-
-
Notifications
You must be signed in to change notification settings - Fork 24
PaymentResponse
Raziul Islam edited this page Sep 5, 2024
·
1 revision
Raziul\Sslcommerz\Data
The PaymentResponse class represents the response received from SSLCommerz after initiating payment via Raziul\Sslcommerz\Facades\Sslcommerz::makePayment().
It provides methods to retrieve various information related to the payment/transaction, such as its status, failure reasons, URLs for payment redirection, and more.
public function status(): ?string- Description: Returns the status of the payment response in lowercase.
-
Returns:
string|null- The status of the payment ornullif not set.
public function success(): bool- Description: Determines if the payment was successful.
-
Returns:
bool-trueif the payment was successful, otherwisefalse.
public function failed(): bool- Description: Determines if the payment failed.
-
Returns:
bool-trueif the payment failed, otherwisefalse.
public function failedReason(): ?string- Description: Gets the reason for the payment failure.
-
Returns:
string|null- The reason for the payment failure ornullif not applicable.
public function sessionKey(): ?string- Description: Gets the session key of the payment response.
-
Returns:
string|null- The session key ornullif not set.
public function gatewayList(): ?array- Description: Gets the list of available gateways.
-
Returns:
array|null- An array of available gateways ornullif not available.
public function gatewayPageURL(): ?string- Description: Gets the gateway page URL where the user can complete the payment. Users should be redirected to this URL.
-
Returns:
string|null- The URL of the gateway page ornullif not available.
public function redirectGatewayURL(): ?string- Description: Gets the URL to redirect to the gateway.
-
Returns:
string|null- The redirection URL to the gateway ornullif not available.
public function directPaymentURLBank(): ?string- Description: Gets the direct payment URL for bank payments.
-
Returns:
string|null- The direct payment URL for bank payments ornullif not available.
public function directPaymentURLCard(): ?string- Description: Gets the direct payment URL for card payments.
-
Returns:
string|null- The direct payment URL for card payments ornullif not available.
public function directPaymentURL(): ?string- Description: Gets the direct payment URL.
-
Returns:
string|null- The direct payment URL ornullif not available.
public function redirectGatewayURLFailed(): ?string- Description: Gets the URL to redirect to if the gateway fails.
-
Returns:
string|null- The URL to redirect in case of gateway failure ornullif not available.
public function storeBanner(): ?string- Description: Gets the store banner URL.
-
Returns:
string|null- The URL of the store banner ornullif not available.
public function storeLogo(): ?string- Description: Gets the store logo URL.
-
Returns:
string|null- The URL of the store logo ornullif not available.
public function description(): ?array- Description: Gets the description array.
-
Returns:
array|null- An array of descriptions ornullif not available.
public function toArray(): ?array- Description: Gets the raw response data.
-
Returns:
array|null- The raw response data ornullif not available.