I am implementing accept hosted via php. I have followed https://developer.authorize.net/api/reference/features/accept_hosted.html and successfully getting payment form. I am using redirect method for getting form. As per the reference guide i can get response on provided response url but have no idea how to do that.
Since the response is POST type and in order to use the response i must know its variable name. So what is its variable name???
If the showReceipt parameter is true, system will display a receipt page after the transaction, with a "Continue" button that points back to the url provided in the url parameter.
Else if the value of the showReceipt parameter is false, the browser will return directly to the return URL.
When showReceipt is false, a return URL must be provided in the url parameter. Otherwise the receipt page will be shown.
In both cases, when showReceipt is set to true or false, i am getting default receipt page https://test.authorize.net/payment/payment with continue button redirecting to the url i have specified in hostedPaymentReturnOptions.
However this is not the problem for me. In https://developer.authorize.net/api/reference/features/accept_hosted.html it is mentioned that
"With any of the form integration methods, information specific to the customer can be passed back to the merchant’s server by embedding it in the continue/return URL or the cancel URL. By embedding information into the URL that is provided in the token request, the merchant server can identify the specific customer and transaction that has been processed when the customer returns. Any name-value pairs embedded in the URL should be URL-encoded to ensure correct processing in the form request."
I need to know how i can embedd the response in continue/return url???
Although i was digging into the problem and found out an alternate. When i specify an url in SILENT POST URL section of authorize.net account section. i get the response on that url after every transaction.
I want that response on the continue url. How can i get that? Advance thanks for any help.
When not using an IFrame, the continue/return URL and cancel URL create buttons that when clicked cause the browser to perform a simple GET request to that URL. No other information about the transaction is provided directly. When using the redirect method, an Authorize.Net generated receipt will be shown and cannot be disabled.
Instead of the Silent Post method, you should use Webhooks, which will enable you to enroll in the events of your choice and designate a URL to receive the notifications as they occur.
Here is the working source code: https://github.com/mvkotekar/Authorize.Net-Hosted.git
I also have similar issue, I have used the webhooks sample code to listen to the transactions. However webhook project runs on different port like 9000. HOw do I ensure I get the response in my application itself rather than seperate listening port ?
Thanks for your response. All am trying to do is, use the webhook notifications inside my asp.net application. However, the examples mentioned in authroize.net, It had to run with nodejs on other port like 9000.
In your php application, do you have both authorize.net payment logic and also subscribed to all transaction events ? if Yes, am trying to achieve the same thing in C#/ASP.net.
Any help from C#/ASP.net please ?