最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Google Pay in Stripe setupIntents payment_method_types - Stack Overflow

programmeradmin0浏览0评论

When setting up a Stripe SetupIntend for triggering later payment, I can choose from a bunch of payment methods which are seen here:

So something like this can be done:

$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)),
]);

Everything works great, but how can Google Pay be integrated here? Isn't Google Pay or Apple Pay possible to be used as a payment method here?

When setting up a Stripe SetupIntend for triggering later payment, I can choose from a bunch of payment methods which are seen here:

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

So something like this can be done:

$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)),
]);

Everything works great, but how can Google Pay be integrated here? Isn't Google Pay or Apple Pay possible to be used as a payment method here?

Share Improve this question asked Mar 10, 2023 at 17:23 maidanmaidan 2293 silver badges10 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 6

Apple Pay and Google Pay are included in the card payment method type, so you don’t need to explicitly pass Apple Pay and Google Pay here. As long as you met the requirements such as enabling Wallets Payment Methods, https://dashboard.stripe./test/settings/payment_methods and have a card on your Google Pay account or add a card to your Wallet for Safari etc., it would show up.

发布评论

评论列表(0)

  1. 暂无评论