Jump to content

i have a [payment problem with my script. please help


supergrame

Recommended Posts

hello im very new to php. im having a problem with this script you see what its ment to do is when you click register an account you need to pay 3 people then the account is created. but what it does is keeps lookping the first payment it never gets to the second step. im going to post the page that i think the problem is on i really hope you guys can help me with this. thanx

 

 

 

 

 

<?

session_start();

include'config.php';

$title="Join now to $CONFIG->sitename";

include("$CONFIG->templatedir/header_locked.php");

///////////////////////////////////////

$stage=$_GET['stage'];

switch($stage){

default:

 

$page_content="

<div align=center class=text>

<br>Your sponsor is :<font color=red>".$_SESSION["sponsor"]["firstname"]

."  ".$_SESSION["sponsor"]["lastname"]."</font>";

$page_content.=grab_content("joinp");

$page_content=html_entity_decode(stripslashes($page_content));

$page_content.="

<fieldset class=text><legend>Please choose the payment processor</legend>

";

//include the payment forms

 

if($CONFIG->allowpaypal){$page_content.=add_paypal($CONFIG->sponsorfee,$_SESSION["sponsor"]["paypal"],"1");}

 

if($CONFIG->allowstormpay){$page_content.=add_stormpay($CONFIG->sponsorfee,$_SESSION["sponsor"]["stormpay"],"1");}

 

if($CONFIG->allowegold){$page_content.=add_egold($CONFIG->sponsorfee,$_SESSION["sponsor"]["egold"],"1");}

 

if($CONFIG->allowintgold){$page_content.=add_intgold($CONFIG->sponsorfee,$_SESSION["sponsor"]["intgold"],"1");}

$page_content.="</fieldset>";

Break;

case primu:

 

$_SESSION["sponsor"]["pay"]='ok';

$page_content="

<div align=center class=text>

<b>First step succeded!<br>You are now on the second step.</b>

<br>Your random sponsor is :<font color=red>".$_SESSION["random1"]["firstname"]

."  ".$_SESSION["random1"]["lastname"]."</font>";

$page_content.="

<fieldset class=text><legend>Please choose the payment processor</legend>

";

//include the payment forms

 

if($CONFIG->allowpaypal){$page_content.=add_paypal($CONFIG->randomfee,$_SESSION["random1"]["paypal"],"2");}

 

if($CONFIG->allowstormpay){$page_content.=add_stormpay($CONFIG->randomfee,$_SESSION["random1"]["stormpay"],"2");}

 

if($CONFIG->allowegold){$page_content.=add_egold($CONFIG->randomfee,$_SESSION["random1"]["egold"],"2");}

 

if($CONFIG->allowintgold){$page_content.=add_intgold($CONFIG->randomfee,$_SESSION["random1"]["intgold"],"2");}

$page_content.="</fieldset>";

break;

/**************************ADMIN*********************************/

case adminul:

$_SESSION["sponsor1"]["pay"]='ok';

 

$page_content="

<div align=center class=text>

<b>Final step!<br>Pay the $CONFIG->sitename admin<br></b>";

$page_content.="

<fieldset class=text><legend>Please choose the payment processor</legend>

";

$q1=db_fetch_array(db_query("select username , paypal ,stormpay,egold,intgold from users where id='1'"));

//include the payment forms

 

if($CONFIG->allowpaypal){$page_content.=add_paypal($CONFIG->adminfee,$q1["paypal"],"3");}

 

if($CONFIG->allowstormpay){$page_content.=add_stormpay($CONFIG->adminfee,$q1["stormpay"],"3");}

 

if($CONFIG->allowegold){$page_content.=add_egold($CONFIG->adminfee,$q1["egold"],"3");}

 

if($CONFIG->allowintgold){$page_content.=add_intgold($CONFIG->adminfee,$q1["intgold"],"3");}

$page_content.="</fieldset>";

break;

 

}

include("$CONFIG->templatedir/content.php");

include("$CONFIG->templatedir/footer.php");

?>

 

<?php
session_start();
include'config.php';
$title="Join now to $CONFIG->sitename";
include("$CONFIG->templatedir/header_locked.php");
///////////////////////////////////////
$stage=$_GET['stage'];

switch($stage){

case 'default':

$page_content="
<div align=center class=text>
<br>Your sponsor is :<font color=red>".$_SESSION["sponsor"]["firstname"]
."  ".$_SESSION["sponsor"]["lastname"]."</font>";
$page_content.=grab_content("joinp");
$page_content=html_entity_decode(stripslashes($page_content));
$page_content.="
<fieldset class=text><legend>Please choose the payment processor</legend>
";
//include the payment forms

if($CONFIG->allowpaypal){$page_content.=add_paypal($CONFIG->sponsorfee,$_SESSION["sponsor"]["paypal"],"1");}

if($CONFIG->allowstormpay){$page_content.=add_stormpay($CONFIG->sponsorfee,$_SESSION["sponsor"]["stormpay"],"1");}

if($CONFIG->allowegold){$page_content.=add_egold($CONFIG->sponsorfee,$_SESSION["sponsor"]["egold"],"1");}

if($CONFIG->allowintgold){$page_content.=add_intgold($CONFIG->sponsorfee,$_SESSION["sponsor"]["intgold"],"1");}
$page_content.="</fieldset>";

Break;

case 'primu':

$_SESSION["sponsor"]["pay"]='ok';
$page_content="
<div align=center class=text>
<b>First step succeded!<br>You are now on the second step.</b>
<br>Your random sponsor is :<font color=red>".$_SESSION["random1"]["firstname"]
."  ".$_SESSION["random1"]["lastname"]."</font>";
$page_content.="
<fieldset class=text><legend>Please choose the payment processor</legend>
";
//include the payment forms

if($CONFIG->allowpaypal){$page_content.=add_paypal($CONFIG->randomfee,$_SESSION["random1"]["paypal"],"2");}

if($CONFIG->allowstormpay){$page_content.=add_stormpay($CONFIG->randomfee,$_SESSION["random1"]["stormpay"],"2");}

if($CONFIG->allowegold){$page_content.=add_egold($CONFIG->randomfee,$_SESSION["random1"]["egold"],"2");}

if($CONFIG->allowintgold){$page_content.=add_intgold($CONFIG->randomfee,$_SESSION["random1"]["intgold"],"2");}
$page_content.="</fieldset>";

break;


/**************************ADMIN*********************************/

case 'adminul':

$_SESSION["sponsor1"]["pay"]='ok';

$page_content="
<div align=center class=text>
<b>Final step!<br>Pay the $CONFIG->sitename admin<br></b>";
$page_content.="
<fieldset class=text><legend>Please choose the payment processor</legend>
";
$q1=db_fetch_array(db_query("select username , paypal ,stormpay,egold,intgold from users where id='1'"));
//include the payment forms

if($CONFIG->allowpaypal){$page_content.=add_paypal($CONFIG->adminfee,$q1["paypal"],"3");}

if($CONFIG->allowstormpay){$page_content.=add_stormpay($CONFIG->adminfee,$q1["stormpay"],"3");}

if($CONFIG->allowegold){$page_content.=add_egold($CONFIG->adminfee,$q1["egold"],"3");}

if($CONFIG->allowintgold){$page_content.=add_intgold($CONFIG->adminfee,$q1["intgold"],"3");}
$page_content.="</fieldset>";

break;

}

include("$CONFIG->templatedir/content.php");

include("$CONFIG->templatedir/footer.php");
?>

 

never mind that worked thank you.. but now when i go back its just a blank page i think is should say step 2 but its  just blank i dont mean an error i mean the links bar and header is all there just were the stage 2 content and paypal button is ment to be i would guess ant there!@!@!@!@!

ill add the config.php maybe that will help.

 

 

 

?

 

class object {};

$CONFIG = new object;

 

/* Edit the database connection parameters below */

 

$CONFIG->dbhost = "####";

$CONFIG->dbname = "####";

$CONFIG->dbuser = "####";

$CONFIG->dbpass = "####";

 

/*Edit the path to the scripts below*/

 

$CONFIG->wwwroot    = "/homepages/4/d262511548";

 

//Site URL -please use the "http://www.mysite.com" format.

$CONFIG->siteurl    = "http://www.coin-crazy.com";

 

// the support email address-all the mails from the contact form will go there

$CONFIG->support    = "[email protected].";

 

//Site name-this will be shown on the header,and footer,and also on every email sent

$CONFIG->sitename    = "Coin-Crazy Cash Randomizer";

 

//Payment fees:---Use the same format,otherwise the forms won't work

 

//for admin

$CONFIG->adminfee="0.25";

 

//for sponsor

$CONFIG->sponsorfee="0.25";

 

//for random membbers

$CONFIG->randomfee="0.25";

 

//Payment processors

//Change TRUE with FALSE if you don't want to use one of them.

//However,the registration form requires a valid paypal AND stormpay address to work

$CONFIG->allowpaypal=true;

$CONFIG->allowstormpay=false;

$CONFIG->allowegold=false;

$CONFIG->allowintgold=false;

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.