Open csmcneill opened 2 years ago
Looks like this is fixed now p1649090720690789-slack-CGGCLBN58, so closing the issue
@jessy-p Thanks for sharing! Is there anything that the user needs to do to remedy this issue?
When I test this on cmtestwoo.wpcomstaging.com, I still encounter the error:
I've tried disabling and re-enabling test mode, disabling and re-enabling express checkouts, flushing the cache via CLI, and clearing the WCPay account cache without success.
Hi @csmcneill, Thanks for reporting this issue. While the issue three days ago affected all test mode requests and has been resolved, there is still an older issue that affected Google Pay checkout using live accounts in test mode, you can read more about it here - p1649090720690789-slack-CGGCLBN58
I encountered this issue again when testing an Apple Pay issue in 5713486-zen.
I could also reproduce the issue on justfortestingwcpay.com
and another HE could reproduce the issue on wooooooo.mystagingwebsite.com
, but another HE couldn't reproduce the issue on their site with a live account in test mode.
Further discussion in p1668561282349669-slack-C3NCP7ZJ6
Same console error:
DEVELOPER_ERROR in loadPaymentData: Invalid stripe:publishableKey for current environment. Make sure you are using Stripe's test key.
F @ pay.js:130
Reopening.
Another instance of the same issue in 5782069-zen.
DEVELOPER_ERROR in loadPaymentData: Invalid stripe:publishableKey for current environment. Make sure you are using Stripe's test key.
This error message looks like a config error. The error is saying that the API / Stripe key passed by the site is a production one, and this doesn't match the site being in test mode. Maybe the merchant needs to reconnect in some way? As I understand in WCPay we don't have a UI for specifying keys, this is handled by onboarding => connection process.
Perhaps this is a caching issue. The site may have recently switch from live to test (or vice versa) and WCPay is using the wrong key:
According to Pc2DNy-3z-p2, this falls in Fusion @anu-rock. Tagging as a part of Gamma Porter duties PcreKM-yM-p2.
Tagging in @anu-rock – is this something Fusion can investigate?
It's worth noting that this doesn't affect all WCPay accounts.
I can reproduce this consistently on my test site, which uses a live account (but stays in test mode). If needed, I can provide access to the site @anu-rock
Can also replicate this on a live test site, whereas it works without issues on a site that is in dev mode. Happy to provide access if needed.
@haszari and @csmcneill - Thanks for your inputs. I've added this issue to our backlog. We might be able to look into it this week. Related thread - p1683012879607679/1649090720.690789-slack-CGGCLBN58.
I was trying to update our Google Pay testing docs per this request:
p1678420538296579-slack-CSP74N77C
However, I ran into the same error eventually on my own test site. :( I'm not sure how I (or possibly any merchant?) can test Google Pay right now.
Notably, one thing I don't see in this thread is a mention of Google's doc here:
https://developers.google.com/pay/api/android/guides/resources/test-card-suite
... which instructs you to join a special Google Group. The effect of that is seeing their test cards in the Google Pay modal instead of actual cards:
Sadly, "purchasing" with the test card does not yield a different result. I get the same error.
So TLDR: it's still unclear whether any live merchants can test Google Pay with WC Pay in test mode, but I suspect they won't be able to?
This bug came up in this thread: pe2Jlk-VR-p2#comment-1175 where Google has been giving us some feedback on our Google Pay doc for WC Pay.
They asked us to mention the test cards in the doc, but frankly if A) I can't really verify how testing it is supposed to work (due to this bug) and B) I suspect no actual live merchants can actually test Google Pay, then there's not much use in acting on their feedback.
New instance: 6349311-zen.
Seeing this again in 6781666-zen
Now seeing this issue on my testing site as well. Very vexing to try and debug anything with express payments while issues like these linger.
Another instance 6815123-zen
Another user with the same error here
Another case here: 7132135-zen
After some discussion with @mordeth, it seems as though reproducing this issue likely requires using a live account that is in test mode. When I attempted to test this while in dev mode, I was unable to reproduce.
I investigated and can confirm the error is not happening due to cached live keys. I'm looking for possible limitations of test keys used for Google Pay. However, Google Pay is working as expected with test accounts and dev-test keys.
More context: p1698144503463069-slack-C9976E5MJ
There is a limitation that requires live accounts to be internally connected to a test mode in order to use test keys. There is an ongoing discussion on how to proceed with that issue.
More context: p1698349022422829/1698144503.463069-slack-C9976E5MJ
cc @frosso
When we were onboarding WooPayments with Joola, both live test and dev accounts did not work for Google Pay.
Received another report of this on 7238008-zen.
The issue is blocked until a lasting solution to address the limitation of Google Pay with test keys becomes available.
More context: paJDYF-bdT-p2
I asked the Stripe team for additional details p1699442127812389/1698144503.463069-slack-C9976E5MJ
To recap , the core problems stems from two issues:
For merchants that only create a Live Stripe account and attempt to test Google Pay in Woo's Test mode, there's a key mismatch as there's no Stripe Test account and the testing fails.
The short term workaround is that merchants must create a Stripe Test account in dev_mode
The long term fix, that improves the UX, is for Stripe to automatically create a Test account whenever a new Live account is created. I suspect this would require some WooPayments code changes once Stripe builds the feature.
Stripe answer to if this same set of circumstances would impact Apple Pay:
The same issue that affects GPay when there’s no Stripe Test account, does that also impact Apple Pay?
Luckily, no. Apple's integration implicitly understands that if an account is connected to a platform in live mode, the platform will have access to test mode as well on that connected account. Google is different in this case.
Noting for @elizaan36 that the problem statement noted here https://github.com/Automattic/woocommerce-payments/issues/4083#issuecomment-1813374722, is a good candidate for consideration in the merchant settings design work, and overall how we approach setting and communicating Test Mode vs Dev Mode in the merchant setting UI. It's a bit scattered currently and the topic is complex.
cc @vladolaru
For context, we are changing "dev mode" to "sandbox mode" everywhere: https://github.com/Automattic/woocommerce-payments/pull/8004 to make more clear what is it about and letting test mode mean "live account in test mode".
Describe the bug
Occasionally, if a merchant attempts to test a purchase via Google Pay, they are unable to, because of the following console error:
To Reproduce
I have been unable to reproduce intentionally. If you attempt to make a purchase on my test site using Google Pay, you can reproduce the issue: https://justfortestingwcpay.com/
Login credentials for testing on this site can be found in p1648671585459649-slack-C7U3Y3VMYScreenshots
Expected behavior
Merchants should be able to test Google Pay via WCPay without encountering this issue.
Desktop (please complete the following information):
Additional context
Affected ticket: 4902883-zd-woothemes
Recent request: p1648671585459649-slack-C7U3Y3VMY
Previous incidents where this issue has occurred: