0

I am new to Authorize.net, trying to integrate my demo website to Authorize.net. When I click on pay button an error"(103) This transaction cannot be accepted" occurs every time. Searched all over web but couldn't resolved. Can anyone point out what I am missing in? Here is the asp.net code I am using.

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> 
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
    <div>
        <div id="divCreditPay" runat="server" style="margin: 10px 30px 10px 10px; background-color: transparent !important; border: 1px solid #cccccc; padding: 15px;">
            <span id="spanCreditPay" style="padding: 1px 0 5px 5px;">


            <input type="hidden" name="x_fp_hash" value="'<%= AuthorizeNet_x_fp_hash %>'" />
            <input type="hidden" name="x_fp_sequence" value="'<%= AuthorizeNet_x_fp_sequence %>'" />
            <input type="hidden" name="x_invoice_num" value="'<%= PurchaseID %>'" />
            <input type="hidden" name="x_fp_timestamp" value="'<%= AuthorizeNet_x_fp_timestamp %>'" />
            <input type="hidden" name="x_login" value="6dubCXe76W" />
            <input type="hidden" name="x_relay_url" value="'<%= AuthorizeNet_x_relay_url %>'" />
            <%--<input type='hidden' name='x_relay_response' value="'<%= AuthorizeNet_x_relay_response %>'" />--%>
            <input type="hidden" name="x_relay_response" value="True" />

            <input type="hidden" name="x_receipt_link_url" value="'<%= AuthorizeNet_x_receipt_link_url %>'" />
            <input type="hidden" name="x_test_request" value="'<%= AuthorizeNet_x_test_request %>'" />
            <input type="hidden" name="x_method" value="CC" />
            <input type="hidden" name="x_type" value="AUTH_CAPTURE" />
            <input type="hidden" name="x_first_name" value="'<%= AuthorizeNet_x_first_name %>'" />
            <input type="hidden" name="x_last_name" value="'<%= AuthorizeNet_x_last_name %>'" />
            <input type="hidden" name="x_amount" value='<%=AuthorizeNet_x_amount%>' />
            <input type="hidden" name="x_address" value="'<%= AuthorizeNet_x_address %>'" />
            <input type="hidden" name="x_city" value="'<%= AuthorizeNet_x_city %>'" />
            <input type="hidden" name="x_state" value="'<%= AuthorizeNet_x_state %>'" />
            <input type="hidden" name="x_zip" value="'<%= AuthorizeNet_x_zip %>'" />

            <div id="divminiContainer" style="padding: 15px 0px 15px 25px;">
                <table id="tblCreditPay" style="width: 100%;">
                    <tr>
                        <td class="tdCreditPay" style="width: 25%;">Card number</td>
                        <td>
                            <asp:TextBox ID="txt_creditCard" runat="server" Width="253px"></asp:TextBox></td>
                    </tr>
                    <tr>
                        <td></td>
                        <td><span>mm</span><span style="padding-left: 45px">yy</span></td>
                    </tr>
                    <tr>
                        <td>Expiration date</td>
                        <td>
                            <asp:TextBox ID="txt_expDate" runat="server" Width="50px"></asp:TextBox>
                            / 
                    <asp:TextBox ID="txt_expYear" runat="server" Width="50px"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td>CSC (optional)</td>
                        <td>
                            <asp:TextBox ID="txt_csc" runat="server" Width="50px"></asp:TextBox>
                        </td>
                    </tr>
                    <tr style="padding-top: 15px;">
                        <td></td>
                        <td>
                            <asp:Button runat="server" ID="btn_payNowCC" OnClick="btn_payNowCC_Click" Text="btn_payNowCC" />
                        </td>
                    </tr>
                </table>

                </div>
        </div>


    </div>
</form> </body> </html>

and Code Behind

public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        btn_payNowCC.PostBackUrl = "https://test.authorize.net/gateway/transact.dll";
        //btn_payNowCC.PostBackUrl = "https://secure.authorize.net/gateway/transact.dll";  
    }
    protected void btn_payNowCC_Click(object sender, EventArgs e)
    {        
        string ccNumber = txt_creditCard.Text;
        string dt = txt_expDate.Text + txt_expYear.Text;

        strAuthorizeNet_x_amount = "12.34";
        strAuthorizeNet_x_login = ConfigurationManager.AppSettings["AUTHORIZE_NET_API_LOGIN"];
        strAuthorizeNet_x_first_name = "Hr";
        strAuthorizeNet_x_last_name = "Hnw";
        strAuthorizeNet_x_address = "123 main st.";
        strAuthorizeNet_x_city = "Indore";
        strAuthorizeNet_x_state = "MP";
        strAuthorizeNet_x_zip = "123456";

        strAuthorizeNet_x_fp_timestamp = AuthorizeNet.Crypto.GenerateTimestamp().ToString();
        strAuthorizeNet_x_fp_sequence = AuthorizeNet.Crypto.GenerateSequence();
        strAuthorizeNet_x_relay_response = "TRUE";
        strAuthorizeNet_x_test_request = "TRUE";
        strAuthorizeNet_x_fp_hash = AuthorizeNet.Crypto.GenerateFingerprint("88v7G7Emg965Nb9s", strAuthorizeNet_x_login, decimal.Parse(strAuthorizeNet_x_amount), strAuthorizeNet_x_fp_sequence, strAuthorizeNet_x_fp_timestamp);
        //strAuthorizeNet_x_fp_hash = AuthorizeNet.Crypto.GenerateFingerprint(ConfigurationManager.AppSettings["AUTHORIZE_NET_TRANSACTION_KEY"], strAuthorizeNet_x_login, decimal.Parse(strAuthorizeNet_x_amount), strAuthorizeNet_x_fp_sequence, strAuthorizeNet_x_fp_timestamp);

        strAuthorizeNet_x_relay_url = ConfigurationManager.AppSettings["MainWebURL"] + "SIM.aspx";

        strAuthorizeNet_x_receipt_link_url = ConfigurationManager.AppSettings["MainWebURL"] + "Thanks.aspx";      
    }

and here is web.config

<?xml version="1.0"?>

<!--
  For more information on how to configure your ASP.NET application, please visit
  http://go.microsoft.com/fwlink/?LinkId=169433
  -->

<configuration>
  <appSettings>
    <add key="AUTHORIZE_NET_API_LOGIN" value="6dubCXe76W"/>
    <add key="AUTHORIZE_NET_TRANSACTION_KEY" value="88v7G7Emg965Nb9s"/>
    <add key="AUTHORIZE_NET_MD5_HASH" value="" />
    <add key="MainWebURL" value="https://test.authorize.net/gateway/transact.dll"/>
  </appSettings>

    <system.web>
      <compilation debug="true" targetFramework="4.5" />
      <httpRuntime targetFramework="4.5" />
    </system.web>

</configuration>

1 Answer 1

0

From Authorize.Net:

Response Reason Code: 103

Response Reason Text: A valid fingerprint or Transaction Key is required for this transaction.

This error is generated when your Authorize.Net account is in Password-Required Mode and you are not sending a valid Transaction Key or hash fingerprint with your transaction request. For security reasons we recommend always submitting a Transaction Key or hash fingerprint. Additionally:

If you are using SIM, make sure you are using a valid Transaction Key to generate and send a fingerprint hash along with your transaction request. The fingerprint hash should be submitted using the field x_fp_hash. If you are using SIM and submit a request for a Credit, Void, or Prior Authorization Capture (x_type = CREDIT, VOID or PRIOR_AUTH_CAPTURE) you may encounter this error. For security reasons these transaction types must be processed by logging into the Merchant Interface directly, or by using a desktop application that uses AIM.

Basically your fingerprint or transaction key are wrong.

4
  • That doesn't mean it is the right key. Do you have a developer account? If not you cannot use test.authorize.net which is why you would get this error.
    – John Conde
    Aug 26, 2015 at 12:57
  • I have created the sandbox account only, is it the same developer account?
    – harshHNW
    Aug 26, 2015 at 13:06
  • Yes, that is. Make sure you use the credentials from that account and make sure your fingerprint is valid.
    – John Conde
    Aug 26, 2015 at 13:07
  • Can you please share what hash fingerprint value should I use that would work? Also, yes I have used x_type=AUTH_CAPTURE; so should I remove this too?
    – harshHNW
    Aug 26, 2015 at 13:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.