【发布时间】:2021-04-01 13:28:43
【问题描述】:
【问题讨论】:
-
你能说得更具体点吗?你有什么问题?
-
您的问题需要更多详细信息。 Stripe 有 documentation 关于如何构建自定义表单的信息。我们需要查看您的代码段并了解您在使用自定义表单时遇到的具体问题。我们不需要查看您的表单图片。
标签: javascript php stripe-payments
【问题讨论】:
标签: javascript php stripe-payments
您可以按照like this 的示例,但是当creating the payment intent 替换基于项目的amount 的计算只是从body 上的客户端发送的金额:
// Create a PaymentIntent with the order amount and currency
$payment_intent = \Stripe\PaymentIntent::create([
"amount" => $body->amount_entered,
"currency" => $body->currency
]);
【讨论】: