RegisterOrder

Extends \Dotpay\Resource\Resource

Provide an interface to use Register Method to create payments.

package

Default

Methods

Initialize the resource.

__construct(\Dotpay\Model\Configuration $config, \Dotpay\Tool\Curl $curl) 
inherited

Arguments

$config

\Dotpay\Model\Configuration

Configuration of Dotpay payments

$curl

\Dotpay\Tool\Curl

Tool for using the cURL library

Close the resource.

close() 
inherited

Create a new payment using Register order method.

create(\Dotpay\Channel\Channel $channel) : \Dotpay\Resource\RegisterOrder\Result
Throws
\Dotpay\Exception\Resource\PaymentNotCreatedException

Thrown when payment is not created

Arguments

$channel

\Dotpay\Channel\Channel

Data of channel which should be used to realizing the operation

Response

\Dotpay\Resource\RegisterOrder\Result

Return a string which contain a header with Accept rule.

getAcceptHeader() : string
inherited

Response

string

Return a parsed response from the external server.

getContent(string $url) : array
inherited
Throws
\Dotpay\Exception\Resource\UnauthorizedException

Thrown when an authorization is failed

\Dotpay\Exception\Resource\ForbiddenException

Thrown when user doesn't have an access or when logging data is wrong

\Dotpay\Exception\Resource\NotFoundException

Thrown when a destination is not found

\Dotpay\Exception\Resource\UnavailableException

Thrown when the resource is not available

\Dotpay\Exception\Resource\TimeoutException

Thrown when timeout is exceed

\Dotpay\Exception\Resource\ServerException

Thrown when server of a destination does not work correctly

Arguments

$url

string

Url of a destination request

Response

array

Result which is decoded as array

Return an object with a tool for using the cURL library.

getCurl() : \Dotpay\Tool\Curl
inherited

Return a data structure for Register Order method.

getDataStructure(\Dotpay\Channel\Channel $channel) : array

Arguments

$channel

\Dotpay\Channel\Channel

Data of channel which should be used to realizing the operation

Response

array

Return a hash of payment based on payment's results.

getHashFromResultArray(array $payment) : string

Arguments

$payment

array

Details of payment

Response

string

Send a post data to the destination point and return a response.

postData(string $url, \Dotpay\Resource\sring $body) : array
inherited

Arguments

$url

string

Url of a destination request

$body

\Dotpay\Resource\sring

Body content of request which is encoded as JSON string

Response

array

Process cash and transfer payments.

processCashAndTransfer(array $resultArray, \Dotpay\Resource\RegisterOrder\Result $resultObject, \Dotpay\Channel\Channel $channel) : \Dotpay\Resource\RegisterOrder\Result
Throws
\Dotpay\Exception\Resource\InstructionNotFoundException

Thrown when an instruction of finishing payment is not found for cash and transfer payments

Arguments

$resultArray

array

Informations which are given from Dotpay server after realizing the payment

$resultObject

\Dotpay\Resource\RegisterOrder\Result

Structure which contains selected result's informations

$channel

\Dotpay\Channel\Channel

Data of channel which should be used to realizing the operation

Response

\Dotpay\Resource\RegisterOrder\Result

Constants

Subaddress of the Retister API location.

TARGET

Properties

Instance of SDK Loader

loader : \Dotpay\Loader\Loader
var

Instance of SDK Loader

Type(s)

\Dotpay\Loader\Loader

Configuration of Dotpay payments

config : \Dotpay\Model\Configuration
inherited
var

Configuration of Dotpay payments

Type(s)

\Dotpay\Model\Configuration

Tool for using the cURL library

curl : \Dotpay\Tool\Curl
inherited
var

Tool for using the cURL library

Type(s)

\Dotpay\Tool\Curl

Information about last request

info : array
inherited
var

Information about last request

Type(s)

array