Documentation

Transactor extends ApiClient
in package

Handle bank transactions.

Tags
author

vitex

Table of Contents

Properties

$mockMode  : bool
Use mocking for api calls ?
$pSUIPAddress  : string
the end IP address of the client application (no server) in IPv4 or IPv6 format. If the bank client (your user) uses a browser by which he accesses your server app, we need to know the IP address of his browser.
$xIBMClientId  : string
ClientID obtained from Developer Portal - when you registered your app with us.

Methods

__construct()  : mixed
Transaction Handler.
checkCertificate()  : bool
checkCertificatePassword()  : bool
checkCertificatePresence()  : bool
Try to check certificate readibilty.
getCertificateSerialNumber()  : string
Calculate and return the SHA1 fingerprint of the certificate used for mTLS.
getMockMode()  : bool
Use mocking uri for api calls ?
getpSUIPAddress()  : string
Keep user public IP here.
getPublicIP()  : string
Obtain Your current Public IP.
getTransactions()  : array<string|int, mixed>
Obtain Transactions from RB.
getXIBMClientId()  : string
ClientID obtained from Developer Portal.
getxRequestId()  : string
Produce a short request identifier used for diagnostics and testing.
import()  : void
Import process itself.
send()  : ResponseInterface
Send an HTTP request while enforcing and updating client rate limits.
setScope()  : void
Prepare processing interval.
sourceString()  : string
Source Identifier.
takeTransactionData()  : void
Use Transaction data for Bank record.

Properties

$mockMode

Use mocking for api calls ?

protected bool $mockMode = false

$pSUIPAddress

the end IP address of the client application (no server) in IPv4 or IPv6 format. If the bank client (your user) uses a browser by which he accesses your server app, we need to know the IP address of his browser.

protected string $pSUIPAddress = ''

Always provide the closest IP address to the real end-user possible. (optional).

$xIBMClientId

ClientID obtained from Developer Portal - when you registered your app with us.

protected string $xIBMClientId = ''

Methods

__construct()

Transaction Handler.

public __construct(string $bankAccount[, array<string|int, mixed> $options = [] ]) : mixed
Parameters
$bankAccount : string
$options : array<string|int, mixed> = []

checkCertificate()

public static checkCertificate(string $certFile, string $password) : bool
Parameters
$certFile : string
$password : string
Return values
bool

checkCertificatePassword()

public static checkCertificatePassword(string $certFile, string $password) : bool
Parameters
$certFile : string
$password : string
Return values
bool

checkCertificatePresence()

Try to check certificate readibilty.

public static checkCertificatePresence(string $certFile[, bool $die = false ]) : bool
Parameters
$certFile : string

path to certificate

$die : bool = false

throw exception or return false ?

Tags
throws
Exception
  • Certificate file not found
Return values
bool

certificate file

getCertificateSerialNumber()

Calculate and return the SHA1 fingerprint of the certificate used for mTLS.

public getCertificateSerialNumber() : string

This fingerprint is used as the client identifier for rate limiting, as rate limits in the API are tied to the certificate, not to X-IBM-Client-Id.

Tags
throws
Exception

if unable to read or parse the certificate

Return values
string

SHA1 fingerprint of the certificate in lowercase hex format

getMockMode()

Use mocking uri for api calls ?

public getMockMode() : bool
Return values
bool

getpSUIPAddress()

Keep user public IP here.

public getpSUIPAddress() : string
Return values
string

getPublicIP()

Obtain Your current Public IP.

public static getPublicIP() : string

since version 0.1 - Do not use in production Environment!

Return values
string

getTransactions()

Obtain Transactions from RB.

public getTransactions() : array<string|int, mixed>
Return values
array<string|int, mixed>

getXIBMClientId()

ClientID obtained from Developer Portal.

public getXIBMClientId() : string
Return values
string

getxRequestId()

Produce a short request identifier used for diagnostics and testing.

public static getxRequestId() : string

since version 0.1 — Do not use in production environments.

Return values
string

the generated request identifier composed from a source token and the current timestamp, truncated to at most 59 characters

import()

Import process itself.

public import() : void

send()

Send an HTTP request while enforcing and updating client rate limits.

public send(RequestInterface $request[, array<string|int, mixed> $options = [] ]) : ResponseInterface

Rate limits are enforced per certificate (not per X-IBM-Client-Id). The certificate fingerprint is used as the client identifier.

Parameters
$request : RequestInterface

the HTTP request to send

$options : array<string|int, mixed> = []

Request options to apply to the transfer. See \GuzzleHttp\RequestOptions.

Tags
throws
GuzzleException
RateLimitExceededException

if the client is rate limited and wait mode is disabled

Return values
ResponseInterface

the HTTP response

setScope()

Prepare processing interval.

public setScope(string $scope) : void
Parameters
$scope : string
Tags
throws
Exception

sourceString()

Source Identifier.

public static sourceString() : string

since version 0.1 - Do not use in production Environment!

Return values
string

takeTransactionData()

Use Transaction data for Bank record.

public takeTransactionData(array<string|int, mixed> $transactionData) : void
Parameters
$transactionData : array<string|int, mixed>
On this page

Search results