Instruction

Informations about an instruction of payments by cash or transfer.

package

Default

Methods

Create the model based on data provided from shop.

createFromData(\Dotpay\Provider\InstructionProviderInterface $provider) : \Dotpay\Model\Instruction
static

Arguments

$provider

\Dotpay\Provider\InstructionProviderInterface

Provider which contains data from shop application

Response

\Dotpay\Model\Instruction

Return an amount of payment.

getAmount() : float

Response

float

Return a bank account number of Dotpay if the instruction applies to transfers payment.

getBankAccount() : string|null

Response

string|null

Return a page of bank, where customer can make his transfer.

getBankPage(\Dotpay\Model\Configuration $config) : string|null

Arguments

$config

\Dotpay\Model\Configuration

Configuration object

Response

string|null

Return an id of channel which is used to make a payment.

getChannel() : integer|null

Response

integer|null

Return a currency code of payment.

getCurrency() : string

Response

string

Return a hash of payment which is used on Dotpay server.

getHash() : string

Response

string

Return an id of the instruction in a shop.

getId() : integer|null

Response

integer|null

Return a flag which informs if the instruction applies to cash payment.

getIsCash() : boolean

Response

boolean

Return a number of payment.

getNumber() : string

Response

string

Return id of order which is connected with the instruction.

getOrderId() : integer|null

Response

integer|null

Return url of the page with original payment instruction.

getPage(\Dotpay\Model\Configuration $config) : string

Arguments

$config

\Dotpay\Model\Configuration

Configuration object

Response

string

Return url of pdf document with instruction of finishing payment.

getPdfUrl(\Dotpay\Model\Configuration $config) : string

Arguments

$config

\Dotpay\Model\Configuration

Configuration object

Response

string

Return loaded DOM document with instruction of payment.

loadDOM(\Dotpay\Model\Configuration $config) : \DOMDocument

Arguments

$config

\Dotpay\Model\Configuration

Object with configuration

Response

\DOMDocument

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 bank account number of Dotpay if the instruction applies to transfers payment.

setBankAccount(string $bankAccount) : \Dotpay\Model\Instruction
Throws
\Dotpay\Exception\BadParameter\BankNumberException

Thrown when the given bank account number is incorrect

Arguments

$bankAccount

string

Bank account number of Dotpay if the instruction applies to transfers payment

Response

\Dotpay\Model\Instruction

Set an id of channel which is used to make a payment.

setChannel(integer $channel) : \Dotpay\Model\Instruction
Throws
\Dotpay\Exception\BadParameter\ChannelIdException

Thrown when the given channel id is incorrect

Arguments

$channel

integer

Id of channel which is used to make a payment

Response

\Dotpay\Model\Instruction

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 hash of payment which is used on Dotpay server.

setHash(string $hash) : \Dotpay\Model\Instruction

Arguments

$hash

string

Hash of payment which is used on Dotpay server

Response

\Dotpay\Model\Instruction

Set an id of the instruction in a shop.

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

Arguments

$id

integer

Id of the instruction in a shop

Response

\Dotpay\Model\Instruction

Set a number of payment.

setNumber(string $number) : \Dotpay\Model\Instruction
Throws
\Dotpay\Exception\BadParameter\OperationNumberException

Thrown when the given number is incorrect

Arguments

$number

string

Number of payment

Response

\Dotpay\Model\Instruction

Set an Order id which is connected with the instruction.

setOrderId(integer $orderId) : \Dotpay\Model\Instruction

Arguments

$orderId

integer

Id of order which is connected with the instruction

Response

\Dotpay\Model\Instruction

Constants

Name of the recipient of payment.

RECIPIENT_NAME

Street of the recipient of payment.

RECIPIENT_STREET

Post code and city of the recipient of payment.

RECIPIENT_CITY

Properties

Id of the instruction in a shop

id : integer|null
var

Id of the instruction in a shop

Type(s)

integer|null

Id of order which is connected with the instruction

orderId : integer|null
var

Id of order which is connected with the instruction

Type(s)

integer|null

Number of payment. It can be considered as a title of payment. Its format is like an operation number of Dotpay

number : string
var

Number of payment. It can be considered as a title of payment. Its format is like an operation number of Dotpay

Type(s)

string

Bank account number of Dotpay if the instruction applies to transfers payment

bankAccount : string
var

Bank account number of Dotpay if the instruction applies to transfers payment

Type(s)

string

Id of channel which is used to make a payment

channel : integer|null
var

Id of channel which is used to make a payment

Type(s)

integer|null

Hash of payment which is used on Dotpay server

hash : string
var

Hash of payment which is used on Dotpay server

Type(s)

string

Amount of money to pay

amount : float
var

Amount of money to pay

Type(s)

float

Currency name

currency : string
var

Currency name

Type(s)

string

Loaded DOM of site with payment instruction

document : \DOMDocument/null
static
var

Loaded DOM of site with payment instruction

Type(s)

\DOMDocument/null