I have been trying to get the PHP Sample working (v2/php_payment).
But no matter which card # I use to test, it always returns payment success and I never see the transactions show up in my Sandbox Dashboard.
From the list of cards here: https://developer.squareup.com/docs/testing/test-values, it says that I can use 4000000000000002 to get a “declined error” back. But this card always generates success code instead of failing.
I need to make sure the success/fail works before I can further integrate this solution into my existing PHP app.
Is this list of Card #s no longer valid perhaps? How do I test success/fail using a fake card in the sandbox?
I have a working sandbox and my .env file is correct - I can use the php_checkout sample without issue and it records the transactions in the sandbox. The problem is with the php_payment sample code. I want to use this to keep users on my site and detect the success/fail of their payment (in order to activate memberships, etc on my site), rather than use the checkout which has no return logic.
Any help would be appreciated, thanks!