Integration and Testing

Authorize.Net API questions and help with your payment integration.

Reply
Highlighted
Member
Posts: 2
Registered: ‎03-22-2012
Accepted Solution

Get Response Info from Sitecore E-commerce Site using Authorize.Net

Hello,

 

I am trying to figure out how to get the response from a credit card transaction and notify the user if the transaction was declined and provide the reason why it happened.

 

I am starting to use sitecore and authorize.net.   I have seen code here on how to get the response string, but it doesn't seem to work in our website because we're using the SEEE API to submit the order.

 

Here's the code we have:

CustomerOrderProcessor customerOrderProcessor = new CustomerOrderProcessor(); customerOrderProcessor.SubmitOrder(order);

order.Status = CustomerOrder.CompleteStatus;

success = true;

 

We get an alert from the catch statement if the transaction fails, but we want it to be more detailed than "This transaction has been declined."  Basically, we want to show whether they entered the wrong cvv, billing zip code, wrong CC number, etc.

 

catch (CreditCardTransactionException ex)                    

{

     this.Page.ClientScript.RegisterStartupScript(this.GetType(), "CreditCardTransactionError", String.Format("alert('{0}');", ex.Message), true);         

}              

catch (Exception ex)                    

{                        

     this.Page.ClientScript.RegisterStartupScript(this.GetType(), "SubmitOrderError", String.Format("alert('{0}');", ex.Message), true);                        

}

 

Does anyone here knows how to get the reponse string in Sitecore E-Commerce Enterprise Edition so we could use it?

 

Thanks!


Accepted Solutions
Solution
Accepted by topic author TheUndecider
‎08-21-2015 01:58 AM
Administrator Administrator
Administrator
Posts: 563
Registered: ‎08-03-2011

Re: Get Response Info from Sitecore E-commerce Site using Authorize.Net

Hi TheUndecider,

I don't know the specifics of Sitecore's Authorize.Net integration, but if you are receiving the message "This transaction has been declined", it is likely that there is no additional information available.  Authorize.Net does return additional details when possible, but most transaction declines come from the customer's bank and do not provide additional details as to the cause of the decline.

Thanks,
Joy

View solution in original post


All Replies
Solution
Accepted by topic author TheUndecider
‎08-21-2015 01:58 AM
Administrator Administrator
Administrator
Posts: 563
Registered: ‎08-03-2011

Re: Get Response Info from Sitecore E-commerce Site using Authorize.Net

Hi TheUndecider,

I don't know the specifics of Sitecore's Authorize.Net integration, but if you are receiving the message "This transaction has been declined", it is likely that there is no additional information available.  Authorize.Net does return additional details when possible, but most transaction declines come from the customer's bank and do not provide additional details as to the cause of the decline.

Thanks,
Joy

Member
Posts: 2
Registered: ‎03-22-2012

Re: Get Response Info from Sitecore E-commerce Site using Authorize.Net

Thanks Joy for your answer.  It's not what I was hoping to hear, but I kind of knew that message could be the only info we could get for declined transactions.

 

Have a nice weekend.

 

T.