paypalPayment static method

Future<void> paypalPayment({
  1. required BuildContext context,
  2. required String clientId,
  3. required String secretKey,
  4. required List<Map<String, dynamic>> transactions,
  5. bool sandboxMode = true,
  6. String? note,
  7. String paymentGatewayName = "PayPal",
  8. dynamic onShowToast()?,
  9. dynamic onPaymentSuccess()?,
  10. dynamic onPaymentFailure()?,
  11. dynamic onPaymentCancel()?,
})

PayPal Payment

Implementation

static Future<void> paypalPayment({
  required BuildContext context,
  required String clientId,
  required String secretKey,
  required List<Map<String, dynamic>> transactions,
  bool sandboxMode = true,
  String? note,
  String paymentGatewayName = "PayPal",
  Function()? onShowToast,
  Function()? onPaymentSuccess,
  Function()? onPaymentFailure,
  Function()? onPaymentCancel,
}) async {
  return PaypalService().openPaypal(
    context: context,
    clientId: clientId,
    secretKey: secretKey,
    transactions: transactions,
    sandboxMode: sandboxMode,
    note: note,
    paymentGatewayName: paymentGatewayName,
    onShowToast: onShowToast,
    onPaymentSuccess: onPaymentSuccess,
    onPaymentFailure: onPaymentFailure,
    onPaymentCancel: onPaymentCancel,
  );
}