#danilkinkin_code
1 messages ยท Page 1 of 1 (latest)
๐ 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/1255517242561531955
๐ Have more to share? Add details, code, screenshots, videos, etc. below.
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.
- danilkinkin_code, 18 hours ago, 28 messages
Hello
Give me a moment to take a look
First image, I logged with account with bonded card, second without.
Why PaymentRequest don't show if account doesn't have payment data?
What do you mean by bonded card? Is that some sort of gift card?
No, payment card added in google account
Ah I see. My understanding is that Express Checkout Element and PaymentRequestButton use different underlying APIs..
The PaymentRequestButton only renders the button if
1/ You're logged into a google account with wallet
2/ Wallet has a valid payment method
Express Checkout Elements shows you a login modal if you're not logged in.
Yep, but in this case, PaymentRequest is not usable for me.
A have my own payment system switcher, and it's so strange if I switch a payment system and don't see a button. Also, maybe If even user don't have an added card now, he is ready to make it right now during payment
So it's not a problem in my code, it's a strange stripe logic?
Like I mentioned earlier the PaymentRequestButton works differently compared to Express Checkout Element. Its not even Stripe logic, I think its just how Pay.js works with Google Pay (which is used by PaymentRequestButton)
Interesting that event this buttons display different payment direction. First ExpressCheckout, second PayemntRequest
It's not Pay.js problem, because native Google Pay button works correct. You can see example on this page https://developers.google.com/pay/api/web/guides/resources/demos
First image from account without card, second with it
I think I misunderstood your ask ๐ I assumed your ask was in comparison to Express Checkout Element
Circling back to your usecase though, we do recommend using Express Checkout Element over PaymentRequestButton anyway as it offers more flexibility and features
Can you share more about what your concerns are with Express Checkout Element? Just to be on the same page
First reason, I have other types of payment method, like a pay with bonus, and I have to display this method with other in one list.
My user story looks like that: Choose payment method -> Fill customer data -> Tap pay button.
So I have to render only one payment system button per page. In theory, i can limit payment method until one via wallets property
Second reason, my product is can be embedded in other sites (iframe widget for selling tickets). I discuss this problem yesterday there: #1255517242561531955 message
Apple Pay works only if top domain is verified, but not all sellers make it, so I have to check possibility Apple Pay method before render payment button, for hide this method from list
In that case it does sound like you will want to use the ECE and limit it to one button. One other way that I think you can limit it to one button is by specifying a max of 1 row, 1 column, no overflow https://docs.stripe.com/js/elements_object/create_express_checkout_element
Yeah, but still exist problem with check is verified top level (parent) domain. Method ApplePaySession.canMakePayments() return true for these cases, but in real I can't use Apple Pay.
Maybe do you have an API for check real possibility of use Apple Pay, without render ExpressCheckout and read data in onready?
One workaround could be to make a dummy payment request object, make the canMakePayment request and only try to render the ECE if it returns true for apple or google pay https://docs.stripe.com/js/payment_request/can_make_payment
And that is interesting, so if neither of the wallets are available, do we still render something the size of those buttons? I would have thought that the ECE would be basically invisible at that point
Yes, if cards not added, ExpressCheckout anyway render button, and after click system ask add card first.
It's more correct behavior, I think
Problem of canMakePayment that this method return false if cards not added. But in really I can make a payment
So if apple pay isn't registered, what shows up on your page that you don't like?
No, if my domain registered but in my Apple Pay account not added card, in this case canMakePayment return false
I need next behavior, my domain (and all other in chain) is registered and in my Apple Pay account not added card, in this case canMakePayment should return true
I mean canMakePayment should not check for availability added payment card in account. If user want, he added card during payment
ExpressCheckout already work in this scheme
So I need to detect only one case:
- Parent (top level) domain, where embedded our iframe not registered in Apple Pay
- User have added card in payment account or not, it's not important
ExpressCheckout can't check first point before use, but work perfect with second point
canMakePayment check added cards in payment account and it's not correct
Unfortunately our SDK does not work that way. You can write in to our support to ask for a method similar to canMakePayment that does that, but right now we do not have a method that can do what you want.
It's so sad
Can you create topic for developer team and check why ExpressCheckout and PayemntRequest work different with account that don't have added card?
I think anyway it's wrong behavior
As for the main question, then we maybe will have to manually enable Apple Pay for users, well, what can I say.
Thanks for trying to help