-
Recently Browsing 0 members
- No registered users viewing this page.
-
Similar Content
-
PayPal to lay off 2,500 employees, or 9% of its workforce
By Omer Dursun,
- 3 replies
- 3 views
-
PayPal launches its own stablecoin, PayPalUSD (PYUSD), for payments
By Omer Dursun,
- crypto
- cryptocurrency
- (and 8 more)
- 5 replies
- 4 views
-
Microsoft Store adds Venmo in the US, PayPal Pay Later expands to more regions
By Omer Dursun,
- microsoft
- microsoft store
- (and 6 more)
- 2 replies
- 3 views
-
Microsoft Teams launches its new Payments app in public preview
By John Callaham,
- microsoft
- microsoft teams
- (and 6 more)
- 1 reply
- 3 views
-
- 0 replies
- 2 views
-
Question
game_over
I'm using Micha's PayPal IPN script and for the most part it worked great:https://github.com/Quixotix/PHP-PayPal-IPN
When i click Pay now on the website it redirects to paypal with correct information, allows payment to be made, but on return nothing happens, ie it does not upgrade the user as it should. Now i've tested the script my code outside of the IPN and it works perfect so it looks to me like the IPN script is losing the session?
Here is my button code:
So the notify url (IPN code) is /account/upgrade -- as far as i know this is where it should perform the upgrade task? so here is my (stripped down) code
$errmsg = '';
// some error checking
if (!empty($errmsg)) {
// manually investigate errors from the fraud checking
} else {
// upgrade user
$package = serialize($_SESSION['package']);
$this->db->update('users',array('id' => $_SESSION['user']['id']),array('payment_plan' => $package));
}
} else {
// not verified, investigate problems
}[/CODE]
As above, the code under '// upgrade user' works fine outside, but on return from paypal it's obviously not keeping hold of the session. It's not throwing any errors, it's just not doing anything.
Where have i gone wrong? how can i ensure that session information will be passed back from PayPal.
Thanks
Link to comment
Share on other sites
0 answers to this question
Recommended Posts