Logidav Docs

EzynessEscrowService
in package

Service for managing escrow balance distribution with eZyness (Banque Postale Française).

Table of Contents

Properties

$apiBaseUrl  : mixed
$authToken  : mixed
$banksDistributionConfig  : array<string|int, mixed>|mixed
$cashInAccountId  : mixed|null
$clientId  : mixed
$clientSecret  : mixed
$container  : ContainerInterface
$distributionConfig  : mixed
$escrowAccountId  : mixed
$payoutConfig  : array<string|int, mixed>|mixed

Methods

__construct()  : mixed
distributeEscrowBalance()  : void
Handles the escrow fund distribution logic.
executeInternalTransferRequest()  : array<string|int, mixed>|bool
Execute an API call to transfer funds based on a prepared payload.
executePayoutRequest()  : array<string|int, mixed>|bool
Execute an API call to transfer funds based on a prepared payload.
getAccountBalance()  : int
Retrieve the balance of a specific account.
getAccountDetails()  : mixed
Retrieve external references for a specific account.
getAccountExternalReferences()  : int
Retrieve external references associated with a specific account.
getAccounts()  : int
Retrieves accounts via the API.
getCashInAccountId()  : mixed|null
getEscrowAccountId()  : mixed|null
getEscrowBalance()  : int
Retrieves the escrow account balance via the API.
getRecipientsByUserId()  : int
Retrieves accounts via the API.
getTransactionDetails()  : string|null
Retrieve transaction details by transaction ID.
listTransactions()  : array<string|int, mixed>
List all transactions with optional filters
moveMoneyFromEscrowToTheOtherBanks()  : void
Handles the escrow fund distribution logic.
roundToCorrectTenMillion()  : mixed
testAmine()  : array<string|int, mixed>|bool
Execute an API call to transfer funds based on a prepared payload.
authenticate()  : string
Authenticates with Payline (eZyness API).
buildPayoutPayload()  : array<string|int, mixed>
Build the payload for transferring funds.
buildTransfer()  : array<string|int, mixed>
Build the payload for transferring funds.
getAuthToken()  : string|null
Retrieves the authentication token.
transferFunds()  : void
Transfer funds between accounts.
transferPayoutFunds()  : void
Transfer funds between accounts.

Properties

$banksDistributionConfig

private array<string|int, mixed>|mixed $banksDistributionConfig

Methods

__construct()

public __construct(ContainerInterface $container) : mixed
Parameters
$container : ContainerInterface

distributeEscrowBalance()

Handles the escrow fund distribution logic.

public distributeEscrowBalance() : void

executeInternalTransferRequest()

Execute an API call to transfer funds based on a prepared payload.

public executeInternalTransferRequest(array<string|int, mixed> $payload) : array<string|int, mixed>|bool
Parameters
$payload : array<string|int, mixed>

The payload to send to the API.

Tags
throws
Exception

When the API call fails.

Return values
array<string|int, mixed>|bool

Response from the API or false on failure.

executePayoutRequest()

Execute an API call to transfer funds based on a prepared payload.

public executePayoutRequest(array<string|int, mixed> $payload) : array<string|int, mixed>|bool
Parameters
$payload : array<string|int, mixed>

The payload to send to the API.

Tags
throws
Exception

When the API call fails.

Return values
array<string|int, mixed>|bool

Response from the API or false on failure.

getAccountBalance()

Retrieve the balance of a specific account.

public getAccountBalance(mixed $accountId) : int
Parameters
$accountId : mixed

The unique identifier for the account whose balance is being retrieved.

Tags
throws
GuzzleException
Return values
int

The account balance in cents.

getAccountDetails()

Retrieve external references for a specific account.

public getAccountDetails(string|int $accountId) : mixed
Parameters
$accountId : string|int

The unique identifier of the account whose details are to be retrieved.

getAccountExternalReferences()

Retrieve external references associated with a specific account.

public getAccountExternalReferences(mixed $accountId) : int
Parameters
$accountId : mixed

The unique identifier of the account to fetch external references for.

Tags
throws
Exception

When the API call fails or the expected data is not retrieved.

Return values
int

The external references count or balance value in cents.

getAccounts()

Retrieves accounts via the API.

public getAccounts() : int
Tags
throws
GuzzleException
Return values
int

The balance in cents

getEscrowBalance()

Retrieves the escrow account balance via the API.

public getEscrowBalance() : int
Tags
throws
GuzzleException
Return values
int

The balance in cents

getRecipientsByUserId()

Retrieves accounts via the API.

public getRecipientsByUserId(mixed $userId) : int
Parameters
$userId : mixed
Tags
throws
GuzzleException
Return values
int

The balance in cents

getTransactionDetails()

Retrieve transaction details by transaction ID.

public getTransactionDetails(string $transactionId) : string|null
Parameters
$transactionId : string

The ID of the transaction to retrieve details for.

Tags
throws
Exception
Return values
string|null

The ID of the matching accounting entry associated with the transaction, or null if no match is found.

listTransactions()

List all transactions with optional filters

public listTransactions([array<string|int, mixed> $params = [] ]) : array<string|int, mixed>
Parameters
$params : array<string|int, mixed> = []

Optional parameters to filter transactions

Tags
throws
Exception
Return values
array<string|int, mixed>

Response containing transaction list

moveMoneyFromEscrowToTheOtherBanks()

Handles the escrow fund distribution logic.

public moveMoneyFromEscrowToTheOtherBanks() : void

roundToCorrectTenMillion()

public roundToCorrectTenMillion(mixed $number) : mixed
Parameters
$number : mixed

testAmine()

Execute an API call to transfer funds based on a prepared payload.

public testAmine(array<string|int, mixed> $payload) : array<string|int, mixed>|bool
Parameters
$payload : array<string|int, mixed>

The payload to send to the API.

Tags
throws
Exception

When the API call fails.

Return values
array<string|int, mixed>|bool

Response from the API or false on failure.

authenticate()

Authenticates with Payline (eZyness API).

private authenticate() : string
Tags
throws
Exception

When authentication fails

Return values
string

The access token

buildPayoutPayload()

Build the payload for transferring funds.

private buildPayoutPayload(string $srcAccount, string $dstAccount, int $amount[, string|null $externalId = null ][, mixed $purpose = null ]) : array<string|int, mixed>
Parameters
$srcAccount : string

Source account ID.

$dstAccount : string

Destination account ID.

$amount : int

Amount to transfer (in cents).

$externalId : string|null = null

External ID (generated if not provided).

$purpose : mixed = null
Return values
array<string|int, mixed>

The prepared payload.

buildTransfer()

Build the payload for transferring funds.

private buildTransfer(string $srcAccount, string $dstAccount, int $amount[, string|null $externalId = null ]) : array<string|int, mixed>
Parameters
$srcAccount : string

Source account ID.

$dstAccount : string

Destination account ID.

$amount : int

Amount to transfer (in cents).

$externalId : string|null = null

External ID (generated if not provided).

Return values
array<string|int, mixed>

The prepared payload.

getAuthToken()

Retrieves the authentication token.

private getAuthToken() : string|null
Return values
string|null

transferFunds()

Transfer funds between accounts.

private transferFunds(string $srcAccount, string $dstAccount, int $amount[, string|null $externalId = null ]) : void
Parameters
$srcAccount : string

Source account ID.

$dstAccount : string

Destination account ID.

$amount : int

Amount to transfer (in cents).

$externalId : string|null = null
Tags
throws
Exception

If transfer fails.

transferPayoutFunds()

Transfer funds between accounts.

private transferPayoutFunds(string $srcAccount, string $dstAccount, int $amount[, string|null $externalId = null ][, mixed $purpose = null ]) : void
Parameters
$srcAccount : string

Source account ID.

$dstAccount : string

Destination account ID.

$amount : int

Amount to transfer (in cents).

$externalId : string|null = null
$purpose : mixed = null
Tags
throws
Exception

If transfer fails.


        
On this page

Search results