• Sign in to Neowin Faster!

    Create an account on Neowin to contribute and support the site.

  • 0
Sign in to follow this  

[PHP] Paypal Connection

Question

_Dom_    0

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

Share this post


Link to post
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.