【发布时间】:2014-08-08 17:47:50
【问题描述】:
我已经成功设置了我正在开发的网站,以使用 paypal c# rest api sdk (https://github.com/paypal/rest-api-sdk-dotnet) 处理付款。
我正在苦苦挣扎的一点(除了令人难以置信的糟糕的文档......)是如何让我的订单摘要显示我的购物篮项目,包括税款,以及如果贝宝在航运将/赢得的基础上工作'不包括税?
总额为 150.99 英镑的样品订单包含:
单件产品售价 145 英镑,含税 24.17 英镑 运费 5.99 英镑,含税 1.00 英镑
这是我要发送到贝宝的:
{
"intent": "sale",
"payer": {
"payment_method": "paypal"
},
"transactions": [
{
"amount": {
"currency": "GBP",
"total": "150.99",
"details": {
"shipping": "5.99",
"subtotal": "120.83",
"tax": "24.17"
}
},
"description": "My Site",
"item_list": {
"items": [
{
"quantity": "1",
"name": "My Item",
"price": "120.83",
"currency": "GBP",
"sku": "123"
}
],
"shipping_address": {
"recipient_name": "My Name",
"line1": "My address",
"line2": "",
"city": "London",
"country_code": "GB",
"postal_code": "XX XXX",
"phone": "00 0000 0000"
}
}
}
],
"redirect_urls": {
"return_url": "http://return",
"cancel_url": "http://cancel"
}
}
这适用于贝宝,我可以处理付款,但项目在订单摘要中显示如下:
My Item £120.83
Item number: 123
Item price: £120.83
Quantity: 1
Item total £120.83
VAT: £24.17
Postage and packaging: £5.99
Total £150.99 GBP
没关系,但我宁愿显示包括增值税在内的价格 - 这可能吗?我在设置订单项时尝试使用 price inc tax,但出现以下错误:
Item amount must add up to specified amount subtotal (or total if amount details not specified
感觉我已经很接近了……有什么想法吗?
【问题讨论】:
-
不可能,paypal不需要增值税。
标签: c# rest paypal paypal-rest-sdk