bigcommerce / checkout-sdk-js

BigCommerce Checkout JavaScript SDK
MIT License
133 stars 218 forks source link

Payment Unexpected Error #512

Closed ONeill45 closed 5 years ago

ONeill45 commented 5 years ago

I am building a custom checkout using the Checkout SDK React example as a basis. I am now noticing an issue with submitting payments via the Cybersource credit card payment method. Upon submission I am receiving "An unexpected error occurred." Using Google dev tools, I can see the error returned by https://payments.bigcommerce.com/api/public/v1/orders/payments is:

image

I cannot figure out why this is happening, the card being used is valid. The payment data upon submission appears as such:

image

The payment configuration for Cybersource comes through as:

image

Anyone have any thoughts?

davidchin commented 5 years ago

Hi @ONeill45, sorry for the late reply. I believe ccExpiry.year field needs to be 4 digits. For example, in your case, the year should be 2020 instead of 20. I hope it helps :)

davidchin commented 5 years ago

I assume the above has addressed your issue. So I'm going to close this ticket. Feel free to re-open it if it hasn't and I'm happy to look at it again. 😄

ONeill45 commented 5 years ago

Hey @davidchin thanks for the response! We ended up going with the default Big Commerce provided checkout due to time constrains but I'll circle back and confirm if this solution works.