-
-
Notifications
You must be signed in to change notification settings - Fork 20
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 ornull
if not set.
public function success(): bool
- Description: Determines if the payment was successful.
-
Returns:
bool
-true
if the payment was successful, otherwisefalse
.
public function failed(): bool
- Description: Determines if the payment failed.
-
Returns:
bool
-true
if 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 ornull
if not applicable.
public function sessionKey(): ?string
- Description: Gets the session key of the payment response.
-
Returns:
string|null
- The session key ornull
if not set.
public function gatewayList(): ?array
- Description: Gets the list of available gateways.
-
Returns:
array|null
- An array of available gateways ornull
if 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 ornull
if not available.
public function redirectGatewayURL(): ?string
- Description: Gets the URL to redirect to the gateway.
-
Returns:
string|null
- The redirection URL to the gateway ornull
if 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 ornull
if 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 ornull
if not available.
public function directPaymentURL(): ?string
- Description: Gets the direct payment URL.
-
Returns:
string|null
- The direct payment URL ornull
if 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 ornull
if not available.
public function storeBanner(): ?string
- Description: Gets the store banner URL.
-
Returns:
string|null
- The URL of the store banner ornull
if not available.
public function storeLogo(): ?string
- Description: Gets the store logo URL.
-
Returns:
string|null
- The URL of the store logo ornull
if not available.
public function description(): ?array
- Description: Gets the description array.
-
Returns:
array|null
- An array of descriptions ornull
if not available.
public function toArray(): ?array
- Description: Gets the raw response data.
-
Returns:
array|null
- The raw response data ornull
if not available.