Dja*_*Dev 14 php webhooks stripe-payments
我正在使用Stripe创建支付网关.
我想将我的localhost网址设置localhost/stripe/webhook.php为我的webhook网址.是否可以将localhost地址设置为webhook URL?这将用于创建在Stripe中每次成功收费时触发的邮件服务.
Vin*_*hni 26
查看http://www.ultrahook.com,它允许您在localhost上接收webhooks
the*_*com 24
如何使用ngrok并设置Stripe Webhooks url
尝试在此终端提示符下键入ngrok.exe http 80以显示端口80
例如,如果我们在localhost上有Stripe webhooks url,那么 http://localhost/stripeproject/webhook.php
只需使用您的webhooks服务指定您的ngrok网址作为端点,您就差不多完成了.
您可以设置此URL http://f253021b.ngrok.io/stripeproject/webhook.php,将测试webhook发送到您帐户的webhooks设置中的集成端点.
它对我来说很好.
更多详情请点击这里
不,这行不通。Stripe 服务器必须能够联系您的服务器以发送 webhook。Stripe 不知道如何联系您的 "localhost" 。您需要一个 Web 可访问地址或 IP 地址才能使其正常工作
There's now another option: you can now use the Stripe CLI to seamlessly test webhooks locally without the need for a 3rd party tool.
In this case you would just do something like this to plumb your Stripe events through to your local webhook handler code:
stripe listen --forward-to localhost/stripe/webhook.php
Run Code Online (Sandbox Code Playgroud)
正如马特所说,您需要将其放在网上的某个地方 - 最好使用 https://。供您参考,我在 2 个月前在这里发布了一个邮件 Webhook 示例: https: //github.com/pnommensen/Stripe-Webhook-Emails。
| 归档时间: |
|
| 查看次数: |
13833 次 |
| 最近记录: |