Пример #1
0
 public function handleReturn()
 {
     try {
         $this->onSuccess($this, $this->payPal->doPayment());
     } catch (PaymentFailedException $e) {
         if (!$this->onError) {
             throw $e;
         }
         $this->onError($this, $e);
     }
     $this->getPresenter()->redirect('this');
 }
Пример #2
0
 public function handleCancel()
 {
     try {
         $success = $this->payPal->doPayment();
         $this->onCancel($this, $success);
     } catch (Exception $e) {
         if (!$this->onError) {
             throw $e;
         }
         $this->onError($this, $e);
     }
     //$this->redirect('this'); // todo: rly?
 }