贝宝智能按钮税被忽略
Paypal Smart Buttons tax get's ignored
我正在我们的商店中实施 PayPal Smart Buttons SDK。
javascript 发送到 https://www.sandbox.paypal.com/v2/checkout/orders 的有效载荷看起来像:
{
"reference_id":"XYZ",
"description":"Fonts bought from hobo typefaces",
"custom_id":"XYZ",
"soft_descriptor":"Soft",
"redirect_urls":{
"return_url":"https://dev.hobo-typefaces.com/checkout",
"cancel_url":"https://dev.hobo-typefaces.com/cancel"
},
"amount":{
"currency_code":"EUR",
"total":"378.00",
"shipping":0,
"value":"360.00",
"tax":"18.00",
"breakdown":{
"item_total":{
"currency_code":"EUR",
"subtotal":"360.00",
"value":"360.00",
"total":"378.00",
"shipping":0,
"tax":"18.00"
}
}
},
"items":[
{
"name":"Rosart Regular",
"sku":"Rosart Regular",
"unit_amount":{
"currency_code":"EUR",
"value":"60.00"
},
"quantity":"1"
},
{
"name":"Rosart RegularItalic",
"sku":"Rosart RegularItalic",
"unit_amount":{
"currency_code":"EUR",
"value":"60.00"
},
"quantity":"1"
},
{
"name":"Rosart MediumItalic",
"sku":"Rosart MediumItalic",
"unit_amount":{
"currency_code":"EUR",
"value":"60.00"
},
"quantity":"1"
},
{
"name":"Rosart Medium",
"sku":"Rosart Medium",
"unit_amount":{
"currency_code":"EUR",
"value":"60.00"
},
"quantity":"1"
},
{
"name":"Rosart Semibold",
"sku":"Rosart Semibold",
"unit_amount":{
"currency_code":"EUR",
"value":"60.00"
},
"quantity":"1"
},
{
"name":"Rosart SemiboldItalic",
"sku":"Rosart SemiboldItalic",
"unit_amount":{
"currency_code":"EUR",
"value":"60.00"
},
"quantity":"1"
}
]
}
虽然结帐流程有效,但税收被忽略,贝宝计算出 360 欧元。不幸的是,我无法用 paypal 文档解决这个问题。我不确定的地方是 amount.value
、amount.total
和 breakdown
数组中的相同内容。
如果有人能帮助解释为什么我的税被忽略,我将不胜感激。
您没有在 purchase_units 数组及其项目数组中传递有效的税收对象。
[编辑:页面不再存在]示例见此处:https://developer.paypal.com/docs/checkout/reference/server-integration/set-up-transaction/
请在此处查看 API 参考资料:https://developer.paypal.com/docs/api/orders/v2/#orders_create
我正在我们的商店中实施 PayPal Smart Buttons SDK。 javascript 发送到 https://www.sandbox.paypal.com/v2/checkout/orders 的有效载荷看起来像:
{
"reference_id":"XYZ",
"description":"Fonts bought from hobo typefaces",
"custom_id":"XYZ",
"soft_descriptor":"Soft",
"redirect_urls":{
"return_url":"https://dev.hobo-typefaces.com/checkout",
"cancel_url":"https://dev.hobo-typefaces.com/cancel"
},
"amount":{
"currency_code":"EUR",
"total":"378.00",
"shipping":0,
"value":"360.00",
"tax":"18.00",
"breakdown":{
"item_total":{
"currency_code":"EUR",
"subtotal":"360.00",
"value":"360.00",
"total":"378.00",
"shipping":0,
"tax":"18.00"
}
}
},
"items":[
{
"name":"Rosart Regular",
"sku":"Rosart Regular",
"unit_amount":{
"currency_code":"EUR",
"value":"60.00"
},
"quantity":"1"
},
{
"name":"Rosart RegularItalic",
"sku":"Rosart RegularItalic",
"unit_amount":{
"currency_code":"EUR",
"value":"60.00"
},
"quantity":"1"
},
{
"name":"Rosart MediumItalic",
"sku":"Rosart MediumItalic",
"unit_amount":{
"currency_code":"EUR",
"value":"60.00"
},
"quantity":"1"
},
{
"name":"Rosart Medium",
"sku":"Rosart Medium",
"unit_amount":{
"currency_code":"EUR",
"value":"60.00"
},
"quantity":"1"
},
{
"name":"Rosart Semibold",
"sku":"Rosart Semibold",
"unit_amount":{
"currency_code":"EUR",
"value":"60.00"
},
"quantity":"1"
},
{
"name":"Rosart SemiboldItalic",
"sku":"Rosart SemiboldItalic",
"unit_amount":{
"currency_code":"EUR",
"value":"60.00"
},
"quantity":"1"
}
]
}
虽然结帐流程有效,但税收被忽略,贝宝计算出 360 欧元。不幸的是,我无法用 paypal 文档解决这个问题。我不确定的地方是 amount.value
、amount.total
和 breakdown
数组中的相同内容。
如果有人能帮助解释为什么我的税被忽略,我将不胜感激。
您没有在 purchase_units 数组及其项目数组中传递有效的税收对象。
[编辑:页面不再存在]示例见此处:https://developer.paypal.com/docs/checkout/reference/server-integration/set-up-transaction/
请在此处查看 API 参考资料:https://developer.paypal.com/docs/api/orders/v2/#orders_create