我正在尝试使用 Bluesnap 构建一个简单的支付流程。目前,我已经能够使用托管字段捕获用户的账单信息,然后将其保存到 bluesnap 中的“购物者”中。现在我尝试使用同一个 Shopper 来创建订单 ( https://developers.bluesnap.com/v8976-Extended/docs/create-order ),但我无法让它工作。
我正在发送这个:
<order>
<ordering-shopper>
<shopper-id>
--Shopper ID--
</shopper-id>
<web-info>
<ip>127.0.0.1:61106</ip>
<remote-host>www.merchant.com</remote-host>
<user-agent>Mozilla/5.0 (Linux; X11)</user-agent>
</web-info>
<fraud-info>
<fraud-session-id>1234567890</fraud-session-id>
</fraud-info>
<authorized-by-shopper>true</authorized-by-shopper>
</ordering-shopper>
<cart>
<cart-item>
<sku>
<sku-id>2425735</sku-id>
</sku>
<quantity>1</quantity>
</cart-item>
</cart>
<expected-total-price>
<amount>15.00</amount>
<currency>USD</currency>
</expected-total-price>
</order>
使用对 BLUESNAPDOMAINPATH/services/2/orders 的 POST 请求
我得到的唯一响应是状态代码 400,正文包含“服务器错误”
有人知道如何解决这个问题吗?
最佳答案
您的根 xml 元素缺少 namespace :
<order>
应该是:
<order xmlns="http://ws.plimus.com">
关于bluesnap - 创建订单状态代码 400 - 服务器错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53176181/