#xvk-prbutton

1 messages · Page 1 of 1 (latest)

timid wharf
heavy gyro
#

I'm not in private browsing, and do see the button for apple pay there

timid wharf
#

ok now in the docs link I sent, what happens if you click the Apple Pay button?

does the modal stay or does it disappear

heavy gyro
#

the modal works fine

#

the issue isnt collecting payment with apple pay, its that the function to detect which payment methods are available is returning incorrect values

timid wharf
#

yeah I understand, I'm just starting at a place to rule things out

#

looking at my own integration one sec

#

ok tried on my integration, works as expected in that it returns

on Safari

now to narrow down more

#

how are you initializing Stripe.js and PaymentRequest Button in your code?

Or PaymentElement if you're using that

heavy gyro
#

let me check. its been a while

#

we're importing a module

import { PaymentRequest, Stripe } from '@stripe/stripe-js';
timid wharf
#

sure and how are you initializing PaymentRequest in your code

heavy gyro
#
  useOnMount(() => {
    paymentRequestRef.current = stripe.paymentRequest(paymentRequestOptions);
  });
#

later, in an effect,

    paymentRequestRef.current
      ?.canMakePayment()
      .then((result) => {
        setAvailablePaymentMethods(result || NoPaymentMethodsAvailable);
      })
timid wharf
#

I'm interested in what paymentRequestOptions are

#

can you log those out to console and paste them here

heavy gyro
#

i can post stuff here later today, have to do the whole ngrok thing to have apple pay work on local. thanks for your help, feel free to ignore this thread for now

timid wharf
#

sure, when you come back with more info, feel free to ask another developer to reopen this thread for you