通过空手道发布巴克莱表格时获得中断的响应



我需要通过巴克莱银行处理测试订单。为此,我需要发送一些数据,这些数据是如下所示的HTML表单: 我尝试将表单存储在如下所示的变量中: 给定网址"https://test.barclaycardsmartpay.com/hpp/pay.shtml">

def data = { billingAddress.city: "##",billingAddress.country: "#", billingAddress.HouseNumberOrName: "##",billingAddress.postalCode: "##",billingAddress.stateOrProvince: "##",billingAddress.street: "N/A",billingAddressType: "#",countryCode: "UK",currencyCode: "GBP",deliveryAddress.city: "##",deliveryAddress.country: "GB",deliveryAddress.houseNumberOrName: "##",deliveryAddress.postalCode: "##",deliveryAddress.stateOrProvince: "##",deliveryAddress.street: 'N/A',deliveryAddressType:"",merchantAccount: "##",merchantReference:"#(order)",voucherHashKey:0,merchantReturnData: "",paymentAmount: "#(totalCost)",resURL: "https://#.#.##.##.#/buy/process",SessionValidity:"#(val)",shipBeforeDate: "#(shipDate)",shopperLocale: "en_GB",skinCode:"##",merchantSig:"#(sig)"} // tried without quote

表单域数据 当方法发布时 然后状态 200 我总是收到破碎的回复,说'很遗憾,我们无法处理请求。这是用户需要传递卡信息并通过巴克莱处理订单的表单。我正在传递一些值,通过这些值来自其他 API 的响应,如商家签名、值等。 如果有人有任何见解,请帮助。

我不知道"巴克莱",但你的 JSON 看起来很糟糕。我不打算阅读所有内容,而只是在下面提出一个建议:

* def data = { billingAddress: { city: "##", country: "##" } }

查看与您发布的内容的差异并尝试修复它。我真诚的建议是,请与同一组织中可以帮助您的人(或有时间的朋友(配对,因为从您之前的问题来看,我认为您需要对 JSON 本身和一些基本原理更加熟悉。

最新更新