orderId = $order->getId(); $this->statusPayment = $order->getStatus(); $this->orderDate = $order->getUpdatedAt(); $this->subTotal = $order->getSubtotal(); $this->total = $order->getTotalInvoiced(); $this->shippingPrice = $order->getShippingInvoiced(); $this->currency = $order->getOrderCurrencyCode(); } public function jsonSerialize() { return get_object_vars($this); } }