I have implemented the hosted form using the Iframe Communicator (ifcommunicator.html and C#).
How do I capture the response when a credit card is decline?
I don't have problems getting the response when a credit card was authorize, but now I need to save the error code and message submitted by authorize.net when a credit card is not charged.
Thank you in advance for your time reading this and offering suggestions.
10-08-2017 05:35 AM
Has anyone found a solution for this. I need a response to mark my orders as "payment failed," but I do not get a declined response?
01-11-2018 09:08 AM
For the IFrame, If sendReceipt is set to False, you will be able to get the response code in transactResponse object.
Please check the below link for the same - under Held Transactions Section.
-Bhavana
01-12-2018 05:19 PM - edited 01-12-2018 05:20 PM
I find that the sendReceipt flag is mentioned 2 times in the documentation for hosted payment form but I cannot find where this flag can be set? I did now find it option for an setting for the request. please help me where I can find this flag!
03-21-2018 01:12 AM
Hi @pixdev
Please have a look at our Accept sample app for it .
https://github.com/AuthorizeNet/accept-sample-app
https://github.com/AuthorizeNet/accept-sample-app/blob/master/getHostedPaymentForm.php
03-21-2018 08:35 PM
Thanks for Reply. Could not find the sendReceipt flag in the whole repo. But I found a showReceipt Flag. Could it be that the documentation is somehow inconsistent and the mentioned sendReceipt should be the showReceipt Flag?
03-22-2018 01:24 AM
Yes, you are right, showReceipt Flag is what you need.
Since you are using iFrame, you can set "showReceipt" to false.
At the same time, pass your iframe communicator url in hostedPaymentIFrameCommunicationUrl setting, as follows
<setting>
<settingName>hostedPaymentIFrameCommunicatorUrl</settingName>
<settingValue>{"url": "your iframe communicator url"}</settingValue>
</setting>
Then, you should be able to get a json response like the following one:
{
"accountType":"XXXX",
"accountNumber":"XXXX",
"transId":"XXXX",
"responseCode":"XX",
"authorization":"XXXX",
....
"totalAmount":"XXXX",
"dateTime":"XXXX"
....
}
Thanks,
Angie
03-23-2018 03:09 PM
I am not able to capture error responses. Only successfull transactions.Any help?
07-01-2021 01:59 PM
Hi,
Im not able to captured error respones from iframe.
if transactions is successful i get a response otherwise if there is a error it will not return anything.
Help please!
07-01-2021 02:03 PM