#niraj-p_error

1 messages ¡ Page 1 of 1 (latest)

graceful locustBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1471731824366583902

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

solar stump
#

That's the decline response from issuer bank. It's a normal thing

#

If you want to reproduce, we have some testing card for decline

rigid jewel
#

Yes i want to generate same error with code and message on my machine so provide me decline card.

#

Because from stripe i have get the message for this error
payment_method_not_available

solar stump
#

Use test cards to validate your Stripe integration without moving real money. Test a variety of international scenarios, including successful and declined payments, card errors, disputes, and bank authentication. You can also test non-card payment methods and redirects.

rigid jewel
#

For this error code payment_method_not_available
which specific card use?

solar stump
#

Can you share the real PI with that error? pi_xxx

rigid jewel
#

Sorry i don't have PI because this error are facing customers and this error inform by stripe so i'm still try to generate this but it is not generated from my end.

#

Stripe message

solar stump
#

Um sorry I think we may don't have the exact decline card to provide you that error code. Please treat it as any possible incoming error message for testing. It should behave the same to the generic decline card on the Doc above

rigid jewel
solar stump
#

Yes the error code is specifically payment_method_not_available, I understand. But it would be the same shape as any error on the that table. How are you handling errors btw?

rigid jewel
#

We are handling error like using try-catch block and this stripe element errors verify from our logic it is from stripe or not and also add this error logs in track js.

#

I mean you are also unable to generate this same error?

solar stump
#

Sorry I have trouble understanding you. Are you saying that you are catching error from frontend?

rigid jewel
#

Yes absolutely this error getting on fronted side in payment element when customer made payments.

solar stump
#

Ok so if you use the pm_card_visa_chargeDeclined card, what error message do you receive?

rigid jewel
#
{
    "message": "Your card has been declined.",
    "__error": {},
    "code": "paymentFailed",
    "paymentFailed": {
        "declineCode": "generic_decline"
    }
}
solar stump
#

And how does this response look like exactly when you had payment_method_not_available ?

rigid jewel
#
{ "message": "An error occurred while processing your payment. Try again in a little bit or try a different payment method.",
  "__error": {},
  "code": "paymentFailed",
  "paymentFailed": {
    "declineCode": "payment_method_not_available"
  }
solar stump
#

Alright, so the declineCode would be different from payment_method_not_available to generic_decline. How would you handle them differently then?

#

Checking declineCode then branching?

rigid jewel
#

I don't handle specific error. My simple concern is how to generate this same error on my checkout or stripe payment element because if this issue simple error then it is okay other wise this is from my side so i want to handle this error.

solar stump
#

if this issue simple error then it is okay other wise this is from my side so i want to handle this error.
Sorry don't follow this part. Unfortunately no it's not possible to generate this exact error, but you should handle it as any other "decline" error as generic_decline above

rigid jewel
#

So how to handle this error and what can i do for this error because this error getting from stripe payment element.

solar stump
#

The error says the Payment Method is not available, so you want to ask the Customer to provide a different card

rigid jewel
#

That means customer entered payment method invalid? Right

solar stump
#

Yep

rigid jewel
#

Is there any way can we reproduce this same error?