Developer Center

EN

Order

Default Parameters

In the following parameters "/" slash character is used to determine the array data under an array data.

Name Type Description
id int Order ID number
Database Field: users_products.id
name
string
Order Product Name
Database Field: users_producs.name
period
string
Order Period Type
(day, week, month, year)
Database Field: users_producs.period
period_time
int
Order Period Time
Database Field: users_producs.period_time
amount
float
Order Product Amount
Database Field: users_producs.amount
total_amount
float
Order Total Amount (Including Add-ons)
Database Field: users_producs.total_amount
amount_cid
int
Order Currency ID
Database Field: users_producs.amount_cid = currencies.id
status
string
Order Status
(waiting,inprocess,active,suspended,cancelled)
Database Field: users_producs.status
status_msg
string
Order Status Message
Database Field: users_producs.status_msg
pmethod
string
Order Payment Method
Database Field: users_producs.pmethod
cdate
date
Order First Payment Date (Y-M-D H:i:s)
Database Field: users_producs.cdate
renewaldate
date
Order Renewal Date (Y-M-D H:i:s)
Database Field: users_producs.renewaldate
duedate
date
Order Payment Due Date (Y-M-D H:i:s)
Database Field: users_producs.duedate
module
string
Name of Module Defined to Order
Database Field: users_producs.module
options
array
Order Configuration Settings
Database Field: users_producs.options
options / server_id
int
Server ID number to which the order is connected
Database Field: servers.id

Sample Usage

Hook::add("OrderApproved",1,function($params=[]){
// Modify Order Data:
// Orders::set($params["id"],['pmethod' => "BankTransfer",'name' => "Test"]);
// Write the code here...
});

OrderApproved

Called when an order is approved.

Return

Not supported

OrderActivated

Called when an order is activated.

Return

Not supported

OrderSuspended

Called when an order is suspended.

Return

Not supported

OrderCancelled

Called when an order is canceled.

Return

Not supported

OrderRenewed

Called when order is renewed (when the service period is extended).

Return

Not supported

PreOrderDeleted

Called before order is deleted.

Return

Not supported

OrderDeleted

Called when an order is deleted.

Return

Not supported

PreOrderModified

Called before order detail information is updated.

Return

The call value must return an "array" data type or "void".

Hook::add("PreOrderModified",1,function($params=[]){
return ['error' => 'write something here...'];
});

 

OrderModified

Called after order detail information is updated.

Return

The call value must return an "array" data type or "void".

Hook::add("OrderModified",1,function($params=[]){
return ['error' => 'write something here...'];
});

 

OrderCancellationRequest

Called when order cancelation request is sent.

Return

Not supported

 

OrderDownload

The order delivery file is called when it is downloading, you can also define a delivery file to the order.

Return

Hook::add("OrderDownload",1,function($params=[]){
// $params["download_file"] // ex: /home/hostuser/public_html/test.zip
// $params["download_link"] // ex: https://example.com/test.zip
});

The return value must be boolean = false or an array, and the return value must be the same as the key values in the  $params  variable.
You can define a new download_file path or new download_link in the array variable.

 

Client Addon

Do you have any questions?

Feel free to contact us
Contact Us
Copyright © 2020. All rights reserved.
Join Our Discord Channel
Top