Oc

Extends \Dotpay\Channel\Channel

Class provides a special functionality for credit card payments, realized as an one Click method.

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

Add a new credit card to a list of all available CCs.

addCard(\Dotpay\Model\CreditCard $card) : \Dotpay\Channel\Oc

Arguments

$card

\Dotpay\Model\CreditCard

An credit card object

Response

\Dotpay\Channel\Oc

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

Create a HTML package for "register card option".

createRegisterCardOption(\Dotpay\Html\Element $element) : \Dotpay\Html\Form\Label

Arguments

$element

\Dotpay\Html\Element

HTML element with "register card option"

Response

\Dotpay\Html\Form\Label

Create a HTML package for "select card list".

createSelectCardList(\Dotpay\Html\Element $element) : \Dotpay\Html\Container\Div

Arguments

$element

\Dotpay\Html\Element

HTML element with credit card list

Response

\Dotpay\Html\Container\Div

Create a HTML package for "select card option".

createSelectCardOption(\Dotpay\Html\Element $element) : \Dotpay\Html\Form\Label

Arguments

$element

\Dotpay\Html\Element

HTML element with "select card option"

Response

\Dotpay\Html\Form\Label

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 credit card which is assigned.

getCard() : \Dotpay\Model\CreditCard

Return an array of all available credit cards.

getCardList() : array

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 an URL to a place in a shop where a customer can manage saved credit cards.

getManageCardsUrl() : string

Response

string

Return a readable name of the channel.

getName() : string|null
inherited

Response

string|null

Return saved Seller model.

getSeller() : \Dotpay\Model\Seller
inherited

Return special agreement only for One Click channel.

getSpecialAgreements() : \Dotpay\Resource\Channel\Agreement
static

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

Assign an credit card object to the channel.

setCard(\Dotpay\Model\CreditCard $card) : \Dotpay\Channel\Oc

Arguments

$card

\Dotpay\Model\CreditCard

An credit card object

Response

\Dotpay\Channel\Oc

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 a description of manage cards URL.

setManageCardsDescription(string $description) : \Dotpay\Channel\Oc

Arguments

$description

string

Description of manage cards URL

Response

\Dotpay\Channel\Oc

Set an URL to a place in a shop where a customer can manage saved credit cards.

setManageCardsUrl(string $url) : \Dotpay\Channel\Oc

Arguments

$url

string

The given URL address

Response

\Dotpay\Channel\Oc

Set a description of register of a new card.

setRegisterCardDescription(string $description) : \Dotpay\Channel\Oc

Arguments

$description

string

Description of register of a new card

Response

\Dotpay\Channel\Oc

Set a description of saved cards option.

setSavedCardsDescription(string $description) : \Dotpay\Channel\Oc

Arguments

$description

string

Description of saved cards option

Response

\Dotpay\Channel\Oc

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

A credit card object which is assigned to this channel

card : \Dotpay\Model\CreditCard
var

A credit card object which is assigned to this channel

Type(s)

\Dotpay\Model\CreditCard

An array of all available credit cards

cardList : array
var

An array of all available credit cards

Type(s)

array

An URL to a place in a shop where a customer can manage saved credit cards

manageCardsUrl : string
var

An URL to a place in a shop where a customer can manage saved credit cards

Type(s)

string

Description of saved cards option

savedCardsDescription : string
var

Description of saved cards option

Type(s)

string

Description of register a new card option

registerCardDescription : string
var

Description of register a new card option

Type(s)

string

Description of manage card URL

manageCardsDescription : string
var

Description of manage card URL

Type(s)

string

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