Example #1
0
 public function fillFromMethodArray($array)
 {
     if (!$this->method_id) {
         $this->setError('not_method_id', 'not_method_id');
         return false;
     }
     $fields = PaymentMethod::getPaymentFields($this->method_id);
     foreach ($fields as $field) {
         $this->{$field} = isset($array[$field]) ? $array[$field] : null;
     }
 }