cancel
Showing results for 
Search instead for 
Did you mean: 

Required Fields for DPM using ASP.NET

I have been receiving the following error when attempting to post using DPM and ASP.NET:

 

(13) The merchant login ID or password is invalid or the account is inactive.

 

I am currently including the following fields:

 

x_card_num

x_exp_date

x_card_code

x_amount

x_tax

x_first_name

x_last_name

x_address

x_city

x_state

x_zip

x_ship_to_first_name

x_ship_to_last_name

x_ship_to_address

x_ship_to_city

x_ship_to_state

x_ship_to_zip

x_login

x_tran_key

x_fp_sequence

x_fp_timestamp

x_fp_hash

x_relay_url

x_relay_response

 

I am posting to the following URL using a developer account:

 

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

 

The account is in LIVE MODE. Are there any other fields I should or need to include, or any settings I should check or set? I can't figure out what the problem could be, or what steps I should take next to try to get everything working. Any help would be appreciated. Thanks.

njsokalski
Contributor
29 REPLIES 29

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.

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)

 

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)

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 />

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.

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.

 

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.

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???

Yes, I did

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.