EPG PHP SDK
Loading...
Searching...
No Matches
CreateRefundRequest Class Reference

Public Member Functions

 __construct (callable $ivGenerator=null)
 
 initRefundPaymentRequest (int $merchantId, string $merchantPassword, array $otherConfigurations, bool|null $production, string|null $baseUrl)
 Initializes a refund payment request with necessary parameters.
 
 requestCurl (string $url, array $data_url, array $headers)
 
 encryption ()
 Encrypts the refund request data for secure transmission.
 
 sendRequest ()
 Sends the refund request to the server.
 
 getHttpQuery ()
 Gets the HTTP query string of the request.
 
 getFormattedReq ()
 Gets the formatted request string.
 
 getOtherConfigurations ()
 Gets the payment request data.
 
 getEncryptedRequest ()
 Gets the encrypted request string.
 
 getResponse ()
 Retrieves the response of the refund request.
 

Public Attributes

int $merchantId = null
 
string $merchantPassword = ''
 
string $httpQuery = ''
 
string $formattedRequest = null
 
string $iv = null
 
string $base64Iv = null
 
string $encryptedRequest = null
 
string $signature = null
 
string $response = null
 

Constructor & Destructor Documentation

◆ __construct()

__construct ( callable  $ivGenerator = null)

Member Function Documentation

◆ encryption()

encryption ( )

Encrypts the refund request data for secure transmission.

Exceptions

Exception If encryption fails or IV generation fails.

@psalm-suppress TypeDoesNotContainType

◆ getEncryptedRequest()

getEncryptedRequest ( )

Gets the encrypted request string.

Returns
string|null The encrypted request or null if not set.

◆ getFormattedReq()

getFormattedReq ( )

Gets the formatted request string.

Returns
string|null The formatted request or null if not set.

◆ getHttpQuery()

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()

getResponse ( )

Retrieves the response of the refund request.

Returns
Response|null The response or null if not set.

◆ initRefundPaymentRequest()

initRefundPaymentRequest ( int  $merchantId,
string  $merchantPassword,
array  $otherConfigurations,
bool|null  $production,
string|null  $baseUrl 
)

Initializes a refund payment request with necessary parameters.

Parameters
int$merchantIdMerchant ID.
string$merchantPasswordMerchant password.
array$otherConfigurationsAdditional configurations.
bool | null$productionIndicates if the request is for production.
string | null$baseUrlBase URL for the request.

◆ requestCurl()

requestCurl ( string  $url,
array  $data_url,
array  $headers 
)

◆ sendRequest()

sendRequest ( )

Sends the refund request to the server.

Returns
array An array containing the result and response of the request.
Exceptions
NetworkExceptionIf a network error occurs during the request.

Member Data Documentation

◆ $base64Iv

string $base64Iv = null

◆ $encryptedRequest

string $encryptedRequest = null

◆ $formattedRequest

string $formattedRequest = null

◆ $httpQuery

string $httpQuery = ''

◆ $iv

string $iv = null

◆ $merchantId

int $merchantId = null

◆ $merchantPassword

string $merchantPassword = ''

◆ $response

string $response = null

◆ $signature

string $signature = null

The documentation for this class was generated from the following file: