tags:

views:

450

answers:

1

In this picture,there are 3 main steps:SetExpressCheckout,GetExpressCheckoutDetails and DoExpressCheckoutDetails,I'm now sure SetExpressCheckout is to be called by myself,what about GetExpressCheckoutDetails and DoExpressCheckoutDetails,is it called by paypal or by myself?

The api is provided to be called by non-paypal I think,but the problem is seems it's redirected to paypal after calling SetExpressCheckout. alt text

+1  A: 

Yes, you are expected to be the one calling these APIs. After you call SetExpressCheckout, you'll get a token back that represents the checkout you're performing. You'll need to use that token and redirect the user to Paypal to approve the payment. After they approve it, Paypal will redirect back to your site and then you can call GetExpressCheckoutDetails and/or DoExpressCheckoutPayment. The GetExpressCheckoutDetails call is useful for getting things like shipping address, etc, since the buyer can set that stuff as part of the approval flow. Once you have all the info you need, the buyer has approved the payment and you're ready to get paid, then call DoExpressCheckoutPayment to get your money.

See the ExpressCheckout docs for an example of a simple integration.

saleemshafi
Is there a code demo?
Paypal
There's some sample code in the documentation and with the SDKs. There's also a wizard to help you get started: https://www.paypal-labs.com/integrationwizard/ecpaypal/code.php
saleemshafi