Stripe webhook keys not working in php πŸ‘¨β€πŸ’»

Hi,
I still have a pb with webhooks testing ever since wappler 4 (it worked great the first time I did a test back in v3.9.8 time).
First how do I upgrade the Stripe CLI (new v1.7.0 available)?
image
Also, Stripe tech support says this url https://mediadash.com/dmxConnect/webhooks/stripe/ (as instructed by Teo’s tutorial) is not valid.
Has there been any major change which we need to take into account now? Stripe suggests the url should end with the event_type.php. Brad had made a tutorial where the event type was also added to the endpoint url.
image

FYI, my webhook test gets β€œsent successfully” only when an event_type.php is appended to the endpoint url, for example: https://your_webdomain.com/dmxConnect/webhooks/stripe/checkout.session.completed.php

My DB insert/update does not run after the event completes. Please advise if this is part of the issue too. My simple Set Values under my webhook are not being displayed.

The url is perfectly fine and is as it should be.

When you add the Stripe webhooks initially an index.php is generated in that folder that handles as dispatcher to all events.

1 Like

When I follow that, I get a 404:


FYI, I’m using Connect. Under the Connected Account, no events added.

Edit: FYI I do have the index file in the webhooks folder of Local. No such file in the Remote. Hoping this helps…
image

Well did you deploy your site so that all those files are uploaded to your live server?

1 Like

Thanks, seems to be working now. Need to dig deeper though.
(I thought these files would populate in the remote, just like API actions files do when I create them)

George,
Coming back to you after endless testing. (Our website, server and all files are live, not local)
Our correct whsec (as seen in test mode in Stripe dashboard) won’t be taken into account when we save the key. These two whsec keys you see in the below screenshot don’t match that of our live or test modes. We get a 400 (Bad Request) status in the CLI response.


Please enlighten us.

Is this a bug by Wappler (or Stripe?) to be fixed in an upcoming version or just a request for help to figure out the webhook key setup?

Not sure yet whether there’s something to fix for php or there’s some info I’m missing. Awaiting for the team’s feedback patiently, albeit timely coz we’re stuck… :innocent:

I’m sorry but this topic is a bit confusing. The initial problem was solved but now you have a different problem with saving the secret keys?

I just tried and all keys are saved as they should. Do make sure everything is published and uploaded to your remote server.

If you still have problems, please post a new topic with exact steps to reproduce the problem.