Operation

Informations about an operation.

package

Default

Methods

Initialize the model.

__construct(string $type, string $number) 

Arguments

$type

string

An identifier of a type of the operation

$number

string

A number of the operation

Create the model based on data provided from shop.

createFromData(\Dotpay\Provider\OperationProviderInterface $provider) : \Dotpay\Model\Operation
static

Arguments

$provider

\Dotpay\Provider\OperationProviderInterface

Provider which contains data from shop application

Response

\Dotpay\Model\Operation

Return an account id of a seller.

getAccountId() : integer|null

Response

integer|null

Return a transaction amount.

getAmount() : float|null

Response

float|null

Return an amount of a Dotpay commission.

getCommissionAmount() : float|null

It's presented as a negative amount.

Response

float|null

Return a value which was given during making a payment.

getControl() : mixed

Response

mixed

Return a code of a transaction currency.

getCurrency() : string

Response

string

Return a DateTime object with date and a time of the last change status of the operation.

getDateTime() : \DateTime|null

Response

\DateTime|null

Return a description of the operation.

getDescription() : string

Response

string

Return a number of the operation.

getNumber() : string

Response

string

Return id of order related to the operation.

getOrderId() : integer

Response

integer

Return an original amount which was sent from a shop.

getOriginalAmount() : float|null

Response

float|null

Return a code of an original currency which was sent from a shop.

getOriginalCurrency() : string

Response

string

Return a Payer object which contains information about payer.

getPayer() : \Dotpay\Model\Payer|null

Response

\Dotpay\Model\Payer|null

Return a PaymentMethod with details of a payment.

getPaymentMethod() : \Dotpay\Model\PaymentMethod|null

Return a number of an operation which is related to the operation.

getRelatedNumber() : string

Response

string

Return a status identifier of the operation.

getStatus() : string

Response

string

Return an identifier of a type of the operation.

getType() : string

Response

string

Return an Url where are located details about the operation.

getUrl() : string

Response

string

Return a withdrawal amount.

getWithdrawalAmount() : float|null

Response

float|null

Return a flag if operation is marked as completed in Seller panel.

isCompleted() : boolean

Response

boolean

Set an account id of a seller.

setAccountId(integer $accountId) : \Dotpay\Model\Operation
Throws
\Dotpay\Exception\BadParameter\IdException

Thrown when the given seller id is incorrect

Arguments

$accountId

integer

An account id of a seller

Response

\Dotpay\Model\Operation

Set a transaction amount.

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

Thrown when the given amount is incorrect

Arguments

$amount

float

A transaction amount

Response

\Dotpay\Model\Operation

Set an amount of a Dotpay commission.

setCommissionAmount(float $commissionAmount) : \Dotpay\Model\Operation
Throws
\Dotpay\Exception\BadParameter\AmountException

Thrown when the given commission amount is incorrect

Arguments

$commissionAmount

float

An amount of a Dotpay commission

Response

\Dotpay\Model\Operation

Set a flag if operation is marked as completed in Seller panel.

setCompleted(boolean $completed) : \Dotpay\Model\Operation

Arguments

$completed

boolean

A flag if operation is marked as completed in Seller panel

Response

\Dotpay\Model\Operation

Set a value which was given during making a payment.

setControl(mixed $control) : \Dotpay\Model\Operation

Arguments

$control

mixed

A value which was given during making a payment

Response

\Dotpay\Model\Operation

Set an original amount which was sent from a shop.

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

Thrown when the given currency is incorrect

Arguments

$currency

string

A code of a transaction currency

Response

\Dotpay\Model\Operation

Set a DateTime object with date and a time of the last change status of the operation.

setDateTime(\DateTime $dateTime) : \Dotpay\Model\Operation

Arguments

$dateTime

\DateTime

A date and a time of the last change status of the operation

Response

\Dotpay\Model\Operation

Set a description of the operation.

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

Arguments

$description

string

A description of the operation

Response

\Dotpay\Model\Operation

Set a number of the operation.

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

Thrown when the given operation number is incorrect

Arguments

$number

string

A number of the operation

Response

\Dotpay\Model\Operation

Set an original amount which was sent from a shop.

setOriginalAmount(float $originalAmount) : \Dotpay\Model\Operation
Throws
\Dotpay\Exception\BadParameter\AmountException

Thrown when the given original amount is incorrect

Arguments

$originalAmount

float

An original amount which was sent from a shop

Response

\Dotpay\Model\Operation

Set a code of an original currency which was sent from a shop.

setOriginalCurrency(string $originalCurrency) : \Dotpay\Model\Operation
Throws
\Dotpay\Exception\BadParameter\CurrencyException

Thrown when the given original currency is incorrect

Arguments

$originalCurrency

string

A code of an original currency which was sent from a shop

Response

\Dotpay\Model\Operation

Set a Payer object which contains information about payer.

setPayer(\Dotpay\Model\Payer $payer) : \Dotpay\Model\Operation

Arguments

$payer

\Dotpay\Model\Payer

A Payer object which contains information about payer

Response

\Dotpay\Model\Operation

Set a PaymentMethod with details of a payment.

setPaymentMethod(\Dotpay\Model\PaymentMethod $paymentMethod) : \Dotpay\Model\Operation

Arguments

$paymentMethod

\Dotpay\Model\PaymentMethod

A PaymentMethod with details of a payment

Response

\Dotpay\Model\Operation

Set a number of an operation which is related to the operation.

setRelatedNumber(string $relatedNumber) : \Dotpay\Model\Operation
Throws
\Dotpay\Exception\BadParameter\OperationNumberException

Thrown when the given related operation number is incorrect

Arguments

$relatedNumber

string

A number of an operation which is related to the operation

Response

\Dotpay\Model\Operation

Set a status identifier of the operation.

setStatus(string $status) : \Dotpay\Model\Operation
Throws
\Dotpay\Exception\BadParameter\OperationStatusException

Thrown when the given operation status is incorrect

Arguments

$status

string

A status identifier of the operation

Response

\Dotpay\Model\Operation

Set an identifier of a type of the operation.

setType(string $type) : \Dotpay\Model\Operation
Throws
\Dotpay\Exception\BadParameter\OperationTypeException

Thrown when the given operation type is incorrect

Arguments

$type

string

An identifier of a type of the operation

Response

\Dotpay\Model\Operation

Set an Url where are located details about the operation.

setUrl(string $url) : \Dotpay\Model\Operation
Throws
\Dotpay\Exception\BadParameter\UrlException

Thrown when the given url is incorrect

Arguments

$url

string

An Url where are located details about the operation

Response

\Dotpay\Model\Operation

Set a withdrawal amount.

setWithdrawalAmount(float $withdrawalAmount) : \Dotpay\Model\Operation
Throws
\Dotpay\Exception\BadParameter\AmountException

Thrown when the given withdrawal amount is incorrect

Arguments

$withdrawalAmount

float

A withdrawal amount

Response

\Dotpay\Model\Operation

Constants

Status identifier of new operation.

STATUS_NEW

Status identifier of processing operation.

STATUS_PROCESSING

Status identifier of completed operation.

STATUS_COMPLETE

Status identifier of rejected operation.

STATUS_REJECTED

Type identifier of payment operation.

TYPE_PAYMENT

Type identifier of refund operation.

TYPE_REFUND

Type identifier of payout operation.

TYPE_PAYOUT

Properties

An Url where are located details about the operation

url : string
var

An Url where are located details about the operation

Type(s)

string

A number of the operation

number : string
var

A number of the operation

Type(s)

string

An identifier of a type of the operation

type : string
var

An identifier of a type of the operation

Type(s)

string

A status identifier of the operation

status : string
var

A status identifier of the operation

Type(s)

string

A transaction amount

amount : float|null
var

A transaction amount

Type(s)

float|null

A code of a transaction currency

currency : string
var

A code of a transaction currency

Type(s)

string

A withdrawal amount

withdrawalAmount : float|null
var

A withdrawal amount

Type(s)

float|null

An amount of a Dotpay commission. It's presented as a negative amount

commissionAmount : float|null
var

An amount of a Dotpay commission. It's presented as a negative amount

Type(s)

float|null

A flag if operation is marked as completed in Seller panel

completed : boolean
var

A flag if operation is marked as completed in Seller panel

Type(s)

boolean

An original amount which was sent from a shop

originalAmount : float|null
var

An original amount which was sent from a shop

Type(s)

float|null

A code of an original currency which was sent from a shop

originalCurrency : string
var

A code of an original currency which was sent from a shop

Type(s)

string

A date and a time of the last change status of the operation

dateTime : \DateTime|null
var

A date and a time of the last change status of the operation

Type(s)

\DateTime|null

A number of an operation which is related to the operation

relatedNumber : string
var

A number of an operation which is related to the operation

Type(s)

string

A value which was given during making a payment

control : mixed
var

A value which was given during making a payment

Type(s)

mixed

A description of the operation

description : string
var

A description of the operation

Type(s)

string

An account id of a seller

accountId : integer|null
var

An account id of a seller

Type(s)

integer|null

A Payer object which contains information about payer

payer : \Dotpay\Model\Payer|null
var

A Payer object which contains information about payer

Type(s)

\Dotpay\Model\Payer|null

A PaymentMethod with details of a payment

paymentMethod : \Dotpay\Model\PaymentMethod|null
var

A PaymentMethod with details of a payment

Type(s)

\Dotpay\Model\PaymentMethod|null

List of all possible operation types

types : array
static
var

List of all possible operation types

Type(s)

array

List of all possible statuses of operation

statuses : array
static
var

List of all possible statuses of operation

Type(s)

array