Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with consumerAuthenticationInformation.AccessToken Field in Response #155

Open
ediwnroy opened this issue Aug 8, 2023 · 1 comment

Comments

@ediwnroy
Copy link

ediwnroy commented Aug 8, 2023

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": "[email protected]",
"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
Copy link
Author

ediwnroy commented Aug 8, 2023

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"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant