コード例 #1
0
 /**
  * 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);
 }
コード例 #2
0
 /**
  * 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);
 }