简体   繁体   中英

paypal Java Rest API Getting Shipping Information before paymentexecution

I am using the Paypal Java Rest API.

I build a payment object. I run the payment.create(accessToken). Then send the user off to paypal. The user returns from paypal after entering shipping and payment information. The user comes back to my site.

I then execute Payment p = Payment.get(accessToken, paymentId);

I get the payment but it does not have the shipping information. I can get the shipping information if I: PaymentExecution paymentExecution = new PaymentExecution(payerID); Payment executedPayment = createdPayment.execute(accessToken, paymentExecution);

Then the payment object will have all information about the transaction.

I don't want to execute the payment yet. I just want the shipping information so I can show shipping options. Then after the user accepts the order I can execute the payment (either sale or auth).

I just want the shipping information when the customer returns to my site before taking or authorizing the payment.

Thanks Mark

Unfortunately, at this time, the shipping information is only returned in the Execution response. There are discussions to modify this for future releases.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM