Reply
Regular Contributor
Posts: 74
Registered: ‎03-21-2017

Duplicate Transaction error

I have used accept hosted payment form with iFrame integration.

 

We are doing some regression testing with sandbox account with live mode.

 

I have entered credit card information in iFrame but 'accidentally' put in the wrong card code, i got the error message 'transaction declined', then I fixed the card code and re-submit same payment from with same session and payment token.

 

On that second submission I'm getting the duplicate transaction error.

 

My understanding is if we found card number  or ccv code  in-correct then after correction, transcation should successfully placed without giveing duplicate tranaction error.

 

 

I am not sure whether it is expcted behaviour and my understanding wrong.

 

Can anyone pleae hlep me on this ?

Highlighted
Moderator
Posts: 50
Registered: ‎06-26-2018

Re: Duplicate Transaction error

Hi, 

 

The fields which are validated for a duplicate transaction are as follows:

                 

API Login ID
Credit Card Number

Expiration Date

Transaction Type

Bank Account Number

Routing Number

Purchase Order Number

Amount

Invoice Number

Customer ID

First Name

Last Name

Company

Address

City

State

Postal Code

 

The card code value is not included in validation of a duplicate transaction, however the credit card number is. 

 

When a transaction is unsuccessful due to the card code value being submitted with an incorrect value, you will need to change one of the above fields in some manner before submitting again or adjust the duplicate window setting value to your specified needs and including this in your getHostedPaymentPageRequest. 

 

Hhere is a working example of including the duplicate window value in a getHostedPaymentPageRequest

 

<getHostedPaymentPageRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">

              <merchantAuthentication>

                             <name>APILogin</name>

                             <transactionKey>TransKey</transactionKey>

              </merchantAuthentication>

              <transactionRequest>

                             <transactionType>authCaptureTransaction</transactionType>

                             <amount>20.00</amount>

                             <order>

                                           <invoiceNumber>INV-12345</invoiceNumber>

                                           <description>Product Description</description>

                             </order>

                             <lineItems>

                                           <lineItem>

                                                          <itemId>1</itemId>

                                                          <name>vase</name>

                                                          <description>Cannes logo </description>

                                                         <quantity>18</quantity>

                                                          <unitPrice>45.00</unitPrice>

                                           </lineItem>

                             </lineItems>

                             <tax>

                                           <amount>4.26</amount>

                                           <name>level2 tax name</name>

                                           <description>level2 tax</description>

                             </tax>

                             <duty>

                                           <amount>8.55</amount>

                                           <name>duty name</name>

                                           <description>duty description</description>

                             </duty>

                             <shipping>

                                           <amount>4.26</amount>

                                           <name>level2 tax name</name>

                                           <description>level2 tax</description>

                             </shipping>

                             <poNumber>456654</poNumber>

                             <customer>

                                           <id>99999456654</id>

                             </customer>

                             <billTo>

                                           <firstName>Ellen</firstName>

                                           <lastName>Johnson</lastName>

                                           <company>Souveniropolis</company>

                                           <address>14 Main Street</address>

                                           <city>Pecan Springs</city>

                                           <state>TX</state>

                                           <zip>44628</zip>

                                           <country>USA</country>

                             </billTo>

                             <shipTo>

                                           <firstName>China</firstName>

                                           <lastName>Bayles</lastName>

                                           <company>Thyme for Tea</company>

                                           <address>12 Main Street</address>

                                           <city>Pecan Springs</city>

                                           <state>TX</state>

                                           <zip>44628</zip>

                                           <country>USA</country>

                             </shipTo>

                             <customerIP>192.168.1.1</customerIP>

                             <transactionSettings>

                                           <setting>

                                                          <settingName>testRequest</settingName>

                                                          <settingValue>true</settingValue>

                                           </setting>

                                           <setting>

                                                          <settingName>recurringBilling</settingName>

                                                          <settingValue>Y</settingValue>

                                           </setting>           

                                           <setting>

                                                          <settingName>allowPartialAuth</settingName>

                                                          <settingValue>Y</settingValue>

                                           </setting>           

                                           <setting>

                                                          <settingName>duplicateWindow</settingName>

                                                          <settingValue>10000</settingValue>

                                           </setting>                                                      

                             </transactionSettings>

                             <userFields>

                                           <userField>

                                                          <name>MerchantDefinedFieldName1</name>

                                                          <value>MerchantDefinedFieldValue1</value>

                                           </userField>

                                           <userField>

                                                          <name>favorite_color</name>

                                                          <value>blue</value>

                                           </userField>

                             </userFields>

              </transactionRequest>

              <hostedPaymentSettings>

                             <setting>

                                           <settingName>hostedPaymentBillingAddressOptions</settingName>

                                           <settingValue>{"show": false, "required":false}</settingValue>

                             </setting>

                             <setting>

                                           <settingName>hostedPaymentShippingAddressOptions</settingName>

                                           <settingValue>{"show": false, "required":false}</settingValue>

                             </setting>

                             <setting>

                                           <settingName>hostedPaymentButtonOptions</settingName>

                                           <settingValue>{"text": "Pay"}</settingValue>

                             </setting>

                             <setting>

                                           <settingName>hostedPaymentReturnOptions</settingName>

                             <settingValue>{"url":"https://www.mystore.com/good","urlText":"Continue","cancelUrl":"https://www.mystore.com/cancel","can...>

                             </setting>

              </hostedPaymentSettings>

</getHostedPaymentPageRequest>

 

I hope this information is helpful to you.

 

Thank you,

Elaine