如何使用 Firebase 扩展“Run Payments with Stripe”最终确定一次性付款摘要在 ReactJs 网站上
我目前正在为我的 ReactJs 网站使用 Firebase。
我想用stripe来添加支付模块。因此,我在 Stripe 上创建了一个帐户,并在我的 Firebase 项目中添加了扩展程序“Run Payments with Stripe”。
我的网站上的此扩展程序一切正常:
- 我可以付款
- 我已重定向到 Stripe 付款界面
- Webhook 在 Firestore 上的客户文档上添加付款文档
但是,我还有一个问题:如何知道哪个 Firestore 文档付款是否与客户在当前结帐会话中进行的一次性付款有关?
Firestore 不会使用付款 ID 更新结帐会话文档,也不会使用结帐会话 ID 更新付款文档。
我尝试手动更新 Google Cloud 上的 webhook 功能,但我认为这不是一个好主意(我不知道为什么,但没有考虑更新)。
我不想列出客户支付并显示的所有付款:我想要此特定付款并显示此订单的摘要。
有人有这方面的线索吗?
I'm currently using Firebase for my ReactJs website.
I wanted to use stripe to add a payment module. So I created an account on Stripe and added the extension "Run Payments with Stripe" on my Firebase project.
Everything works fine on this extension on my website:
- I can make payment
- I'm well redirected to the Stripe payment interface
- The webhook add the payment document on my customer document on Firestore
But, I have one problem remaining : how to know which firestore document payment was concerned by the one-time payment a customer make on the current checkout session?
Firestore does not update checkout session document with the payment id, or the payment document with the checkout session id.
I tried to update manually the webhook function on Google Cloud but I don't think that's a good idea (and I don't know why but the update was not considered).
I don't want to list all payment the customer made and displayed it : I want to have this specific payment and display a summary of this order.
Does someone has clues on this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,webhook 处理程序中的函数似乎是 不添加结帐会话数据与关联的 Firestore 付款文档。
我建议使用您的反馈/请求在 GitHub 存储库上创建问题。或者,您可以配置第二个 Webhook 来根据需要更新 Firestore 文档。
Yup, it appears that the function in the webhook handler does not add Checkout Session data with the associated Firestore payment document.
I'd recommend creating an issue on the GitHub repository with your feedback/request. Alternatively you can configure a 2nd webhook to update the Firestore documents as you need.