CyberSource / cybersource-rest-samples-node

NodeJS sample code for the CyberSource REST API
MIT License
37 stars 61 forks source link

Payment with flex token example gives INVALID_DATA error #66

Open 8enSmith opened 1 year ago

8enSmith commented 1 year ago

When I run the flex token payment example i.e.

node Samples/Payments/Payments/payment-with-flex-token.js

I get the following error in the response:

\"Declined - One or more fields in the request contains invalid data\",\"details\":[{\"field\":\"tokenInformation.jti\",\"reason\":\"INVALID_DATA\"

As these examples are supposed to be self-contained I expected this to work. Does anyone know what the issue is? I did try adding the jti value which you can obtain from the decoded JWT token but this didn't fix the issue.

Also note that the exact same problem applies to the payment-with-flex-token-create-permanent-tms-token.js example.

rejith7 commented 1 year ago

@8enSmith any leads on this? I too got this issue

8enSmith commented 1 year ago

@rejith7 the team Im in decided not to use any of the Node based cybersource repositories on GitHub due poor development experience e.g. poorly documented, unit tests which dont actually work, out of date javascript, no TypeScript support etc. Instead we decided to interact with CyberSource just via HTTP REST requests and TBH the documentation for the REST interface ins't great either!

If we had the option we would move to another provider! e.g. Stripe.

Shameel123 commented 2 months ago

Facing the same issue here.

Shameel123 commented 2 months ago

@8enSmith can you share the draft for sample REST API request here? The ones in the docs isn't working either.