#tonz18

1 messages · Page 1 of 1 (latest)

misty troutBOT
sly temple
#

It depends on the logged in Apple Account have a valid card setup in ApplePay

#

You can share your URL here and we can quick test

vast heath
#

Thank for the reply Orakaro, Yes we understand it depend on the apple account. But the device works on all other sites and sometimes on ours but then sometimes it doesnt. Which is why we think its a bug on our code.

sly temple
#

It works for me too

vast heath
#

This is currently for me

#

But it has worked on my iPhone earlier today

#

Another website works no problem

old quartz
#

👋 taking over for my colleague. Let me catch up.

vast heath
#

Apple pay

old quartz
#

hmmm that's interesting

#

so if you go back now and visit your website do you still see Link instead of Apple Pay?

vast heath
#

I see Link

#

which is why I think its our code bug

old quartz
#

ok would you mind sharing your code please?

vast heath
#

yeah how?

#

via git?

old quartz
#

not all of it, just a snippet here

vast heath
#

<script>
// Stripe publishable API key.
stripe = Stripe('{{ $this->stripe_publishable_key }}');

        const paymentRequest = stripe.paymentRequest({
            country: 'US',
            currency: '{{ strtolower($currency) }}',
            total: {
                label: '{{ $product->name }}',
                amount: {{ $stripePrice }},
            },
            requestShipping: true,
            shippingOptions: [
                {
                    id: 'free-shipping',
                    label: 'Free Shipping',
                    detail: 'Standard Free Shipping',
                    amount: 0,
                },
            ],
            requestPayerName: true,
            requestPayerEmail: true,
        });

        const elements = stripe.elements();
        const prButton = elements.create('paymentRequestButton', {
            paymentRequest,
            style: {
                paymentRequestButton: {
                    type: 'buy',
                    height: '46px',
                }
            }
        });

        (async () => {
            // Check the availability of the Payment Request API first.
            const result = await paymentRequest.canMakePayment();
            if (result) {
                prButton.mount('#payment-request-button');
            } else {
                document.getElementById('payment-request-button').style.display = 'none';
            }
        })();
#

<!-- Stripe payment widget -->
@if($this->stripe_is_activated)
<div
wire:ignore
class="mt-3"
>
<div>
<div id="payment-request-button" class="w-full">
<!-- A Stripe Element will be inserted here. -->
</div>
</div>

                </div>
                @endif
old quartz
vast heath
#

yeah I believe so

old quartz
#

I tried your website on my safari and it works fine, I can see the Apple Pay button

#

that's really really weird

#

would you mind sharing some info about your testing device?

#

version, iOS?

vast heath
#

Is there anyway to check the verify with apple has worked?

#

iPhone 13 Pro Max
16.3.1

old quartz
vast heath
#

Is there anyway to verify that the apple domain verication worked correctly, could that be the issue?

old quartz
#

if it were then I wouldn't be able to see Apple Pay on my safari

fallen cloud
#

also jumping it, it's working for me in Desktop and on my iPhone(same for all my colleagues) so the site itself is likely totally fine and customers won't have a problem

To be clear, how is that device set up, i.e. are you just using normal 'real' cards in your Apple Pay wallet, or are you using something like https://developer.apple.com/apple-pay/sandbox-testing/

vast heath