Pergunta

After looking through Paypal docs for a solution for this circumstance, I came up blank. What I want is a way to have a shopping cart with a subscription (recurring payment) and an item purchase. Is there a method that would resolve this or would I have to do something custom ( and how would I go about that if I'm using Paypal standard buttons for cart / checkout ).

Thanks in advance.

Foi útil?

Solução

Yes, you can do this with Express Checkout Recurring Payments.
You would simply need to ensure you include an AMT in your SetExpressCheckout and DoExpressCheckoutPayment API calls.

A general Express Checkout checkout flow is based on three API calls; SetExpressCheckout, GetExpressCheckoutDetails and DoExpressCheckoutPayment.

  1. SetExpressCheckout sets up the payment and returns a token
  2. You redirect the buyer to https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=TOKEN-HERE, where TOKEN-HERE is the token you received earlier
  3. After the buyer has agreed to the payment, he is returned back to your site.
  4. You can call GetExpressCheckoutDetails and supply the token as a parameter to get the PAYERID of the buyer.
  5. Call DoExpressCheckoutPayment with the token and PAYERID supplied to finalize the payment

If you wish to use Recurring Payments, you would use the following flow:
1. Call SetExpressCheckout and set BILLINGTYPE to 'RecurringPayments' and set 'AMT' to 0 OR to any amount you wish to charge the buyer immediately. .
2. Retrieve the token from the API response for SetExpressCheckout
3. Call DoExpressCheckoutPayment and set the 'AMT' to the amount you'd like to charge immediately. 4. Call CreateRecurringPaymentsProfile and supply the token, specify all other required parameters (billingfrequency, among others).
(Optional) 5. Use UpdateRecurringPaymentsProfile if you wish to update your recurring payments profile..

You can find additional documentation for Express Checkout at https://www.x.com/community/ppx/documentation#ec as well as our SDK's at https://www.x.com/community/ppx/sdks#NVP

You can find an overview with links to the relevant API documentation for SetExpressCheckout, DoExpressCheckoutPayment, CreateRecurringPaymentsProfile and UpdateRecurringPaymentsProfile at https://www.x.com/docs/DOC-1372

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top