cancel
Showing results for 
Search instead for 
Did you mean: 

Please help SIM ASP MVC C#

Good afternoon ,

I threw my test site (SIM MVC C#) out to a publically accessible location
http://authorize.inetwd.com/Home/VendorPaymentForm
and I’m still not getting  a response back.
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<h1>  Vendor API Call </h1>  
<%using (Html.BeginSIMForm("http://authorize.inetwd.com/Home/ShowResponse",
         2.22M,
         ViewData["apID"].ToString(),                     // reference 43yNStuff----  My API Login ID From Web Config File
         ViewData["T_key"].ToString(),          //   reference  8JgaNStuff---- TransactionKey From Web Config File
         true))

  {%>

  <div class = "sumStuff">
  <span>
<%=Html.CheckoutFormInputs(true)%>
<%=Html.Hidden("order_id","9786") %>
<%--<%=Html.Hidden("x_type","AUTH_CAPTURE")  %>--%>
<%=Html.Hidden("x_relay_always", true)%>
 </span>
 </div>
 <div class="MoreStuff">
<input type = "submit" value = "Pay" />
</div>
<%}%>    

</asp:Content>


I’m having difficulity obtaining a response to my payment submission
I have configured the managment interface to a relay response URL as shown in the code above

 

http://authorize.inetwd.com/Home/ShowResponse

 

 I have manually tested the routing engine to confirm that this URL is seen and have stepped into it manually..
However I cant get a response to hit it from Authorize.Net

 
[HttpPost]
public ActionResult ShowResponse(FormCollection post)
        {
            var response = new AuthorizeNet.SIMResponse(post);
            var isValid = response.Validate("merchHashCd", "transActKey");
            if (!isValid)
            { return RedirectToAction("FAIL"); }
            ViewData["response"] = Request.QueryString["m"] ?? "";
            return View("Response");
        }

This concept was borowed from the Direct Post style but I don’t think it matters if I have a parameter or not
At this point. I’m just not getting an automated web based response period.
Can anyhone help please..

charles4iNET
Contributor
1 ACCEPTED SOLUTION

Accepted Solutions

Good afternoon  integration support Authorize.net                       

 

I will update  my entries in your dev forum with my findings but

for your information, and future reference.

 

A colleague more familiar with general web based development pointed out that I could force some data to the web page after receiving your response by using a method on the web  Response object named Flush().

:: Response.Flush()

 

This allowed me to continue manipulating ( evaluating for approval the  various  returned

codes, AVS, CCV, CAVV whatever) to determine if the response was approved, before displaying my receipt page,

while using C# MVC .   

 

Once again please note that I received the error----“An error occurred while trying to report this transaction to the merchant. An e-mail has….”       within miliseconds of submitting my Hosted payment form.

View solution in original post

6 REPLIES 6

I have to remove the HTTP Post attribute for manual navigation to the ActionResult ShowResponse() but 

I replaced it for testing the Aut.net API again to no avail   so if you attempt to nav to ShowResponse manually I have put it back to [HttpPost]

charles4iNET
Contributor

I find it interesting how the links in the fail page pont to Authorize.net's home page when Its actually MY Fail page back here at the source.     I cant tell whats going on here

I have no idea how to program in ASP MVC C#, but maybe this is a relay response problem. Have you configured your relay response URL(s) in your control panel? That has to be done or Authorize.net willl ignore them.

I got past this confusion -- using the SDK Helper dll apparently doesnt invoke the same 'complete' hosted payment form as the api does. ?!??!?!!  Sup with that ??!!

Still not sure as support wont deny or confirm that for me.

 

So I went with the API as I get full bill/ship address this way.

 

Note... the direct post methods samples that list SIM as the type are ASSUREDLY NOT SIM they are specifically direct post and you cannot evaluate the response with the sdk.  

The response in the SDK for SIM I have additionally not gotten to function correctly  EVER. Yet the signature is clearly there inthe Object Browser ?!!?!??!?!  

 

Currently I'm having a problem OUT OF THE BLUE trying to get my relay response back to my MVC method.

 

All was working fine yesterday and I was ready to move functioning test code into the production site template.

 

Nothing changed on my end I even reverted to an old test project that I left in working state for reference., (KRAZY!!!)

I now consistantly in all solutions get the famous time out error::  "An error occurred while trying to report this transaction to the merchant."  We are basically at the point of believing perhaps it just doesn work on Fridays...

 

 

To all concerned parties pick on SDK or API and dont dare get the two confused. My personal $0.02  go with  the API and write up your own helpers !!!

Good afternoon  integration support Authorize.net                       

 

I will update  my entries in your dev forum with my findings but

for your information, and future reference.

 

A colleague more familiar with general web based development pointed out that I could force some data to the web page after receiving your response by using a method on the web  Response object named Flush().

:: Response.Flush()

 

This allowed me to continue manipulating ( evaluating for approval the  various  returned

codes, AVS, CCV, CAVV whatever) to determine if the response was approved, before displaying my receipt page,

while using C# MVC .   

 

Once again please note that I received the error----“An error occurred while trying to report this transaction to the merchant. An e-mail has….”       within miliseconds of submitting my Hosted payment form.

Hi Charles!

 

I'm working on SIM Relay Response for NopCommerce. The Relay Response URL page dispalys, but it's format is all mangled up. It works fine when I type it in my browser:

http://www.horn-tunes.com/plugins/paymentAuthorizeNetSIM/RelayResponseHandler

 

and when I use the Relay Response test tool by John Conde found here: http://authnet.johnconde.net/tools/relay-response/simulator.php.

 

Both of these methods do not render the page on Authorize.Net's servers .... When it is rendered there, the URL retruned says it's on there domain.

 

So why does it not render correctly?