and drop the bzzz_terminal folder into your server resources folder.
Drop the horizon_paymentsystem folder into your server resources folder.
Add these lines to your server.cfg:
start bzzz_terminal
start horizon_paymentsystem
Configure the script if needed.
Restart your server.
Requirements
ESX Legacy/QBCore
Integration into other resources
Horizon Payment System allows easy integration of payment via terminal into other resources such as a shop, car dealership or any other script.
Export on the client side
exports["horizon_paymentSystem"]:startPayment(
"SELLER NAME", -- Seller name (e.g. 24/7 Store, Premium Deluxe Motorsport)
PAYMENT AMOUNT, -- Total amount of the payment
{ -- List of items that will appear on the receipt (could be nil)
{item = "ITEM NAME #1", price = TOTAL PRICE, amount = AMOUNT} -- "amount" could be nil
{item = "ITEM NAME #2", price = TOTAL PRICE, amount = AMOUNT} -- "amount" could be nil
},
{ -- OnSuccess event, triggered by successful payment
event = "EVENT_NAME", args = {ARG1 = "ARGUMENT #1", ARG2 = "ARGUMENT #2"}
},
{ -- OnFail event, triggered by unsuccessful payment
event = "EVENT_NAME", args = {ARG1 = "ARGUMENT #1", ARG2 = "ARGUMENT #2"}
}
)
Export on the server side
exports["horizon_paymentSystem"]:startPayment(
PLAYER, -- Player id who receives the payment request
"SELLER NAME", -- Seller name (e.g. 24/7 Store, Premium Deluxe Motorsport)
PAYMENT AMOUNT, -- Total amount of the payment
{ -- List of items that will appear on the receipt (could be nil)
{item = "ITEM NAME #1", price = TOTAL PRICE, amount = AMOUNT} -- "amount" could be nil
{item = "ITEM NAME #2", price = TOTAL PRICE, amount = AMOUNT} -- "amount" could be nil
},
{ -- OnSuccess event, triggered by successful payment (could be nil)
event = "EVENT_NAME", args = {ARG1 = "ARGUMENT #1", ARG2 = "ARGUMENT #2"}
},
{ -- OnFail event, triggered by unsuccessful payment (could be nil)
event = "EVENT_NAME", args = {ARG1 = "ARGUMENT #1", ARG2 = "ARGUMENT #2"}
}
)
Horizon Payment System will not calculate the total amount of the payment from the subtotal of each item, nor will it calculate the subtotal of each item based on the number of items. These calculations must be done separately.
The specified onSuccess / onFail event will be interpreted as a client-side event if the export is triggered on the client side and as a server-side event if the export is triggered on the server side.
This behaviour can be overridden by specifying the value of "side" in the table containing the onSuccess / onFail event.