initPayment method

dynamic initPayment (
  1. {Function onSuccess,
  2. Function onError}
)

Implementation

initPayment({Function onSuccess, Function onError}){
  _channel.invokeMethod("khaltiPayment", {
    "merchantKey": _merchantKey,
    "productId": _productId,
    "productName": _productName,
    "productUrl": _productUrl,
    "urlSchemeIOS": _urlSchemeIOS,
    "amount": _amount,
    "customData": _customData,
  });
  _listenToResponse(onSuccess, onError);
}