CyberSource / cybersource-rest-client-dotnet

.NET client library for the CyberSource REST API
Other
19 stars 44 forks source link

Issue with consumerAuthenticationInformation.AccessToken Field in Response #155

Open ediwnroy opened 1 year ago

ediwnroy commented 1 year ago

I am currently integrating the CyberSource API for payment processing using the provided SDK. I have encountered an issue with the PtsV2PaymentsPost201ResponseConsumerAuthenticationInformation.AccessToken property in the response I receive after invoke PaymentsApi.CreatePaymentAsync.

As per the CyberSource documentation, the field should be token instead of accessToken. However, in the current response, the consumerAuthenticationInformation.AccessToken field is being serialized as "accessToken," causing the field to arrive as null in the response.

Current Behavior: The consumerAuthenticationInformation.AccessToken field in the response is being serialized as "accessToken," leading to the field arriving as null.

Additional Information: Reference Documentation: https://developer.cybersource.com/api-reference-assets/index.html#payments_payments_process-a-payment_samplerequests-dropdown_authorization-with-payer-authentication_authorization-with-pa-enroll-authentication-needed_liveconsole-tab-request-body

Sample Request: Authorization with PA Enroll (Authentication Needed)

Body request: { "clientReferenceInformation": { "partner": { "developerId": "CEOVXJBB" } }, "processingInformation": { "actionList": [ "CONSUMER_AUTHENTICATION" ], "capture": true }, "paymentInformation": { "card": { "number": "4456530000001096", "expirationMonth": "12", "expirationYear": "2025", "type": "001", "securityCode": "1234" } }, "orderInformation": { "amountDetails": { "totalAmount": "55.00", "currency": "usd" }, "billTo": { "firstName": "Juan", "lastName": "Pedro", "address1": "Address Line 1", "address2": "", "locality": "Nicaragua", "administrativeArea": "", "postalCode": "", "country": "NI", "email": "mi.correo@dominio.com", "phoneNumber": "12345678" } }, "consumerAuthenticationInformation": { "referenceId": "e61eebf9-0432-4677-beee-6777fa79a49b" } }

Body response: { ..... "token": "xxxxxxxxxxxxxxxxxxxx", ....... }, "errorInformation": { "reason": "CONSUMER_AUTHENTICATION_REQUIRED", "message": "The cardholder is enrolled in Payer Authentication. Please authenticate the cardholder before continuing with the transaction." },... }

ediwnroy commented 1 year ago

I apologize for any confusion caused by my previous issue submission. After posting the issue, I realized that I inadvertently omitted a key detail in the original request body. The missing field was the returnUrl within the consumerAuthenticationInformation object.

"consumerAuthenticationInformation": { "referenceId": "e61eebf9-0432-4677-beee-6777fa79a49b", "returnUrl": "https://your-return-url.com" }