|
...
|
...
|
@@ -81,13 +81,13 @@ class PayStripeApi |
|
|
|
* @method :post
|
|
|
|
* @time :2024/12/24 10:38
|
|
|
|
*/
|
|
|
|
public function createPaymentIntent($amount, $currency = 'usd', $paymentMethodTypes = 'card')
|
|
|
|
public function createPaymentIntent($amount, $currency = 'usd')
|
|
|
|
{
|
|
|
|
$url = "https://api.stripe.com/v1/payment_intents";
|
|
|
|
$data = [
|
|
|
|
'amount' => $amount,
|
|
|
|
'currency' => $currency,
|
|
|
|
'payment_method_types[]' => $paymentMethodTypes,
|
|
|
|
'payment_method_types' => $this->currency_types[$currency],
|
|
|
|
];
|
|
|
|
return $this->sendRequest($url, 'POST', $data);
|
|
|
|
}
|
...
|
...
|
|