#woakaley-ionic
1 messages ยท Page 1 of 1 (latest)
๐ happy to help
if I understood correctly you are bundling your webhook endpoint in your hybrid app?
Well, yes. I have a wordpress backend, with rest api's, with a Ionic/Angular front end.
This is the error log
And in test mode, everything were working fine. I even tried to switch back, and it worked. But when i am trying to test the payment in live mode, it gives me the attached error.
the webhook endpoint should be part of your backend and not your frontend
Yepp, I know. It's in my backend. Otherwise it would not work in test mode neither.
This was a log in test mode. The origin is the same
And it worked.
Maybe its not working, because my backend is still on a dev environment on our own server?
If i put the backend on a live environment, the payment would work? WHat do you think?
in test mode we print a warning to the console that the domain youโre redirecting to Checkout from is not valid, in live mode that is stepped up to an error
this is why it's not working
in production
so the only way to fix this issue is to change your integration from being a client only integration and use full client-server Checkout, or use PaymentLinks
Hmm, I think i understood what do to. Basically I have to make my dev backend into a live domain. like app.example.com, where my backend lives, so the stripe will see the domains. Am i right?
But then i have to change the code as well
I mean the way i integrated Stripe in my app.
yes exactly, this is the only solution
Can i find some examples for full client-server Checkout ?
in php? ๐
Or maybe the payment link is the easiest way to do this. I dont know. This is my first experience with Stripe.
Hmm, but the think is that, i need a response when the payment was successful. I have to change the subscription status to Active in my backend, if the payment was fine.
Can i do that with payment links as well?
Ohh, okey. SO basically i dont have to change my php file, where i listen to the stripe webhook, i just have to place the payment link somehow into my code, so when the user clicks the Pay with Card button, it will redirect him to the payment link.
yes
Well, thank you very much for your fast responses ๐ It helped. I will try the payment links, and If i have further questions, can we keep this thread for a few days?
threads are kept open for 1h of inactivity unfortunately, but feel free to come back to the main channel and ask your questions, a colleague will pick it up if I'm not around
Alright, thanks!