You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: I have opened a ticket on this issue as well, but thought I would also open an issue.
I would issue a PR, but it looks like the Give-Recurring-Donations add-on is a private repo
Issue Overview
Using the Recurring Donations Add-On
Gateway: PayPal Website Payments Pro (NVP API)
Submitting the form to create a new recurring donation always returns "Error: Internal Error"
Failed Payment logs show that Error 10001 is being returned from PayPal
Expected Behavior
Given the recurring donation form is submitted with valid information, a new "Recurring Profile" should be created in PayPal and the user should be redirected to the "Donation Confirmation" page
Current Behavior
In a dev environment, I modifiedgive-recurring/includes/gateways/give-recurring-paypalpro.php and set the api_endpoint to a proxy that would forward the request onto my local box so I could inspect the request body.
The following was found in the request body: STATE=US&COUNTRYCODE=TX
Since the request also includes an INITAMT, paypal will try to charge the credit card immediately, but because the request body had the state and country mixed up, the payment failed.
As the request also includes FAILEDINITAMTACTION=CancelOnFailure, the recurring payment profiles is NOT created.
Possible Solution
FILE: give-recurring/includes/gateways/give-recurring-paypalpro.php
FUNCTION: public function create_payment_profiles()
LINES: 133 - 134
Thanks for the issue @wesdunn - It looks like switching the array ordering fixes it? I'm going to move the issue to the recurring repo and look into it.
@DevinWalker I should have added, yes, the fix I proposed is being used in a production environment now and is successfully creating recurring profiles in PayPal.
The issue is not the order of the array, but that COUNTRYCODE is using purchase_data['card_info']['card_state'] and STATE is using purchase_data['card_info']['card_country']. So, just switching the array keys, but leaving the values in place fixes it.
Note: I have opened a ticket on this issue as well, but thought I would also open an issue.
I would issue a PR, but it looks like the Give-Recurring-Donations add-on is a private repo
Issue Overview
Expected Behavior
Current Behavior
give-recurring/includes/gateways/give-recurring-paypalpro.php
and set the api_endpoint to a proxy that would forward the request onto my local box so I could inspect the request body.STATE=US&COUNTRYCODE=TX
INITAMT
, paypal will try to charge the credit card immediately, but because the request body had the state and country mixed up, the payment failed.FAILEDINITAMTACTION=CancelOnFailure
, the recurring payment profiles is NOT created.Possible Solution
FILE:
give-recurring/includes/gateways/give-recurring-paypalpro.php
FUNCTION:
public function create_payment_profiles()
LINES: 133 - 134
Current Code:
Should be changed to:
Steps to Reproduce (for bugs)
Related Issues and/or PRs
N/A
Todos
The text was updated successfully, but these errors were encountered: