public function prepare() { $this->model = Model\Transaction::create(['order' => $this->order, 'data' => json_encode($this->toArray(), JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT)]); $this['order_id'] = $this->model->getKey(); }