Open
Description
Describe the bug
We implemented adyen in our app, but it seems that the locale on android isn't working at all. We tried different Countrycodes and locales, either with both of the settings changed, sometimes only one, but it still defaults to english. On iOS it's working as expected
To Reproduce
const getEnvironment = () => {
if (testmode) return 'test';
return 'live-eu';
};
const config: Configuration = {
clientKey: sessionclientid,
returnUrl: 'myapp://payment',
countryCode: 'DE',
locale: 'de-DE',
amount: {
value: Math.round(amount * 100),
currency: 'EUR',
},
environment: getEnvironment(),
applepay: {
merchantID: applemerchantid,
},
card: {
showStorePaymentField: false,
},
analytics: {
verboseLogs: true,
},
};
const client = new AdyenClient(apikey, apiendpoint);
const createPayment = useCallback(async (data: any) => {
const key = `${user.id}_${moment().unix()}`;
const body = {
reference: key,
amount: config.amount,
deliveryAddress: deliveryAddress,
billingAddress: billingAddress,
paymentMethod: data.paymentMethod,
merchantAccount: merchantid,
returnUrl: config.returnUrl,
shopperInteraction: 'Ecommerce',
};
return await client.createPayment(body);
}, []);
Expected behavior
The correct locale should be loaded. In our case german since it's supported according to https://github.com/Adyen/adyen-react-native/blob/develop/docs/Localization.md
Smartphone (please complete the following information):
- Device: Samsung S24+
- OS: Android 14
Also testet on different emulators
Additional context
Part of our package.json
"@adyen/react-native": "^2.4.1",
"react": "18.2.0",
"react-native": "0.73.1",