getCustomUiModelCards function
This function is used to get the required customUi model cards for payment processing. It takes all the essential information needed for the process, like payment mode, brand, checkoutId, shopperResultUrl, lang, cardNumber, holderName, month, year, cvv, and enabledTokenization. It then generates and returns a map containing each of the data fields.
Implementation
Map<String, String?> getCustomUiModelCards({
required PaymentMode paymentMode,
required String brand,
required String checkoutId,
required String shopperResultUrl,
required String lang,
required String cardNumber,
required String holderName,
required int month,
required int year,
required int cvv,
required bool enabledTokenization,
}) {
return {
"type": PaymentConst.customUi,
"mode": paymentMode.toString().split('.').last,
"checkoutid": checkoutId,
"brand": brand,
"lang": lang,
"card_number": cardNumber,
"holder_name": holderName,
"month": month.toString(),
"year": year.toString(),
"cvv": cvv.toString(),
"EnabledTokenization": enabledTokenization.toString(),
"ShopperResultUrl": shopperResultUrl,
};
}