capturePayment static method
Capture payment
Implementation
static Future<void> capturePayment({
required LRCapturePayment capturePayment,
}) async {
try {
final Map<String, dynamic> arguments = {
'userId': capturePayment.userId,
'amount': capturePayment.amount,
'paymentId': capturePayment.paymentId,
'type': capturePayment.type?.name ?? PaymentType.DEFAULT_PAYMENT.name,
'status': capturePayment.status?.name ?? PaymentStatus.PAYMENT_COMPLETED.name,
};
await _channel.invokeMethod('capturePayment', arguments);
developer.log('Payment captured successfully', name: packageName);
} on PlatformException catch (e) {
developer.log('Failed to capture payment: ${e.message}',
error: e, name: packageName);
rethrow;
}
}