# fluent-cart/1.3.21/app/Services/CustomPayment/PaymentIntent.php

FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler, version 1.3.21. 56 lines.

- Page: https://pluginprobe.com/plugins/fluent-cart/1.3.21/code/app/Services/CustomPayment/PaymentIntent.php
- Raw: https://pluginprobe.com/plugins/fluent-cart/1.3.21/raw/app/Services/CustomPayment/PaymentIntent.php
- Modified: 2025-10-14T16:36:46+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/fluent-cart/1.3.21/code/app/Services/CustomPayment/PaymentIntent.php#L10-L20`.

```php
<?php

namespace FluentCart\App\Services\CustomPayment;

use FluentCart\Framework\Support\Collection;

class PaymentIntent
{
    private $lineItems = [];

    private $customerEmail;


    /**
     * @return mixed
     */
    public function getCustomerEmail()
    {
        return $this->customerEmail;
    }

    /**
     * @param mixed $customerEmail
     */
    public function setCustomerEmail($customerEmail)
    {
        $this->customerEmail = $customerEmail;
        return $this;
    }


    public function setLineItems($lineItems)
    {
        $this->lineItems = $lineItems;
        return $this;
    }

    public function getLineItems()
    {
        return $this->lineItems;
    }


    public function toArray() : array{
        $lineItems = Collection::make($this->lineItems)->map(function($item){
            return $item->toArray();
        })->toArray();

        return [
            'line_items' => $lineItems,
            'customer_email' => $this->getCustomerEmail()
        ];
    }


}
```
