Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Using Modules a...Using Modules a...POST requests not workingPOST requests not working
Previous
 
Next
New Post
4/21/2010 11:20 AM
 

(I searched for the topic but could not find any thread. Please let me know if there is any solution or thread on this topic.)

We have a payment module for a payment Gateway. The problem is that the Gateway will POST the transaction data only to the URL from where it was submitted (i.e. the 'Defaul.aspx' path for the module). But it seems that 'Default.aspx' is not accepting POST requests. Is there some logical problem here or i am doing something wrong.

Please suggest any workaround or solution .... Any urgent replies are much appreciated.

ps. I can successfully parse the POST data on another .aspx file under "/DesktopModules/ModuleName/someFolder/" but not in 'Default.aspx'.

 
New Post
4/21/2010 2:29 PM
 

 

 or in other words .... does DNN "default.aspx" accept POST requests or it's just a module-specific case??

 
New Post
4/21/2010 3:01 PM
 

Looks like we're working on the same thing.......  Since DNN already has a <FORM> on the page, it doesn't like you trying to add another <FORM>.

I've made a few posts in the thread:  http://www.dotnetnuke.com/Community/Forums/tabid/795/forumid/76/postid/363604/scope/posts/Default.aspx#363604

Here's my solution.  If you or anyone knows of a better one, please let me know.

Private Sub Post(ByVal paymentInfo As Payment)
    Dim HTML As StringBuilder = New StringBuilder

    HTML.Append("[html][head][title]Test[/title][/head][body]")
    HTML.Append(String.Format("[form name=""AutoForm"" method=""post"" action=""{0}""]", GatewayParameters.RequestURL))
    HTML.Append(String.Format("[input type=""hidden"" name=""TransactionAmount"" value=""{0}"" /]", paymentInfo.TransactionAmountAsString))
    HTML.Append(String.Format("[input type=""hidden"" name=""ECOMRequestID"" value=""{0}"" /]", GatewayParameters.ECOMRequestID))
    HTML.Append(String.Format("[input type=""hidden"" name=""PurchaseIdentifier1"" value=""{0}"" /]", paymentInfo.PurchaseIdentifier1))
    HTML.Append(String.Format("[input type=""hidden"" name=""PurchaseIdentifier2"" value=""{0}"" /]", paymentInfo.PurchaseIdentifier2))

    HTML.Append("[/form]")
    HTML.Append("[SCRIPT type=""text/javascript""]document.AutoForm.submit();[/SCRIPT]")
    HTML.Append("[/body][/html]")

    Response.Write(HTML.ToString)
End Sub

Note: < > replaced with [ ]

 
New Post
4/21/2010 3:05 PM
 

When my gateway responds back to me with a "POST" I do the following:

        Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            Try
                If Page.IsPostBack = False Then

                    TransactionID = Request.Params("TransactionID")
                    ResponseCode = Request.Params("ResponseCode")
                    ResponseText = Request.Params("ResponseText")
                    ApprovalCode = Request.Params("ApprovalCode")
                    AVSResultCode = Request.Params("AVSResultCode")
                    PurchaseIdentifier1 = Request.Params("PurchaseIdentifier1")
                    PurchaseIdentifier2 = Request.Params("PurchaseIdentifier2")

                    Dim paymentInfo As New ptsi.eGovPay.DAL.PtsiEGovPayUBPayment
                    With paymentInfo
                        .Query.Where(.Query.PurchaseIdentifier1.Equal(PurchaseIdentifier1))
                        If .Query.Load Then
                            .ETSResponseCode = ResponseCode
                            .ETSResponseText = ResponseText
                            .ETSApprovalCode = ApprovalCode
                            .ETSAVSResultCode = AVSResultCode
                            .Save()
                        End If
                    End With

                End If
            Catch exc As Exception        'Module failed to load
                ProcessModuleLoadException(Me, exc)
            End Try
        End Sub

I also had to set enableViewStateMac="false" in the web.config.  I'm not sure how this effects security for the rest of the site.  I'm looking into that now.

 
New Post
4/21/2010 3:45 PM
 

Thanks a lot Kyle ... i will try your technique and let you know.

For including the FORM to the page, i am using a slightly different technique that i learned from some blog ... i will post that code later once i reach home.

cheers

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Using Modules a...Using Modules a...POST requests not workingPOST requests not working


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out