-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Description:
I encountered a bug related to the SetupPayerDetailsViewController in the SDK when using it for iOS. The issue occurs when changing the language after entering the payer's details, which causes the data in the payerName and payerEmail fields to reset to their default values.
Steps to Reproduce:
-
Create a
Merchantinstance as per the SDK documentation:let merchant = Merchant( authorization: Merchant.Authorization( clientId: "***", clientSecret: "***" ), environment: .sandbox )
-
Configure the SDK with the following code:
do { try TpayModule .configure(merchant: merchant) .configure(merchantDetailsProvider: MyCustomMerchantDetailsProvider()) .configure( paymentMethods: [ .payPo, .pbl ] ) .configure(preferredLanguage: .pl) } catch { print(error) }
-
Open the SDK and navigate to the
SetupPayerDetailsViewController. -
Enter values for
payerNameandpayerEmail. -
Change the language from PL to English EN.
-
Observe that the data in the
payerNameandpayerEmailfields resets to their default values (empty inputs in this case).
Expected Behavior:
The payerName and payerEmail fields should retain the modified data even after the language is changed. If an additional PayerContext was provided, the fields should not reset to the data from the PayerContext but rather retain any manual modifications made by the user.
Actual Behavior:
After changing the language, the data in the payerName and payerEmail fields resets to their default state (empty inputs). If a PayerContext is provided, the fields reset to the data from the PayerContext instead of keeping the modified input.
Environment:
- SDK Version: 1.2.0
- iOS Version: 17.2
Additional Context:
This issue affects the user experience as it forces users to re-enter their information after a language change, which can be particularly inconvenient. The expected behavior would be for the data to persist regardless of language changes unless explicitly reset.