Ingenico-ePayments / connect-extension-magento2

Ingenico Connect based Shopping Cart Extension for Magento 2.x
https://epayments.developer-ingenico.com/documentation/ecommerce-extensions/magento-2/
MIT License
4 stars 4 forks source link

China locale issue #8

Closed ivanigitalboutique closed 4 years ago

ivanigitalboutique commented 4 years ago

We have China store which used "zh_Hans_CN" locale Ingenico API return error for this locale example from log:
response: { "errorId": "5e4bc68000265b822f4b9ef1aa5867d9", "errors": [ { "code": "100099", "id": "INVALID_VALUE", "category": "CONNECT_PLATFORM_ERROR", "propertyName": "hostedCheckoutSpecificInput.locale", "message": "INVALID_VALUE", "httpStatusCode": 400 }, { "code": "21000220", "id": "FIELD_LENGTH_INVALID", "category": "CONNECT_PLATFORM_ERROR", "propertyName": "hostedCheckoutSpecificInput.locale", "message": "FIELD_LENGTH_INVALID", "httpStatusCode": 400 } ] }

request locale data: "hostedCheckoutSpecificInput": { "locale": "zh_Hans_CN",

kanduvisla commented 4 years ago

Hello @ivanigitalboutique ,

Please refer to the documentation at https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/java/hostedcheckouts/create.html?paymentPlatform=ALL#hostedcheckouts-create-payload

It states that the max length of this field should be 6 characters. zh_Hans_CN is 10 characters. You can report this issue to your support contact at Ingenico so it can reach the API development team.

Since this is an issue with the API and not the Magento 2 module I'm closing this issue.

drewdhunter commented 4 years ago

@kanduvisla - By closing this - presumably you are stating that this module is therefore not compatible fully with Magento 2 and the chinese locales ?

kanduvisla commented 4 years ago

Hi @drewdhunter ,

As a workaround you could change the locale of your language pack to zh_CN. Please make sure that a language pack is configured in the Ingenico Configuration Center for the locale you are submitting. Available languages in the Configuration Center are:

We've created a ticket internally on how to deal with this with the Ingenico Connect module.

Ingenico-Shoppingcarts-zz commented 4 years ago

Hi @drewdhunter,

You seem very outspoken and capable so I'm confident you can help in providing the correct information to move forward.

Our API supports the setup of 2||3 character language code together with 2 character country code. Resulting in a max. 6 character string

There is no support for language packs in the format Language-script-country in our API and this is mirrored in Magento.

Based on your feedback I've tried to find any reference from Magento 2 on the standard of their language packs. I was able to find only the CLI for language packs management where they discuss the ISO-639-1 and the ISO 3166 as setup. (https://devdocs.magento.com/guides/v2.3/config-guide/cli/config-cli-subcommands-i18n.html)

If you know where Magento states their supports for the formats other than, xxx_xx or xx_xx we will add this to our backlog to be handled correctly conform the Magento standard.

As stated by @kanduvisla in case of use of our Hosted Checkout there should always be a relation between the local Magento and the availble language pack on the hosted.

kanduvisla commented 4 years ago

Hi @ivanigitalboutique

This issue has been resolved in version 2.2.0 of the module, that has been released today.