recurringPaymentWithCard static method
Implementation
static Future<dynamic> recurringPaymentWithCard({
required String publicKey,
required String email,
required String cardId,
required String currency,
}) async {
try {
final dateNow = DateTime.now();
final tnxRef = dateNow.millisecondsSinceEpoch;
var response = await Fetcher.fetch(
method: Method.post,
path: '/payment-engine/api/v1/web-engine/process/card-request',
publicKey: publicKey,
payloads: {
"cardRequestType": "TOKEN_PAYMENT",
"email": email,
"transactionRef": "${tnxRef}QLCUP",
"currency": currency,
"cardId": cardId
});
return response;
} catch (e) {
throw Exception(e);
}
}