removePayment static method

  1. @Deprecated('Send the same paymentId with status PAYMENT_CANCELLED through trackEvent')
Future<void> removePayment({
  1. required LRRemovePayment removePayment,
})

Implementation

@Deprecated('Send the same paymentId with status PAYMENT_CANCELLED through trackEvent')
static Future<void> removePayment({
  // ignore: deprecated_member_use_from_same_package
  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;
  }
}