I need to process a test order through Barclays. For that, I need to send some data which is an HTML form like below: I tried storing form in a variable like below: Given URL '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
form fields data When method post Then status 200 I always get the broken response saying 'Unfortunately we are unable to process the request.' This is the form where the user needs to pass the card info and process the order through Barclays. I am passing some values through which are the responses from other API's like merchantSig, value, etc. If someone has any insight, please help.