'members', 'controller' => 'summary', 'action' => 'index' ); /** * * update the balance of the selected user * * @param bool $ipn true if payment is completed, false otherwise * @param array $post array keys: {user_id, amount} * @return $this */ public function callback($ipn, array $post) { if ($ipn) { $usersService = new Service\Users(); $user = $usersService->findBy('id', $post['user_id']); if (count($user) > 0) { $user->updateBalance((-1) * $post['amount']); } } return $this; } }