Spreedly sending the wrong content-type to Wyre?
Hi there! I'm creating a test integration to use Spreedly with Wyre and so far things are going well, but I hit a snag in the final part that I can't figure out. I'm successfully getting everything setup to the point where I request that Spreedly send the test transaction to Wyre, which seems to be happening, but Wyre response with a 422 error saying that "Request with contentType application/x-www-form-urlencoded MUST not contains a JSON body". Since Spreedly is the one sending that request to Wyre on my behalf I cannot control the Content-Type header for that post, right? Is there a setting for the receiver that specifies what content-type should be used?
Here is the response I get sending my request to the ".../deliver.json" endpoint. I can provide the info I used to get to this point, but the error seems unrelated to the data itself and points at how the data is sent.
{
"transaction": {
"token": "304wFCPEmg3Q0uyasWVHqkmWMkk",
"transaction_type": "DeliverPaymentMethod",
"state": "failed",
"created_at": "2022-12-23T16:23:45Z",
"updated_at": "2022-12-23T16:23:46Z",
"succeeded": false,
"message": "Delivery/Export to receiver endpoint returned with an error response code. Check the transaction transcript for more detail.",
"sub_merchant_key": null,
"url": "https://api.testwyre.com/v3/debitcard/process/partner",
"deliver_time_ms": 283,
"response": {
"status": 400,
"headers": "Date: Fri, 23 Dec 2022 16:23:46 GMT\r\nContent-Type: application/json; charset=utf-8\r\nTransfer-Encoding: chunked\r\nConnection: keep-alive\r\nrequest-id: 2FNJZH\r\nx-powered-by: A bag full of angry cats\r\nx-human: You just made my day.\r\naccess-control-allow-origin: *\r\naccess-control-allow-methods: GET, POST, DELETE\r\naccess-control-max-age: 86400\r\naccess-control-allow-headers: Authorization, Content-Type, X-Api-Key, X-Api-Signature\r\nx-frame-options: DENY\r\nstrict-transport-security: max-age=15724800; includeSubDomains\r\ncontent-security-policy: frame-ancestors 'none';\r\nCF-Cache-Status: DYNAMIC\r\nReport-To: {\"endpoints\":[{\"url\":\"https:\/\/a.nel.cloudflare.com\/report\/v3?s=lyZBbllbI%2FJVAVvsawy6z6WFlByom%2Fxnh7ztzr1OyNKTSpI%2Bkl81QocgjOoy97SUSmrfYUEx81rgCaHgE%2FWlLf9hlZPspxPy9iuf%2FvwC5yL666fP2EzdWT1V%2B9ia%2BgKpbCo%3D\"}],\"group\":\"cf-nel\",\"max_age\":604800}\r\nNEL: {\"success_fraction\":0,\"report_to\":\"cf-nel\",\"max_age\":604800}\r\nServer: cloudflare\r\nCF-RAY: 77e27190188a8296-IAD",
"body": "{\"language\":\"en\",\"compositeType\":\"\",\"subType\":\"\",\"exceptionId\":\"test_RVG3EY\",\"transient\":false,\"message\":\"Request with contentType application/x-www-form-urlencoded MUST not contains a JSON body :)\",\"type\":\"ValidationException\"}"
},
"receiver": {
"company_name": "SendWyre",
"receiver_type": "send_wyre",
"token": "2vyJD8FEbkKoAlBoDxWHuG2qqmu",
"hostnames": "https://api.sendwyre.com, https://api.testwyre.com, https://api.qawyre.com, https://backend-core.ngrok.io",
"sub_merchant_key": null,
"state": "retained",
"created_at": "2022-12-22T16:32:50Z",
"updated_at": "2022-12-22T16:32:50Z",
"credentials": null,
"ssl_certificate_token": null
},
"payment_method": {
"token": "HkCvAkSZKyF0KfTxQ5DaDAw3lIy",
"created_at": "2022-12-23T16:18:03Z",
"updated_at": "2022-12-23T16:18:03Z",
"email": null,
"data": null,
"storage_state": "cached",
"test": true,
"metadata": null,
"callback_url": null,
"last_four_digits": "1111",
"first_six_digits": "411111",
"card_type": "visa",
"first_name": "Randall",
"last_name": "Lee",
"month": 2,
"year": 2025,
"address1": null,
"address2": null,
"city": null,
"state": null,
"zip": null,
"country": null,
"phone_number": null,
"company": null,
"full_name": "Randall Lee",
"eligible_for_card_updater": true,
"shipping_address1": null,
"shipping_address2": null,
"shipping_city": null,
"shipping_state": null,
"shipping_zip": null,
"shipping_country": null,
"shipping_phone_number": null,
"issuer_identification_number": "41111111",
"click_to_pay": false,
"payment_method_type": "credit_card",
"errors": [],
"fingerprint": "9527b7f84f529f012aa6830579d8cc73a3b3",
"verification_value": "",
"number": "XXXX-XXXX-XXXX-1111"
}
}
}Please sign in to leave a comment.
Comments
0 comments