Reply
Highlighted
Expert
Posts: 4,525
Registered: ‎03-08-2010

Re: DPM - Custom Receipt Page

I always put my code in code behind, so I'm not so sure how it might be different on a single page.

Highlighted
Contributor
Posts: 20
Registered: ‎11-06-2012

Re: DPM - Custom Receipt Page

I typically do also, but it was easier to modify the asp to .net by leaving it in one file. So, any ideas on what the issue is?

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

Re: DPM - Custom Receipt Page

[ Edited ]

No idea, but I do know it works if the Request.Form is in code behind.

 

And I haven't found anything with the <% some codes %> in asp.net

Highlighted
Contributor
Posts: 20
Registered: ‎11-06-2012

Re: DPM - Custom Receipt Page

Okay I will try moving things to the code behind. I was trying to avoid having any server controls in any of the Auhtorize .NET pages. The examples I saw said to avoid this for DPM at least for the page gathering the credit card information because of PCI compliance. I am guessing that that is not an issue on the receipt/relay page since the card information has already been sent, right?

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

Re: DPM - Custom Receipt Page

The examples I saw said to avoid this for DPM at least for the page gathering the credit card information because of PCI compliance. I am guessing that that is not an issue on the receipt/relay page since the card information has already been sent, right?

Correct. Authorize.net capture all the CC info, so you don't have to.

Highlighted
Contributor
Posts: 20
Registered: ‎11-06-2012

Re: DPM - Custom Receipt Page

Okay well i tried in the code behind and I still get the object reference error...I really need to get this working...any other ideas??

 

The main part of the page is still the same except I pulled the population of the variables into the page_load method

 

    protected void Page_Load(object sender, EventArgs e)
    {
        //Response.Expires = 0;

        // Retrieving and defining Form Data from Post command body from Authorize.Net
        sResponseCode = Request.Form["x_response_code"].Trim();
        sResponseReasonText = Request.Form["x_response_reason_text"].Trim();
        sResponseReasonCode = Request.Form["x_response_reason_code"].Trim();
        sAVS = Request.Form["x_avs_code"].Trim();
        sTransID = Request.Form["x_Trans_ID"].Trim();
        sAuthCode = Request.Form["x_Auth_Code"].Trim();
        sAmount = Request.Form["x_Amount"].Trim();
        sReceiptLink = "http://www.authorizenet.com";
        sDescription = "description";
        sInvoiceID = "1";
        sBillingInfo = "John Doe<br />123 Main St<br />Somewhereville, XX 99999<br />email@email.com<br />555-555-5555";    
    }

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

Re: DPM - Custom Receipt Page

This it from my relay response test page to check the post values.

protected void Page_Load(object sender, EventArgs e)
{
	foreach (string key in Request.Form)
	{
		Label1.Text += key + ",";
		Label2.Text += Request.Form[key] + ",";
	} 
}

 As you can see it only have 2 label, Label1 and Label2. And I just run it again and make sure it works.

Highlighted
Contributor
Posts: 20
Registered: ‎11-06-2012

Re: DPM - Custom Receipt Page

I tried that and got nothing. So I tried the following and get 0 - as in NONE. Why am I not getting anything back??? Really need to get this working ;)

 

lit1.Text = Request.Form.Count.ToString();

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

Re: DPM - Custom Receipt Page

It this the relay response page(where you have the URL set on the merchant account) or it is redirect from some another page?

Highlighted
Contributor
Posts: 20
Registered: ‎11-06-2012

Re: DPM - Custom Receipt Page

It is the receipt page as sent in the confirmation page (where the client enters their card info).

 

Confirm.aspx - where the client enters their info

 

strAuthorizeNet_x_relay_response = "TRUE";
strAuthorizeNet_x_relay_url = "https://" + Request.Url.Host + "/Public/Authorize/SIM.aspx";
strAuthorizeNet_x_receipt_link_url = "https://" + Request.Url.Host + "/Public/Authorize/Thanks.aspx";

SIM.aspx

 

Response.Redirect("/Public/Authorize/Thanks.aspx");


AHHHH....after pasting this...duh! That is what I get for copying someone else's example and tweaking it.

 

So, then how do I display a receipt to the client? I have everything working as I want it except that part. Can I redirect back to the default Authorize .NET receipt page at that point?