Closed asumaran closed 4 months ago
@dwainm although it's focused on checkout, I think it's a better fit for your team due to carding prevention involved. Could you please prioritize it and take a look?
It would be ideal if we could confirm whether this is a legitimate issue or if it only occurs when using the local server.
Sure @vbelolapotkov , we'll take a look at it.
@asumaran hey 👋 I think you forgot to send the card testing nonce in the checkout data to the server, which is added to the page when the card testing prevention is enabled, and checked by the server. That might be the cause of it. If you have capacity to solve it by looking to the previous code about how it was sent, feel free to own the issue, otherwise, you'd need to help us set up ECE on our locals :)
Also FYI, I added a setting to the WCPay dev tools plugin that mimics the card testing prevention flag as activated on the client. You can use that option to test this scenario too.
@tpaksu I've noticed that the wcpay-fraud-prevention-token
is defined on the cart and checkout pages, but it’s missing from the product page. When the token is present, the checkout process completes smoothly.
I'll address this for ECEs (and PRBs) as I'm currently handling it.
The token isn't being added to the product page https://github.com/Automattic/woocommerce-payments/blob/261a1ec990b1fe84d512029c6e90995b6c790cf6/includes/fraud-prevention/class-fraud-prevention-service.php#L89-L93
I'll submit the fix as part of https://github.com/Automattic/woocommerce-payments/pull/8987
Thanks for the confirmation, the digging, and finding the fix @asumaran! Let me know if you need anything.
Describe the bug
Originally reported by @ricardo in https://github.com/Automattic/woocommerce-payments/pull/8937#issuecomment-2161724831. A site with the Fraud Prevention Service enabled fails to checkout using the Express Checkout Element.
To Reproduce
card_testing_protection_eligible
is set totrue
Actual behavior
Error message is shown: "We're not able to process this payment. Please refresh the page and try again." on checking out using ECE.
Expected behavior
Payment should finish without issues and no error should be displayed.