Esempio n. 1
0
        /// <summary>
        /// Confirms payment
        /// </summary>
        /// <param name="res"></param>
        /// <returns></returns>
        private string confirm(processCheckOutResponse res)
        {
            string TRX_ID        = res.TRX_ID;
            string DESCRIPRION   = res.DESCRIPTION;
            string MERCHANT_T_ID = MERCHANT_TRANSACTION_ID;
            string status        = client.confirmTransaction(header, ref TRX_ID, ref MERCHANT_TRANSACTION_ID, out DESCRIPRION);

            return(checkForErrors(status));
        }
Esempio n. 2
0
 public string pay()
 {
     try
     {
         //Make a request to pay
         checkoutresponse = getClient(getCheckOutHeader(), getCheckOutRequest()).processCheckOut(header, request);
         //Check if successfull
         if (checkoutresponse.RETURN_CODE == "00")
         {
             //go ahead and confirm the transaction
             return(confirm(checkoutresponse));
         }//success
         //Confirm payment
         return(checkForErrors(checkoutresponse.RETURN_CODE));
     }
     catch (EndpointNotFoundException ex)
     {
         string message = ex.Message;
         return(null);
     }
 }