# give/4.18.0/src/PaymentGateways/Gateways/Stripe/ValueObjects/PaymentIntent.php

GiveWP – Donation Plugin and Fundraising Platform, version 4.18.0. 63 lines.

- Page: https://pluginprobe.com/plugins/give/4.18.0/code/src/PaymentGateways/Gateways/Stripe/ValueObjects/PaymentIntent.php
- Raw: https://pluginprobe.com/plugins/give/4.18.0/raw/src/PaymentGateways/Gateways/Stripe/ValueObjects/PaymentIntent.php
- Modified: 2022-02-25T01:33:58+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/give/4.18.0/code/src/PaymentGateways/Gateways/Stripe/ValueObjects/PaymentIntent.php#L10-L20`.

```php
<?php

namespace Give\PaymentGateways\Gateways\Stripe\ValueObjects;

use Give_Stripe_Payment_Intent;

/**
 * @since 2.19.0
 */
class PaymentIntent
{
    /** @var bool|\Stripe\PaymentIntent */
    protected $paymentIntentObject;

    /**
     * @since 2.19.0
     * @param $paymentIntentArgs
     * @return PaymentIntent
     */
    public function create( $paymentIntentArgs )
    {
        $paymentIntentFactory = give( Give_Stripe_Payment_Intent::class );
        $this->paymentIntentObject = $paymentIntentFactory->create( $paymentIntentArgs );
        return $this;
    }

    /**
     * @since 2.19.0
     * @return string
     */
    public function id()
    {
        return $this->paymentIntentObject->id;
    }

    /**
     * @since 2.19.0
     * @return string
     */
    public function status()
    {
        return $this->paymentIntentObject->status;
    }

    /**
     * @since 2.19.0
     * @return string
     */
    public function clientSecret()
    {
        return $this->paymentIntentObject->client_secret;
    }

    /**
     * @since 2.19.0
     * @return string
     */
    public function nextActionRedirectUrl()
    {
        return $this->paymentIntentObject->next_action->redirect_to_url->url;
    }
}

```
