Hi,

In the $uses we need to add plugin something like this: $uses =
array('PaypalIpn.InstantPaymentNotification');

On Mon, Dec 27, 2010 at 8:39 PM, cricket <[email protected]> wrote:

> On Mon, Dec 27, 2010 at 7:33 AM, WhyNotSmile <[email protected]>
> wrote:
> > Hi everyone, I'm using a plugin from the bakery, and having trouble
> > with it.  I think it was working a few days ago, so it's maybe
> > something I've done that's caused the problem.
> >
> > The problem is that the controller doesn't seem to be finding the
> > model functions.  So, I'm getting:
> >
> > Fatal error: Call to undefined method
> > InstantPaymentNotificationsController::isValid() in D:\Work\Clients
> > \IAAD\site\app\plugins\paypal_ipn\controllers
> > \instant_payment_notifications_controller.php on line 31
> >
> > when I go to the controller action.
> >
> > The relevant function is:
> >
> > function process(){
> >   if($this->isValid($_POST)){      // This is line 31
> >      $notification = $this->InstantPaymentNotification-
> >>buildAssociationsFromIPN($_POST);
> >      $this->InstantPaymentNotification->saveAll($notification);
> >      $this->__processTransaction($this->InstantPaymentNotification-
> >>id);
> >   }
> >  $this->redirect('/');
> > }
> >
> > The controller (instant_payment_notifications_controller.php) starts:
> >
> > class InstantPaymentNotificationsController extends
> > PaypalIpnAppController {
> >
> >        var $name = 'InstantPaymentNotifications';
> >        var $helpers = array('Html', 'Form', 'Paginator');
> >        var $components = array('Auth','Email');
> >        var $uses = array('InstantPaymentNotification');
> >
> >
> >
> > and the model (instant_payment_notification.php) begins:
> >
> > class InstantPaymentNotification extends PaypalIpnAppModel {
> >    var $name = 'InstantPaymentNotification';
> >
> >
> > and has the function isValid().
> >
> > When I copy the function into the controller, I can call it ok, so
> > it's not the function itself that's the problem.  It looks like the
> > controller just isn't finding the model.
>
> You're calling the method as if it's in the controller, not the model.
>
> $this->InstantPaymentNotification->isValid(...)
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> 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]<cake-php%[email protected]>For
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>



-- 
Vivi
http://photos.vr-3d.net

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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