doPayment method

void doPayment(
  1. BuildContext _cnx, {
  2. dynamic vendor_key,
  3. dynamic title,
  4. dynamic description,
  5. dynamic amount,
  6. dynamic transaction_id,
})

Implementation

void doPayment(BuildContext _cnx,
    {vendor_key, title, description, amount, transaction_id}) async {
  _buildContext = _cnx;
  Navigator.push(
      _buildContext, MaterialPageRoute(builder: (context) => Loading()));
  Map<String, String> postValue = new Map<String, String>();
  postValue["vendor_key"] = vendor_key.toString();
  postValue["title"] = vendor_key.toString();
  postValue["description"] = description.toString();
  postValue["amount"] = amount.toString();
  postValue["transaction_id"] = transaction_id.toString();
  postValue["response_url"] = ReqModel.SUCCESS_URL;
  postValue["cancellation_url"] = ReqModel.FAILED_URL;
  ApiHelper _apiHelper = ApiHelper(this);
  _apiHelper.processRequest(body: postValue);
}