Paypal API and WordPress

Try working through the source code of a plugin such as PayPal Framework. From your question, the WP side is fairly trivial, but you should study general PayPal tutorials to understand the API, for example, here’s the first search result from Google for PayPal API tutorial: Using PayPal’s IPN with PHP Also some additional helpful … Read more

Update the value of a constant

You can’t alter a constant once it is defined. That is how PHP works. Don’t fight it. The good news is that you should not be using a constant at all. Use options. // get your value // the second parameter is the default $enable_paypal = get_option(‘enable_paypal’,true); // set your value based on, I assume, … Read more

Paypal Post IPN handeling nightmare

I ended up using kind of a hack. I made a hidden field that was populated with the user ID. I then used this to update metas and what not on a successful IPN and or successful payment. Ie: add_filter(“gform_paypal_post_ipn”, “update_order_status”, 10, 4); function update_order_status($ipn_post, $entry, $config, $cancel){ // if the IPN was canceled, don’t … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)