Configuration

Storage of basic configuration.

package

Default

Methods

Initialize the model.

__construct(string $pluginId) 

Arguments

$pluginId

string

Name of the plugin which uses the Configuration

Set a private property from child class.

__set(string $name, mixed $value) 

Arguments

$name

string

Name of the property

$value

mixed

Value of the property

Create the model based on data provided from shop.

createFromData(\Dotpay\Provider\ConfigurationProviderInterface $provider) : \Dotpay\Model\Configuration
static

Arguments

$provider

\Dotpay\Provider\ConfigurationProviderInterface

Provider which contains data from shop application

Response

\Dotpay\Model\Configuration

Return a payment API version.

getApi() : string

Response

string

Check if BLIK channel is set as visible.

getBlikVisible() : boolean

Response

boolean

Check if normal card channel is set as visible.

getCcVisible() : boolean

Response

boolean

Return an information if Dotpay payment is enabled on the shop site.

getEnable() : boolean

Response

boolean

Return list of channels which are enabled in configuration.

getEnabledChannels() : \Dotpay\Model\array/null

Response

\Dotpay\Model\array/null

Return a string which contains a list with currency codes for which card channel for foreign currencies is enabled.

getFccCurrencies() : string

Response

string

Return seller id for the account which is asigned to card channel for foreign currency.

getFccId() : integer|null

Response

integer|null

Return seller pin for the account which is asigned to card channel for foreign currency.

getFccPin() : string

Response

string

Check if card channel for foreign currency is set as visible.

getFccVisible() : boolean

Response

boolean

Return seller id.

getId() : integer|null

Response

integer|null

Check if payment instruction of cash or transfer channels should be visible on a shop site.

getInstructionVisible() : boolean

Response

boolean

Check if MasterPass channel is set as visible.

getMpVisible() : boolean

Response

boolean

Return a flag if multimerchant is enabled.

getMultimerchant() : boolean

Response

boolean

Check if the One Click card channel is set as visible.

getOcVisible() : boolean

Response

boolean

Return password of Dotpay seller dashboard.

getPassword() : \Dotpay\Model\password

Response

\Dotpay\Model\password

Return an URL to Dotpay server for payments.

getPaymentUrl() : string

Response

string

Check if Paypal channel is set as visible.

getPaypalVisible() : boolean

Response

boolean

Return seller pin.

getPin() : string

Response

string

Return plugin id.

getPluginId() : string

Response

string

Check if refunds requesting is enabled from a shop system.

getRefundsEnable() : boolean

Response

boolean

Check if payments renew option is enabled.

getRenew() : boolean

Response

boolean

Return a number of days after creating an order when payment can be renewed.

getRenewDays() : integer

Response

integer

Return Seller object for given seller id.

getSeller(integer $sellerId) : \Dotpay\Model\Seller
Throws
\Dotpay\Exception\SellerNotFoundException

Thrown when seller with the given id is not found in shop configuration

Arguments

$sellerId

integer

Seller identifier

Response

\Dotpay\Model\Seller

Return an URL to Dotpay server for seller API.

getSellerUrl() : string

Response

string

Return a shop IP or null if it's not possible to read.

getShopIp() : string|null

Response

string|null

Return a name of shop which is sent to Dotpay server.

getShopName() : string

Response

string

Return a flag if special surcharge is enabled.

getSurcharge() : boolean

Response

boolean

Return an amount which will be added as a surcharge.

getSurchargeAmount() : float

Response

float

Return a percent of value of order which will be added as a surcharge.

getSurchargePercent() : float

Response

float

Check if test mode is enabled.

getTestMode() : boolean

Response

boolean

Return username of Dotpay seller dashboard.

getUsername() : string

Response

string

Return a string which contains a list with currency codes for which main Dotpay channel is disabled.

getWidgetCurrencies() : string

Response

string

Check if Dotpay widget is set as visible.

getWidgetVisible() : boolean

Response

boolean

Check if opayment of rder placed on a given date can be renewed.

ifOrderCanBeRenewed(\DateTime $orderAddDate) : boolean

If number of days is 0, then payment of order can be renewed always.

Arguments

$orderAddDate

\DateTime

A date when an order has been placed

Response

boolean

Check if card channel for foreigner currencies can be used for the given currency.

isCurrencyForFcc(string $currency) : boolean

Arguments

$currency

string

Currency code

Response

boolean

Check if the given currency is on the given list.

isCurrencyOnList(string $currency, \Dotpay\Model\string/array $list) : \Dotpay\Model\booleanean

Arguments

$currency

string

Currency code

$list

\Dotpay\Model\string/array

A string which contains a list of currency codes. Every code is separated by "," character

Response

\Dotpay\Model\booleanean

Check if card channel for foreign currencies is enabled.

isFccEnable() : boolean

Response

boolean

Check if Dotpay payments support the given currency.

isGatewayEnabled(string $currency) : boolean

Arguments

$currency

string

Currency code

Response

boolean

Check if seller id and pin are not empty.

isGoodAccount() : boolean

Response

boolean

Check if username and password are not empty.

isGoodApiData() : boolean

Response

boolean

Check if the One Click card channel is enabled to use.

isOcEnable() : boolean

Response

boolean

Check if Dotpay widget can be used for the given currency.

isWidgetEnabled(string $currency) : boolean

Arguments

$currency

string

Currency code

Response

boolean

Set the given API version.

setApi(string $api) : \Dotpay\Model\Configuration
Throws
\Dotpay\Exception\BadParameter\ApiVersionException

Thrown when the given payment API version is different than the "dev" string

Arguments

$api

string

Api version. Only "dev" is allowed

Response

\Dotpay\Model\Configuration

Set the flag if BLIK channel is visible.

setBlikVisible(boolean $blikVisible) : \Dotpay\Model\Configuration

Arguments

$blikVisible

boolean

Flag if BLIK channel is visible

Response

\Dotpay\Model\Configuration

Set the flag if normal card channel is visible.

setCcVisible(boolean $ccVisible) : \Dotpay\Model\Configuration

Arguments

$ccVisible

boolean

Flag if normal card channel is visible

Response

\Dotpay\Model\Configuration

Set the flag if Dotpay payment is enabled in a shop.

setEnable(boolean $enable) : \Dotpay\Model\Configuration

Arguments

$enable

boolean

Flag of enabling Dotpay payment

Response

\Dotpay\Model\Configuration

Set the list of codes of currencies for which is allowed the FCC card channel.

setFccCurrencies(string $fccCurrencies) : \Dotpay\Model\Configuration

Arguments

$fccCurrencies

string

List of codes of currencies for which is allowed the FCC card channel. Every code is separated by "," character

Response

\Dotpay\Model\Configuration

Set the given seller id for the second account.

setFccId(integer $fccId) : \Dotpay\Model\Configuration
Throws
\Dotpay\Exception\BadParameter\IdException

Thrown when the given seller id for the second account is incorrect

Arguments

$fccId

integer

Seller id for an account which is signed to support payment by card using foreign currencies

Response

\Dotpay\Model\Configuration

Set the given seller pin for the second account.

setFccPin(string $fccPin) : \Dotpay\Model\Configuration
Throws
\Dotpay\Exception\BadParameter\PinException

Thrown when the given seller pin is incorrect

Arguments

$fccPin

string

Seller pin for an account which is signed to support payment by card using foreign currencies

Response

\Dotpay\Model\Configuration

Set the flag which informs if card channel for foreign currencies is visible.

setFccVisible(boolean $fccVisible) : \Dotpay\Model\Configuration

Arguments

$fccVisible

boolean

Card channel for foreign currencies visible flag

Response

\Dotpay\Model\Configuration

Set the given seller id.

setId(integer $id) : \Dotpay\Model\Configuration
Throws
\Dotpay\Exception\BadParameter\IdException

Thrown when the given seller id is incorrect

Arguments

$id

integer

Seller id

Response

\Dotpay\Model\Configuration

Set a flag if payment instruction of cash or transfer channels should be visible on a shop site.

setInstructionVisible(boolean $instructionVisible) : \Dotpay\Model\Configuration

Arguments

$instructionVisible

boolean

Flag if payment instruction of cash or transfer channels should be visible on a shop site

Response

\Dotpay\Model\Configuration

Set the flag if MasterPass channel is visible.

setMpVisible(boolean $mpVisible) : \Dotpay\Model\Configuration

Arguments

$mpVisible

boolean

Flag if MasterPass channel is visible

Response

\Dotpay\Model\Configuration

Set a flag if multimerchant option is enabled.

setMultimerchant(boolean $multimerchant) : \Dotpay\Model\Configuration

Arguments

$multimerchant

boolean

Flag if multimerchant option is enabled

Response

\Dotpay\Model\Configuration

Set the flag which informs if One Click card channel is visible.

setOcVisible(boolean $ocVisible) : \Dotpay\Model\Configuration

Arguments

$ocVisible

boolean

One Click card channel visible flag

Response

\Dotpay\Model\Configuration

Set the given password for Dotpay dashboard.

setPassword(string $password) : \Dotpay\Model\Configuration
Throws
\Dotpay\Exception\BadParameter\PasswordException

Thrown when the given password is incorrect

Arguments

$password

string

Seller password

Response

\Dotpay\Model\Configuration

Set the flag if Paypal channel is visible.

setPaypalVisible(boolean $paypalVisible) : \Dotpay\Model\Configuration

Arguments

$paypalVisible

boolean

Flag if Paypal channel is visible

Response

\Dotpay\Model\Configuration

Set the given seller pin.

setPin(string $pin) : \Dotpay\Model\Configuration
Throws
\Dotpay\Exception\BadParameter\PinException

Thrown when the given seller pin is incorrect

Arguments

$pin

string

Seller pin

Response

\Dotpay\Model\Configuration

Set the given plugin id.

setPluginId(string $pluginId) : \Dotpay\Model\Configuration

Arguments

$pluginId

string

Plugin id

Response

\Dotpay\Model\Configuration

Set a flag if refunds requesting is enabled from a shop system.

setRefundsEnable(boolean $refundsEnable) : \Dotpay\Model\Configuration

Arguments

$refundsEnable

boolean

Flag of refunds enabling from shop sites

Response

\Dotpay\Model\Configuration

Set a flag if payment of order can be renewed.

setRenew(boolean $renew) : \Dotpay\Model\Configuration

Arguments

$renew

boolean

Response

\Dotpay\Model\Configuration

Set a number of days when after placed an order the payment can be renewed.

setRenewDays(\Dotpay\Model\type $renewDays) : \Dotpay\Model\Configuration

Arguments

$renewDays

\Dotpay\Model\type

Response

\Dotpay\Model\Configuration

Set the given name of shop which is sent to Dotpay server.

setShopName(string $shopName) : \Dotpay\Model\Configuration

Arguments

$shopName

string

Shop name

Response

\Dotpay\Model\Configuration

Set a flag if special surcharge is enabled.

setSurcharge(boolean $surcharge) : \Dotpay\Model\Configuration

Arguments

$surcharge

boolean

Flag if special surcharge is enabled

Response

\Dotpay\Model\Configuration

Set an amount which will be added as a surcharge.

setSurchargeAmount(float $surchargeAmount) : \Dotpay\Model\Configuration

Arguments

$surchargeAmount

float

Amount which will be added as a surcharge

Response

\Dotpay\Model\Configuration

Set a percent of value of order which will be added as a surcharge.

setSurchargePercent(float $surchargePercent) : \Dotpay\Model\Configuration

Arguments

$surchargePercent

float

Percent of value of order which will be added as a surcharge

Response

\Dotpay\Model\Configuration

Set the flag which informs if test mode is enabled or not.

setTestMode(boolean $testMode) : \Dotpay\Model\Configuration

Arguments

$testMode

boolean

Test mode flag

Response

\Dotpay\Model\Configuration

Set the given username for Dotpay dashboard.

setUsername(string $username) : \Dotpay\Model\Configuration
Throws
\Dotpay\Exception\BadParameter\UsernameException

Thrown when the given username is incorrect

Arguments

$username

string

Seller username

Response

\Dotpay\Model\Configuration

Set the list of currency codes for which is disallowed the Dotpay main channel.

setWidgetCurrencies(string $widgetCurrencies) : \Dotpay\Model\Configuration

Arguments

$widgetCurrencies

string

List of currency codes. Every code is separated by "," character

Response

\Dotpay\Model\Configuration

Set the flag if Dotpay widget is visible on a payment page.

setWidgetVisible(boolean $widgetVisible) : \Dotpay\Model\Configuration

Arguments

$widgetVisible

boolean

Flag if Dotpay widget is visible on a payment page

Response

\Dotpay\Model\Configuration

Constants

Version of the SDK.

SDK_VERSION

DOTPAY_SSL_URL

DOTPAY_SSL_URL

Url of Dotpay payment production server.

PAYMENT_URL_PROD

Url of Dotpay payment test server.

PAYMENT_URL_DEV

Url of Dotpay seller production server.

SELLER_URL_PROD

Url of Dotpay seller test server.

SELLER_URL_DEV

Address IP of Dotpay confirmation server.

CALLBACK_IP

Address IP od Dotpay office.

OFFICE_IP

Address IP of the localhost.

LOCAL_IP

Id of One Click card channel.

OC_CHANNEL

Id of card channel, used for foreign currencies.

FCC_CHANNEL

Id of standard chard channel.

CC_CHANNEL

Id of MasterPass channel.

MP_CHANNEL

Id of BLIK channel.

BLIK_CHANNEL

Id of PayPal channel.

PAYPAL_CHANNEL

Class name of the HTML container which contains aDotpay widget on a payment site.

WIDGET_CLASS_CONTAINER

Properties

List of all supported currencies.

CURRENCIES : 
static

Type(s)

Id of plugin where is used SDK

pluginId : string
var

Id of plugin where is used SDK

Type(s)

string

Flag which inform if Dotpay payment is enabled in a shop

enable : boolean
var

Flag which inform if Dotpay payment is enabled in a shop

Type(s)

boolean

Seller id

id : integer|null
var

Seller id

Type(s)

integer|null

Seller pin

pin : string
var

Seller pin

Type(s)

string

Username of Dotpay seller dashboard

username : string
var

Username of Dotpay seller dashboard

Type(s)

string

Password of Dotpay seller dashboard

password : string
var

Password of Dotpay seller dashboard

Type(s)

string

Flag if test mode is activated

testMode : boolean
var

Flag if test mode is activated

Type(s)

boolean

Flag if One Click card channel is visible

ocVisible : boolean
var

Flag if One Click card channel is visible

Type(s)

boolean

Flag if card channel for foreign currencies is visible

fccVisible : boolean
var

Flag if card channel for foreign currencies is visible

Type(s)

boolean

Seller id for an account which is signed to support payment by card using foreign currencies

fccId : integer|null
var

Seller id for an account which is signed to support payment by card using foreign currencies

Type(s)

integer|null

Seller pin for an account which is signed to support payment by card using foreign currencies

fccPin : string
var

Seller pin for an account which is signed to support payment by card using foreign currencies

Type(s)

string

Codes of currencies for which is allowed the FCC card channel. Every code is separated by "," character

fccCurrencies : string
var

Codes of currencies for which is allowed the FCC card channel. Every code is separated by "," character

Type(s)

string

Flag if normal card channel is visible

ccVisible : boolean
var

Flag if normal card channel is visible

Type(s)

boolean

Flag if MasterPass channel is visible

mpVisible : boolean
var

Flag if MasterPass channel is visible

Type(s)

boolean

Flag if BLIK channel is visible

blikVisible : boolean
var

Flag if BLIK channel is visible

Type(s)

boolean

Flag if Paypal channel is visible

paypalVisible : boolean
var

Flag if Paypal channel is visible

Type(s)

boolean

Flag if Dotpay widget is visible on a payment page

widgetVisible : boolean
var

Flag if Dotpay widget is visible on a payment page

Type(s)

boolean

Codes of currencies for which is disallowed the Dotpay main channel. Every code is separated by "," character

widgetCurrencies : string
var

Codes of currencies for which is disallowed the Dotpay main channel. Every code is separated by "," character

Type(s)

string

Flag if payment instruction of cash or transfer channels should be visible on a shop site

instructionVisible : boolean
var

Flag if payment instruction of cash or transfer channels should be visible on a shop site

Type(s)

boolean

Flag if refunds requesting is enabled from a shop system

refundsEnable : boolean
var

Flag if refunds requesting is enabled from a shop system

Type(s)

boolean

Flag if renew payments are enabled for customers

renew : boolean
var

Flag if renew payments are enabled for customers

Type(s)

boolean

Number of days, how long after creating an order should be available renew option

renewDays : integer
var

Number of days, how long after creating an order should be available renew option

Type(s)

integer

Flag if special surcharge is enabled

surcharge : boolean
var

Flag if special surcharge is enabled

Type(s)

boolean

Amount which will be added as a surcharge

surchargeAmount : float
var

Amount which will be added as a surcharge

Type(s)

float

Percent of value of order which will be added as a surcharge

surchargePercent : float
var

Percent of value of order which will be added as a surcharge

Type(s)

float

Name of shop which is sent to Dotpay server

shopName : string
var

Name of shop which is sent to Dotpay server

Type(s)

string

Flag if multimerchant option is enabled

multimerchant : boolean
var

Flag if multimerchant option is enabled

Type(s)

boolean

Payment API version

api : string
var

Payment API version

Type(s)

string