0
votes

I'm currently working on a shopping cart where I want to add paypal payments with subscription feature for credit card customers where the shopping cart have both one time payment products as well as monthly subscription services. I was able to do the subscription separately and one time payment (express checkout) separately. However when both type of items are added on the shopping cart often by the customers.

I want to know how I can integrate paypal for the following scenario.

In the shopping cart there are two items available. One item is a one time payment ( a product) and the other item is the website subscription (monthly recurring payment). I want to know how I can integrate the paypal to do both these different transactions in single checkout process where the subscription and the one time payment works in a single flow.

I have given a sample shopping cart below.

shopping cart

  • item 1 - 20$

  • item 2 - 5$

  • service 1 - 10$ every month

For the above example, i want to know how can i make the one time payments with the each month subscription in single checkout.

1

1 Answers

0
votes

You can have loop of cart items and their type of payments (single, recurring) and based on their payment type call respective paypal class and process payment and take their response on one page and show result to user at end of process..Hope this logic will help you