I am working on custom stripe integration(gateway).If i do payment using credit/debit card i am getting successfull json response with token id from this url https://api.stripe.com/v1/tokens. but for invalid cvc i am not getting any error response.i checked in network from this url https://api.stripe.com/v1/tokens i am getting error response. but in program i dont know where to get this response. pls help me i am stuck here.
here is my code
var handler = StripeCheckout.configure({
key: 'pk_test_mXJ6f6GEBqPLjz3GfgDjZ8ig',
image: 'https://stripe.com/img/documentation/checkout/marketplace.png',
locale: 'auto',
token: function(token) {
// You can access the token ID with `token.id`.
// Get the token ID to your server-side code for use.
}
});
document.getElementById('customButton').addEventListener('click', function(e) {
// Open Checkout with further options:
handler.open({
name: 'Demo Site',
description: '2 widgets',
amount: 2000
});
e.preventDefault();
});
// Close Checkout on page navigation:
window.addEventListener('popstate', function() {
handler.close();
});