getDLMobileCheckoutBottomSheet

fun getDLMobileCheckoutBottomSheet(theme: DLMobileCheckoutTheme = DLMobileCheckoutTheme(), amount: Double? = null, currencyCode: String? = null, onSuccess: (DLCheckoutResult) -> Unit?, onError: (String) -> Unit?): BottomSheetDialogFragment

Creates the BottomSheetDialogFragment containing the checkout UI ready to be presented.

Return

The BottomSheetDialogFragment instance if it was successfully created.

Parameters

amount

The total amount that you want to charge.

currencyCode

The currency of the amount parameter. For example USD for US dollar.

onSuccess

Called when the operation is successful and a payment token was generated. When this is called the checkout UI has been already dismissed.

onError

Called when the operation fails. The error parameter includes information about what went wrong. When this is called the checkout UI has been already dismissed.