# give/4.15.4/src/Framework/PaymentGateways/Commands/PaymentCommand.php

GiveWP – Donation Plugin and Fundraising Platform, version 4.15.4. 71 lines.

- Page: https://pluginprobe.com/plugins/give/4.15.4/code/src/Framework/PaymentGateways/Commands/PaymentCommand.php
- Raw: https://pluginprobe.com/plugins/give/4.15.4/raw/src/Framework/PaymentGateways/Commands/PaymentCommand.php
- Modified: 2022-10-31T21:53:38+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.15.4/code/src/Framework/PaymentGateways/Commands/PaymentCommand.php#L10-L20`.

```php
<?php

namespace Give\Framework\PaymentGateways\Commands;

/***
 * @since 2.18.0
 */
abstract class PaymentCommand implements GatewayCommand
{
    /**
     * The Gateway Transaction / Charge Record ID
     *
     * @var string|null
     */
    public $gatewayTransactionId;

    /**
     * Notes to be added to the payment.
     *
     * @var array|string[]
     */
    public $paymentNotes = [];

    /**
     * @param string|null $gatewayTransactionId
     *
     * @return static
     */
    public static function make(string $gatewayTransactionId = null): PaymentCommand
    {
        return new static($gatewayTransactionId);
    }

    /**
     * @since      2.18.0
     * @since 2.23.1 Make constructor final to avoid unsafe usage of `new static()`.
     *
     * @param string|null $gatewayTransactionId
     */
    final public function __construct(string $gatewayTransactionId = null)
    {
        $this->gatewayTransactionId = $gatewayTransactionId;
    }

    /**
     * @since 2.22.0 add type, so it is typesafe
     *
     * @param string|string[] ...$paymentNotes
     *
     * @return $this
     */
    public function setPaymentNotes(string ...$paymentNotes): PaymentCommand
    {
        $this->paymentNotes = $paymentNotes;

        return $this;
    }

    /**
     * @param string $gatewayTransactionId
     *
     * @return $this
     */
    public function setTransactionId(string $gatewayTransactionId): PaymentCommand
    {
        $this->gatewayTransactionId = $gatewayTransactionId;

        return $this;
    }
}

```
