Mp

Extends \Dotpay\Channel\Channel

Class provides a special functionality for MasterPass payments.

package

Default

Methods

Initialize a separate channel.

__construct(integer $channelId, string $code, \Dotpay\Model\Configuration $config, \Dotpay\Model\Transaction $transaction, \Dotpay\Resource\Payment $paymentResource, \Dotpay\Resource\Seller $sellerResource) 
inherited

Arguments

$channelId

integer

Code number of payment channel in Dotpay system

$code

string

Short string code which can be used to identify

$config

\Dotpay\Model\Configuration

Dotpay configuration object

$transaction

\Dotpay\Model\Transaction

Object with transaction details

$paymentResource

\Dotpay\Resource\Payment

Payment resource which can be used for Payment API

$sellerResource

\Dotpay\Resource\Seller

Seller resource which can be used for Seller API

Add a new Agreement object for channel.

addAgreement(\Dotpay\Resource\Channel\Agreement $agreement) : \Dotpay\Channel\Channel
inherited

Arguments

$agreement

\Dotpay\Resource\Channel\Agreement

The agreement to add to channel

Response

\Dotpay\Channel\Channel

Check if the channel can have an instruction.

canHaveInstruction() : boolean
inherited

Response

boolean

Set the seller model with the correct data from plugin Configuration.

chooseSeller() 
inherited

Get the saved value by the given name.

get(string $name) : mixed
inherited

Arguments

$name

string

Name of the saved value

Response

mixed

Return an array with agreement structs, downloaded from Dotpay server.

getAgreements() : array
inherited

Response

array

Return an array with all hidden fields including CHK.

getAllHiddenFields() : array
inherited

Response

array

Return a code number of payment channel in Dotpay system.

getChannelId() : integer|null
inherited

Response

integer|null

Calculate CHK for the given data.

getCHK(array $inputParameters, string $pin, array $subPayments = array()) : string
inherited static

Arguments

$inputParameters

array

Array with transaction parameters

$pin

string

Seller pin to sign the control sum

$subPayments

array

Response

string

Return a short string code of the payment channel.

getCode() : string
inherited

Response

string

Return a configuration object.

getConfig() : \Dotpay\Model\Configuration
inherited

Return a name of a group to which it belongs the channel.

getGroup() : string|null
inherited

Response

string|null

Return a form with all hidden fields for payment.

getHiddenForm() : \Dotpay\Html\Container\Form
inherited

Return a readable name of the channel.

getName() : string|null
inherited

Response

string|null

Return saved Seller model.

getSeller() : \Dotpay\Model\Seller
inherited

Return a title which can be displayed on the channel list.

getTitle() : string
inherited

Response

string

Return object with transaction details.

getTransaction() : \Dotpay\Model\Transaction
inherited

Return an array of fields which can be displayed on a list of payment channels.

getViewFields() : array
inherited

They can contain aditional fields with information which are needed before continue a payment process.

Response

array

Return view fields enriched by an additional piece of HTML code.

getViewFieldsHtml() : array
inherited

Response

array

Check an availability of the channel.

isAvailable() : boolean
inherited final

Response

boolean

Check if the channel is enabled to using.

isEnabled() : boolean
inherited

Response

boolean

Check a visibility of the channel on a channels list.

isVisible() : boolean
inherited

Response

boolean

Return array of hidden fields for a form to redirecting to a Dotpay site with all needed information about a current payment.

prepareHiddenFields() : array
inherited
Throws
\Dotpay\Exception\Channel\SellerNotGivenException

Thrown when seller object is not given to payment channel

Response

array

Save the given value for the name.

set(string $name, mixed $value) : \Dotpay\Channel\Channel
inherited

Arguments

$name

string

The name of the value

$value

mixed

The value to saving

Response

\Dotpay\Channel\Channel

Retrieve informations about the channel from Dotpay server.

setChannelInfo(integer|null $channelId = null) 
inherited
Throws
\Dotpay\Exception\BadParameter\ChannelIdException

Thrown if the given channel id isn't correct

Arguments

$channelId

integer|null

Code number of payment channel in Dotpay system

Set the given seller.

setSeller(\Dotpay\Model\Seller $seller) : \Dotpay\Channel\Channel
inherited

Arguments

$seller

\Dotpay\Model\Seller

Model of shop seller

Response

\Dotpay\Channel\Channel

Set a title which can be displayed on the channel list.

setTitle(string $title) : \Dotpay\Channel\Channel
inherited

Arguments

$title

string

Title which can be displayed on the channel list

Response

\Dotpay\Channel\Channel

Constants

CODE

CODE

Name of cash channels group.

CASH_GROUP
inherited

Name of transfer channels group.

TRANSFER_GROUP
inherited

Properties

Code number of payment channel in Dotpay system

code : integer
inherited
var

Code number of payment channel in Dotpay system

Type(s)

integer

Array of values which can be set for saving some additional informations

reqistry : array
inherited
var

Array of values which can be set for saving some additional informations

Type(s)

array

Dotpay configuration object

config : \Dotpay\Model\Configuration
inherited
var

Dotpay configuration object

Type(s)

\Dotpay\Model\Configuration

A channel info struct, downloaded from Dotpay server

channelInfo : \Dotpay\Resource\Channel\ChannelInfo
inherited
var

A channel info struct, downloaded from Dotpay server

Type(s)

\Dotpay\Resource\Channel\ChannelInfo

An agreement struct, downloaded from Dotpay server

agreements : array
inherited
var

An agreement struct, downloaded from Dotpay server

Type(s)

array

Flag of an availability of the channel

available : boolean
inherited
var

Flag of an availability of the channel

Type(s)

boolean

Object with transaction details

transaction : \Dotpay\Model\Transaction
inherited
var

Object with transaction details

Type(s)

\Dotpay\Model\Transaction

Payment resource which can be used for Payment API

paymentResource : \Dotpay\Resource\Payment
inherited
var

Payment resource which can be used for Payment API

Type(s)

\Dotpay\Resource\Payment

Seller resource which can be used for Payment API

sellerResource : \Dotpay\Resource\Seller
inherited
var

Seller resource which can be used for Payment API

Type(s)

\Dotpay\Resource\Seller

Title which can be displayed on the channel list

title : string
inherited
var

Title which can be displayed on the channel list

Type(s)

string

Object of used seller

seller : \Dotpay\Channel\Seller
inherited
var

Object of used seller

Type(s)

\Dotpay\Channel\Seller