Enabling the Payment Gateway
The following attributes are required for arranging the payment acceptance through Relictum Pay:
White node.
Encryption keys.
Payment contract registered in the White node.
Relictum PHP SDK.
1. White Node
A White node is a node with a public IP address, which can be used to arrange any private home server for publishing on the Internet.
Installation guide on Medium.
2. Encryption Keys
Access keys must be generated for authorization on the node when performing invoicing requests and asset transfers.
Type the following commands in the console one by one:
Step-by-step instructions can be found below:
Step 1. First command.
Step 2. Result.
Step 3. Second command.
Step 4. Result.
The keys will be generated as a result. They will look as follows in the folder:
You need to rename the key.pub file to match your contract URI in order to issue invoices via RelictumPay. The file name must exclude "system://" and include the "-" character as a delimiter. Move it to the root directory of the node.
Example: your contract is system://payments/mycontract . In this case, the file (key) must be named payments-mycontract.pub .
Arranging payments from the node:
The key.pub file must be renamed into transfer.pub in order to send GTNs;
The key.pub file must be renamed into transfer2.pub in order to send any other tokens.
An example of a folder with a node with files is below:
When authorizing a request, the .key file corresponding to its .pub key pair must be sent along with the data.
This is another way to create an invoice for a customer via a php smart contract using our SDK:
Result:
3. Relictum PHP SDK
If you use PHP in your project, the SDK will help you set up this process.
Installation. Enter the command in the console:
If you use versions from >=PHP8, you must add the disable version checking flag, otherwise the installation will fail:
You can also make requests in other languages or in other ways. The above sequence works for PHP.
Example of a node with an enabled payment contract and a detailed example of PHP scripts.
4. Registration of a Payment Contract in the White Node
Go to Products -> Payment contract -> Add contract
Fill in the following fields:
System name of the contract: any name in Latin in lower case, preferably in one word;
Supplier: select any name, preferably a short one, as it will be visible in the RelictumPay section as the object issuing the invoice. If the supplier name is long, it will cause line folding, so it is advisable to use a short one).
Result:
You will be charged 50 USDR after you create and save a payment contract.
Example of sending a request via the console:
Last updated