【发布时间】:2020-08-09 09:07:38
【问题描述】:
我是一名业余 php 开发人员。我在我的 php 网站中接受条带付款作为一次性付款。我已经根据条纹网站文档正确集成了它。 (https://stripe.com/docs/payments/checkout/one-time#create-checkout-session)。我从 stripe webhook 获得 checkout.session.created 事件,并将其作为已完成的付款存储在我的数据库中。 (如果我做错了,请告诉我)。这是作为 checkout.session.completed 事件触发的示例事件数据。
{
"id": "evt_123",
"object": "event",
"api_version": "2019-03-14",
"created": 1561420781,
"data": {
"object": {
"id": "cs_test_123",
"object": "checkout.session",
"billing_address_collection": null,
"cancel_url": "https://example.com/cancel",
"client_reference_id": null,
"customer": "cus_123",
"customer_email": null,
"display_items": [],
"mode": "setup",
"setup_intent": "seti_1123",
"submit_type": null,
"subscription": null,
"success_url": "https://example.com/success"
}
},
"livemode": false,
"pending_webhooks": 1,
"request": {
"id": null,
"idempotency_key": null
},
"type": "checkout.session.completed"
}
但我需要处理 webhook 事件以解决争议。如果付费用户提出争议,我需要知道。 stripe 如何通过 webhook 通知我?如果条纹通知我,我如何找到父母付款?对不起我的英语不好。
【问题讨论】:
标签: javascript php stripe-payments webhooks