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!
Solved! Go to Solution.
03-22-2012 11:50 AM
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
03-23-2012 02:21 PM
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
03-23-2012 02:21 PM
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.
03-23-2012 02:55 PM