Payment

Informations about a payment.

package

Default

Methods

Initialize the payment model.

__construct(\Dotpay\Model\Seller $seller, float $amount, string $currency, string $description, string $id = '') 

Arguments

$seller

\Dotpay\Model\Seller

A Seller model for the payment

$amount

float

An amount of the payment

$currency

string

A currency code of the payment

$description

string

A description of the payment

$id

string

An id of the payment

Create Payment object from the given data.

createFromData(\Dotpay\Provider\PaymentProviderInterface $provider) : \Dotpay\Model\Payment
static

Arguments

Response

\Dotpay\Model\Payment

Return an amount of the order.

getAmount() : float

Response

float

Return a currency code of the order.

getCurrency() : string

Response

string

Return a description of the payment.

getDescription() : string

Response

string

Return an id of the order.

getId() : integer

Response

integer

Return an identifier of the payment, which depends on seller id, order amount, order currency.

getIdentifier() : string

Response

string

Return a Seller model for the payment.

getSeller() : \Dotpay\Model\Seller|null

Response

\Dotpay\Model\Seller|null

Return an amount of surcharge which is calculated for the order.

getSurcharge(\Dotpay\Model\Configuration $config) : float

Arguments

$config

\Dotpay\Model\Configuration

Configuration object

Response

float

Set an amount of the order.

setAmount(float $amount) : \Dotpay\Model\Order
Throws
\Dotpay\Exception\BadParameter\AmountException

Thrown when the given amount is incorrect

Arguments

$amount

float

An amount of the order

Response

\Dotpay\Model\Order

Set a currency code of the order.

setCurrency(string $currency) : \Dotpay\Model\Order
Throws
\Dotpay\Exception\BadParameter\CurrencyException

Thrown when the given currency is incorrect

Arguments

$currency

string

A currency code of the order

Response

\Dotpay\Model\Order

Set a description of the payment.

setDescription(string $description) : \Dotpay\Model\Payment

Arguments

$description

string

A description of the payment

Response

\Dotpay\Model\Payment

Set an id of the order.

setId(integer $id) : \Dotpay\Model\Order

Arguments

$id

integer

An id of the order

Response

\Dotpay\Model\Order

Set a Seller model for the payment.

setSeller(\Dotpay\Model\Seller $seller) : \Dotpay\Model\Payment

Arguments

$seller

\Dotpay\Model\Seller

A Seller model for the payment

Response

\Dotpay\Model\Payment

Properties

An id of the payment

id : integer
var

An id of the payment

Type(s)

integer

An amount of the payment

amount : float
var

An amount of the payment

Type(s)

float

A currency code of the payment

currency : string
var

A currency code of the payment

Type(s)

string

A description of the payment

description : string
var

A description of the payment

Type(s)

string

A Seller model for the payment

seller : \Dotpay\Model\Seller|null
var

A Seller model for the payment

Type(s)

\Dotpay\Model\Seller|null