square-php-sdk icon indicating copy to clipboard operation
square-php-sdk copied to clipboard

Postal Code requires 5 characters in regions which do not have 5 characters.

Open turbo124 opened this issue 3 years ago • 3 comments

We are seeing an issue with users in Australia attempting to use this gateway. Square injects the postal code as a required field, but does not accept a 4 digit code (thats all we have in Australia).

The API also returns an ambiguous error message INVALID_CARD_DATA which causes some confusion.

https://github.com/invoiceninja/invoiceninja/issues/6729

turbo124 avatar Oct 09 '21 01:10 turbo124

@turbo124 which gateway are you referring to? Also, where are you seeing that a postal code is being required?

wolfadex avatar Jan 24 '22 15:01 wolfadex

I'm seeing the same issue, I'm only using the sandbox mode at the moment, but will need to accept payments in £ when we go live and for customer data will be using their postcode for the CVS check which will be up to 8 characters

I'm using the CreatePayment function, in the PHP SDK Payments API

At the moment it only allows a 5 number zip code which is presumably an American zip code of 5 numbers, ie no letters allowed so it will not accept UK postcodes containing letters and numbers, and usually over 5 digits

This is when the customers country is set to GB and the currency code set to GBP

amcdonald-4mentalhealth avatar Jan 26 '22 10:01 amcdonald-4mentalhealth

@amcdonald-4mentalhealth thanks for the details! That's definitely an issue for many countries.

wolfadex avatar Jan 26 '22 16:01 wolfadex

Hi all, thanks for all of your feedback here,

I have confirmed that when trying to reproduce this issue with the latest php sdk that the issue seems to be resolved and I can take payments with non US zip codes.

Cheers!

zenmasterjobo avatar Mar 13 '24 20:03 zenmasterjobo