You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
⚠️ To reproduce the bug, you must import the translations for the JP store in table directory_country_region_name : region_names.csv
Start express Amazon Pay Checkout
Select shipping address with region with default translation (ie: Tokyo)
Select billing address with translated region (ie: 東京都)
Try execute checkoutSessionDetails
Normally the billing address has no region_id / region_code.
Your setup
Magento version: 2.4.5-p5
Amazon Pay Extension Version: 5.16.0
Fix proposal
This function should be improved \Amazon\Pay\Helper\Address::getRegionData() :
First, load region by code
If no region find, try load with default translation
if no region find, try load with translated region name with current store locale
The text was updated successfully, but these errors were encountered:
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.
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
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()
:The text was updated successfully, but these errors were encountered: