作者 lyh

gx同步项目设置服务器

@@ -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 }