THT Community (TCom)

Full Version: Paid hosting - not working
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Alright, when i try to order a plan it creates account and everything, but then i goto the invoice and click pay, but it just says "Please wait, your order is being processed..." but never redirects to paypal.

(tested) fix:
open includes/paypal/paypal.class.php and replace your whole submit_paypal_post() function with this:
Code:
function submit_paypal_post() {
     /********************************************************************************​\
    || Bug fix for TheHostingTool by Booher                                          ||
     \*******************************************************************************​**/
      // this function actually generates an entire HTML page consisting of
      // a form with hidden elements which is submitted to paypal via the
      // BODY element's onLoad attribute.  We do this so that you can validate
      // any POST vars from you custom form before submitting to paypal.  So
      // basically, you'll have your own form which is submitted to your script
      // to validate the data, which in turn calls this function to create
      // another hidden form and submit to paypal.

      // The user will briefly see a message on the screen that reads:
      // "Please wait, your order is being processed..." and then immediately
      // is redirected to paypal.

      echo "<html>\n";
      echo "<head><title>Processing Payment...</title></head>\n";
      echo "<body>\n";
      echo "<center><h3>Please wait, your order is being processed...</h3></center>\n";
      echo "<form method=\"post\" name=\"form\" action=\"".$this->paypal_url."\">\n";

      foreach ($this->fields as $name => $value) {
         echo "<input type=\"hidden\" name=\"$name\" value=\"$value\">";
      }

      echo "</form>\n";
      ?>
      <script>
      document.form.submit();
      </script>
      <?php
      echo "</body></html>\n";
    
   }

I tested it, and it worked perfectly Smile -- I think the problem was that <body> was already defined?
What browser you on?
The latest firefox.
The double body tags could have possibly confused the jQuery Library. Possibly.
Well I've changed the whole way of how it works in 1.2.1. So that shouldn't be a problem in the new release.
So if I edit that file, will the paid option work?

thank you
the paid option works aleady. this modification is not supported and is use at your own risk.
(12-26-2009 08:43 PM)Nick Wrote: [ -> ]the paid option works aleady. this modification is not supported and is use at your own risk.

Ok I will test again this and will report here Smile

Thanks for the reply
(12-26-2009 08:43 PM)Nick Wrote: [ -> ]the paid option works aleady. this modification is not supported and is use at your own risk.
Confimed twice, the paid options does not work! Sad
Reference URL's