正在显示
1 个修改的文件
包含
2 行增加
和
2 行删除
| @@ -81,13 +81,13 @@ class PayStripeApi | @@ -81,13 +81,13 @@ class PayStripeApi | ||
| 81 | * @method :post | 81 | * @method :post |
| 82 | * @time :2024/12/24 10:38 | 82 | * @time :2024/12/24 10:38 |
| 83 | */ | 83 | */ |
| 84 | - public function createPaymentIntent($amount, $currency = 'usd', $paymentMethodTypes = 'card') | 84 | + public function createPaymentIntent($amount, $currency = 'usd') |
| 85 | { | 85 | { |
| 86 | $url = "https://api.stripe.com/v1/payment_intents"; | 86 | $url = "https://api.stripe.com/v1/payment_intents"; |
| 87 | $data = [ | 87 | $data = [ |
| 88 | 'amount' => $amount, | 88 | 'amount' => $amount, |
| 89 | 'currency' => $currency, | 89 | 'currency' => $currency, |
| 90 | - 'payment_method_types[]' => $paymentMethodTypes, | 90 | + 'payment_method_types' => $this->currency_types[$currency], |
| 91 | ]; | 91 | ]; |
| 92 | return $this->sendRequest($url, 'POST', $data); | 92 | return $this->sendRequest($url, 'POST', $data); |
| 93 | } | 93 | } |
-
请 注册 或 登录 后发表评论