presentPaymentMethodSelection

fun presentPaymentMethodSelection(selectedPaymentMethodId: String? = null)

Launch the PaymentMethodsActivity to allow the user to select a payment method, or to add a new one.

The initial selected Payment Method ID uses the following logic.

  1. If {@param userSelectedPaymentMethodId} is specified, use that

  2. If the instance's PaymentSessionData.paymentMethod is non-null, use that

  3. If the instance's PaymentSessionPrefs.getPaymentMethod is non-null, use that

  4. Otherwise, choose the most recently added Payment Method

Parameters

selectedPaymentMethodId

if non-null, the ID of the Payment Method that should be initially selected on the Payment Method selection screen