startPayKunPayment static method

Future<String> startPayKunPayment({
  1. String? merchantId,
  2. String? accessToken,
  3. String? customerName,
  4. String? customerEmail,
  5. String? customerPhone,
  6. String? productName,
  7. String? amount,
  8. String? currency,
  9. bool? isLive,
})

Implementation

static Future<String> startPayKunPayment(
    {String? merchantId,
    String? accessToken,
    String? customerName,
    String? customerEmail,
    String? customerPhone,
    String? productName,
    String? amount,
    String? currency,
    bool? isLive}) async {
  print("Start Paykun in Dart");
  final String transactionID =
      await _channel.invokeMethod('startPayKunPayment', {
    "merchantId": merchantId,
    "accessToken": accessToken,
    "customerName": customerName,
    "customerEmail": customerEmail,
    "customerPhone": customerPhone,
    "productName": productName,
    "amount": amount,
    "currency": currency,
    "isLive": isLive
  });

  print("OUTSIDE DART PLUGIN METHOD CALL");
  if (transactionID == null) {
    return "NA";
  } else {
    return transactionID;
  }
}