PaymentResult
in package
PaymentResult class.
Table of Contents
- $payment_details : string
- Array of details about the payment.
- $redirect_url : string
- Redirect URL for checkout.
- $status : string
- Current payment status.
- $valid_statuses : array<string|int, mixed>
- List of valid payment statuses.
- __construct() : mixed
- Constructor.
- __get() : mixed
- Magic getter for protected properties.
- set_payment_details() : mixed
- Set payment details.
- set_redirect_url() : mixed
- Set redirect URL.
- set_status() : mixed
- Set payment status.
Properties
$payment_details
Array of details about the payment.
protected
string
$payment_details
= []
$redirect_url
Redirect URL for checkout.
protected
string
$redirect_url
= ''
$status
Current payment status.
protected
string
$status
= ''
$valid_statuses
List of valid payment statuses.
protected
array<string|int, mixed>
$valid_statuses
= ['success', 'failure', 'pending', 'error']
Methods
__construct()
Constructor.
public
__construct([string $status = '' ]) : mixed
Parameters
- $status : string = ''
-
Sets the payment status for the result.
Return values
mixed —__get()
Magic getter for protected properties.
public
__get(string $name) : mixed
Parameters
- $name : string
-
Property name.
Return values
mixed —set_payment_details()
Set payment details.
public
set_payment_details([array<string|int, mixed> $payment_details = [] ]) : mixed
Parameters
- $payment_details : array<string|int, mixed> = []
-
Array of key value pairs of data.
Return values
mixed —set_redirect_url()
Set redirect URL.
public
set_redirect_url([array<string|int, mixed> $redirect_url = [] ]) : mixed
Parameters
- $redirect_url : array<string|int, mixed> = []
-
URL to redirect the customer to after checkout.
Return values
mixed —set_status()
Set payment status.
public
set_status(string $payment_status) : mixed
Parameters
- $payment_status : string
-
Status to set.