Gokul
Gokul

Reputation: 43

The transaction was not sent to the host because of a duplicate order id

Moneris payment gateway issues my form code is like this

<FORM METHOD="POST" ACTION="https://www3.moneris.com/HPPDP/index.php">
 <INPUT TYPE="HIDDEN" NAME="ps_store_id" VALUE="xxxxxxxx">
<INPUT TYPE="HIDDEN" NAME="hpp_key" VALUE="xxxxxxx">
<INPUT TYPE="HIDDEN" NAME="charge_total" VALUE="1.00">
<INPUT TYPE="SUBMIT" NAME="SUBMIT" VALUE="Click to proceed to Secure Page">
</form>

This code was running properly for the past few months. But now I've suddenly started getting an error message:

The transaction was not sent to the host because of a duplicate order id

This is on all my transactions. Could you please help me to fix it? Thanks in advance/

Upvotes: 1

Views: 3424

Answers (2)

O&#39;Neill
O&#39;Neill

Reputation: 374

I had the same error (using xml server posting), whenever the data I was sending it ended the same way:

{ result: 'success',
  code: 200,
  data:{
     ReceiptId: null,
     ReferenceNum: null,
     ResponseCode: null,
     ISO: null,
     AuthCode: null,
     TransTime: null,
     TransDate: null,
     TransType: null,
     Complete: false,
     Message: 'The transaction was not sent to the host because of a duplicate order id',
     TransAmount: null,
     CardType: null,
     TransID: null,
     TimedOut: false,
     BankTotals: null,
     Ticket: null,
     IsVisaDebit: false
    }
}

The solution? I removed the field "wallet_indicator" and now I get a complete answer!

Upvotes: 0

Christopher Ashley
Christopher Ashley

Reputation: 108

There must be an order ID in your code somewhere else. I tested the above code in both Moneris production and in Moneris QA and it worked without any errors.

If you don't specify an Order ID in your code then moneris will automatically generate a unique order ID for you.

In your response variables (that you recieved back from Moneris) you have this variable response listed:

 [response_order_id] => Cup150513 

However Cup150513 is not a Moneris Hosted Pay Page generated order ID. A Moneris Hosted Pay Page order ID will always start with mhp for example: mhp123456789. Since there's no order ID specified in the above code snippet - and since the above code works - it means that the order ID must be somewhere else in your code.

Here's what you can do:

  1. Look for the keywords order_id and Cup in your code to find out where the order ID is being generated.

  2. Remove the code that generates the order ID or change the code so that the order ID is always unique

Upvotes: 1

Related Questions