Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Language Change Resets Payer Details in SetupPayerDetailsViewController #12

Open
Matejkob opened this issue Aug 26, 2024 · 0 comments
Open

Comments

@Matejkob
Copy link

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:

  1. Create a Merchant instance as per the SDK documentation:

    let merchant = Merchant(
        authorization: Merchant.Authorization(
            clientId: "***",
            clientSecret: "***"
        ),
        environment: .sandbox
    )
  2. 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)
    }
  3. Open the SDK and navigate to the SetupPayerDetailsViewController.

  4. Enter values for payerName and payerEmail.

  5. Change the language from PL to English EN.

  6. Observe that the data in the payerName and payerEmail fields 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant