cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

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 ?

raviparmarce88
Regular Contributor
2 REPLIES 2

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

ElaineM
Moderator Moderator
Moderator

Excuse me. But why the hell isn't this in the API? I used that API as a guide and I expect ALL settings to be in there. Now I released our product, the duplicate window is not 0, so my customers they are having issues with submitting the form when they get their CCV wrong. Which also it's stupid not including CCV in that duplicate window list.

 

 

ADD THIS TO THE API!

 

I can't even auto-complete it in the library because it's a magic word in a JSON object. Here's the code to help others:

 

TransactionRequestType transactionRequest = new TransactionRequestType();

SettingType duplicateWindow = new SettingType();
duplicateWindow.setSettingName("duplicateWindow");
duplicateWindow.setSettingValue( "0" );

ArrayOfSetting transactionSettingsList = new ArrayOfSetting();
transactionSettingsList.getSetting().add(duplicateWindow);
transactionRequest.setTransactionSettings( transactionSettingsList );

 

It's not in the API: https://developer.authorize.net/api/reference/index.html#accept-suite-get-an-accept-payment-page

 

Or the guide: https://developer.authorize.net/api/reference/features/accept_hosted.html

 

Or even in your github: https://github.com/AuthorizeNet/sample-code-java/blob/master/src/main/java/net/authorize/sample/Acce...

 

It's in a damn forum post.

lightwave365
Regular Contributor