#Randomuser2022

1 messages ยท Page 1 of 1 (latest)

open cloakBOT
static flare
#

i check there's a Declined payments section, but it has a prompt no sure it's the situation I need

foggy fiber
#

Hi! Let me help you with this.

#

What do you mean by "it has a prompt"?

static flare
#

we have a page and use payment element instead of check-out session. so we need to call the retravial api to get the payment result to the customer on the page. so i'm testing.

#

when i enter a invalid card number in test mode, it only has a prompt

#

like this

#

i'd like to know how to test a failed payment in test mode.

foggy fiber
# static flare

I don't know where is this alert coming from, it's not from Payment Element.

#

Could you please share the code where you integrate it?

static flare
#

the payment intent id is: pi_3NDjj0EydrSRkIrF1axEWpr0

static flare
#

the pop up is from our end

foggy fiber
#

I am not sure what's your challenge here. Could you please give more detail?

static flare
#

we'd like to test to complete the payment but the payment is failed. The case i give you is the payment hasn't completed. We need to test payment completion, but the deduction failed, so it'll call payment Intent retrieval API and display the failure payment status to the customer.

#

the pop up is on the check out page, i can't test submit

foggy fiber
#

I see, you want the authorization to go through but the payment to fail eventually?

static flare
#

The thing is i want to test the Intent retrieval API, but with the stripe document didn't explain this. I try entering an invalid card, it has an error pop-up, so i still stay on the check-out page, and only when the payment has completed, it'll call Intent retrieval API and display the payment stauts, be it successful or failed. Suceessful payment is easy to test. And the pop-up is ok, but i'd like to know a way to test the payment failure.

static flare
#

ok maybe a litte background info would help

#

that's the question we had today and now we finish the job. only need to test the Intent retrieval API and the returl_url

foggy fiber
#

Are you only using card?

static flare
#

no, we have affirm google pay & apple pay

#

but we prefer to test card & affirm cuz for the rest i don't have access

foggy fiber
static flare
#

you mean this?

foggy fiber
#

Yes

static flare
#

ok

#

this?

#

still a pop-up

#

pi_3NDkOoEydrSRkIrF1VX3IsJY

foggy fiber
#

Try the last one, "Insufficient funds".

#

But actually due to how cards work, you receive the result immediately, so it will not take you to the redirect page if the payment doesn't go through.

static flare
#

i just tried....

static flare
foggy fiber
#

It will just fail immediately on the Payment Element.

static flare
#

can we try other payment methods?

#

help have a look in test mode.

#

๐Ÿซ‚

foggy fiber
#

The only other option is processing if you use bank transfers.

static flare
#

you mean the check out link?

#

i could create a new link

foggy fiber
#

Sorry, I wasn't clear. The only other state that you might get is processing, and it's only if you use bank transfers as your payment method type.

#

Basically card payments will always succeed if you get through your authorization.

static flare
#

it doesn't matter for the state. i'd like to test the Intent retrieval API and the returl_url

static flare
#

๐Ÿซ‚ so no way to test?

foggy fiber
#

Sorry, I am not sure I understand what you mean by "Intent retrieval API and the return_url".
Could you please share the code that you want to test?

open cloakBOT
wary kayak
#

๐Ÿ‘‹ taking over for my colleague. Let me know if there's any follow-up Qs I can answer!

static flare
#

yes we would like to have a test in test enviroment

#

here's the background info

#

that's the question we had today and now we finish the job. only need to test the Intent retrieval API and the returl_url

#

The thing is i want to test the Intent retrieval API, but with the stripe document didn't explain this. I try entering an invalid card, it has an error pop-up, so i still stay on the check-out page, and only when the payment has completed, it'll call Intent retrieval API and display the payment stauts, be it successful or failed. Suceessful payment is easy to test. And the pop-up is ok, but i'd like to know a way to test the payment failure.

wary kayak
#

if a payment fails you will not be redirected

static flare
#

ooooh for every payment methods?

wary kayak
#

no for cards

static flare
#

we want to test other methods as well, google pay, apple pay, affirm

wary kayak
#

yes you can test these as well

static flare
#

and we'd like to know how.... according to the stripe document we can't find solutions

static flare
# static flare

this. it's card test, according to you, the card didn't redirect

wary kayak
#

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.

static flare
#

so test in code not from the page?

#

and how to test a google pay collection failure?

static flare
#

ok i'm trying affirm, and it jumps to this page after clicking submitting

wary kayak
#

yes this is because Affirm is a Redirect PM

#

you need to get redirected to the Affirm website to complete the payment

static flare
#

so even in test mode, i still need to input a valid phone number?

#

like a valid account?

#

it looks like requesting a valid phone number

wary kayak
#

I'm not really familiar with affirm, to be honest

#

if you need a specific help with this PM type you can reach out to https://support.stripe.com/?contact=true

static flare
#

ok thanks dude