I have set up the PayPal IPN Notification tool. Send test IPN saved to my
db, and then I get sent an email saying there was a transaction. 
But no matter what I try I can not update the user who made the transaction
from the app_controller
I can extract the user_id from the transaction and since there is no view I
just pass it as a variable to the email so I can see it for testing.
 
I have tried different functions to get the users current credits but
nothing work.
 
Tried the following in:
app_model or user_model or app_controller
public function getCredits($user_id) {
          $params = array(
        'conditions' => array(
            'user.id' => $user_id),
        'contain' => false, 
        'fields' => array('User.id',
           'User.credits') 
        );
          $q = $this->User->find(first', $params);
          return $q['User']['credits'];
      }
 
Tried calling it from app_controller
$credits = $this->User->getCredits($employer);
 
or
 
$credits = $this->getCredits($employer);
 
and
 
$credits = getCredits($employer);
 
But nothing is ever returned, there must be an error because no email is
sent whenever I try any of the function variations. The ipn shows up in the
dbbut noemail sent tome saying new transaction.
 
Is there a way to debug a function in the app_controller or how do I get the
users credits and updatethe credits  field?
 
Dave 

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to