CyberSource / cybersource-rest-client-python

Python client library for the CyberSource REST API
Other
21 stars 36 forks source link

VCO wrapped_key field missing #55

Open raieru opened 4 years ago

raieru commented 4 years ago

Using Python Client v0.0.21

Exception when calling PaymentsApi->create_payment: (400) Reason: Bad Request HTTP response headers: HTTPHeaderDict({'Content-Type': 'application/json', 'Content-Length': '236', 'x-response-time': '362ms', 'Connection': 'keep-alive', 'Strict-Transport-Security': 'max-age=31536000', 'v-c-correlation-id': '7d73fcaa-59e5-4aa3-9c1e-b8832002a41a'}) HTTP response body: {"submitTimeUtc":"2020-11-05T12:53:05Z","status":"INVALID_REQUEST","reason":"MISSING_FIELD","message":"Declined - The request is missing one or more fields","details":[{"field":"encrypted_payment_wrapped_key","reason":"MISSING_FIELD"}]}

michaeltee commented 4 years ago

This error can be due to a configuration issue on the Cybersource backend, or because of a payload data mismatch. Can you provide the request data being sent?

raieru commented 4 years ago

Hi Michael,

I look into the model ptsv2payments_payment_information_fluid_data and I found that this class is auto generated by the swagger without the field 'key'. The issue is that no exist the field 'key' described in CreatingAuthReqVisaCheckout.

REQUEST JSON: { "_client_reference_information": { "_code": "BMD" }, "_processing_information": { "_capture": true, "_payment_solution": "visacheckout", "_visa_checkout_id": "4608431371076217402" }, "_payment_information": { "_fluid_data": { "_key_serial_number": ".......U2qtA", "_value": ".......NIg==" } }, "_order_information": { "_amount_details": { "_total_amount": "102.21", "_currency": "MXN" } } }

Also it is important that our REST API map correctly the field 'key' with the field 'wrappedKey' described in our SOAP/SOAPI schema v1.171:

**__** Please feel free to ping me internally to discus this. Best Regards Raieru