PP REST API收取税款并在没有发送地址的情况下发货? [英] PP REST API charge tax and shipping without sending address?

查看:74
本文介绍了PP REST API收取税款并在没有发送地址的情况下发货?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用REST API,如果我将用户发送到PayPal 以收集运输信息(当然要付款),我该如何收取税款或运输费?

Using the REST API, how can I charge tax or shipping if I send the user to PayPal to collect shipping information (and pay, of course)?

进行一些研究似乎几乎是不可能的,但是我无法想象是这样.如果我必须自己收集运输信息,则使用PP的价值将大大降低.

Doing some research it almost seems like that isn't possible, but I can't imagine that being the case. If I have to collect shipping information myself, the value prop for using PP is greatly reduced.

推荐答案

使用REST API,就像Classic API一样,贝宝(PayPal)付款分三步执行:

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

1)将初始信息发送到PayPal以获取令牌.将客户重定向到PayPal.客户授权付款. 2)获取付款明细(例如送货地址) 3)确认付款.

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.

因此,在这种情况下,在获得送货地址后,您将向客户显示订单复查页面,该页面将为客户生成送货选项和税额.然后,他们必须选择确认订单"按钮,然后使用新的税金/运费和最终金额最终确定向PayPal收取的费用.

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.

按照API的说法,最后一步是通过

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.

这篇关于PP REST API收取税款并在没有发送地址的情况下发货?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆