requestIdPayment method
Implementation
@override
Future<PaymentResponse> requestIdPayment(
{required PaymentRequest paymentRequest}) async {
dynamic responseMap = await apiBase.call(
RESTOption.post,
resource: _payments,
headers: headers,
body: paymentRequest.toJson(),
);
switch (responseMap["status"] as String) {
case "Authorized":
return PaymentResponse.fromMap(responseMap);
case "Pending":
return PaymentResponse3DS.fromMap(responseMap);
default:
return PaymentResponse.fromMap(responseMap);
}
}