0
votes

I am attempting to set up a Paypal Recurring Profile, but I keep getting the error code 10525: "This transaction cannot be processed. The amount to be charged is zero." I only want to start the recurring billing, rather than charge them a one time payment amount and then the recurring billing on top of that. ($13 every month or $135 annually are the choices).

From the paypal knowledge (https://www.paypal-knowledge.com/infocenter/index?page=content&id=FAQ1441&actp=LIST) I found: "Use BillingType=RecurringPayments/MerchantInitiatedBilling instead for creating a Recurring Profile/Billing Agreement ID with no dollar amount."

However, I have already done so.

Also, in the paypal api(https://developer.paypal.com/docs/classic/api/merchant/SetExpressCheckout_API_Operation_NVP/) I found: "Set this field to 0 if the transaction does not include a one-time purchase such as when you set up a billing agreement for a recurring payment that is not immediately charged. When the field is set to 0, purchase-specific fields are ignored."

But it is set to "0", so I'm not sure what to do there.

Here is my debug list:

2017-11-08 19:39:28 - PayPal Express debug (Call data): {
"METHOD":"SetExpressCheckout",
"MAXAMT":0,
"RETURNURL":"***",
"CANCELURL":"***",
"REQCONFIRMSHIPPING":0,
"NOSHIPPING":1,
"LOCALECODE":"EN",
"LANDINGPAGE":"Login",
"HDRIMG":"***",
"PAYFLOWCOLOR":"FFFFFF",
"CHANNELTYPE":"Merchant",
"ALLOWNOTE":"1",
"PAYMENTREQUEST_0_SHIPPINGAMT":"",
"PAYMENTREQUEST_0_CURRENCYCODE":"USD",
"PAYMENTREQUEST_0_PAYMENTACTION":"Sale",
"L_PAYMENTREQUEST_0_DESC0":"Journal Inside Pages:Unlined, Journal Theme:Mom",
"L_PAYMENTREQUEST_0_NAME0":"The Gratitude Project",
"L_PAYMENTREQUEST_0_NUMBER0":"JNL103",
"L_PAYMENTREQUEST_0_AMT0":0,
"L_PAYMENTREQUEST_0_QTY0":"1",
"L_PAYMENTREQUEST_0_ITEMURL0":"***",
"L_PAYMENTREQUEST_0_ITEMLENGTHVALUE0":"8.00000000",
"L_PAYMENTREQUEST_0_ITEMLENGTHUNIT0":"in",
"L_PAYMENTREQUEST_0_ITEMWIDTHVALUE0":"10.00000000",
"L_PAYMENTREQUEST_0_ITEMWIDTHUNIT0":"in",
"L_PAYMENTREQUEST_0_ITEMHEIGHTVALUE0":"0.00000000",
"L_PAYMENTREQUEST_0_ITEMHEIGHTUNIT0":"in",
"PAYMENTREQUEST_0_ITEMAMT":"0.00",
"PAYMENTREQUEST_0_AMT":0,
"L_BILLINGTYPE0":"RecurringPayments",
"L_BILLINGAGREEMENTDESCRIPTION0":"1 USD every 1 day"}

2017-11-08 19:39:29 - PayPal Express debug (Result): 
"TOKEN=EC%2d67C48949S6014741D&TIMESTAMP=2017%2d11%2d08T19%3a39%3a29Z&CORRELATIONID=a278368193eb9&ACK=Success&VERSION=109%2e0&BUILD=40710629"

2017-11-08 19:39:47 - PayPal Express debug (Call data): 
{"METHOD":"GetExpressCheckoutDetails",
"TOKEN":"EC-67C48949S6014741D"}

2017-11-08 19:39:48 - PayPal Express debug (Result):    "TOKEN=***"

2017-11-08 19:39:48 - PayPal Express debug (Call data): 
{"TOKEN":"EC-67C48949S6014741D",
"PAYERID":"8CKXXNF3MR26N",
"METHOD":"DoExpressCheckoutPayment",
"PAYMENTREQUEST_0_NOTIFYURL":"***",
"RETURNFMFDETAILS":1,
"PAYMENTREQUEST_0_SHIPPINGAMT":"",
"PAYMENTREQUEST_0_CURRENCYCODE":"USD",
"PAYMENTREQUEST_0_PAYMENTACTION":"Sale",
"L_PAYMENTREQUEST_0_DESC0":"Journal Inside Pages:Unlined, Journal Theme:Mom",
"L_PAYMENTREQUEST_0_NAME0":"The Gratitude Project",
"L_PAYMENTREQUEST_0_NUMBER0":"JNL103",
"L_PAYMENTREQUEST_0_AMT0":0,
"L_PAYMENTREQUEST_0_QTY0":"1",
"L_PAYMENTREQUEST_0_ITEMURL0":"***",
"L_PAYMENTREQUEST_0_ITEMLENGTHVALUE0":"8.00000000",
"L_PAYMENTREQUEST_0_ITEMLENGTHUNIT0":"in",
"L_PAYMENTREQUEST_0_ITEMWIDTHVALUE0":"10.00000000",
"L_PAYMENTREQUEST_0_ITEMWIDTHUNIT0":"in",
"L_PAYMENTREQUEST_0_ITEMHEIGHTVALUE0":"0.00000000",
"L_PAYMENTREQUEST_0_ITEMHEIGHTUNIT0":"in",
"PAYMENTREQUEST_0_ITEMAMT":"0.00",
"PAYMENTREQUEST_0_AMT":0,
"L_BILLINGTYPE0":"RecurringPayments",
"L_BILLINGAGREEMENTDESCRIPTION0":"1 USD every 1 day"}

If I do, however, set the PAYMENTREQUEST_0_AMT to "13.00", for instance, the call goes in correctly. However the customer would double pay for their first month (total of $26). I could set a trial period for "0", but that would only fix the monthly subscription, not the annual subscription.

I am using Paypal Express (Sandbox) with Opencart 2.3.0.2 This problem is known via Opencart, but no one has fixed it. So I was attempting to fix it myself. I have not used Paypal API before so I'm not sure where to look.

1

1 Answers

0
votes

"Set this field to 0 if the transaction does not include a one-time purchase...." in the link https://developer.paypal.com/docs/classic/api/merchant/SetExpressCheckout_API_Operation_NVP/ means that "n" in the parameter "PAYMENTREQUEST_n_AMT" is set to "0" instead of you set total amount into "0". So, "MAXAMT" and "L_PAYMENTREQUEST_0_AMT0" cannot be "0 but should be more than 0 to match your total amount. You are request to firstly call SetExpressCheckout API (BillingType=RecurringPayments), and got response with EC token and use it in CreateRecurringPaymentsProfile API https://developer.paypal.com/docs/classic/api/merchant/CreateRecurringPaymentsProfile_API_Operation_NVP/