generatePaymentLink static method

dynamic generatePaymentLink({
  1. required String apiKey,
  2. required num amount,
  3. required String orderId,
  4. String? successUrl = lsu,
  5. String? failureUrl = lfu,
})

Implementation

static generatePaymentLink({
  required String apiKey,
  required num amount,
  required String orderId,
  String? successUrl = lsu,
  String? failureUrl = lfu,
}) {
  var paymentLink = paymentUrl;

  paymentLink += "api_key=$apiKey";
  paymentLink += "&amount=$amount";
  paymentLink += "&success_url=$successUrl";
  paymentLink += "&failure_url=$failureUrl";
  paymentLink += "&code=$orderId";
  paymentLink += "&type=Internal";

  return paymentLink;
}