Link to home
Start Free TrialLog in
Avatar of global_expert_advice
global_expert_adviceFlag for India

asked on

Paypal ipn integration with php mysql smarty

hi,
i'm looking for a easy to go paypal ipn integration script.
What i want is once client make payment, the database should be updated with paypal transaction id.
my sql table which i want to update with paypal transaction id is simple, with fields like
id
date
package
cost
status
paypal txn id  // to be updated...

How can i achieve this...
if possible give a working code...
thanks
zia
Avatar of AUCKLANDIT
AUCKLANDIT
Flag of New Zealand image

Have the notifications page set.

You need to send a custom var (random number etc) to paypal and save that same custom var to your database

then in your notification page

$key = $_POST['custom'];

$txn_id = $_POST['txn_id'];

then update paypal_txn_id to $txn_id where customkey = $key

there are a number of scripts out there that do this nicley...
ASKER CERTIFIED SOLUTION
Avatar of AUCKLANDIT
AUCKLANDIT
Flag of New Zealand image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of global_expert_advice

ASKER

okay solution