gopaycommunity / gopay-php-api

GoPay's PHP SDK for Payments REST API
MIT License
81 stars 38 forks source link

Error in localization for Slovenia #60

Closed stanislavKosacek closed 1 year ago

stanislavKosacek commented 1 year ago

The gateway does not load with the Slovenian localization.

Here instead of SI should be SL https://github.com/gopaycommunity/gopay-php-api/blob/3daba4fa0460648843d7e1904096ca10ff8dc868/src/Definition/Language.php#L24

standakouba commented 1 year ago

Hi @stanislavKosacek, can you please provide more information? I just tested it and everything seems fine. Thank you

stanislavKosacek commented 1 year ago

Hi @standakouba, the Slovenian language code is "SL," not "SI" (https://www.loc.gov/standards/iso639-2/php/langcodes_name.php?iso_639_1=sl). (locale code vs country code, like CS vs CZ)

If I set the Payment locale to the constant const SLOVENIAN = "SI; after redirecting to the payment gateway, the gateway redirects me to the Czech version. If I set the payment locale to "SL", then the gateway works well in Slovenian. On the production GoPay gateway, you can also see the locale code in the URL. Try to see what happens if you try to change the code in the URL to si or sl.

standakouba commented 1 year ago

Hi @stanislavKosacek, I found it, thanks