#dhaari

1 messages · Page 1 of 1 (latest)

floral vergeBOT
heady bough
#

👋 happy to help

#

Hi, We use charges API.
We would like to know the test case for the error thrown by stripe JS during token generation?

stripe.createToken(card).then(function (result) {
if (result.error) {

            var displayError = document.getElementById('card-errors');
            displayError.textContent = result.error.message;
#

would you mind removing your message from the main channel?

jade sinew
#

no problem

#

Would like to know when result.error would be true.. Test scenario and case

heady bough
#

if you enter wrong card details

jade sinew
#

that will be throw during keyup itseld.. on the fly

#

after entering all card details, we send that to stripe for token generation. At that time we get this

#

we had a live issue as well for this kind

#

After entering valid card details, customer clicked o submit button. The token was not generated as the card was denied..

#

would like to replicate this in test environment

#

I mean after entering valid card details, the customer clicks to get the token later which will be submitted to our server for further processing. So before token generation, after submitting the card data, if error is throw, it has to be displayed.. That's what above stripe code says.. want to know the test case

heady bough