#jonastex_api

1 messages ยท Page 1 of 1 (latest)

errant badgerBOT
#

๐Ÿ‘‹ 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/1226880909463130252

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

frank elkBOT
scarlet vessel
#

Hi there ๐Ÿ‘‹ can you tell me a bit more about what you're describing when you say "it then cancels it"? Can you share the ID of a Payment Intent from your testing where you saw this behavior?

visual heart
#

I don't have an ID because the payment doesn't even exist on my dashboard

scarlet vessel
#

Can you tell me more about what is being canceled then? I thought you were referring to a Payment Intent.

visual heart
#

No, when i use my phone on safari i see the button for use apple pay, when i use the button Apple asks me which card I want to use... and then he proceeds to payment but after the paiement its cancel. I am using my test token, is this due to this?

scarlet vessel
#

Are you testing in livemode or testmode? Is your code that is processing the payment throwing any errors? What debugging have you done so far?

visual heart
#

in testmode, i don't have error in my log, i have try to replace this php $intent = $stripe->paymentIntents->create([ 'customer' => $id_customer, 'setup_future_usage' => 'off_session', 'amount' => 1099, 'currency' => 'eur', 'automatic_payment_methods' => [ 'enabled' => 'true', ], ]);

by this php $intent = $stripe->paymentIntents->create([ 'customer' => $id_customer, 'setup_future_usage' => 'off_session', 'amount' => 1099, 'currency' => 'eur', 'payment_method_types' => ['card', 'google_pay', 'apple_pay'], ]); but it nothing work

scarlet vessel
#

Huh? Do you have a publicly accessible test site I can look at?

visual heart
scarlet vessel
#

Okay, so this looks like an Express Checkout Element integration, not the Payment Element.

visual heart
#

Ah, ok ok Do you have a solution to resolve payment issues?

scarlet vessel
#

I'm still trying to figure out what the behavior you're describing is. Sorry, the server has been very busy so I haven't had too much time to debug this for you.

visual heart
#

Okay okay

scarlet vessel
#

Looking at browser console I see this error:
Unhandled Promise Rejection: IntegrationError: Unhandled expressCheckout Element confirm event. Make sure to register a confirm handler.

Did you add the logic shown here to process the payment for your Express Checkout Element?
https://docs.stripe.com/elements/express-checkout-element/accept-a-payment#submit-the-payment

Also taking a step back, did you want a separate Express Checkout Element instead of using the Payment Element ot accept wallet payments?

Learn how to accept payments with the Express Checkout Element.

visual heart
#

What is the difference? because after I use another PHP code to subscribe the user to a subscription

scarlet vessel
#

They're two distinct types of Elements, both of which would need their own logic if you use them side by side. The Express Checkout Element is designed to accept wallet based payment methods, the Payment Element is designed to accept most types of Payment Methods that we support.

visual heart
#

Did you add the logic shown here to process the payment for your Express Checkout Element?
Yes i use this

#

Do you wan't my code for look ?

scarlet vessel
#

I don't need it, I'm scanning your code using Safari and see that isn't there.

visual heart
#

Ok the Payment Element requires a redirection on one of your sites?

scarlet vessel
visual heart
#

I have add this code but I have the same result js const expressCheckoutElement = elements.create('expressCheckout'); expressCheckoutElement.mount('#express-checkout-element'); expressCheckoutElement.on('confirm', async (event) => { handleSubmit(event); });

scarlet vessel
#

What error do you see in the browser console now?

visual heart
#

I'm trying payment with Apple Pay directly on my phone, so I don't have a console

scarlet vessel
#

You should find a way to test this where you can see the console. It's crucial to your debugging efforts to be able to see the errors you're running into.

visual heart
#

Ok, I corrected a few lines and it works, thank you

scarlet vessel
#

Glad to hear! Any time!