#friedrich-keydel_code
1 messages · Page 1 of 1 (latest)
👋 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/1262774784681578640
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
That option belongs in payment_method_types like you have it, not payment_method which is where you would specific a specific payment method ID you've already collected.
You should remove that payment_method parameter
Note that you also will not be able to confirm the payment, since you need to provide payment details, for example by colelcting usine Payment Element
What are you trying to do, conceptually?
thank you for your quick response!
I now removed the payment_method-Parameter as well as the confirm-parameters and the return_url
Now there is no error any more, but it's redirecting to my start-page without leading me into the payment process
I have a payment form, which worked with the Sources API which I try to migrate to PaymentIntents API
Is this the guide you're following? https://docs.stripe.com/payments/sofort/accept-a-payment?web-or-mobile=web&payments-ui-type=direct-api
Am I right, that before, using the Sources API, I could send a payment directly in one step, wheras now I have to create a PaymentIntent first and then send the payment?
I already took a look at this guide, but as the first step didn't really work, I looked for further ressources
If I recall correctly, you could only create payments in one-step if you have the payment method (source) saved/set up which is something PaymentIntents API allows too..
Can you share more about what did not work? That's the canonical guide to integrate sofort.
Are you trying to integrate sofort with PaymentElement?
OK, than it would be nice to know, how it works
no! You can look here: https://einfach-elterngeld.de/registrieren
There is the payment form, wich lets the user choose his preferred payment method and afterwards leads him into payment process. Credit Card is already implemented using PaymentIntents, there I'm using PaymentElement. But I thought this isn't really needed for sofort, as there is no form required to load in advance.
PayPal is a separate implementation, which is not using stripe
Looks like you're using CardElements (which is different than PaymentElement)
But yeah, the guide I linked is what you'd need really.. I'd add more logging in your code to see why its being redirected instead of processing payment
do you see any errors in your console?
no - i now saved the response of the paymentIntent and it's seems to be looking fine. I would like to know, if the part described here https://docs.stripe.com/payments/sofort/accept-a-payment?web-or-mobile=web&payments-ui-type=direct-api#submit-payment could also be done with PHP!?
That is payment confirmation process which is supposed to happen client-side (similar to how you're handling confimPayment OR confirmCardPayment for Card Element)
OK thank you very much! I think my problem is solved for the moment! I'll try the rest on myself.
Great, glad I could help 🙂
oh, maybe one question
Sure
If I would use payment element, would I also be able to display PayPal as well, even if it's not a stripe method?
Yes, PaymentElement does support PayPal (only in EU at the moment): https://docs.stripe.com/payments/paypal
Oh no, I think this is a missunderstanding! I Would like to display paypal in the same panel/UI of payment element, but without using stripe as service provider
Ah ah I see. I'd recommend passing external_paypal as external payment method when you initialize elements and see if that works: https://docs.stripe.com/payments/external-payment-methods?platform=web