PP REST API charge tax and shipping without sending address?

落花浮王杯 提交于 2019-12-05 18:19:49

With the REST API, just like the Classic API, a PayPal payment is executed in three steps:

1) Send initial information to PayPal to get a token. Redirect customer to PayPal. Customer authorizes payment. 2) Get payment details (like the shipping address) 3) Confirm payment.

So, in this case, after getting the shipping address, you display an order review page to the customer where it will generate the shipping options and tax amount to the customer. They then have to select a "Confirm Order" button which will then finalize the charge to PayPal with the new tax/shipping and final amount.

In API terms, the final step is done with the /execute command. This accepts the payer_id you received in step 2, and a transactions array that supports a new amount object.

The amount object includes a details object that includes shipping, tax, handling fee, insurance, etc.

Include the details the customer decides on your review page and PayPal will charge the updated amount to the customer's funding source of choice.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!