Payment

Extends \Dotpay\Resource\Resource

Allow to use informations about channels which are enabled for details of payment.

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

Check if the seller with the given id exists in Dotpay system.

checkSeller(integer $id, \Dotpay\Resource\Channel\Request $request = null) : boolean
Throws
\Dotpay\Exception\BadReturn\TypeNotCompatibleException

Thrown when a response from Dotpay server is in incompatible type

Arguments

$id

integer

Seller id

$request

\Dotpay\Resource\Channel\Request

Object with request data. If it's not provided, default request is created automatically

Response

boolean

Clear the buffer of past requests.

clearBuffer() : \Dotpay\Resource\Payment

Close the resource.

close() 
inherited

Return a string which contain a header with Accept rule.

getAcceptHeader() : string
inherited

Response

string

Return the Info structure which contains list of channels for the given payment details.

getChannelListForRequest(\Dotpay\Resource\Channel\Request $request) : \Dotpay\Resource\Channel\Info
Throws
\Dotpay\Exception\BadReturn\TypeNotCompatibleException

Thrown when a response from Dotpay server is in incompatible type

\Dotpay\Exception\Resource\ApiException

Thrown when is reported an Api Error

Arguments

$request

\Dotpay\Resource\Channel\Request

Details of request information

Response

\Dotpay\Resource\Channel\Info

Return the Info structure which contains list of channels for the given payment details.

getChannelListForTransaction(\Dotpay\Model\Transaction $transaction) : \Dotpay\Resource\Channel\Info
Throws
\Dotpay\Exception\BadReturn\TypeNotCompatibleException

Thrown when a response from Dotpay server is in incompatible type

\Dotpay\Exception\Resource\ApiException

Thrown when is reported an Api Error

Arguments

$transaction

\Dotpay\Model\Transaction

Payment details

Response

\Dotpay\Resource\Channel\Info

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

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

Properties

List of channels lists which are gotten from server for specific orders

buffer : array
var

List of channels lists which are gotten from server for specific orders

Type(s)

array

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