paymentTransaction method
Future<RedeTransactionResponse>
paymentTransaction({
- required RedePaymentType paymentType,
- required int amount,
- int? installment,
Implementation
Future<RedeTransactionResponse> paymentTransaction({
required RedePaymentType paymentType,
required int amount,
int? installment,
}) async {
try {
Map<String, dynamic> params = {
'amount': amount,
};
if (installment != null) {
params['installment'] = installment;
}
final response = await _channel.invokeMethod(paymentType.method, params);
final model = RedeTransactionResponse.fromJson(response);
return model;
} catch (e) {
rethrow;
}
}