cancel
Showing results for 
Search instead for 
Did you mean: 

relay_url goes to the test site of authorize.net

Hello so I don't know how to solve this if someone can help me please

I'm doing DPM

 

I have the realy_url and it goes to the page because I can read the text property of the label that i have in the response page aspx.  But the address that gives me is the

 

https://test.authorize.net/gateway/transact.dll

 

I need to display the custom page not the one that authorize.net has by default and I know the transaction went through because i recived an email.

 

Thanks for your help

authorizeK
Contributor
10 REPLIES 10

read

https://community.developer.authorize.net/t5/The-Authorize-Net-Developer-Blog/Relay-Response-Basics-...

" Relay Response does not redirect the end user back to the merchant’s server, but relays the page content to the end user instead of displaying the Authorize.Net default receipt page. "

 

If you want it on your page. read the data on the relay response url page, then do a javascript to redirect to another page on your site.

RaynorC1emen7
Expert

Hello Thanks so much for your response will it be something like ??


    Protected Sub Page_Load(sender As Object, e As EventArgs)

  If Request IsNot Nothing AndAlso Request.Form IsNot Nothing AndAlso Request.Form.AllKeys IsNot Nothing Then
            If Request.Form.AllKeys.Contains("x_response_code") Then
                result_cust_id = Request.Form("x_cust_id")
                result_response_code = Request.Form("x_response_code")
                result_response_subcode = Request.Form("x_response_subcode")
                result_response_reason_code = Request.Form("x_response_reason_code")
                result_response_reason_text = Request.Form("x_response_reason_text")
                result_auth_code = Request.Form("x_auth_code")
                result_invoice_num = Request.Form("x_invoice_num")
                result_amount = Request.Form("x_amount")




                result_trans_id = Request.Form("x_trans_id")
            End If
        End If

 End Sub

 

I did like the above and i get

 

a response email, it goes to the authorize.net page but it appear my label. But it does not load any information

 

Why javascript as far as I understand the DPM and relay_url is to display the custom results after the transaction ?

 

Can you help me please ?

 

again thanks so much!!

 

read

https://community.developer.authorize.net/t5/Integration-and-Testing/Questions-about-DPM-relay-page-...

 

Why javascript as far as I understand the DPM and relay_url is to display the custom results after the transaction ?

read this again

"Relay Response does not redirect the end user back to the merchant’s server, but relays the page content to the end user instead of displaying the Authorize.Net default receipt page."

Thanks so much.

Okay I understand.

 

But then now I do have the information I want to display it and save it into the database
and I'm reading in it

 

 

        If Request IsNot Nothing AndAlso Request.Form IsNot Nothing AndAlso Request.Form.AllKeys IsNot Nothing Then
            If Request.Form.AllKeys.Contains("x_response_code") Then
                result_cust_id = Request.Form("x_cust_id")
                result_response_code = Request.Form("x_response_code")
                result_response_subcode = Request.Form("x_response_subcode")
                result_response_reason_code = Request.Form("x_response_reason_code")
                result_response_reason_text = Request.Form("x_response_reason_text")
                result_auth_code = Request.Form("x_auth_code")
                result_invoice_num = Request.Form("x_invoice_num")
                result_amount = Request.Form("x_amount")

 

 

but it does not load anything.

 It does shows the title of the response page. But then how Can I read the responses if is not like the above. The transaction went through because I received the email, But please can you help me with an example how to read the responses

 

thanks

 

 

 

I did and I'm using request form, I posted the code but it does not display the responses

 

  If Request.Form.AllKeys.Contains("x_response_code") Then
                result_cust_id = Request.Form("x_cust_id")
                result_response_code = Request.Form("x_response_code")
                result_response_subcode = Request.Form("x_response_subcode")
                result_response_reason_code = Request.Form("x_response_reason_code")
                result_response_reason_text = Request.Form("x_response_reason_text")
                result_auth_code = Request.Form("x_auth_code")
                result_invoice_num = Request.Form("x_invoice_num")
                result_amount = Request.Form("x_amount")

 

 

it shows me the title of my relay_url and it's going thorugh so I'm not sure what am I doing wrong

 

Can you please indicate me

 

thanks in advance

In the linked thread. It said authorize.net is not using form post to your page. so a request form is not going to work.

Thanks so much again for taking your time to answer me.

I used that one because the only example that I found and from where i was able to get to this point has that statement in the realy_url. There is no good information that guides you to have a solution.

 

 

So I have to do a web request

 

https://msdn.microsoft.com/en-us/library/system.web.httprequest%28v=vs.110%29.aspx?cs-save-lang=1&cs...

 

Basically I have a form with ajax controls once that pages is valid it goes to my postback page which has

 

 

in the aspx page

 


                            <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='<%= AuthorizeNet_x_login %>' />
                            <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_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" />




                            <br />

                            <asp:Label ID="label_amount" runat="server" Text="Amount" CssClass="label_basicinfo"></asp:Label>



                            <input type="text" name='x_amount' value='<%= AuthorizeNet_x_amount %>' />



                            <div class="meetings_titles">Credit Card Details</div>


                            <asp:Label ID="label_creditcardnum" runat="server" Text="Credit Card Number" CssClass="label_basicinfo"> </asp:Label>

                            <input type='text' name='x_card_num' value='<%= CardNumber%>' />


                            <br />

                            <asp:Label ID="label_expdate" runat="server" Text="Expiration Date: (MMYY)" CssClass="label_basicinfo"> </asp:Label>


                            <input type='text' name='x_exp_date' value='<%= ExpirationDate%>' />

                            <br />

                            <asp:Label ID="label_cardcode" runat="server" Text="CCV" CssClass="label_basicinfo"> </asp:Label>
                            <input type='text' name='x_card_code' value='<%= CCV%>' />

 

 

 

 

and behind code

 

 


    Private nPurchaseID As Integer
    Public ReadOnly Property PurchaseID() As Integer
        Get
            Return nPurchaseID
        End Get
    End Property

    Private strAuthorizeNet_x_fp_hash As String
    Public ReadOnly Property AuthorizeNet_x_fp_hash() As String
        Get
            Return strAuthorizeNet_x_fp_hash
        End Get
    End Property

    Private strAuthorizeNet_x_fp_timestamp As String
    Public ReadOnly Property AuthorizeNet_x_fp_timestamp() As String
        Get
            Return strAuthorizeNet_x_fp_timestamp
        End Get
    End Property

    Private strAuthorizeNet_x_fp_sequence As String
    Public ReadOnly Property AuthorizeNet_x_fp_sequence() As String
        Get
            Return strAuthorizeNet_x_fp_sequence
        End Get
    End Property

    Private strAuthorizeNet_x_login As String
    Public ReadOnly Property AuthorizeNet_x_login() As String
        Get
            Return strAuthorizeNet_x_login
        End Get
    End Property

    Private strAuthorizeNet_x_transKey As String
    Public ReadOnly Property AuthorizeNet_x_transKey() As String
        Get
            Return strAuthorizeNet_x_transKey
        End Get
    End Property


    Private strAuthorizeNet_x_relay_url As String
    Public ReadOnly Property AuthorizeNet_x_relay_url() As String
        Get
            Return strAuthorizeNet_x_relay_url
        End Get
    End Property

    Private strAuthorizeNet_x_receipt_link_url As String
    Public ReadOnly Property AuthorizeNet_x_receipt_link_url() As String
        Get
            Return strAuthorizeNet_x_receipt_link_url
        End Get
    End Property

    Private strAuthorizeNet_x_relay_response As String
    Public ReadOnly Property AuthorizeNet_x_relay_response() As String
        Get
            Return strAuthorizeNet_x_relay_response
        End Get
    End Property

    Private strAuthorizeNet_x_test_request As String
    Public ReadOnly Property AuthorizeNet_x_test_request() As String
        Get
            Return strAuthorizeNet_x_test_request
        End Get
    End Property

    Private strAuthorizeNet_x_amount As String
    Public ReadOnly Property AuthorizeNet_x_amount() As String
        Get
            Return strAuthorizeNet_x_amount
        End Get
    End Property


    Private strAuthorizeNet_x_address As String
    Public ReadOnly Property AuthorizeNet_x_address() As String
        Get
            Return strAuthorizeNet_x_address
        End Get
    End Property

    Private strAuthorizeNet_x_city As String
    Public ReadOnly Property AuthorizeNet_x_city() As String
        Get
            Return strAuthorizeNet_x_city
        End Get
    End Property

    Private strAuthorizeNet_x_state As String
    Public ReadOnly Property AuthorizeNet_x_state() As String
        Get
            Return strAuthorizeNet_x_state
        End Get
    End Property

    Private strAuthorizeNet_x_zip As String
    Public ReadOnly Property AuthorizeNet_x_zip() As String
        Get
            Return strAuthorizeNet_x_zip
        End Get
    End Property

    Private strAuthorizeNet_x_cardnumber As String
    Public ReadOnly Property CardNumber() As String
        Get
            Return strAuthorizeNet_x_cardnumber
        End Get
    End Property

    Private strAuthorizeNet_x_expdate As String
    Public ReadOnly Property ExpirationDate() As String
        Get
            Return strAuthorizeNet_x_expdate
        End Get
    End Property


    Private strAuthorizeNet_x_ccv As String
    Public ReadOnly Property CCV() As String
        Get
            Return strAuthorizeNet_x_ccv
        End Get
    End Property



    Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load



        Button1.PostBackUrl = "https://test.authorize.net/gateway/transact.dll"
       

        strAuthorizeNet_x_cardnumber = Request.Form("textbox_creditcardnumber")
        strAuthorizeNet_x_expdate = Request.Form("textbox_expdate")
        strAuthorizeNet_x_ccv = Request.Form("textbox_creditcardscode")
        strAuthorizeNet_x_amount = Request.Form("textbox_paymentauth")

        strAuthorizeNet_x_login = ""
        strAuthorizeNet_x_transKey = ""


        strAuthorizeNet_x_fp_timestamp = AuthorizeNet.Crypto.GenerateTimestamp()
        strAuthorizeNet_x_fp_sequence = AuthorizeNet.Crypto.GenerateSequence()
        strAuthorizeNet_x_relay_response = "True"
        strAuthorizeNet_x_test_request = "True"
      
        strAuthorizeNet_x_fp_hash = AuthorizeNet.Crypto.GenerateFingerprint(strAuthorizeNet_x_transKey, strAuthorizeNet_x_login, Decimal.Parse(strAuthorizeNet_x_amount), strAuthorizeNet_x_fp_sequence, strAuthorizeNet_x_fp_timestamp.ToString)

       



        strAuthorizeNet_x_relay_url = "https://...../test_webs3/registrationresponse.aspx"

 

 


     

    End Sub

 

 

 

 

Then when i hit submit here it goes and does the transaction I get the title of my relay URL but I know don't how to capture the values there

 

 

Please can you help me ?

Sorry don't understand what you are trying to do. look like you are making it more complex then it need to be.

You could hire a certified developer

http://www.authorize.net/solutions/merchantsolutions/merchantservices/certifieddeveloperdirectory/