joshnuss / svelte-stripe

Everything you need to add Stripe Elements to your Svelte project
https://sveltestripe.com
MIT License
412 stars 40 forks source link

Two issues with Google Pay in PaymentElement #112

Open laszlo1337 opened 4 months ago

laszlo1337 commented 4 months ago

Describe the bug

Hello. I have issues with PaymentElement. Stripe.com support said it's most likely issue with the library.

  1. When user chooses GPay as payment method and closes the GPay popup window, the promise is not rejected and I have no way of cancelling progress-overlay in that case.
  2. GooglePay is available as payment method in Opera browser, but when user chooses it and tried to pay, they see information about a need of using Chrome or Safari browser. Again, stripe support said Opera is supported for Google Pay - so they said it's most likely library issue

Reproduction

{#if stripe && clientSecret}
  <Elements bind:elements {stripe} {clientSecret} theme="night" labels="floating" {variables} {rules}>
   <PaymentElement
    on:change={({ detail }) => (paymentDataFilled = detail.complete)}
    on:ready={() => (elementsFullyRendered = true)}
    options={{
     layout: { type: 'accordion' },
     fields: { billingDetails: 'never' },
     business: { name: 'xxx' },
    }}
   />
  </Elements>
  <button
   disabled={!elementsFullyRendered || !paymentDataFilled}
   class="btn btn-xl md:btn-lg bg-gradient-to-br variant-gradient-warning-error my-8"
  >
   <IconWallet class="mr-2" />{$_('shop.checkout.button.pay')}
  </button>
{/if}

and image ^ this should throw when Google Pay popup was blocked or after unblocking in Opera user cant pay because of the Chrome or Safari message and popup is closed - meaning payment is cancelled.

Severity

annoyance

Additional Information

It's not really blocking all usage but at least good portion of it

joshnuss commented 4 months ago

Hi @laszlo1337

In the screenshot, you're showing a call to the Stripe client (stripe.confirmPayment()), that API is provided by Stripe. So I'm not clear how it's an issue with this library.

Also, can you provide a minimal reproduction in a GitHub repo of the Opera issue?