Seller

Extends \Dotpay\Resource\Resource

Allow to use Seller API.

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 given seller pin for foreign currencies is correct.

checkFccPin() : boolean

Response

boolean

Check if the given seller id and pin are correct.

checkIdAndPin(integer $id, string $pin) : boolean

Arguments

$id

integer

Seller id

$pin

string

Seller pin

Response

boolean

Check if the given normal seller pin is correct.

checkPin() : boolean

Response

boolean

Close the resource.

close() 
inherited

Return a string which contain a header with Accept rule.

getAcceptHeader() : string
inherited

Response

string

Return an account of seller who has the given seller id.

getAccount(integer $id) : \Dotpay\Model\Account
Throws
\Dotpay\Exception\Resource\Account\NotFoundException

Thrown when seller account is not found

Arguments

$id

integer

Seller id

Response

\Dotpay\Model\Account

Return Api url for the given end point on the Dotpay server.

getApiUrl(string $end) : string

Arguments

$end

string

End point of the Api

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 which can be used to creating a payout through Dotpay server.

getDataForPayout(\Dotpay\Model\Payout $payout) : array

Arguments

$payout

\Dotpay\Model\Payout

Payout data

Response

array

Return a parsed response from the Seller Api.

getDataFromApi(string $targetUrl) : array
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

$targetUrl

string

Url of the target resource

Response

array

Return an Operation which identifier is given.

getOperationById(mixed $id) : \Dotpay\Model\Operation
Throws
\Dotpay\Exception\Resource\Operation\NotFoundException

Thrown when searched operation is not found

Arguments

$id

mixed

Operation identifier

Response

\Dotpay\Model\Operation

Return an Operation which number is given.

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

Thrown when the given operation number is incorrect

\Dotpay\Exception\Resource\Operation\NotFoundException

Thrown when searched operation is not found

Arguments

$number

string

Number of a operation

Response

\Dotpay\Model\Operation

Return results when the target resource uses pagination mechanism.

getPaginateDataFromApi(string $url) : array
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

$url

string

Url address of the selected target

Response

array

Return an Operation object which wraps the given input data.

getWrapedOperation(array $input) : \Dotpay\Model\Operation

Arguments

$input

array

Input data which should be wraped

Response

\Dotpay\Model\Operation

Check if the given username and password are correct.

isAccountRight() : boolean

Response

boolean

Realize a payout for the given seller using the given payout data.

makePayout(\Dotpay\Model\Seller $seller, \Dotpay\Model\Payout $payout) : boolean
Throws
\Dotpay\Exception\Resource\Account\NotFoundException

Thrown when seller account is not found

Arguments

$seller

\Dotpay\Model\Seller

Seller data

$payout

\Dotpay\Model\Payout

Payout data

Response

boolean

Realize a refund for the given model.

makeRefund(\Dotpay\Model\Refund $refund) : boolean
Throws
\Dotpay\Exception\Resource\Operation\NotFoundException

Thrown when payment for refund is not found

Arguments

$refund

\Dotpay\Model\Refund

Refund data

Response

boolean

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

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