• 0

[PHP] Paypal Connection


Question

ok im using the example php script giving to us via paypal.

my site uses a points system

points are 2p each and can be bought in 50s

i have a simple select box (name='amount') and a submit box which pass's it onto the process.php

but i also have 2 hidden variables (username and code)

username is the username so when it gets to the IPN i can update the database and the code is a random code generated so i can check that the payment has been done (i know it might be hard to foil IPN but id like to try this random code anyway)

the problem is when i complete my payment some of the variables are not appearing on sucess.php including:

username

code

amount

i have added the following code

success.php

<tr align="left" valign="top">

<td bgcolor="#EEEEEE">Amount:</td>

<td bgcolor="#EEEEEE">

<?=$_POST[amount]?>

</td>

</tr>

<tr align="left" valign="top">

<td bgcolor="#EEEEEE">Username:</td>

<td bgcolor="#EEEEEE">

<?=$_POST[username]?>

</td>

</tr>

<tr align="left" valign="top">

<td bgcolor="#EEEEEE">Code:</td>

<td bgcolor="#EEEEEE">

<?=$_POST

?>

</td>

</tr>

config.inc.php

$paypal[username]="$_POST[username]";

$paypal[code]="$_POST[code]";

global_config.inc.php

<input type="hidden" name="username" value="<?=$paypal[username]?>">

<input type="hidden" name="code" value="<?=$paypal[code]?>">

as you can probably tell there aremany variables i do not need such as first name/last name / address or shipping costs so i have tryed to shorten the script as much as possible

if anyone could give me a hand i would be very very very greatful

thanks a lot

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.