Class to handle Void Payment Requests.
More...
Class to handle Void Payment Requests.
◆ __construct()
| __construct |
( |
callable |
$ivGenerator = null | ) |
|
◆ encryption()
Encrypts the void request data for secure transmission.
- Exceptions
-
Exception If encryption fails or IV generation fails.
@psalm-suppress TypeDoesNotContainType
◆ getEncryptedRequest()
Gets the encrypted request string.
- Returns
- string|null The encrypted request or null if not set.
◆ getFormattedReq()
Gets the formatted request string.
- Returns
- string|null The formatted request or null if not set.
◆ getHttpQuery()
Gets the HTTP query string of the request.
- Returns
- string|bool 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 Void request.
- Returns
- Response|null The response or null if not set.
◆ initVoidPaymentRequest()
| initVoidPaymentRequest |
( |
int |
$merchantId, |
|
|
string |
$merchantPassword, |
|
|
array |
$otherConfigurations, |
|
|
bool|null |
$production, |
|
|
string|null |
$baseUrl |
|
) |
| |
Initializes a void payment request with necessary parameters.
- Parameters
-
| int | $merchantId | Merchant ID. |
| string | $merchantPassword | Merchant password. |
| array | $otherConfigurations | Additional configurations. |
| bool | null | $production | Indicates if the request is for production. |
| string | null | $baseUrl | Base URL for the request. |
◆ requestCurl()
| requestCurl |
( |
string |
$url, |
|
|
array |
$data_url, |
|
|
array |
$headers |
|
) |
| |
◆ sendRequest()
Sends the void request to the server.
- Returns
- array An array containing the result and response of the request.
- Exceptions
-
| NetworkException | If a network error occurs during the request. |
◆ $base64Iv
◆ $encryptedRequest
| string $encryptedRequest = null |
◆ $formattedRequest
| string $formattedRequest = null |
◆ $httpQuery
◆ $iv
◆ $merchantId
◆ $merchantPassword
| string $merchantPassword = '' |
◆ $response
◆ $signature
The documentation for this class was generated from the following file: