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

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsStoreStoreBUG - Cannot reach the PayPal payment pageBUG - Cannot reach the PayPal payment page
Previous
 
Next
New Post
10/15/2011 8:59 AM
 
Hi all,
regarding my previous post, I managed to reach PayPal payment page by adding a Response.Flush soon after writing the html containing the page with auto-submit.

Project:      DotNetNuke.Store.Cart
File:           RemoteForm.cs
Method:     public void Post(bool hidden)

HttpContext.Current.Response.Clear();
HttpContext.Current.Response.Write(form.ToString());
////////////////////////////////////
HttpContext.Current.Response.Flush(); // add this line
////////////////////////////////////
HttpContest.Current.Response.End();

The Response.End raises a ThreadAbortException, and this is maybe causing the problem with IIS and Integrated Pipeline Mode.
Hope this helps
Thank you
--
Antonello Aringhieri

 

 
New Post
10/15/2011 9:40 AM
 

Also:
- added a "Please wait..." label
- replaced "\\" (double back slash) with "/" (single forward slash) inside the foreach (the input tag closing)
- appended 5 blanks after "</html>" - for some reasons the Response.Write truncated the last 3 chars of the stringbuilder content, thus displaying a weird "/>" in the top of the page, although for a brief moment)

The final code is this:


public void Post(bool hidden)
{
    // Build the HTML form
    var form = new StringBuilder();
    form.AppendFormat("<html><head></head><body onload=\"document.{0}.submit()\">", FormName);
    form.AppendFormat("<form name=\"{0}\" method=\"POST\" action=\"{1}\" >", FormName, Url);
    form.Append("<p><b>Please wait...</b></p>");
    foreach (string key in Fields)
    {
        if (hidden)
            form.AppendFormat("<input type=\"hidden\" name=\"{0}\" value=\"{1}\" />", key, Fields[key]);
        else
            form.AppendFormat("<input name=\"{0}\" value=\"{1}\" />", key, Fields[key]);
    }
    form.Append("</form></body></html>     ");
    // Clear all and return the form
    HttpContext.Current.Response.Clear();
    HttpContext.Current.Response.Write(form.ToString());
    HttpContext.Current.Response.Flush();
    HttpContext.Current.Response.End();
}
 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsStoreStoreBUG - Cannot reach the PayPal payment pageBUG - Cannot reach the PayPal payment page


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