Reply
Highlighted
Contributor
Posts: 27
Registered: ‎03-30-2012

Re: Required Fields for DPM using ASP.NET

What do you mean by a simple Receipt.aspx? I tried the following code in my Receipt.aspx Load event:

 

Dim apirequest AsIGatewayRequest = CheckoutFormReaders.BuildAuthAndCaptureFromPost(Request.Form)

 

And then assigned the properties of the apirequest variable to the text property of span control to display them to the screen, but because like I said, I never really seem to make it to the Receipt.aspx page, so I obviously don't see these values. I also set

EnableViewStateMac="False" on both the page from which I am submitting (that is what you meant by "DPM page" right?) and Receipt.aspx, but no help.

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

Re: Required Fields for DPM using ASP.NET

When I said simple I mean a aspx page with just a label "I'm here." no custom code other than EnableViewStateMac="False".  Just to make sure authorize.net can get there. Then, if that work, use request.form directly and display it content without using the SDKs code.

 

Did https://developer.authorize.net/tools/paramdump/index.php

works?

 

Didn't know you were using the SDKs. I haven't use that much at all.

I think that is for building the DPM page, not for getting response

Dim apirequest AsIGatewayRequest = CheckoutFormReaders.BuildAuthAndCaptureFromPost(Request.Form)

 I think what you are looking for is

 public SIMResponse(NameValueCollection post)

 

Highlighted
Contributor
Posts: 27
Registered: ‎03-30-2012

Re: Required Fields for DPM using ASP.NET

I think that's the problem, but I don't know how to fix it. When I submit, I end up at https://test.authorize.net/gateway/transact.dll with the error message:

 

An error occurred while trying to report this transaction to the merchant. An e-mail has been sent to the merchant informing them of the error. The following is the result of the attempt to charge your credit card.
      This transaction cannot be accepted.

 

The page that was submitted does include all the fields we have talked about in our previous posts, including the following:

 

<input id="x_relay_url" name="x_relay_url" type="hidden" value="http://www.mckeepottery.com/catalog/Receipt.aspx"/>

 

I tried modifying Receipt.aspx so that it is just a simple page with some text like "I'm here", and it displays if I enter the URL directly into the browser, but I am obviously not being sent to it from transact.dll. Why would Authorize.Net be not sending me to it? Thanks. (NOTE: I had also tried using SIMResponse, but since at this point it is not even getting to Receipt.aspx, that's probably not my top concern yet)

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

Re: Required Fields for DPM using ASP.NET

An error occurred while trying to report this transaction to the merchant. An e-mail has been sent to the merchant informing them of the error. The following is the result of the attempt to charge your credit card.
      This transaction cannot be accepted.

Did you add the url as a valid relay response url in your merchant account? I just try it by adding your receipt.aspx page as a valid relay response url on MY test account and run a DPM, and it show up.

 

 

I tried modifying Receipt.aspx so that it is just a simple page with some text like "I'm here", and it displays if I enter the URL directly into the browser, but I am obviously not being sent to it from transact.dll. Why would Authorize.Net be not sending me to it? Thanks. (NOTE: I had also tried using SIMResponse, but since at this point it is not even getting to Receipt.aspx, that's probably not my top concern yet)

That is what they mean they relay your page content. They post to your receipt.aspx in code, get the response from receipt.aspx , and return it to your customer(that why the URL is staty at transact.dll). That also mean all relative path will not work, everything need to be absolute path. e.g. <img src="/images/logo.jpg" /> need to be <img src="http://www.mckeepottery.com/images/logo.jpg />

Highlighted
Contributor
Posts: 27
Registered: ‎03-30-2012

Re: Required Fields for DPM using ASP.NET

They post to your receipt.aspx in code, get the response from receipt.aspx , and return it to your customer(that why the URL is staty at transact.dll).

 

OK, I think that makes sense, but then what exactly do I put in Receipt.aspx & Receipt.aspx.vb? You mention "get the response from receipt.aspx", so I tried using code such as Response.Write("Testing 1 2 3") to see if it displayed that at transact.dll, but no difference. What sort of code should I be using to send the response to transact.dll? Thanks.

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

Re: Required Fields for DPM using ASP.NET

[ Edited ]

If you don't mind that the receipt.aspx will have the transact.dll url.

Then, the receipt.aspx will be just what you want to show to your customer.

 

Other then getting "ASP.NET Ajax client-side framework failed to load." It display the "testing 1 2 3" on my test. What are you seeing when you said but no difference?

Look like it will use relative path for the ajax script. I would suggest not using ajax control at all.

 

If you have to do ajax script, read this http://am-blog.no-ip.org/BlogEngine/post/2010/04/12/Increase-AJAX-Performance-by-combining-Scripts-u...

But you will be on you own on this, as It is beyond this forum.

 

Highlighted
Contributor
Posts: 27
Registered: ‎03-30-2012

Re: Required Fields for DPM using ASP.NET

When I say but no difference, I mean I still see the following:

 

An error occurred while trying to report this transaction to the merchant. An e-mail has been sent to the merchant informing them of the error. The following is the result of the attempt to charge your credit card.

      This transaction cannot be accepted.

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

Re: Required Fields for DPM using ASP.NET

An error occurred while trying to report this transaction to the merchant. An e-mail has been sent to the merchant informing them of the error. The following is the result of the attempt to charge your credit card.
      This transaction cannot be accepted.

Did you add the url as a valid relay response url in your merchant account? I just try it by adding your receipt.aspx page as a valid relay response url on MY test account and run a DPM, and it show up.

 

Did you do that???

Highlighted
Contributor
Posts: 27
Registered: ‎03-30-2012

Re: Required Fields for DPM using ASP.NET

Yes, I did

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

Re: Required Fields for DPM using ASP.NET

[ Edited ]

Double check to make sure there isn't a typo. because it work for me when I try that URL ( www.mckeepottery.com/catalog/Receipt.aspx ) as my x_relay_url.

And you still have the EnableViewStateMac="False" on your DPM submit page?

 

Looking at the

<form name="aspnetForm" method="post" action="https://secure.authorize.net/gateway/transact.dll" id="aspnetForm" onsubmit="mckeepottery_com.MPWebServices.GenerateT

imestamp(function(value){document.getElementById('x_fp_timestamp').value=value;});mckeepottery_com.MPWebServices.GenerateFingerprint('xxx','xxx',126.00,'43',document.getElementById('x_fp_timestamp').value,function(value){window.setTimeout('document.getElementById('x_fp_hash').value=value;',1000);});">

 

It just didn't look right, can you just move that to code-behind.