Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pay button testing #31

Open
malcolmhmaclean opened this issue Apr 25, 2023 · 5 comments
Open

Pay button testing #31

malcolmhmaclean opened this issue Apr 25, 2023 · 5 comments

Comments

@malcolmhmaclean
Copy link

malcolmhmaclean commented Apr 25, 2023

Hi, I am testing out implementing this for an existing clients commerce checkout.

I am having trouble consistently tryjng to show the Google Pay / Apple pay buttons.

  • On my iPhone the Apple pay button appears ok but when testing on Browserstack iphones it does not
  • On desktop i get a 'Pay with Link' green button (but this payment method is switched off in Stripe admin) - i only seem to get this green button when testing on Incognito Chrome - normal chrome Deskop i get GPay button
  • Sometimes i get a random purple Pay Now button with a small arrow - what is this payment button for?

Is there a way to have some logic as to whether a Pay Button will appear - as i wil need ot hide the billing address as its not needed if using Apple {ay

Any ideas much appreciated
Malcolm

@alexjcollins
Copy link
Member

Hi Malcolm,

A few answers below:

  1. My guess is the Browserstack phones don't have a payment method setup in the wallet. When that's the case an ApplePay button won't show. You can test this by visiting this page on the device on BrowserStack. You should see something like I've attached below.
  2. Is it definitely turned off on both production and test modes in Stripe? If it is, this might be something to get in touch with Stripe about.
  3. I think this is Stripe's generic Web Payments button that is shown when it doesn't know what (web) payment methods are available. There's a bit of discussion about it here.

With regards to determining the existence of the pay button, you might be able to listen to the js variable the button creates; if it exists, you'll know the button is present.

I have to say, I've never really thought about it like that, though. Given a web payment button is an 'all-in-one' checkout solution, the user probably won't interact with any of the conventional checkout fields if it's at the top of the checkout flow.

CleanShot 2023-04-25 at 14 31 40

@malcolmhmaclean
Copy link
Author

Thanks so much for the detailed answers Alex - really appreciate it

@alexjcollins
Copy link
Member

Pleasure; I hope they help you get your integration over the line.

I'm going to close this, but if you have anything further, feel free to reopen the issue, or ping us an email at dev [at] ethercreative.co.uk.

@malcolmhmaclean
Copy link
Author

Hi Alex

Apologies for dropping you another line - i thought it was all working ok but its not quite there as yet.

I am testing on GPay Desktop and Mobile and also Apple Pay on my iphone. When i click the Pay button the pop/slide up all comes up fine and the details within all look fine (amount,desc etc) but when i click pay for Apple it buzzes the phone then the payment prompt dissapears and for GPay it tries to process then just comes back to the same screen (in the popup) with the PAY button ready to press again. In either case i cannot see any transaction attempts in Craft Orders or in Stripe itself.

Any idea if i missing something simple?

This is my code:

	 	 {{ craft.webPayments.button({
			cart: craft.commerce.carts.cart,
			requestDetails: ['name', 'phone'],
			onComplete: {
					redirect: '/commerce/order?number={number}&success=true',
					js: 'window.paymentCompleted(cwp.number);',
			},
		}) }} 

Malcolm

@alexjcollins alexjcollins reopened this Apr 26, 2023
@alexjcollins
Copy link
Member

Hi Malcolm

Do you think you'd be able to share some screen recordings of what you're seeing on the computer and device? Feel free to email them over to the dev address above so that they're not public. I'm trying to get my head around what you're seeing and the order of events unfolding.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants