swell-js
swell-js copied to clipboard
Support Braintree CVV (CVC)
We really want to use Swell for multiple sites, but we still can't do so because your Braintree checkout on your checkout page is broken because it does not send the CVV (you call it CVC) to Braintree. Who do we contact to have you fix your Braintree Bug on your checkout URL (swell.store/checkout/)?
Braintree only works if Braintree is not set up to verify the CVV (a setting in the actual Braintree admin). However, if you set CVV verification in Braintree admin (a requirement nowadays), your Braintree Payment fails on checkout, with the error code (CVV not sent). This is clearly just some small problem in your code, where you are not sending the CVV correctly to Braintree.
To RECREATE
To recreate this on your end, simply set up a Braintree account. Go into the Sandbox and click on the Settings Gear Icon -> Fraud Settings - > CVV Section and check off "CVV does not match" "CVV Not Provided" (see attached screenshot). Then after these settings are done, try to checkout with Swell. It will not work, as Swell does not send the CVV correctly. You will get an error message as follows on the Swell checkout page: Billing method: Payment authorization failed (cvv is required.)
Proposed Solution
In looking at your code, you are obviously using the Braintree SDK. In which case, there are 2 things that might be wrong:
- You are not actually sending the CVV to the SDK when you submit your form. or
- You are sending the wrong id. In fact, I think this is the problem. You have named the field "CVC" in your code, but Braintree requires a field called CVV ( see: https://github.com/braintree/braintree-web) So to solve this just correclty send the CVV to Braintree. Probably needs to add one line to your code send CVV and not CVC.
Hey @osseonews , thanks for your patience with the delayed response here. I've passed this along to our platform engineering team to take a look.