Welcome Guest, Not a member yet? Register   Sign In
AngellEye PayPal IPN listener post additional data to database.
#1

[eluser]comyou[/eluser]
Hello all,

I'm unaware if anyone is familiar with the Angell Lab PayPal library for CodeIgniter.
I've currently got the IPN listener etc. all set up on my server fine and it's writing to its orders table however I'm looking to insert some data into another table.

I'm looking to input the returned field "credits" & existing value from "users.credits" into my table "users" where users.id = the returned field "custom".

> Grab current "credits" value from "users" table where "users.id" is $order_data['custom'];
> Update "credits" in "users" table to the current value + $order_data['item_number'];


I'm not having any luck, I've tried this to see if it inputs the value but it doesn't seem to work.
Code:
$user_data = array (
'id' => $order_data['custom'],
'credits' => $order_data['item_number'],
);

$this->db->insert('users', $user_data);

Does anyone familiar with the IPN listener know how I would do this?

The listener: http://www.angelleye.com/product/paypal-...-template/

The current query which inserts the order data into the table "orders":
Code:
$order_id = $db -> query_insert('orders', $order_data);




Theme © iAndrew 2016 - Forum software by © MyBB