Open dimitriBouteille opened 1 year ago
Hi @dimitriBouteille ,
Does your store have any Japanese language packs or similar extensions installed, or simply the CSV data you provided in the directory_country_region_name
table? I think your proposed solution seems very sound, but I would like to test it out locally and make sure there are no other areas where the prefecture/region translation should be addressed.
Thanks, Spencer
Hi,
I am setting up Amazon Pay on a Japanese store. When I load the information via the graphQl
checkoutSessionDetails
query, I see that when the region is translated, the region information is not returned.Here is a result of the query
checkoutSessionDetails
:For the delivery address no problem, because Tokyo is the default translation. For the billing address, the region 東 京 都 exits well but this is the translated version of Tokyo.
Default translation in
directory_country_region
table :These are the addresses configured in Amazon :
What happened instead
Region information is not loaded and an error occurs when saving the billing address (
regionIdは必須項目です。
)Steps to reproduce the issue
:warning: To reproduce the bug, you must import the translations for the JP store in table
directory_country_region_name
: region_names.csvcheckoutSessionDetails
Normally the billing address has no region_id / region_code.
Your setup
Fix proposal
This function should be improved
\Amazon\Pay\Helper\Address::getRegionData()
: