Mandatory SDK initialization:
RevolutPayments.revolutPay.init(environment: RevolutPayEnvironment, returnUri: String, merchantPublicKey: String, requestShipping: Boolean)
Button instantiation:
RevolutPayments.revolutPay.provideButton(
context: Context,
params: ButtonParams
): RevolutPayButton
Create Revolut Pay promotional banner widget:
RevolutPayments.revolutPay.providePromotionalBannerWidget(
context: Context,
params: BannerParams
): RevolutPayButton
Set up the callback to be invoked once the user clicks the Revolut Pay button:
Controller.setHandler(onClick: (ConfirmationFlow) -> Unit)
Set up the callback to be invoked once the payment is successfully confirmed or failed:
Controller.setOrderResultCallback(orderResultCallback: OrderResultCallback)
Set up orderToken
once the order has been created:
ConfirmationFlow.setOrderToken(orderToken: String)
Attach an instance of Lifecycle
to the button:
ConfirmationFlow.attachLifecycle(lifecycle: Lifecycle)
Proceed with the payment once orderToken
and Lifecycle
has been set:
ConfirmationFlow.continueConfirmationFlow()