moneris .net api transaction

hi

 

i am making test transaction on moneris .net api in pakistan and getting "Global Error Receipt" in response . can i access api from pakistan ?

 

thanks  

  • Yes, you can use the API. Can you please answer the following questions:

    -transaction you're using (copy-paste the code you're using if possible as well)?
    -store ID and are you setting test mode or not? (test mode needs to be set to ON if test credentials are used)
    -API version and language?
  • In reply to ME_Moneris:

    Hello Me_Moneris,

    I am having exactly the same issue. I'm using the Hosted Tokenization method, and the API i'm using for the purchase transaction is eSELECTplus_DotNet_API_v255-Vault. I'm testing this on my local machine with c#, .NET Framework 4.6.

    Store ID: store3


    In the Receipt object returned, it had a string attribute of "globalErrorReceipt" that basically is an xml that had something like "<ReceiptId>Global Error Receipt</ReceiptId>" , and a currentTag attribute that says "TimedOut".

    Please see below my test code:
    The data_key is from request parameters. The value was passed from another page that sends the card number and gets a dataKey from moneris. Then it sends a request to this page with the dataKey value.


    protected void Page_Load(object sender, EventArgs e)
    {
    string responseMsg = "";
    /********************** Request Variables ****************************/
    string host = "esqa.moneris.com";
    string store_id = "store3";
    string api_token = "yesguy";
    /********************** Transaction Variables ************************/
    string data_key = Request.Params["dataKey"];
    string order_id = "testOrderABC";
    string amount = "1.00";
    //string cust_id = "customer1"; //if sent will be submitted, otherwise cust_id from profile will be used
    string crypt_type = "1";

    /************************ Request Object ******************************/
    ResPurchaseCC resPurchaseCC = new ResPurchaseCC(data_key, order_id, amount, crypt_type);

    HttpsPostRequest mpgReq = new HttpsPostRequest(host, store_id, api_token, resPurchaseCC);


    /************************ Receipt Object ******************************/
    try
    {
    Receipt receipt = mpgReq.GetReceipt();

    responseMsg = "DataKey = " + receipt.GetDataKey() +
    "ReceiptId = " + receipt.GetReceiptId()+
    "ReferenceNum = " + receipt.GetReferenceNum()+
    "ResponseCode = " + receipt.GetResponseCode()+
    "AuthCode = " + receipt.GetAuthCode()+
    "Message = " + receipt.GetMessage()+
    "TransDate = " + receipt.GetTransDate()+
    "TransTime = " + receipt.GetTransTime()+
    "TransType = " + receipt.GetTransType()+
    "Complete = " + receipt.GetComplete()+
    "TransAmount = " + receipt.GetTransAmount()+
    "CardType = " + receipt.GetCardType()+
    "TxnNumber = " + receipt.GetTxnNumber()+
    "TimedOut = " + receipt.GetTimedOut()+
    "ResSuccess = " + receipt.GetResSuccess()+
    "PaymentType = " + receipt.GetPaymentType()+
    "IsVisaDebit = " + receipt.GetIsVisaDebit();

    }
    catch (Exception ee)
    {
    Console.WriteLine(ee);
    }

    Response.Clear();
    Response.Write(responseMsg);
    Response.End();
    }

    I might be doing something wrong or missing something here. Please help.

    Thanks.

  • In reply to SunnySpeedy:

    It looks like I didn't set the expiry date for the card. After I added resPurchaseCC.SetExpdate("1708"); it was returning successful transaction response.