#Mosh-ApplePay

1 messages · Page 1 of 1 (latest)

ebon hollow
#

Hi there, it's me again 👋

#

Can you give the URL again?

#

Google Pay needs a credit card registered on your Google Pay profile (not the Chrome browser)

hearty star
#

Yeah, Google pay is working in the same computer and phone when its in Stripe hosted payment page, means there is no problem with phone or computer Id say.

ebon hollow
#

Can you give your account id again? (acc_xxx)

hearty star
#

We use stripe connect. So you want out main account or connected accounts?

ebon hollow
#

the connect account

hearty star
#

acct_1KbZRPRlIzNgG9WW

ebon hollow
#

Sorry can can clarify again how you are using this PaymentElement? Are you initializing using the connected account publishable key?

hearty star
#

no Im initializing using our main account's publishable key

#

pk_test_51JNtwbDOglbCzaHnwnsQfnjMfbekI2Sg3iTYSRjY8ydKzCN7zSt6a4nzGSFqIOghk1yeFWC09kN0stkYssDPC0A100sqfIFkmL

ebon hollow
#

(Dont' put key here generally)

hearty star
#

Sorry

ebon hollow
#

it's kinda ok since this is only a publishable key, but don't put key in this public space

#

And you are using the Stripe account header?

hearty star
#

mm what is Stripe account header?

ebon hollow
#

Looks like you don't so how is this PaymentElement related to your connected account?

hearty star
#

No no I do that. check this Payment Intent.

#

pi_3KoIq9DOglbCzaHn0ZmoB5eo

#

In here it shows which connected account it releated to.

ebon hollow
#

ah I see, Destination Charge

#

okie

#

So it's only your Platform account setting matters

hearty star
#

Yeah

ebon hollow
hearty star
#

Do you think is there anything stripe needs to enable to out account?

ebon hollow
#

Basically

Chrome 61 or newer
An activated Google Pay card
These should be enough

#

But it could be some other setting in Account

#

let me look closer on your account

hearty star
#

Thanks

ebon hollow
#

Hi, can you see the Google Pay tab at all? Or you can see it but can't click the button?

hearty star
#

Yeah, we can see the Google pay button, but it's disabled. Apple pay button same thing.

#

for apple pay some phones cant even see the button, but mine can see the apple pay button but its disabled.

ebon hollow
#

The Pay now button is actually a button from your code. Can you add some debug to see how it's disabled in the GooglePay/ApplePay tab?

#

I may know what it is

#
// Disable the button until we have Stripe set up on the page
document.querySelector("button").disabled = true;
#

First you disable the button here

hearty star
#

correct

ebon hollow
#
                    paymentElement.on("change", function (event) {
                      // Disable the Pay button if there are no card details in the Element
                      document.querySelector("button").disabled = event.empty;
                      document.querySelector("#card-error").textContent = event.error ? event.error.message : "";
                    });
hearty star
#

then I enable here

#

paymentElement.on("change", function (event) {
// Disable the Pay button if there are no card details in the Element
document.querySelector("button").disabled = event.empty;
document.querySelector("#card-error").textContent = event.error ? event.error.message : "";
});

ebon hollow
#

Yeah

#

But for the ApplePay/GoolePay tab, there is no such event fired

#

and it is never enabled again

hearty star
#

mm okay, how to enable it in apple pay and google pay?

#

Or do I need to remove disbling part

ebon hollow
#

I think so. It's completely under your control

#

The idea of disable-enable again, I guess you wanted to prevent accidentally clicking on the button while the element is still loading?

hearty star
#

Yeah exactly. It cuases lots of problems before.

ebon hollow
#

Can you try the event.completed instead of event.empty?

#

here

#

true if all required fields for the selected payment method in the Payment Element have been filled with potentially valid input.
It should be doing what you want

hearty star
#

Sure, Let me give it a try

hearty star
#

okay, that fixes the disabled issue.

#

But, In the broweser we still have button not showing issue.

#

Same browser if you got to your pre-build checkout page, it will show the google pay button, but not showing with stripe elements.

ebon hollow
#

Same browser if you got to your pre-build checkout page
Sorry, how do I do this?

hearty star
#

try this

ebon hollow
#

Yeah I see a menu

ebon hollow
#

Yeah because this is a Stripe-hosted page and we auto-detect conditions to show the GooglePay button

#

In PaymentElement there is no GooglePay button, there is only the GooglePay "tab" that you see without the "Pay now" button enabled, that I believe you have fixed

hearty star
#

Yeah, it should show for this browser as well right?

ebon hollow
#

the Stripe-hosted Checkout page? yes it shows on my side