コード例 #1
0
 /**
  * @return bool
  */
 protected function needPayment()
 {
     if (isset($this->paymentMinLimits[$this->_payment->currency])) {
         return $this->_payment->getTotal() >= $this->paymentMinLimits[$this->_payment->currency];
     }
     return true;
 }
コード例 #2
0
 /**
  * @param array $attributes
  * @return PaytrailPayment
  */
 public static function create(array $attributes)
 {
     $model = new PaytrailPayment();
     $model->attributes = $attributes;
     if (!$model->save()) {
         throw new CException('Failed to save paytrail payment.');
     }
     return $model;
 }