CreditCard

Informations about a credit card.

package

Default

Methods

Initialize the model.

__construct(integer $id, string $userId) 

Arguments

$id

integer

Id of credit card in a shop

$userId

string

Identificator of a credit card user

Generate a new user identificator which can be assigned to a registered card during a first transaction.

generateNewUserId() : string
static

Response

string

Return a random value between 0 and 11.

generateRandomValue() : integer
static
codeCoverageIgnore

Response

integer

Return current Unix timestamp with microseconds.

generateTimeValue() : integer
static
codeCoverageIgnore

Response

integer

Generate a new user identificator which can be assigned to a registered card during a first transaction.

generateUserId() : string

Response

string

Return a brand object for the credit card.

getBrand() : \Dotpay\Model\CardBrand

Return an identificator of credit card which is assigned by Dotpay system.

getCardId() : \Dotpay\Model\type

Response

\Dotpay\Model\type

Return credit card which is connected with the given order id. This function is a mock and it should be overwritten in a children CreditCard class.

getCreditCardByOrder(integer $orderId) : \Dotpay\Model\getCreditCardByOrder
static

Arguments

$orderId

integer

Order id

Response

\Dotpay\Model\getCreditCardByOrder

Return a customer hash.

getCustomerHash() : string

Response

string

Return an URL on Dotpay server where is located information about this card.

getHref() : string

Response

string

Return a credit card id in a shop.

getId() : integer|null

Response

integer|null

Return a card issuer id.

getIssuerId() : string

Response

string

Return a card masked number.

getMask() : string

Response

string

Return an id of the first order made using the card.

getOrderId() : integer|null

Response

integer|null

Return a date when the card has beed registered.

getRegisterDate() : \Dotpay\Model\DateType|null

Response

\Dotpay\Model\DateType|null

Return an identificator of a credit card user.

getUserId() : string

Response

string

Check if the credit card contains information which are available after registration on Dotpay server.

isRegistered() : boolean

Response

boolean

Set a brand object for the credit card.

setBrand(\Dotpay\Model\CardBrand $brand) : \Dotpay\Model\CreditCard

Arguments

$brand

\Dotpay\Model\CardBrand

Brand object for the credit card

Response

\Dotpay\Model\CreditCard

Set an identificator of credit card which is assigned by Dotpay system.

setCardId(string $cardId) : \Dotpay\Model\CreditCard

Arguments

$cardId

string

Identificator of credit card which is assigned by Dotpay system

Response

\Dotpay\Model\CreditCard

Set the given customer hash.

setCustomerHash(string $customerHash) : \Dotpay\Model\CreditCard

Arguments

$customerHash

string

Customer hash

Response

\Dotpay\Model\CreditCard

Set an URL on Dotpay server where is located information about this card.

setHref(string $href) : \Dotpay\Model\CreditCard
Throws
\Dotpay\Exception\BadParameter\UrlException

Thrown when the given URl address is incorrect

Arguments

$href

string

Url where are located information about this card

Response

\Dotpay\Model\CreditCard

Set an id of credit card in a shop.

setId(integer $id) : \Dotpay\Model\CreditCard

Arguments

$id

integer

Id of credit card in a shop

Response

\Dotpay\Model\CreditCard

Set a card issuer id.

setIssuerId(string $issuerId) : \Dotpay\Model\CreditCard

Arguments

$issuerId

string

Card issuer id

Response

\Dotpay\Model\CreditCard

Set a card masked number.

setMask(string $mask) : \Dotpay\Model\CreditCard
Throws
\Dotpay\Exception\BadParameter\CardMaskException

Thrown when the given card masked number is incorrect

Arguments

$mask

string

Card masked number

Response

\Dotpay\Model\CreditCard

Set an id of the first order made using the card.

setOrderId(integer $orderId) : \Dotpay\Model\getCreditCardByOrder

Arguments

$orderId

integer

Id of the first order made using the card

Response

\Dotpay\Model\getCreditCardByOrder

Set a date when the card has beed registered.

setRegisterDate(\DateTime $registerDate) : \Dotpay\Model\CreditCard

Arguments

$registerDate

\DateTime

Date when the card has beed registered

Response

\Dotpay\Model\CreditCard

Set an identificator of a credit card user.

setUserId(string $userId) : \Dotpay\Model\CreditCard

Arguments

$userId

string

Identificator of a credit card user

Response

\Dotpay\Model\CreditCard

Properties

Id of credit card in a shop

id : integer|null
var

Id of credit card in a shop

Type(s)

integer|null

Card masked number

mask : string
var

Card masked number

Type(s)

string

Brand object for the credit card

brand : \Dotpay\Model\CardBrand|null
var

Brand object for the credit card

Type(s)

\Dotpay\Model\CardBrand|null

Identificator of a credit card user

userId : string
var

Identificator of a credit card user

Type(s)

string

Identificator of credit card which is assigned by Dotpay system

cardId : string
var

Identificator of credit card which is assigned by Dotpay system

Type(s)

string

Card issuer id

issuerId : string
var

Card issuer id

Type(s)

string

Customer hash

customerHash : string
var

Customer hash

Type(s)

string

URL on Dotpay server where is located information about this card

href : string
var

URL on Dotpay server where is located information about this card

Type(s)

string

Date when the card has beed registered

registerDate : \DateTime|null
var

Date when the card has beed registered

Type(s)

\DateTime|null

Id of the first order made using the card

orderId : integer|null
var

Id of the first order made using the card

Type(s)

integer|null