首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >忽略Paypal智能按钮tax get

忽略Paypal智能按钮tax get
EN

Stack Overflow用户
提问于 2020-08-13 20:53:08
回答 1查看 201关注 0票数 0

我正在我们的商店中实现PayPal智能按钮开发工具包。javascript发送到https://www.sandbox.paypal.com/v2/checkout/orders的有效负载如下所示:

代码语言:javascript
复制
{
   "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.valueamount.totalbreakdown数组中的相同。

如果有人能帮我解释为什么我的税被忽略了,我将不胜感激。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2020-08-13 22:06:19

您没有在purchase_units数组及其项数组中传递有效的tax对象。

请看这里的示例:https://developer.paypal.com/docs/checkout/reference/server-integration/set-up-transaction/

请看这里的接口参考:https://developer.paypal.com/docs/api/orders/v2/#orders_create

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/63395622

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档