I am new to Authorize.Net, I am implementing Authorize.Net PHP SDK to implement it. I am trying to charge a credit card but it is giving error as:
"A duplicate transaction has been submitted"
I read several articles, reference : https://community.developer.authorize.net/t5/Integration-and-Testing/Prevent-Duplicate-Transactions/td-p/20417.
where the solution mentioned that add x_duplicate_window = (of your own choice, maximum 28800 seconds) to your script. so I added it as follows:
<createTransactionRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd"> <merchantAuthentication> <name> <![CDATA[API_LOGIN_ID]]> </name> <transactionKey> <![CDATA[API_TRANSACTION_KEY]]> </transactionKey> </merchantAuthentication> <refId> <![CDATA[ref1465541052]]> </refId> <transactionRequest> <transactionType> <![CDATA[authCaptureTransaction]]> </transactionType> <amount>1</amount> <payment> <creditCard> <cardNumber> <![CDATA[4111111111111111]]> </cardNumber> <expirationDate> <![CDATA[1233]]> </expirationDate> </creditCard> </payment> <order> <description> <![CDATA[DESCRIPTION]]> </description> </order> </transactionRequest> <extraOptions><![CDATA[x_duplicate_window=0]]></extraOptions> </createTransactionRequest> but it throws error as
E00003 : The element 'createTransactionRequest' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd' has invalid child element 'extraOptions' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd'.
I am unable to add x_duplicate_window in my script. Is this the right way to prevent duplicate transaction error
NOTE: I'm working in sandbox environment and at LIVE mode
Please help.
No comments:
Post a Comment