public function __construct($data = array(), $message = '') { parent::__construct($data); if ($this->isDataOk()) { $orderId = $data['Event']['Purchase']['PaymentMethod']['ReferenceId']; $this->order = new Order($orderId, '', $this->getAmount() / 100); } $this->message = $message; }
/** * New query response * * @param string $type Query type * @param array $data */ public function __construct($type, array $data = []) { $this->type = $type; $this->data = $data; parent::__construct($data); }
/** * New network error response * * @param string $message * @param array $data */ public function __construct($message, $data = array()) { $this->message = $message; parent::__construct($data); }
/** * Creates new transaction * * @param Method $method Payment method * @param type $mode Query type * @param array $data */ public function __construct(Method $method, $mode, array $data = []) { $this->method = $method; $this->mode = $mode; parent::__construct($data); }