-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Square payment gateway issues - Server Error 500 / Declined_Verification / Invalid Card Data / "Enter a valid card number" #6729
Comments
When we get clarity on #6681 we can move onto this one :) |
I have entered my square Sandbox credentials for Square under the gateway settings and ticked test mode (now that its a tick box as per #6681 The credit card numbers field appears, I enter a valid card and click Pay now and it still reports "Enter a valid card number". Is this not the correct usage of the Sandbox mode? Please explain the influence the "test mode" variable has under the gateway settings, or what I should be doing otherwise in order to test Square payments in a sandbox fashion before using my production credentials. |
Sandbox mode allows you to test your payment flow with test credentials and credit cards, the credit card box should appear in this mode, you may need to click on the radio button to show the credit card dialog (this may be a bug). |
@turbo124 Because this is what I've done, and the credit card box DOES appear but as per the issue reported, just says to "enter a valid card number" when clicking pay now. Card details are 100% correct and I've tried multiple cards. Pretty sure I tried production credentials without test mode ticked as well and got the same error. I was willing to pay myself to test this haha |
Your using these values, right? |
As usual, some tests in real time here too: https://www.youtube.com/watch?v=Thx7QWAfHGU |
this fixes for customers() issue The second issue is for SCA implementations for EU, we'll look into this. |
Thanks David! Also as well as SCA implementation, please also add Square Gift Card implementation if possible! |
@turbo124 As well as on my box at home, I also tested with 5.3.21 FRESH on my Namecheap shared hosting via Softaculous and retested. The server error 500 occurs the same when attempting to pay in the client portal, regardless of what payment gateway I use. That's an automated script, so it 100% shouldn't be anything I could of influenced to cause the issue. Laravel:
|
please update to 5.3.22, i've just tagged it https://github.com/invoiceninja/dockerfiles/releases/tag/5.3.22 |
@turbo124 Here's the Softaculous install and what happens if needed: https://youtu.be/8oyhFB5DiP8 Laravel:
|
can you confirm if you see the class InstantPayment in app\services\clientportal\instantpayment.php please? |
(Referring to my own box at home) There was an error processing your payment [500]. Please try again later. I have Sandbox credentials in the gateway settings and test mode is ticked (as I am trying to verify this is working with Sandboxing first) |
Thanks, this is a bug that has been introduce when implementing Square SCA requirements. There is a bug in square with the particular flow we use (Create Payment - then store card details), we need to refactor this to Create the card first, and then capture the payment afterwards. |
I'm digging into this deeper. There are a couple of issue with the Square gateway (which i've raised with them directly also).
From my testing, if you enter and save a 5 digital postal code on the client address, and then use this in a payment, the payment goes through correctly. I'll tag issue on their repo for tracking |
I've had a chat with Square about this. If you are in production, you'll need to ensure that your client postal code matches what is in Invoice Ninja and then what is entered into the Square credit card box. When you are in the testing environment, Square is expected a 5 digit postal code so for your testing, you'll need to ensure your postal code in invoice ninja is also 5 digits. |
Thanks David, I can confirm that utilising a 5 digit postcode works in Sandbox. Since that works, I find it likely production would work. I will find the right time to deploy it for production once I've played with it and checked it further with testing credentials. I did however find another issue during this testing, and have created #6844 which is related to the Client Portal |
What version of Invoice Ninja are you running? ie v4.5.25 / v5.0.30
v5.3.17-C59
What environment are you running?
Shared Hosting
Describe the bug
The Square payment gateway is still not working.
Upon attempting to pay via the client portal, after entering correct card details, the error "Enter a valid card number" is presented and the payment cannot proceed. This is the behaviour with sandbox credentials and regardless of test mode being true or false, invoice ninja continues to display the gateway as "in test mode". See issue #6681
Steps To Reproduce
Configure the Square payment gateway credentials.
Create an invoice.
Go to the client portal as that client and attempt to pay the invoice with credit card.
Enter a valid card number, expiry and security code then click pay now.
Screenshots
![carderror](https://user-images.githubusercontent.com/52687659/134857010-5bb9bddc-4dae-4017-92be-66bbff0c14d2.png)
Additional context
I have tried with test mode true or false, it makes no difference.
I am testing with my sandbox API credentials from Square.
Production Credentials
If I try and use the production credentials, the field to enter the card details doesn't appear at all.
Tried:
The text was updated successfully, but these errors were encountered: