startPayment method

void startPayment({
  1. dynamic onSuccess(
    1. ImePaySuccessResponse
    )?,
  2. dynamic onFailure(
    1. String?
    )?,
})

Implementation

void startPayment({
  Function(ImePaySuccessResponse)? onSuccess,
  Function(String?)? onFailure,
}) async {
  _channel.invokeMethod("ime_pay#startPayment", {
    "merchant_code": merchantCode,
    "merchant_name": merchantName,
    "module": module,
    "user_name": userName,
    "password": password,
    "reference_id": refId,
    "amount": amount.toString(),
    "recording_service_url": recordingServiceUrl,
    "delivery_service_url": deliveryServiceUrl,
    "env": environment.toString().split('.').last
  });
  _listenToPaymentResponse(onSuccess, onFailure);
}