【问题标题】:papal plus malformed_request JSON with shipping addresspapal plus malformed_request JSON 和送货地址
【发布时间】:2016-11-21 10:06:35
【问题描述】:

为了显示 Paypal plus iFrame (REST API),我使用 JSON 发出请求

{
“意图”:“销售”,
"experience_profile_id": "XP-XXXX-XXXX-XXX-XXX",
“重定向网址”:{
"return_url": "https://www.XXXXXXX.de/bestellen.php",
"cancel_url": "https://www.XXXXXXX.de/zahlungabbruch.php"
},

"payer": {  
    "payment_method": "paypal"  
},  
"transactions": [{  
    "amount": {  
        "total": "53.45",  
        "currency": "EUR",  
        "details": {  
            "subtotal": "49.5",  
            "shipping": "3.95"  
        }  
    },  
    "description": "Tollewolle",  
    "invoice_number": "",  
    "item_list": {  
        "items": [  

            {  
                "quantity": "4",  
                "name": "Fine Kid - 50",  
                "price": "8.25",  
                "currency": "EUR",  
                "sku": "8-50"  
            },  

            {  
                "quantity": "2",  
                "name": "Fine Kid - 208",  
                "price": "8.25",  
                "currency": "EUR",  
                "sku": "8-208"  
            }  

        ]  
    },  
    "shipping_address": {  
        "line1": "Rechnungs Str. 41",  
        "city": "Flensburg",  
        "postal_code": "24939",  
        "country_code": "DE"  
    }  
}]  

}

如果没有 shipping_address,它可以正常工作。 使用地址我得到一个错误'MALFORMED_REQUEST'

【问题讨论】:

    标签: json curl paypal


    【解决方案1】:

    我相信送货地址是子项,因此您需要将其提升一个级别。例如

    “交易”:[{“金额”:{“总计”:“53.45”,“货币”: "EUR","details":{"subtotal": "49.5", "shipping": "3.95"}},"description": "Tollewolle", "invoice_number": "", "item_list": {"items": [{"quantity": "4", "name": "Fine Kid - 50", “价格”:“8.25”,“货币”:“欧元”,“sku”:“8-50”},{“数量”:“2”, “名称”:“Fine Kid - 208”,“价格”:“8.25”,“货币”:“欧元”,“sku”: "8-208"}],"shipping_address": {"line1": "Rechnungs Str. 41","city": "弗伦斯堡", "postal_code": "24939", "country_code": "DE"}}}]

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2019-07-11
      • 2022-10-06
      • 1970-01-01
      • 2013-10-12
      • 2021-12-19
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多