[Kassa Compleet] What is the right format of a customer's locale in a «POST /v1/orders/» request?


(Dmitry Fedyuk) #1

As you can see in the JSON Schema of a «POST /v1/orders/» request, the customer/locale property has the following specification:

"locale": {
	"description": "POSIX locale without codeset and modifier",
	"type": ["string", "null"],
	"pattern": "^[a-zA-Z]{2}(_[a-zA-Z]{2})?$"

So the following values are correct:

  • nl
  • NL
  • nl_nl
  • nl_NL

And even:

  • nL
  • Nl
  • nL_nL
  • Nl-nL

end so on.

The official Kassa Compleet extrension for Magento 1.x always uses the nl_NL format because of using the standard Mage_Core_Model_Locale::getLocaleCode() method:

[Ginger Payments] The «customer/locale» property is absent in the JSON Schema of a «POST /v1/orders/» request, but is passed by the official extension for Magento 1.x
The official Ginger Payments and Kassa Compleet extensions for Magento 1.x pass the same customer data to «POST /v1/orders/» besides the «customer/locale» format