id = $id; $this->created = $created; $this->status = $status; $this->client_secret = $client_secret; $this->next_action = $next_action; $this->last_setup_error = $last_setup_error; $this->customer_id = $customer_id; $this->payment_method_id = $payment_method_id; $this->metadata = $metadata; $this->payment_method_types = $payment_method_types; $this->payment_method_options = $payment_method_options; $this->order = $order; } /** * Returns the last payment error of this intention * * @return array */ public function get_last_setup_error(): array { return $this->last_setup_error; } /** * Defines which data will be serialized to JSON */ public function jsonSerialize(): array { return [ 'id' => $this->get_id(), 'created' => $this->get_created()->getTimestamp(), 'customer' => $this->get_customer_id(), 'metadata' => $this->get_metadata(), 'payment_method' => $this->get_payment_method_id(), 'payment_method_types' => $this->get_payment_method_types(), 'status' => $this->get_status(), 'order' => $this->get_order(), ]; } }