IPizza

Protocol for IPizza based banklinks.
implements RKD\Banklink\Protocol\ProtocolInterface

Known subclasses

RKD\Banklink\Protocol\IPizza2015, RKD\Banklink\Protocol\LiisiPayment
Methods Summary
public
# __construct( string $sellerId , string $privateKey , string $privateKeyPassword , string $publicKey , string $requestUrl , string $sellerName = NULL, string $sellerAccount = NULL, string $version = '008' )
Init IPizza protocol.
public
# useMbStrlen( bool $useMbStrlen )
Set mb_strlen usage
public
# getPaymentRequest( int $orderId , float $sum , string $message , string $language = 'EST', string $currency = 'EUR', array $customRequestData = array ( ), string $encoding = 'UTF-8', string $timezone = 'Europe/Tallinn' )
public
# getAuthRequest( string $recId = NULL, string $nonce = NULL, string $rid = NULL, string $encoding = 'UTF-8', string $language = 'EST', string $timezone = 'Europe/Tallinn' )
Get authentication object

Implementation of

public
# handleResponse( array $response , string $encoding = 'UTF-8' )
Handles response from bank.

Implementation of

protected
# handlePaymentResponse( array $responseData , bool $success )
Get payment response.
protected
# handleAuthResponse( array $responseData , bool $success )
Get authentication response.
public
# getSignature( array $data , string $encoding = 'UTF-8' )
Generates signature for request.
protected
# generateSignature( array $data , string $encoding = 'UTF-8' )
Generate MAC string from array of fields.
protected
# validateSignature( array $response , string $encoding = 'UTF-8' )
Validate bank signature.
public
# setAlgorithm( int|string $algorithm )
Set algorithm used to generate mac Should be one of valid values for openssl_sign functions signature_alg parameter

see

public
# getAlgorithm( )
Get algorithm used to generate mac
protected static
# getFields( $service )
Get fields from Services class
protected static
# getServicesClass( )
Get services provider class
Constants Summary
public string FIELD_SERVICE
Fields
# 'VK_SERVICE'
public string FIELD_VERSION
# 'VK_VERSION'
public string FIELD_SND_ID
# 'VK_SND_ID'
public string FIELD_STAMP
# 'VK_STAMP'
public string FIELD_AMOUNT
# 'VK_AMOUNT'
public string FIELD_CURR
# 'VK_CURR'
public string FIELD_REF
# 'VK_REF'
public string FIELD_MSG
# 'VK_MSG'
public string FIELD_RETURN
# 'VK_RETURN'
public string FIELD_CANCEL
# 'VK_CANCEL'
public string FIELD_DATETIME
# 'VK_DATETIME'
public string FIELD_T_DATETIME
# 'VK_T_DATETIME'
public string FIELD_LANG
# 'VK_LANG'
public string FIELD_NAME
# 'VK_NAME'
public string FIELD_ACC
# 'VK_ACC'
public string FIELD_MAC
# 'VK_MAC'
public string FIELD_RID
# 'VK_RID'
public string FIELD_REPLY
# 'VK_REPLY'
public string FIELD_NONCE
# 'VK_NONCE'
public string FIELD_REC_ID
# 'VK_REC_ID'
public string FIELD_AUTO
# 'VK_AUTO'
public string FIELD_SND_NAME
# 'VK_SND_NAME'
public string FIELD_SND_ACC
# 'VK_SND_ACC'
public string FIELD_REC_NAME
# 'VK_REC_NAME'
public string FIELD_REC_ACC
# 'VK_REC_ACC'
public string FIELD_T_NO
# 'VK_T_NO'
public string FIELD_USER_ID
# 'VK_USER_ID'
public string FIELD_USER_NAME
# 'VK_USER_NAME'
public string FIELD_COUNTRY
# 'VK_COUNTRY'
public string FIELD_TOKEN
# 'VK_TOKEN'
Properties Summary
protected string $publicKey
File path or file contents of public key.
# NULL
protected string $privateKey
File path or file contents of private key.
# NULL
protected string $privateKeyPassword
Private key password.
# NULL
protected string $sellerId
Seller id, provided by bank.
# NULL
protected string $sellerName
Seller name, mus match with bank account name.
# NULL
protected string $sellerAccount
Seller account number.
# NULL
protected string $version
Protocol version used for communication.
# NULL
protected string $requestUrl
Request url, where data will be sent.
# NULL
protected string $serviceId
Service number used.
# NULL
protected bool $result
Result of signature validation.
# NULL
protected bool $useMbStrlen
Is mb_strlen function used to get string length?
# true
protected int|string $algorithm
Algorithm used to generate mac
# 1