|
| | __construct (callable $ivGenerator=null) |
| |
| | initRedirectionPaymentRequest (int $merchantId, string $merchantPassword, array $otherConfigurations, bool|null $production, string|null $baseUrl) |
| | Initializes the payment request with necessary parameters.
|
| |
| | encryption () |
| | Encrypts the request data using AES-256-CBC encryption.
|
| |
| | requestCurl (string $url, array $data_url, array $headers) |
| |
| | sendRequest () |
| | Sends the encrypted request to the Addon Payments API and processes the response.
|
| |
| | getHttpQuery () |
| | Gets the HTTP query string of the request.
|
| |
| | getFormattedReq () |
| | Gets the formatted request data.
|
| |
| | getOtherConfigurations () |
| | Gets the payment request data.
|
| |
| | getEncryptedRequest () |
| | Gets the encrypted request data.
|
| |
| | getResponse () |
| | Retrieves the response of the Hosted request.
|
| |
◆ __construct()
| __construct |
( |
callable |
$ivGenerator = null | ) |
|
◆ encryption()
Encrypts the request data using AES-256-CBC encryption.
This method generates an IV (initialization vector) and encrypts the request data along with it. It also computes a SHA256 hash signature of the formatted request data.
- Exceptions
-
Exception If encryption fails or IV generation fails.
@psalm-suppress TypeDoesNotContainType
◆ getEncryptedRequest()
Gets the encrypted request data.
- Returns
- string|null Returns the encrypted request data or null if not set.
◆ getFormattedReq()
Gets the formatted request data.
- Returns
- string|null Returns the formatted request data or null if not set.
◆ getHttpQuery()
Gets the HTTP query string of the request.
- Returns
- string|bool Returns the HTTP query string or false if not set.
◆ getOtherConfigurations()
| getOtherConfigurations |
( |
| ) |
|
Gets the payment request data.
- Returns
- array Returns payment request data array.
◆ getResponse()
Retrieves the response of the Hosted request.
- Returns
- Response|null The response or null if not set.
◆ initRedirectionPaymentRequest()
| initRedirectionPaymentRequest |
( |
int |
$merchantId, |
|
|
string |
$merchantPassword, |
|
|
array |
$otherConfigurations, |
|
|
bool|null |
$production, |
|
|
string|null |
$baseUrl |
|
) |
| |
Initializes the payment request with necessary parameters.
- Parameters
-
| int | $merchantId | Merchant ID provided by the Addon Payments platform. |
| string | $merchantPassword | Merchant password for authentication. |
| array | $otherConfigurations | Additional configurations for the request. |
| bool | null | $production | Flag to indicate if the environment is production or staging. |
| string | null | $baseUrl | Base URL for the API requests. |
◆ requestCurl()
| requestCurl |
( |
string |
$url, |
|
|
array |
$data_url, |
|
|
array |
$headers |
|
) |
| |
◆ sendRequest()
Sends the encrypted request to the Addon Payments API and processes the response.
This method constructs the full request with headers and encrypted data, sends it using cURL, and processes the response.
- Returns
- array Contains the result and response data from the API.
- Exceptions
-
| NetworkException | If a network-related error occurs. |
| |
Exception If response handling fails or no response data is received.
◆ $base64Iv
◆ $encryptedRequest
| string $encryptedRequest = null |
◆ $formattedRequest
| string $formattedRequest = null |
◆ $httpQuery
◆ $iv
◆ $merchantId
◆ $merchantPassword
| string $merchantPassword = '' |
◆ $redirectUrl
| string $redirectUrl = null |
◆ $signature
The documentation for this class was generated from the following file: