#ryancwalsh

1 messages · Page 1 of 1 (latest)

fleet marshBOT
hard current
#

Hi, could you please summarise the question?

fleet marshBOT
civic peak
#

@languid pendant was correct that rebooting my Mac then allowed https://stripe.com/docs/stripe-js/elements/payment-request-button to show a clickable Google Pay button. (Restarting just the Chrome browser wasn't enough.)

However, we still haven't solved the main problem.

My company wants to allow customers to add a payment method(card, Google Pay, Apple Pay, etc) without making a charge immediately.

(And the way that we will make a charge is Invoices.)

So I'm trying to add a PaymentElement. https://stripe.com/docs/payments/payment-element

And use this flow to "Collect payment details before creating an Intent".https://stripe.com/docs/payments/accept-a-payment-deferred?platform=web&type=setup

I used:

const options: StripeElementsOptions = {
  mode: "setup",
  currency: "usd",
};

But Google Pay didn't appear in my form.

Then I tried:

const options: StripeElementsOptions = {
  mode: "setup",
  currency: "usd",
  paymentMethodTypes: ["card", "google_pay"],
};

But I get:

Uncaught IntegrationError: Invalid value for elements(): paymentMethodTypes.1 should be one of the following strings: alipay, affirm, afterpay_clearpay, au_becs_debit, acss_debit, bacs_debit, bancontact, blik, boleto, card, cashapp, customer_balance, eps, fpx, giropay, grabpay, ideal, klarna, konbini, mobilepay, nz_bank_account, oxxo, p24, pay_by_bank, paypal, sepa_debit, sofort, south_korea_market, swish, three_d_secure, upi, us_bank_account, wechat_pay, paynow, pix, promptpay, revolut_pay, netbanking, id_bank_transfer, link, demo_pay, zip. You specified: google_pay.

Thanks.

plain igloo
#

👋

#

So first you can use a SetupIntent with Payment Request Button and that works to just collect details

#

If Google Pay isn't showing, then there is a problem with your wallet set up

civic peak
#

https://stripe.com/docs/stripe-js/elements/payment-request-button shows a clickable Google Pay button, so I don't think my Google Pay wallet is a problem.

I don't think I want to use Payment Request Button because I want one unified widget that supports multiple options (card, Google Pay, Apple Pay, Cash App, etc).

The Preview at https://dashboard.stripe.com/test/settings/payment_methods shows the Google Pay button: (screenshot 1)

But my PaymentElement still does not: (screenshot 2)

Collect payment and address information from customers who use Apple Pay, Google Pay, or Link.

plain igloo
#

Is your test site running over HTTPS?

#

Is there somewhere I can go to reproduce?

civic peak
#

🤦‍♂️ I forgot to use ngrok to add HTTPS on localhost. I'm trying that now.

Unfortunately our app is written in a way where authentication won't work for ngrok domains, so I'll need to write a temporary workaround to pull the PaymentElement to a page that doesn't require auth.

But I bet you will be right!