getPaymentPageUrl static method

String getPaymentPageUrl(
  1. String paymentFrameUrl,
  2. String transactionNo,
  3. String clientName,
  4. String clientMobile,
)

Generates the payment page URL for a transaction. paymentFrameUrl - The URL of the payment frame. transactionNo - The transaction number for which to generate the payment URL. clientName - The name of the client making the payment. clientMobile - The mobile number of the client making the payment. Returns the payment page URL.

Implementation

static String getPaymentPageUrl(
  String paymentFrameUrl,
  String transactionNo,
  String clientName,
  String clientMobile,
) {
  // Encode the strings to make it safe for literal use as a URI component.
  clientName = Uri.encodeComponent(clientName);
  clientMobile = Uri.encodeComponent(clientMobile);

  return '$paymentFrameUrl/$transactionNo?n=$clientName&m=$clientMobile';
}