#sainita_code

1 messages ยท Page 1 of 1 (latest)

tall sorrelBOT
weary boughBOT
#

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

tall sorrelBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1260199586941898833

๐Ÿ“ Have more to share? Add details, code, screenshots, videos, etc. below.

devout iron
#

Do you have an active card in your Apple Pay wallet on the device?

#
void night
#

Yes. There is an active card.. My client is testing the process. He is located in UK, London

#

Our old apple pay integration is working in the same domain. But stripe apple pay is not showing

devout iron
devout iron
void night
#

Yes they have visited the url and apple pay is showing there

#

they have sent me this

devout iron
#

Can you the code where you initialise Stripe.js?

void night
#

var apiKey = '{{ config('stripe.api_key') }}';
var stripe = Stripe(apiKey, {
'stripeAccount': XXXXXXXXXXXXXX
});

const expressAppleCheckoutOptions = {
buttonType: {
applePay: 'buy'
},
buttonTheme: {
applePay: 'black'
}
};
const appleElements = stripe.elements({
mode: 'payment',
amount: 1099,
currency: 'gbp',
});
const expressAppleCheckoutElement = appleElements.create(
'expressCheckout',
expressAppleCheckoutOptions
);
expressAppleCheckoutElement.mount('#PayByStripeApplePay');

#

expressAppleCheckoutElement.on('click', (event) => {
if($('input[name=rawAmount]').val() == '' || $('input[name=rawAmount]').val() < 1) {
swal_fire_error('Amount is required');
return;
}
var updatedAmount = ($('input[name=rawAmount]').val()) * 100;
var updatedCurrency = $('input[name=currency_name]').val();

    appleElements.update({amount: updatedAmount, currency:updatedCurrency});
    const appleOptions = {
        elementType: 'expressCheckout',
        expressPaymentType: 'apple_pay',
        business: {
            name: '{{$page->url}}'
        },
        emailRequired: true
    };
    event.resolve(appleOptions);
});
const handleAppleError = (error) => {
const appleMessageContainer = document.querySelector('#apple-error-message');
appleMessageContainer.textContent = error.message;
}

expressAppleCheckoutElement.on('confirm', async (event) => {
const {error: submitError} = await appleElements.submit();
if (submitError) {
    swal_fire_error(submitError);
    return;
}
const appleClientSecret = XXXXXXXXXXXXXX;
const {appleError} = await stripe.confirmPayment({
    // `elements` instance used to create the Express Checkout Element
    appleElements,
    // `clientSecret` from the created PaymentIntent
    appleClientSecret,
    redirect: 'if_required',
    confirmParams: {
    return_url: "{{ route('public.page.success', $page->url) }}",
},

});

if (error) {
    handleAppleError(error);
    return;
} else {
    swal_fire_success("Payment successful");
   
}
});
#

Yes we are using stripe connect

devout iron
void night
#

Stripe google pay is working on our end but apple pay is not working

#

but the main domain is already registered

#

Do we need to make any changes in connect account also?

devout iron
#

It's not. It's registered on the platform account (acct_1MmGiGHMOCsDa4Df)

#

But as you're doing direct charges with standard accounts, the domain(s) need to be registered on the individual connected accounts too

void night
#

Ok let me check

#

Is it can be done with API? Because, we have loads of connected accounts. So It's not possible to do this manually

daring plinth
#

hi! I'm taking over this thread.

#

did you check the link shared with you above? it shows how to register domains with the API.