Jump to content

Possibly A Easy To Answer Problem


jack_wetson

Recommended Posts

Im working on a website for WoW Powerlevelling, call it sad if you wish:p i have custom level order page orderform.php, and im struggling to get it to send all the data on the form to paypal so i can view all the info to process the order. if anyone could help that would be great.

 

 

all files are .zipped at http://www.silversidegaming.info/htdocs.zip, any help would be greatly appreciated

Link to comment
Share on other sites

no im trying to post an output of the js with with php stuff and i dont know how to  here is the code thus far

 

<?php
/*
* orderform.php
*
* PHP Toolkit for PayPal v0.51
* http://www.paypal.com/pdn
*
* Copyright (c) 2004 PayPal Inc
*
* Released under Common Public License 1.0
* http://opensource.org/licenses/cpl.php
*
*/
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Platinum Leveling - World of Warcraft Leveling</title>
<meta name="keywords" content="world of warcraft, WoW, level your character, leveling, wow levels, wow leveling guide, power level" />
<meta name="abstract" content="Platinum Leveling is your one source for WoW World of Warcraft power leveling." />
<meta http-equiv="Content-Language" content="EN" />
<meta name="distribution" content="Global" />
<meta name="revisit-after" content="7 days" />
<meta name="robots" content="FOLLOW,INDEX" />
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<link rel="icon" href="animated_favicon1.gif" type="image/gif" />

<link href="style.css" rel="stylesheet" type="text/css" />
<script language="javascript" type="text/javascript" src="JS/preload.js"></script>
<script language="javascript" type="text/javascript" src="JS/calculator.js"></script>
</head>
<body onLoad="MM_preloadImages('images/order_ordernow_rollover_09.jpg')">
<table width="1001" border="0" align="center" cellpadding="1" cellspacing="0" style="background-color:#999999">
  <tr>
    <td><table id="Table_01" width="1001" border="0" cellpadding="0" cellspacing="0" style="background-color:#FFFFFF">	
<tr>
	<td>
		<img src="images/OrderTemplate_01.jpg" width="404" height="39" alt=""></td>
	<td colspan="2" style="background-image:url(images/OrderTemplate_02.jpg)"><table border="0" align="right" cellpadding="0" cellspacing="0">
  <tr>
    <td class="style2"><a href="index.html"><strong>Home</strong></a></td>
    <td>    </td>
    <td class="style3"><a href="order.html"><strong>Order</strong></a></td>
    <td>    </td>
    <td class="style2"><a href="packages.html"><strong>Packages</strong></a></td>
    <td>    </td>
    <td class="style3"><a href="http://platinum-leveling.com/FAQ/index.php?action=search"><strong>FAQ</strong></a></td>
    <td>    </td>
    <td class="style2"><a href="../contact/"><strong>Contact</strong></a></td>
    <td> </td>
  </tr>
</table></td>
	<td>
		<img src="images/spacer.gif" width="1" height="39" alt=""></td>
</tr>
<tr>
	<td>
		<img src="images/OrderTemplate_04.jpg" width="404" height="40" alt=""></td>
	<td colspan="2" style="background-image:url(images/OrderTemplate_05.jpg)"></td>
	<td>
		<img src="images/spacer.gif" width="1" height="40" alt=""></td>
</tr>
<tr>
	<td rowspan="2" valign="top"><table width="404" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><img src="images/OrderTemplate_07.jpg" width="404" height="284" alt=""></td>
  </tr>
  <tr>
    <td><img src="images/OrderTemplate_11.jpg" width="404" height="315" alt=""></td>
  </tr>
</table></td>
	<td valign="top"><img src="images/OrderTemplate_08.jpg" width="321" height="139" alt=""></td>
	<td valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" class="style10">
          <tr>
            <td>Instructions:</td>
          </tr>
          <tr>
            <td><ol>
              <li>Enter your desired Start Level</li>
              <li>Enter your desired Finish Level</li>
              <li>Click "Calculate"</li>
              <li>Review cost and estimate time required.</li>
		  <li>Fill out your order details</li>
              <li>Click "Order Now" </li>
            </ol></td>
          </tr>
          <tr>
            <td>This form helps you calculate the cost and time required for pure-power-leveling.</td>
          </tr>
        </table>		  </td>
	<td>
		<img src="images/spacer.gif" width="1" height="139" alt=""></td>
</tr>
<tr>
	<td colspan="2" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td><p> </p>
            <br />
            <table width="550" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr>
    <td><FORM name=thisformonly action="process.php"  method="post"  target="_parent" style="margin:0">
<fieldset>
<legend> Estimate     
<table width="500" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td colspan="2"><br><label for="startlevel">Starting Level</label></td>
    <td colspan="2"><br><div class="formboxdiv"><INPUT name=beginlevel class="formbox" id=beginlevel onkeypress=onlyNum(); /></div></td>
  </tr>
  <tr>
    <td colspan="2"><label for="endlevel">Ending Level</label></td>
    <td colspan="2"><div class="formboxdiv"><INPUT name=endlevel class="formbox" id=endlevel onkeypress=onlyNum(); /></div></td>
  </tr>
  
    <td colspan="2"><div align="right">
      <input name="Submit" type="button" class="calculate" onClick="doCacl(thisformonly);" value="CALCULATE" />
    </div></td>
    <td colspan="2"> </td>
  </tr>
  <tr>
    <td colspan="2"> </td>
    <td colspan="2"> </td>
  </tr>
  <tr>
    <td width="204"><label for="price">Forecasted Price</label></td>
    <td width="45"><div align="right">$  </div></td>
    <td width="143"><div class="formboxdiv"><INPUT name=price class="formbox" size=15 readonly />
    </div></td>
    <td width="108">  Circa</td>
  </tr>
  
    <tr>
    <td><label for="price">Required Time</label></td>
    <td>Time  </td>
    <td><div class="formboxdiv"><INPUT name=totaltime class="formbox" size=15 readonly />
    </div></td>
    <td>  Hours</td>
    </tr>
    <tr>
      <td colspan="2"><INPUT name=score id="score"  type="hidden" size=15 readonly />					</td>
      <td colspan="2"><INPUT name=gameid id="gameid"  type="hidden" value="2" size=15 readonly /></td>
    </tr>
<tr> 
          <td colspan="2"> <br> <br> <label for="price">FIRST NAME </label> <br> 
              <div class="formboxdiv"><input name="firstname" class="formbox" type="text" id="firstname" size="40"> </div> </div>
            </td>
        </tr>
<tr> 
          <td colspan="2"> <br> <br> <label for="price">LAST NAME </label> <br> 
              <div class="formboxdiv"><input name="firstname" class="formbox" type="text" id="lastname" size="40"> </div> </div>
            </td>
        </tr>

<tr> 
          <td colspan="2"> <br> <br> <label for="price">EMAIL </label> <br> 
              <div class="formboxdiv"><input name="firstname" class="formbox" type="text" id="email" size="40"> </div> </div>
            </td>
        </tr>

<tr> 
          <td colspan="2"> <br> <br> <label for="price">Contact Number </label> <br> 
              <div class="formboxdiv"><input name="firstname" class="formbox" type="text" id="phone1" size="40"> </div> </div>
            </td>
        </tr>
<tr> 
          <td colspan="2"> <br> <br> <label for="price">Class </label> <br> 
              <input name="firstname" class="formbox" type="text" id="size" size="40">
<select name="os0">
                        <option value="Druid">Druid</option>
                        <option value="Hunter">Hunter</option>
                        <option value="Mage">Mage</option>
					<option value="Paladin">Paladin</option>
					<option value="Priest">Priest</option>
					<option value="Rogue">Rogue</option>
					<option value="Shaman">Shaman</option>
					<option value="Warlock">Warlock</option>
					<option value="Warrior">Warrior</option>
					<option value="Death Knight">Death Knight</option> 
                     </select> </td>			  </div> 
            </td>
        </tr>

	<tr> 
          <td colspan="2"> <br> <br> <label for="price">Race </label> <br> 
              <input name="firstname" class="formbox" type="text" id="Color" size="40">
<select name="os0">
                        <option value="Horde">Horde</option>
                        <option value="Alliance">Alliance</option>
                        
                     </select> </td>			  </div> 
            </td>
        </tr>
  <tr>
    <tr>
      <td colspan="2"><div align="right"><input name="Submit2" type=button class="calculate" onClick="doCacl(thisformonly);javascript:if(document.thisformonly.price.value>0){ thisformonly.submit();}" value="CONTINUE" /></div></td>
      <td colspan="2"> </td>
    </tr>
</table>
</legend>
</fieldset>

</td>
  </tr>
</table></td>
          </tr>
          <tr>
            <td><div align="right"><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Order Now!','','images/order_ordernow_rollover_09.jpg',1)"><img src="images/order_09.jpg" alt="Order Now!" name="Order Now!" width="270" height="179" border="0" id="Order Now!" /></a></div></td>
          </tr>
        </table>		  </td>
	<td>
		<img src="images/spacer.gif" width="1" height="145" alt=""></td>
</tr>

<tr>
	<td colspan="3" style="background-image:url(images/OrderTemplate_12.jpg)"><div align="left" class="style9">   Copyright © 2008 Platinum Leveling, All rights reserved. </div></td>
	<td>
		<img src="images/spacer.gif" width="1" height="42" alt=""></td>
</tr>
<tr>
	<td>
		<img src="images/spacer.gif" width="404" height="1" alt=""></td>
	<td>
		<img src="images/spacer.gif" width="320" height="1" alt=""></td>
	<td>
		<img src="images/spacer.gif" width="275" height="1" alt=""></td>
	<td></td>
</tr>
</table></td>
  </tr>
</table>
</body>
</html>
<html>
<head>



</form> 

</body>
</html>

Link to comment
Share on other sites

do calc

function doCacl(form)
{
	//????????
	var beginlevel	= form.beginlevel.value;
	var endlevel	= form.endlevel.value;
	//???????????
	if ((beginlevel == "") | (endlevel == "")) {alert("please enter your level");return false;}
	//??????????????
	if (beginlevel * 1 > endlevel * 1){alert("please enter your level");return false;}
	if ( endlevel * 1 > 70 ){alert("please enter your real level");return false;}

	if (( endlevel * 1 < 11 ) | (beginlevel * 1 < 1 ))
	{
	alert("Please choose a correct level range");  
	document.thisformonly.price.value =""  ;
        document.thisformonly.totaltime.value ="";  
    return false;
    }
	//??????
	var price = 0;
	var totaltime = 0;
	//????
	for (var i=0;i<ItemArr.length;i++)
	{
		if ((ItemArr[i].level * 1 > beginlevel * 1 )&(ItemArr[i].level * 1 <= endlevel * 1))
		{
			price		= price + ItemArr[i].price;
			totaltime	= totaltime + ItemArr[i].time;
		}

		if (ItemArr[i].level * 1 > endlevel * 1){i=ItemArr.length;}
	}
	if ( price < 1 ){alert("Please choose a correct level range");return false;}
	if ( totaltime < 24 ){alert("Please choose a correct level range");return false;}
	if (price>=100)
	{
	form.price.value		=  parseFloat(price).toFixed(2);
	form.score.value		=  Math.round(parseFloat(price).toFixed(2)*0.1) ;
	}
	if(price<100)
	{
	form.price.value		=  parseFloat(price).toFixed(2);
	form.score.value		=  Math.round(price*0.1) ;
	}
	form.totaltime.value	= totaltime ;

 

where are the clashes?

Link to comment
Share on other sites

all in the stuff was in the .zip file :P

 

process.php

<?php
/*
* process.php
*
* PHP Toolkit for PayPal v0.51
* http://www.paypal.com/pdn
*
* Copyright (c) 2004 PayPal Inc
*
* Released under Common Public License 1.0
* http://opensource.org/licenses/cpl.php
*
*/

//Configuration File
include_once('includes/config.inc.php'); 

//Global Configuration File
include_once('includes/global_config.inc.php');

?> 

<html>
<head><title>::PHP PayPal::</title></head>
<body onLoad="document.paypal_form.submit();">
<form method="post" name="paypal_form" action="<?=$paypal[url]?>">

<?php 
//show paypal hidden variables

showVariables(); 

?> 

<center><font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="333333">Processing Transaction . . . </font></center>

</form>
</body>   
</html>

Link to comment
Share on other sites

right, need to see the 'doCacl' function...

 

also seeing two form elements named the same... 'firstname', well all the form elements are named the same, I think your mixing 'id' with 'name'...

 

 

id and name are the same thing..you can't use both..

Link to comment
Share on other sites

showvar

 

function showVariables() {

global $paypal;

?>

<!-- PayPal Configuration -->
<input type="hidden" name="business" value="<?=$paypal[business]?>">
<input type="hidden" name="cmd" value="<?=$paypal[cmd]?>">
<input type="hidden" name="image_url" value="<? echo "$paypal[site_url]$paypal[image_url]"; ?>">
<input type="hidden" name="return" value="<? echo "$paypal[site_url]$paypal[success_url]"; ?>">
<input type="hidden" name="cancel_return" value="<? echo "$paypal[site_url]$paypal[cancel_url]"; ?>">
<input type="hidden" name="notify_url" value="<? echo "$paypal[site_url]$paypal[notify_url]"; ?>">
<input type="hidden" name="rm" value="<?=$paypal[return_method]?>">
<input type="hidden" name="currency_code" value="<?=$paypal[currency_code]?>">
<input type="hidden" name="lc" value="<?=$paypal[lc]?>">
<input type="hidden" name="bn" value="<?=$paypal[bn]?>">
<input type="hidden" name="cbt" value="<?=$paypal[continue_button_text]?>">

<!-- Payment Page Information -->
<input type="hidden" name="no_shipping" value="<?=$paypal[display_shipping_address]?>">
<input type="hidden" name="no_note" value="<?=$paypal[display_comment]?>">
<input type="hidden" name="cn" value="<?=$paypal[comment_header]?>">
<input type="hidden" name="cs" value="<?=$paypal[background_color]?>">

<!-- Product Information -->
<input type="hidden" name="item_name" value="<?=$paypal[item_name]?>">
<input type="hidden" name="amount" value="<?=$paypal[amount]?>">
<input type="hidden" name="quantity" value="<?=$paypal[quantity]?>">
<input type="hidden" name="item_number" value="<?=$paypal[item_number]?>">
<input type="hidden" name="undefined_quantity" value="<?=$paypal[edit_quantity]?>">
<input type="hidden" name="on0" value="<?=$paypal[on0]?>">
<input type="hidden" name="os0" value="<?=$paypal[os0]?>">
<input type="hidden" name="on1" value="<?=$paypal[on1]?>">
<input type="hidden" name="os1" value="<?=$paypal[os1]?>">

<!-- Shipping and Misc Information -->
<input type="hidden" name="shipping" value="<?=$paypal[shipping_amount]?>">
<input type="hidden" name="shipping2" value="<?=$paypal[shipping_amount_per_item]?>">
<input type="hidden" name="handling" value="<?=$paypal[handling_amount]?>">
<input type="hidden" name="tax" value="<?=$paypal[tax]?>">
<input type="hidden" name="custom" value="<?=$paypal[custom_field]?>">
<input type="hidden" name="invoice" value="<?=$paypal[invoice]?>">

<!-- Customer Information -->
<input type="hidden" name="first_name" value="<?=$paypal[firstname]?>">
<input type="hidden" name="last_name" value="<?=$paypal[lastname]?>">
<input type="hidden" name="address1" value="<?=$paypal[address1]?>">
<input type="hidden" name="address2" value="<?=$paypal[address2]?>">
<input type="hidden" name="city" value="<?=$paypal[city]?>">
<input type="hidden" name="state" value="<?=$paypal[state]?>">
<input type="hidden" name="zip" value="<?=$paypal[zip]?>">
<input type="hidden" name="email" value="<?=$paypal[email]?>">
<input type="hidden" name="night_phone_a" value="<?=$paypal[phone_1]?>">
<input type="hidden" name="night_phone_b" value="<?=$paypal[phone_2]?>">
<input type="hidden" name="night_phone_c" value="<?=$paypal[phone_3]?>">

<?php } ?>

Link to comment
Share on other sites

right, need to see the 'doCacl' function...

 

also seeing two form elements named the same... 'firstname', well all the form elements are named the same, I think your mixing 'id' with 'name'...

 

 

id and name are the same thing..you can't use both..

 

mmm, I never use id...

 

 

 

 

bits like this:

<input type="hidden" name="image_url" value="<? echo "$paypal[site_url]$paypal[image_url]"; ?>">

need concatenating

<input type="hidden" name="image_url" value="<? echo "$paypal[site_url].$paypal[image_url]"; ?>">

 

 

... nothing from the original form is added to this form...

 

... does

<body onLoad="document.paypal_form.submit();">

as it is, work? (esp... if js turned off!)

 

 

NB:

...also in your js script, you keep multiplying things by 1, what is the point?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.