#Keyur-error

1 messages · Page 1 of 1 (latest)

muted orchid
#

Can you show me the code around that?

void remnant
#
            ApplicationInfo ai = getPackageManager().getApplicationInfo(this.getPackageName(), PackageManager.GET_META_DATA);
            Bundle bundle = ai.metaData;
            final String baseUrl = bundle.getString("paymentServiceUrl");

            Bundle arguments = getIntent().getExtras();

            if (arguments != null){
                final String customerID = arguments.getString("customerID");
                final String token = arguments.getString("token");

                if (customerID != null && token != null){
                    api = new PaymentService(baseUrl, token);
                    CustomerSession.initCustomerSession(getApplicationContext(), new ParkChampEphemeralKeyProvider(baseUrl, token, customerID, PaymentMethodsActivity.this));

                }
            }

        } catch (PackageManager.NameNotFoundException e) {
            EventLogger.handleError(this, "Failed to load meta-data, NameNotFound: " + e.getMessage());
        } catch (NullPointerException e) {
            EventLogger.handleError(PaymentMethodsActivity.this, "Failed to load meta-data, NullPointer: " + e.getMessage());
        }```
urban adder
#

@void remnant hello! Seems like you came back with the exact same question as last time unfortunately, without the additional information we had asked. The recommendation I gave you last time is still the right one. You are calling/showing PaymentSession before you have properly called CustomerSession.initCustomerSession. This means there's a race condition in your code where the code you shared above is not called when it should
This can be tracked by adding clear logs to the code itself to debug this on your end

#

one colleague also mentioned that it's surprising how you pass PaymentMethodsActivity.this to new ParkChampEphemeralKeyProvider and that it might be your race condition

urban adder
#

@void remnant Did you read what I said?