cancel
Showing results for 
Search instead for 
Did you mean: 

How to configure a Merchant Defined Response URL for SIM API ?

Hello All

 

I have read through a bunch of posts and documentation , and I am not able to resolve my issue:

 

What i want to achieve :

 

- I DO NOT wish to display the Default Authorize.Net Receipt Page

- I want Authorize.Net to send its response to a Merchant Defined URL , so that i can parse the response , make database entries and redirect to success/error page based on the response.

- Seems like to achieve this , i need to use the "x_relay_url" param in my HTTP POST to Authorize.Net to dispay the HOP Page and the value in this param should match the value defined for the Response Relay URL in Authorize.Net Merchant Account. Is this correct ?

- I did this and created a simple page with no processing in it - but i still get the following error on the browser "An error occurred while trying to report this transaction to the merchant. An e-mail has been sent to the merchant informing them of the error. The following is the result of the attempt to charge your credit card.

      This transaction has been approved.
It is advisable for you to contact the merchant to verify that you will receive the product or service."

 

And then i get an email saying :

 

Your script timed out while we were trying to post transaction results to it.

 

What is wrong here ?

kpatodia
Contributor
10 REPLIES 10
RaynorC1emen7
Expert

So, what i am trying to achieve - can that be achieved through x_receipt_link_url or do i need to use x_relay_url ?

 

We have done integrations with CyberSOurce before - and configuring the Receipt URL to a Merchant URL works seemlessly - but with Authorize.Net this is not working. I have checked all the bulltet points in the article you posted and none of them seems to be an issue.

 

So, wanted to first clarify - which approach should i take Receipt URL or Relay URL ?

x_relay_url

 

are you using https? asp.net? public accessable url?

https

 

Trying to do this integration through Salesforce - not getting much luck. Any sample code ?

The most common reason for receiving a timeout error message is when you are specifying a URL that is not publicly addressable or using a non-standard port.  The gateway is attempting to POST to your URL and is timing out after failing to make a connection.  Since you didn't include the URL you are using, it's difficult to troubleshoot further.

 

Richard

 "If you would like to redirect the end user back to your server, please provide a link on your Relay URL for this purpose" - I read this in the documentation for Relay Response URL - How do i do this ? When the response from Auth.Net gets Relayed to the Merchant Defined Relay URL , it loses context of the session - how do i get past this ?

 

My Relay response URL is https://<a force.com URL> , its accessible over the internet - but ideally , i would like this URL to be accessed only by logged-in user - but , if i do this configuration in Force.com , then i get an error - since this URL needs to be publicly accessible. 

 

My sample code is like this for the Relay URL:

 

<apex:page controller="HOPReturnController" sidebar="false" showHeader="false" standardStylesheets="false" >
<head>
<script>
var returnLoc = '{!sreturnURL}';
top.location.href = returnLoc;
</script>
</head>
<body>
</body>
</apex:page>

 

 

I dont want to do top.location.href = returnLoc , since my original post to Auth.Net is from an iFrame and i want my response to stay in context of an iframe. 

I can confirm it would not be possible for the Relay Response to POST to a URL that requires authentication.  The Relay Response URL must be publicly addressable.

 

The Relay Response POST also cannot target the iframe itself.  We don't recommend using SIM within an iframe.

 

Richard

These are basic requirements:

 

- We have to use an iFrame - We are using a Product , and that provides for calling the Payment Gateway within an Iframe. 

- We have to use a Hoted Order Page from Payment Gateway to collect Credit Card Details to avoid PCI COmpliance issues - this is ONLY offered in SIM API , as i understand ??

 

- "I can confirm it would not be possible for the Relay Response to POST to a URL that requires authentication.  The Relay Response URL must be publicly addressable." - if this is the case , then how does the session get authenticated from the response from Auth.Net. I made a request to Auth.Net as an authenticated user , but the response has no session information - how do i tie it back to the request ? 

 

- What are my options here ? 

The simplest solution is to pass session data as Merchant-Defined Fields (see http://www.authorize.net/support/SIM_guide.pdf page 42).  The Merchant-Defined Fields are returned in the Relay Response, but are not stored as part of the transaction.  You could parse the Relay Response and use the merchant-defined field values to update your data and user experience.

 

Richard