/** * Send user to appropriate PayPal URL to complete preapproval/first payment process */ function prepay_challenge($challenge_id) { $challenge = Challenge::find_by_id($challenge_id); if (!$challenge) { throw new PageNotFoundException(); } return $this->do_prepay_challenge($challenge); }
/** * Page that allows any user (usually an invited friend) to donate to given challenge. */ function donate($challenge_id) { $challenge = Challenge::find_by_id($challenge_id); if (!$challenge) { throw new PageNotFoundException(); } return array('challenge' => $challenge, 'charity' => $challenge->charity, 'challenger' => $challenge->user); }