#jatinpatel0708

1 messages · Page 1 of 1 (latest)

lusty islandBOT
turbid bronze
mellow vale
turbid bronze
#

Yes, I am following this steps Apple Pay Button is working on the other page but here in the Iframe Apple Pay button is not showing

mellow vale
#

The above code is not Stripe related and I don't really know what it does

#

Can you share what you want to achieve?

turbid bronze
#

we want to show Apple Pay Button on my Form

mellow vale
turbid bronze
#

var paymentRequest = stripe.paymentRequest({
country: 'US',
currency: currencyVal,
total: {
label: 'GivingX Custom Fundraiser Software',
amount: parseInt( Math.round(stripe_amount) ),
},
requestPayerName: true,
requestPayerEmail: true,
});
var elements = stripe.elements();
var prButton = elements.create('paymentRequestButton', {
paymentRequest: paymentRequest,
});

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

here is the payment-request-button code i am using it for the connected account

mellow vale
#

Did you implement Payment Request Button in a separate page and add it to the iframe of another page?

turbid bronze
#

acct_1MuJnsGdhkL3rLC9

here is my connected account Id

#

I have added it in the Iframe page

mellow vale
#

Can you use Payment Request Button directly to the page instead of using iframe?

turbid bronze
#

yes have use it without iframe but not working

#

Hi there

#

?

mellow vale
#

Thanks for waiting! Discord server is busy now

#

Where do I expect to see Apple Pay/Google Pay in the page? I don't see Google Pay either

turbid bronze
#

You can see it on the next tab, click on the donate Button

mellow vale
#

This is what I see

#

Where do I expect Google Pay/Apple Pay to appear?

turbid bronze
#

here you can see Google Pay

turbid bronze
mellow vale
#

Can you disable Link and let me know, so that I can refresh your website again

turbid bronze
#

done, please check

#

but still Apple Pay button is not showing

mellow vale
#

I can see it at my end

turbid bronze
mellow vale
turbid bronze
#

Hi River, it's showing on Givingx.com platform but when I put this iframe on the Other platform the Apple Pay button is not working:

i put this iframe on the W3school Platform: https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_iframe

<iframe id='giving-iframe' allow='payment' class='iframe-class ifram-scroll-infomain' style='width: 475px; height: 950px; border-radius: 10px;' src='https://www.givingx.com/org/forms/data/embedded/6487891d9f8926c66c05df80?lang=en' frameborder='0' scrolling='no' seamless='seamless'></iframe>

mellow vale
#

Does other platform share the same domain? Apple Pay will only work on the domain configured

lusty islandBOT
turbid bronze
#

the other platform is https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_iframe

and the Apple Pay integration here on GivingX.com here is Iframe i am putting this iframe on the W3school platform

<iframe id='giving-iframe' allow='payment' class='iframe-class ifram-scroll-infomain' style='width: 475px; height: 950px; border-radius: 10px;' src='https://www.givingx.com/org/forms/data/embedded/6487891d9f8926c66c05df80?lang=en' frameborder='0' scrolling='no' seamless='seamless'></iframe>

barren nymph
#

Apple Pay doesn't work in iframes no

#

read https://stripe.com/docs/stripe-js/elements/payment-request-button?client=html

When using an iframe, its origin must match the top-level origin. Two pages have the same origin if the protocol, host (full domain name), and port (if specified) are the same for both pages.
and
If you use the paymentRequestButton Element within an iframe, the iframe must have the allow attribute set to equal “payment *”.

#

so unless your page that is showing the iframe is on the same domain name (e.g. www.example.com) as the page where you host the payment page, it simply won't work

turbid bronze
#

i have set “payment *” in the iframe but it not working

#

we want to used Apple Pay button on the iframe, could you please help us to how it work

barren nymph
#

did you read and understand what I shared above about the domain needing to match?

lusty islandBOT
turbid bronze
#

yes, but i don't no how to match this in the iframe, could you please suggest me

near meteor
#

Hi! I'm taking over this thread.

turbid bronze
#

Hi Soma, please help me to fix this

near meteor
#

If you have to use an iframe, then the website and the iframe mush have the same top-level domain. So if you website's domain is foobar.com, then the iframe must be also on foobar.com

turbid bronze
near meteor
#

yes, that's why it doesn't work.

turbid bronze
#

is there any other option to work it

near meteor
#

No, sorry.

turbid bronze
#

okay

turbid bronze
#

We've detected that you are not using Automatic Payment Methods. To manage payment methods from this page get the latest version of Checkout, Payment Element or Payment Links.

why this warning showing in my stripe account

near meteor
#

Are you using Automatic Payment Methods?

turbid bronze
#

Yes, when creating payment intent for Google Pay I set the "'automatic_payment_methods' => ['enabled' => true],"

near meteor
#

And is that the only way you create payments with Stripe?

turbid bronze
#

No, i am also using custom card payment,

#

when i am creating a card payment I am not using this 'automatic_payment_methods' => ['enabled' => true],"

#

it means when we create payment intent we need to add "'automatic_payment_methods' => ['enabled' => true],"
is right?

near meteor
#

No, i am also using custom card payment, when i am creating a card payment I am not using this 'automatic_payment_methods' => ['enabled' => true],"
Then that explains why you see the warning in the Stripe dashboard

#

it means when we create payment intent we need to add "'automatic_payment_methods' => ['enabled' => true]," is right?
That's completely up to you. If you only accept card payments, then no need to do this.

turbid bronze
#

for the ACH payment?

near meteor
#

What do you mean?

turbid bronze
#

for the ACH payment w have to use 'automatic_payment_methods' => ['enabled' => true]," and how can we resolve this :

We've detected that you are not using Automatic Payment Methods. To manage payment methods from this page get the latest version of Checkout, Payment Element or Payment Links.

near meteor
#

You don't have to "resolve it". It's just Stripe telling you that you are not using 'automatic_payment_methods' => ['enabled' => true]," all the time, which is fine.

turbid bronze
#

Okay, Thanks

near meteor
#

Happy to help 🙂

lusty islandBOT
turbid bronze
#

if I add 'automatic_payment_methods' => ['enabled' => true]," in all the Payment Intent create then is that any issue

near meteor
#

Again, you don't have to do this. But yes I think it should work. I would recommend doing some tests i test mode just to be sure.

normal pine
#

👋 taking over for my colleague. Let me know if there's any follow-up Qs I can answer!