- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
04-22-2012 03:43 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey njsokalski,
Looking at the code you posted above, we were able to determine that the information you are using is from a live account, not a test account. I masked the login ID from your original post as a security precaution.
If you try the code above, with your Transaction Key, but change the post location to the production URL, then it should work fine.
Hope that helps.
Thanks,
Michelle
Developer Community Manager
04-25-2012 11:29 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
njsokalski, Are you posting to the test.authorize.net on your new test account loginID?
Michelle, it also in the fingerprint method The form tag is: <form name="aspnetForm"....
04-25-2012 11:29 AM - edited 04-25-2012 11:32 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
OK, here is the new code using the Api Login Id and Transaction Key I was given with my new test account:
<input id="x_card_num" type="hidden" value="4007000000027"/><input id="x_exp_date" type="hidden" value="1212"/><input id="x_card_code" type="hidden" value=""/><input id="x_amount" type="hidden" value="126.00"/><input id="x_tax" type="hidden" value="6.00"/><input id="x_first_name" type="hidden" value="Nathan"/><input id="x_last_name" type="hidden" value="Sokalski"/><input id="x_address" type="hidden" value="1217 Maryland Avenue"/><input id="x_city" type="hidden" value="Allentown"/><input id="x_state" type="hidden" value="PA"/><input id="x_zip" type="hidden" value="18103"/><input id="x_ship_to_first_name" type="hidden" value="Nathan"/><input id="x_ship_to_last_name" type="hidden" value="Sokalski"/><input id="x_ship_to_address" type="hidden" value="1217 Maryland Avenue"/><input id="x_ship_to_city" type="hidden" value="Allentown"/><input id="x_ship_to_state" type="hidden" value="PA"/><input id="x_ship_to_zip" type="hidden" value="18103"/><input id="x_login" type="hidden" value="8e6UZKcMjJ3g"/><input id="x_fp_sequence" type="hidden" value="43"/><input id="x_test_request" type="hidden" value="FALSE"/><input id="x_fp_timestamp" type="hidden"/><input id="x_fp_hash" type="hidden"/><input id="x_relay_url" type="hidden" value="http://www.mckeepottery.com/catalog/Receipt.aspx"/><input id="x_relay_response" type="hidden" value="TRUE"/><input id="x_version" type="hidden" value="3.1"/><input id="x_method" type="hidden" value="CC"/><input id="x_type" type="hidden" value="AUTH_CAPTURE"/>
Even though the login id and transaction key are from a test account, I tried it with both of the following form tags (notice that the only difference between the two is the action attribute to determine which server it posts to):
<form name="aspnetForm" method="post" action="https://test.authorize.net/gateway/transact.dll" id="aspnetForm" onsubmit="mckeepottery_com.MPWebServices.GenerateTimestamp(function(value){document.getElementById('x_fp_timestamp').value=value;});mckeepottery_com.MPWebServices.GenerateFingerprint('4pC73a5hw6K872Dg','8e6UZKcMjJ3g',126.00,'43',document.getElementById('x_fp_timestamp').value,function(value){window.setTimeout('document.getElementById('x_fp_hash').value=value;',1000);});">
<form name="aspnetForm" method="post" action="https://secure.authorize.net/gateway/transact.dll" id="aspnetForm" onsubmit="mckeepottery_com.MPWebServices.GenerateTimestamp(function(value){document.getElementById('x_fp_timestamp').value=value;});mckeepottery_com.MPWebServices.GenerateFingerprint('4pC73a5hw6K872Dg','8e6UZKcMjJ3g',126.00,'43',document.getElementById('x_fp_timestamp').value,function(value){window.setTimeout('document.getElementById('x_fp_hash').value=value;',1000);});">
Because I just created the test account about an hour ago, and haven't touched any of the account settings, I would think it is a test account right now, right? Thanks.
04-25-2012 12:16 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I should have spot it earlier, must not be getting enough sleep.
The problem is it need the name attribute for the input, not just the id.
So every input should be like
<input name="x_login" id="x_login" type="hidden" value="8e6UZKcMjJ3g" />
after that it work on test.authorize.net
04-25-2012 12:34 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Well, I haven't made it to solved yet, but I guess it's good that I've managed to get something other than that error 13. I am now getting the following after submitting:
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.
And I then receive the following email:
**Please DO NOT REPLY to this message. E-mail developer@authorize.net if you have any questions.
Authorize.Net Developer Center Merchant,
Your script timed out while we were trying to post transaction results to it.
Transaction ID: 0
Transaction Result: This transaction cannot be accepted.
The following message was displayed to the customer:
------------------------------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.
------------------------------
This is when posting to https://test.authorize.net/gateway/transact.dll using my new test account and all the same fields & code I posted in my previous post (with the name attribute included with the id now, of course). I'm not really sure what to do next, because all it really says is "An error occurred while trying to report this transaction", it doesn't give any error codes or details, and I couldn't really find anything from the searches I did for the error message. Are there any common mistakes that cause this error, or somewhere I should be looking to get more details? Thanks.
04-26-2012 09:10 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
....
It mean your relay response it not working.
Relay Response Basics and Troubleshooting
When I put your relay_url http://www.mckeepottery.com/catalog/Receipt.aspx it getting a 302 then to http://www.mckeepottery.com/catalog/CheckoutError.aspx which is 404
----------------------
Transaction ID: 0
Could be error 99 https://developer.authorize.net/tools/responsecode99/
Change your relay_url to get the raw output https://developer.authorize.net/tools/paramdump/index.php
remember to add that to your merchant account valid relay url list.
Did you add the attribute name="???" to all the inputs e.g. name="x_fp_timestamp", name="x_fp_sequence", etc
04-26-2012 09:41 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
OK, on the Relay Response Basics and Troubleshooting page it says:
It instructs the payment gateway to return transaction results to the merchant using an HTML form POST to a specified URL on the merchant's Web server. A script or program at the URL can be used to create a custom receipt page using the transaction information. The custom receipt page is then relayed back to the customer's browser. 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.
Wouldn't "a specified URL on the merchant's Web server" mean http://www.mckeepottery.com/catalog/Receipt.aspx in my case? Is it going to http://www.mckeepottery.com/catalog/Receipt.aspxand then giving the error? How can I see the 302 and 404 errors you mention? I also tried changing the x_relay_url field as you mention (including in the valid relay url list), but it didn't help. Any suggestions? Thanks.
(NOTE: I did add the name attribute to all of my fields)
04-26-2012 05:29 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
1)your site DPM form post to authorize.net
2)authorize.net process and post the result (in code) to your relay response page. In code mean something like http://msdn.microsoft.com/en-us/library/debx8sh9.aspx
3)in your relay response page, check for approve or decline, save the post data or back to DPM form. Then, if approve, using javascript to redirect or a javascript form post to the final receipt page that will display to your customer. If you don't use javascript, the URL will stay at authorize.net
The 302 and 404 was from using firebug with firefox, or fiddler with IE, right now if I go to straight to the receipt.aspx it showing error 500 Parameter count mismatch.
When you change the x_relay_url to https://developer.authorize.net/tools/paramdump/index.php
didn't it post all the result data? Which should all the fields in http://developer.authorize.net/guides/AIM/Transaction_Response/Fields_in_the_Payment_Gateway_Respons...
which you can look up the response reason code and text in http://developer.authorize.net/guides/AIM/Transaction_Response/Response_Reason_Codes_and_Response_Re...
04-26-2012 05:44 PM - edited 04-26-2012 05:51 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm confused about what I can and need to do in my relay response page (Receipt.aspx). If I'm supposed to use Javascript, wouldn't it need to be open in the user's browser (but obviously it isn't). Is there anywhere that I can see an example of a basic ASP.NET relay response page? Thanks.
04-27-2012 08:46 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Do a simple Receipt.aspx, just display all the post param or just a just any text to the screen and you will see what they mean by it relay your page content.
Also, I not sure if you knew this, but you will need to set EnableViewStateMAC = false on both your DPM page and the relay response page or set the machinekey on your web.config
04-27-2012 11:06 AM
