CodeIgniter Forums
Another Paypal_Lib Problem - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Another Paypal_Lib Problem (/showthread.php?tid=23715)



Another Paypal_Lib Problem - El Forum - 10-20-2009

[eluser]wowdezign[/eluser]
I have an application set up using Paypal_Lib. Everything works fine until I try to update the DB.

I can email everything in
Code:
$this->paypal_lib->ipn_data
. But if I try to run
Code:
if($this->paypal_lib->ipn_data['txn_type'] == 'subscr_signup'){
  $this->db->where('id',$this->paypal_lib->ipn_data['user_id']);
  $this->db->update('users',array('rights'=>2));
}

the db doesn't get updated.

Anyone seen this before? I have tried everything (except the solution, obviously Smile) and I can't find the problem.

I also could use some help on how to see the DB error that is being produced (if there is one).


Another Paypal_Lib Problem - El Forum - 10-20-2009

[eluser]imn.codeartist[/eluser]
Did you try printing what
Code:
$this->paypal_lib->ipn_data['txn_type']
is returning ?


Another Paypal_Lib Problem - El Forum - 10-20-2009

[eluser]wowdezign[/eluser]
Thanks for the reply. I did try that. I found one of the problems. I was loading the database with:
Code:
$this->load->database('dirt',TRUE);
I changed it to:
Code:
$this->load->database();
and it fixed the issue I was having.

However, I have another one. Sad