Stripe 中的 Google Pay setupIntents payment_method_types

mai*_*dan 3 javascript payment stripe-payments

当设置 Stripe SetupIntend 来触发稍后付款时,我可以从此处看到的一系列付款方式中进行选择:

https://stripe.com/docs/api/setup_intents/object#setup_intent_object- payment_method_options

所以可以这样做:

$setupIntents = $stripe->setupIntents->create([
    'customer' => $customer_id,
    'description' => 'abcdefgh',
    'payment_method_types' => ['card', 'sepa_debit', 'ideal', 'bancontact'],
    'metadata' => [
        "lastname" => $item->name,
        "email" => $item->email,
        ],
], [
    'idempotency_key' =>  vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex(random_bytes(16)), 4)),
]);
Run Code Online (Sandbox Code Playgroud)

一切都很好,但是 Google Pay 如何集成到这里呢?这里不能使用 Google Pay 或 Apple Pay 作为付款方式吗?

pgs*_*pgs 5

Apple Pay 和 Google Pay 包含在卡支付方式类型中,因此您不需要在此处显式传递 Apple Pay 和 Google Pay。只要您满足启用电子钱包付款方式等要求,https://dashboard.stripe.com/test/settings/ payment_methods 并在您的 Google Pay 账户上有一张卡或将一张卡添加到您的 Safari 电子钱包等,它会出现的。

\n