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

HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...method="POST" to PCI Compliant Gatewaymethod="POST" to PCI Compliant Gateway
Previous
 
Next
New Post
4/12/2010 1:22 PM
 

In order to become PCI compliant, I'm changing my site to use a "hosted" PCI compliant page provide by my gateway/processor.

They have suggest that I execute the following:

<body>
    <form id="form1" method="POST" action="https://test1.XXXXX.com/ecomh/main.aspx">
    Transaction Amount:<br>
    <input type="TEXT" name="TransactionAmount" value="1.00">
    <input type="HIDDEN" name="RequestID" value="{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxxx}">
    <input type="HIDDEN" name="PurchaseIdentifier1" value="ORDER-0003">
    <input type="HIDDEN" name="PurchaseIdentifier2" value="Customer#25">
    <input type="submit" value="Go to Payment Page">
    </form>
</body>

How can I do this in DNN?

 

I have tried the code below.  It opens a new window, but doesn't seem to be submitting the form.

Dim FormHTML As StringBuilder = New StringBuilder
Dim HTML As StringBuilder = New StringBuilder

HTML.Append("<SCRIPT LANGUAGE='JavaScript'>")
HTML.Append("var newWin = window.open("""", ""NewWin"", ""width=600,height=400,scrollbars=1,resizable=1"");")
HTML.Append(ControlChars.CrLf)
HTML.Append("newWin.document.open();")
HTML.Append(ControlChars.CrLf)
HTML.Append("newWin.document.write('")

FormHTML.Append("<html><body><form name=""AutoForm"" method=""post"" action=""https://test1.xxxxxxxxx.com/ecomh/main.aspx"">")
FormHTML.Append("<input type=""hidden"" name=""TransactionAmount"" value=""1.00"" "">")
FormHTML.Append("<input type=""hidden"" name=""ECOMRequestID"" value=""{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}"" "">")
FormHTML.Append("<input type=""hidden"" name=""PurchaseIdentifier1"" value=""ORDER-0005"" "">")
FormHTML.Append("<input type=""hidden"" name=""PurchaseIdentifier2"" value=""5555"" "">")

FormHTML.Append("<\/form>")
FormHTML.Append("<SCRIPT LANGUAGE=""JavaScript"">document.getElementById(""AutoForm"").submit();<\/SCRIPT>")
FormHTML.Append("<\/body><\/html>")

HTML.Append(FormHTML.ToString)
HTML.Append("');")
HTML.Append(ControlChars.CrLf)
HTML.Append("newWin.document.close();")
HTML.Append(ControlChars.CrLf)
HTML.Append("</SCRIPT>")

Response.Write(HTML.ToString)

 
New Post
4/12/2010 2:02 PM
 

Kyle,

 

Here is an example of how to do it using just an html module.

 

<script type="text/javascript">
/* <![CDATA[ */
function __doExternalPost(targetUrl) {
   theForm.__VIEWSTATE.value = "";
   theForm.encoding = "application/x-www-form-urlencoded";
   theForm.action = targetUrl;
   theForm.onsubmit="";
   theForm.target="_blank";
   theForm.submit();
   window.location.reload( false );
   return false;
}
/* ]]> */
</script>



Name.:<br />
<input type="text" class="formbox" maxlength="7" id="username" name="username" />                   <br />

Password:<br />
<input type="password"  id="ruserpass" name="userpass" />                   <br />

<p><input type="submit" value="Click Here" onclick=" return __doExternalPost('https://www.testsite.com/login.aspx');" /></p>

 

You could do the same in a custom module.
 

 

 

 

 

 

 
New Post
4/12/2010 3:08 PM
 

Got it to work...........here's the code incase it might help someone else.

 

 

Protected Sub btnSubmit_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnSubmit.Click

Dim FormHTML As StringBuilder = New StringBuilder
Dim HTML As StringBuilder = New StringBuilder

HTML.Append("<script type=""text/javascript"">")
HTML.Append("var newWin = window.open("""", ""NewWin"", ""width=675,height=600,scrollbars=1,resizable=1"");")
HTML.Append(ControlChars.CrLf)
HTML.Append("newWin.document.open();")
HTML.Append(ControlChars.CrLf)
HTML.Append("newWin.document.write('")

FormHTML.Append("<html><head><title>Test</title></head><body>")
FormHTML.Append("<form name=""AutoForm"" method=""post"" action=""https://test1.xxxxx.com/xxxxx/main.aspx"">")
FormHTML.Append("<input type=""hidden"" name=""TransactionAmount"" value=""1.00"" \/>")
FormHTML.Append("<input type=""hidden"" name=""ECOMRequestID"" value=""{xxxxx-xxx-xxxx-xxxx-xxxxxxxxxxxx}"" \/>")
FormHTML.Append("<input type=""hidden"" name=""PurchaseIdentifier1"" value=""ORDER-0006"" \/>")
FormHTML.Append("<input type=""hidden"" name=""PurchaseIdentifier2"" value=""Customer #6"" \/>")

FormHTML.Append("<\/form>")
FormHTML.Append("<SCRIPT type=""text/javascript"">document.AutoForm.submit();<\/SCRIPT>")
FormHTML.Append("<\/body><\/html>")

HTML.Append(FormHTML.ToString)
HTML.Append("');")
HTML.Append(ControlChars.CrLf)
HTML.Append("newWin.document.close();")
HTML.Append(ControlChars.CrLf)
HTML.Append("</SCRIPT>")

Response.Write(HTML.ToString)

End Sub

 

 

 
Previous
 
Next
HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...method="POST" to PCI Compliant Gatewaymethod="POST" to PCI Compliant Gateway


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