Integration and Testing

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

Posts: 20
Registered: ‎07-13-2011

Re: Direct Post Method (DPM) not working

[ Edited ]

Ok, well I'm not following that because a plain .html page will accept a form post, it just will ignore everything else in the post.  I don't see how AuthorizeNet can really investigate the relay.  I would think it simply posts data to the relay page and moves on.


However, I set up a page that could take a form post and I am still getting an error.  The page simply spits out a few things

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="AuthRelay.aspx.vb" Inherits="SinglePageCO.AuthRelay" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">

<html xmlns="">
<head runat="server">
    <form id="form1" runat="server">
        Thank you<br />
        You have arrived<br />
        <asp:Label ID="LblResponseCode" runat="server" Text="Label"></asp:Label>
        <br />
        <asp:Label ID="LblRespReason" runat="server" Text="Label"></asp:Label>
        <br />
        <asp:Label ID="LblTranCode" runat="server" Text="Label"></asp:Label>
        <br />
        <asp:Label ID="LblAuthCode" runat="server" Text="Label"></asp:Label>
        <br />
        <asp:HyperLink ID="HLkRedirect" runat="server">Click to Continue</asp:HyperLink>


Public Class AuthRelay
    Inherits System.Web.UI.Page
    Dim ResponseCode As String = Trim(Request.Form("x_response_code"))
    Dim ResponseReasonText As String = Trim(Request.Form("x_response_reason_text"))
    Dim ResponseReasonCode As String = Trim(Request.Form("x_response_reason_code"))
    Dim AVS As String = Trim(Request.Form("x_avs_code"))
    Dim TransID As String = Trim(Request.Form("x_Trans_ID"))
    Dim AuthCode As String = Trim(Request.Form("x_Auth_Code"))
    Dim Amount As String = Trim(Request.Form("x_Amount"))
    Dim ReceiptLink As String = ""

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        LblResponseCode.Text = ResponseCode
        LblRespReason.Text = ResponseReasonText
        LblAuthCode.Text = AuthCode
        LblTranCode.Text = TransID
        HLkRedirect.NavigateUrl = ReceiptLink
    End Sub

End Class

 Your link has a sample .asp relay response...I'm going to try that one next.  It is classic asp but should work on this server.

Posts: 4,525
Registered: ‎03-08-2010

Re: Direct Post Method (DPM) not working

for set EnableViewStateMac="false" on both page the post to and the relay response page.

Posts: 20
Registered: ‎07-13-2011

Re: Direct Post Method (DPM) not working

Ok, actually it appears I just had an error in my code.