Last updated
Last updated
You can easily integrate PRIZM into your project, online store, exchanger and etc.
The software can run on one server as well as on different servers. However it's better to launch it on the one for your convenience.
Firstly, you should launch the node and wait while it syncs. The next step is configuration of the PrizmAPIServlet module.
The description of work with receiving and sending coins, with examples of ready-made functions and description of the principles of work. The Mysql database is used to store the transaction list, there is a dump of the storage table below, along with examples of code to work with the table (if you apply QueryBuilder, it won't be a problem).
There is a script in the Cron-task that makes a request to the servlet every 2-5 minutes so it could receive new transactions on the wallet of the store. Having received the list of transactions, you should save them to the local database. If there are no operations in the database, you should run the command without any parameter. However if you wish to receive new transactions, you should send the number of the last transaction that you have as a parameter.
In this example you receive the list of new transactions that should be saved to the local database.
Therefore, you keep a history of all transactions on the wallet and in the future you will search for them in our local database using key data.
Thus, there should be another process that will analyze new incoming transactions and deposit coins to the internal account if the payment comment has a hash identifier of the client. Also you need to make a separate "I PAID" button for the client which could search and record new transactions for this user after making click on it.
Getting public key for the wallet (works only for activated wallets having balance).
File
Configuration
PrizmAPIServlet.properties
in the line passphrase: NONE
instead of NONE you should write the private key of the wallet that will be used by your project.
After you have filled in the fields, you should launch the servlet through
run-servlet.sh
in the line sendkey: NONE
instead of NONE you should write the password (it will be used by the function of coin sending as an additional protection from unauthorized transactions).
Prizm crypto-system integration guideline.