#gamesover - question

1 messages · Page 1 of 1 (latest)

dark hinge
#

Pasting message here:

in payment elements, I've switched to google pay, but it response error error: {code: 'incomplete', type: 'validation_error', message: 'Please fill in your card details.'} . It seems it still check the first tab, card. but I switched the tab to go with google pay already
#

Will get to it in a moment. Catching up with threads

#

Can you provide more info here? Am a bit confused on the ask. A screenshot would help as well.

gray coyote
#

I click google pay tab to pay, and call method

(this.stripe.updatePaymentIntent({elements: this.stripeElements})
    .then((result) => {
      return this.stripePaymentMethodHandler(result, payload);
    });

According to https://stripe.com/docs/js/payment_intents/update_payment_intent,
For some payment methods such as Apple Pay or Google Pay, stripe.updatePaymentIntent will prompt the user to provide the remaining required details.

However, the response I got is error: {code: 'incomplete', type: 'validation_error', message: 'Please fill in your card details.'}

It seems it ignore google pay tab, it checks Card tab, which is empty. so that's why your server respond me 'Please fill in your card details.'

#

also, there is no prompt

dark hinge
#

Did you click that small google pay button within the Google Pay tab?

gray coyote
#

I have a separate submit button, which works fine if I select Card tab

#

but when I click Google pay tab and try to pay by google pay, the payment element seems ignoring my switch, it still consider I am paying using card

#

that's why I got error: {code: 'incomplete', type: 'validation_error', message: 'Please fill in your card details.'}, which is true since everything in card tab is empty. Since I already switched to google pay to pay, but it was ignored for unknown reason

#

Again, I want to re-iterate here, if I select Card tab, my coding works perfectly, I can make payment successfully

dark hinge
#

Ah ok I see. Can you check if there are any errors in the browser console?

#

What browser are you using?

gray coyote
#

latest chrome
Uncaught DOMException: Failed to construct 'WebSocket': An insecure WebSocket connection may not be initiated from a page loaded over HTTPS. is it matter? since I am using ngrok in development env. it is tricky, sicne google pay need https . but too much my local dev link is still in http

I just found another warning pay.js:176 PaymentRequest.show() requires either transient user activation or delegated payment request capability

dark hinge
#

Yup that's the issue