Hello:
I created an Accept hosted integartion. This integration works fine in sandbox mode, but fails in LIVE mode with the following error:
User authentication failed due to invalid authentication values.
I verified that my transactionKey and api_login_id are correct and that I am using the correct URL.
The settings on the auth.net account are set to LIVE.
What else could be the issue? I see banter about requiring a signature key also, but nothing in the docs.
Below is the code for the request:
<getHostedPaymentPageRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd"> <merchantAuthentication> <name>{hidden api_login_id}</name> <transactionKey>{hidden transaction key}</transactionKey> </merchantAuthentication> <transactionRequest> <transactionType>authCaptureTransaction</transactionType> <amount>7.94</amount> <order> <invoiceNumber>138437174</invoiceNumber> </order> <billTo> <firstName>MARK</firstName> <lastName>WEXLER</lastName> <company>WHIRLWIND INC</company> <address>9811 ASHBURTON LANE</address> <city>BETHESDA</city> <state>MD</state> <zip>20817</zip> <country>US</country> </billTo> <shipTo> <firstName>MARK</firstName> <lastName>WEXLER</lastName> <company>WHIRLWIND INC</company> <address>9811 ASHBURTON LANE</address> <city>BETHESDA</city> <state>MD</state> <zip>20817</zip> <country>US</country> </shipTo> </transactionRequest> <hostedPaymentSettings> <setting> <settingName>hostedPaymentBillingAddressOptions</settingName> <settingValue>{"show": true, "required":true}</settingValue> </setting> <setting> <settingName>hostedPaymentButtonOptions</settingName> <settingValue>{"text": "Pay"}</settingValue> </setting> <setting> <settingName>hostedPaymentReturnOptions</settingName> <settingValue>{"showReceipt" : false, "url":"https://www.breyerhorses.com/plugins/authnet_iframe_communicator.html","urlText":"Continue","cancelUrl":"https://www.breyerhorses.com/plugins/authnet_response.php?action=cancel","cancelUrlText":"Cancel"}</settingValue> </setting> <setting> <settingName>hostedPaymentShippingAddressOptions</settingName> <settingValue>{"show": false, "required":false}</settingValue> </setting> <setting> <settingName>hostedPaymentStyleOptions</settingName> <settingValue>{"bgColor":"#B00"}</settingValue> </setting> <setting> <settingName>hostedPaymentIFrameCommunicatorUrl</settingName> <settingValue>{"url": "https://www.breyerhorses.com/plugins/authnet_iframe_communicator.html"}</settingValue> </setting> </hostedPaymentSettings> </getHostedPaymentPageRequest>
โ10-19-2017 07:43 AM
So not sure if anyone figured this out already, but I was running into this issue as well. I was using their example code/API. Everything worked fine in sandbox mode but would fail with a authentication error with the production keys. I had to dig through their SDK code and found out the reason it was failing is because their code defaults to using the sandbox url. I use node so it might be slightly different for everyone else, but I went into the authorizenet folder > apicontrollersbase.js then changed this line this._endpoint = constants.endpoint.sandbox; to this this._endpoint = constants.endpoint.production; and everything started working correctly.
It is really annoying that I have to go into their code and find that line and change it in order for it to work. It should just force me to put in the url that I want to use, or accept the url as a parameter and then defualt to the sandbox if it is not provided. Hope that helps anyone who stumbles across this.
โ09-10-2019 09:04 AM