Post by ronijohn » Tue Jun 12, 2018 3:31 pm

Hi

I am using Opencart 3.0.20. I have setup a recurring profile ($5 every month), and attached it to a product named Premium Membership. I have set the product price also as $5. I use Paypal express checkout. The problem is that when user purchase a premium membership, user is first charged $5 for the product price, and immediately again charged $5 as recurring payment. Opencart IPN code changes the customer group to premium only after the receipt of the recurring payment $5 (shuld receive txn_type as recurring_payment). If I set one month trial period then I dont receive the IPN notification with txn_type as recurring_payment, so the customer group doesnt change to Premium, so cant use that option. If I set the Product price as zero then Paypal is giving an error that the transaction amount cant be zero.

Ideally customer should only be charged for the recurring payment $5, and the initial product price of $5 should not be charged. How can we do that in opencart.

Below are the comments I received from Paypal support, but not sure how to implement this in Opencart, can you please help.

Your shopping cart is using ExpressCheckout to create a recurring profile.
A normal one-time payment Express Chekout payment will include:
1) SetExpressCheckout API
2) GetExpressCheckoutDetails API (optional)
2) DoExpressCheckout API
When the DoExpressCheckout API call is made, this mean it will be a one-time payment.
Creating a recurring profile using Express Checkout will be:
1) SetExpressCheckout API
2) GetExpressCheckoutDetails API (optional)
3) CreateRecurringPaymentProfile API
To create recurring payment profile, you dont even need to complete the first payment (until DoExpressCheckout API). You can refer here for more information on how Reucrring Profile created using Express Checkout:
https://developer.paypal.com/docs/class ... -curl-etc/
What you/your shopping cart doing is completing the ExpressCheckout cycle and creating the RecurringPayment Profile together.
You/your shopping cart include all of these together in 1 flow:
1) SetExpressCheckout API
2) GetExpressChcekoutDetails API
3) CreateRecurringPaymentProfile API
4) DoExpressCheckout API
So when a full ExpressCheckout flow is made you are actually charging the customer a one-time payment, and together creating a recurring profile. Resulting in your customer being charged twice.


Thanks
RJ

Newbie

Posts

Joined
Sat Feb 03, 2018 3:03 pm

Post by theselec » Fri Apr 17, 2020 1:51 am

Hi - I've got this same issue - did you work out for to fix?

Thanks
Charlie

Newbie

Posts

Joined
Mon Mar 23, 2020 4:33 am

Post by TylerH » Fri Jul 23, 2021 6:39 am

Ditto - Any follow up?

Newbie

Posts

Joined
Fri Jul 23, 2021 6:04 am

Post by thekrotek » Sat Jul 24, 2021 12:34 am

As stated in the original post, there's a bug in PP Express logic. You need to tweak the code to make it work the right way. If you can't do it yourself, send me an email or message in Skype and I will do it for you.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am

Who is online

Users browsing this forum: No registered users and 103 guests