removePayment static method

Future<void> removePayment({
  1. required LRRemovePayment removePayment,
})

Remove captured payment

Implementation

static Future<void> removePayment({
  required LRRemovePayment removePayment,
}) async {
  try {
    final Map<String, dynamic> arguments = {
      'userId': removePayment.userId,
      'paymentId': removePayment.paymentId,
    };

    await _channel.invokeMethod('removePayment', arguments);
    developer.log('Payment removed successfully', name: packageName);
  } on PlatformException catch (e) {
    developer.log('Failed to remove payment: ${e.message}',
        error: e, name: packageName);
    rethrow;
  }
}