# give/4.18.0/src/PaymentGateways/Gateways/Stripe/StripePaymentElementGateway/DataTransferObjects/StripeGatewayData.php

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

- Page: https://pluginprobe.com/plugins/give/4.18.0/code/src/PaymentGateways/Gateways/Stripe/StripePaymentElementGateway/DataTransferObjects/StripeGatewayData.php
- Raw: https://pluginprobe.com/plugins/give/4.18.0/raw/src/PaymentGateways/Gateways/Stripe/StripePaymentElementGateway/DataTransferObjects/StripeGatewayData.php
- Modified: 2023-10-16T17:55: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/give/4.18.0/code/src/PaymentGateways/Gateways/Stripe/StripePaymentElementGateway/DataTransferObjects/StripeGatewayData.php#L10-L20`.

```php
<?php

namespace Give\PaymentGateways\Gateways\Stripe\StripePaymentElementGateway\DataTransferObjects;

class StripeGatewayData
{
    /**
     * @var string
     */
    public $stripeConnectedAccountId;
    /**
     * @var string
     */
    public $successUrl;
    /**
     * @var string
     */
    public $stripePaymentMethod;
    /**
     * @var bool
     */
    public $stripePaymentMethodIsCreditCard;

    /**
     * @since 3.0.0
     *
     * @param  array{stripeConnectedAccountKey: string, stripePaymentIntentId: string}  $request
     * @return StripeGatewayData
     */
    public static function fromRequest(array $request): StripeGatewayData
    {
        $self = new self();
        $self->stripePaymentMethod = $request['stripePaymentMethod'];
        $self->stripePaymentMethodIsCreditCard = $request['stripePaymentMethodIsCreditCard'];
        $self->stripeConnectedAccountId = $request['stripeConnectedAccountId'];
        $self->successUrl = rawurldecode($request['successUrl']);

        return $self;
    }
}
```
