Adaptive Payments Bug

Issue #59 closed
Drew Angell repo owner created an issue

Bug report from Clay Hickman

We actually just create test coupons to test on the live site and haven't messed with sandbox lately. Here are the results of my testing and trying to get the functions to fire on the hook:

With latest version of plugin.. I created a test coupon and purchased the test coupon. I got a paypal ipn response but the function hook was not triggered (paypal_ipn_for_wordpress_adaptive_payment_pay). I reverted the PayPal IPN for Wordpress plugin to v 1.04 per your suggestion I purchased the test coupon again. I got a paypal ipn response and the function hook WAS triggered.

Comments (10)

  1. Drew Angell reporter

    I was able to confirm that the paypal_ipn_for_wordpress_adaptive_payment_pay hook is not getting triggered for some reason in our current code.

  2. Drew Angell reporter

    I'm really not sure why it's not triggering. /includes/class-paypal-ipn-for-wordpress-paypal-helper.php, line 339 - 341 is where this gets triggered. There is some logic there to trigger it or not, but the logic looks like it should have triggered based on the IPN transaction_type value that is coming through on these IPNs.

    The paypal_ipn_for_wordpress_ipn_response_handler is trigger just fine for the "Adaptive Payments PAY" type just fine, but the specific paypal_ipn_for_wordpress_adaptive_payment_pay hook does not.

  3. Drew Angell reporter

    The log does get saved for the Adaptive Payments PAY transaction_type, so that part of the logic is working, but for some reason our logic that actually triggers the hook is not working.

  4. Drew Angell reporter

    Figured it out.

    We are now using the prefix "paypal_ipn_for_wordpress_adaptive_" for our hook, and then the transaction_type has a value of "Adaptive Payment PAY". When those are appended we end up with adaptive in the hook twice, like this: paypal_ipn_for_wordpress_adaptive_adaptive_payment_pay.

    Using that hook it gets fired as expected. Need to update the documentation to reflect this.

  5. Log in to comment