From 5c77a9871b97318f678fd653826aefe5ba531cb9 Mon Sep 17 00:00:00 2001 From: einhornimmond Date: Tue, 23 Feb 2021 13:32:10 +0100 Subject: [PATCH] add ajax transfer function to community server and api doc md --- community_server | 2 +- docu/community-server.api.md | 31 ++++++++++++++++++++++++++++++- 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/community_server b/community_server index 8cbfecc98..164e1e715 160000 --- a/community_server +++ b/community_server @@ -1 +1 @@ -Subproject commit 8cbfecc988d3b4f815daa496c9bff854a6758d99 +Subproject commit 164e1e715bd773814fba10dade7a4b3aff65d0ed diff --git a/docu/community-server.api.md b/docu/community-server.api.md index 983caa8c2..329881fda 100644 --- a/docu/community-server.api.md +++ b/docu/community-server.api.md @@ -60,4 +60,33 @@ Wenn alles okay: - transactionExecutingCount: how many transaction for this user currently pending and waiting for signing - count: sum of finished transactions user is involved - gdtSum: sum of gdt of user in cent with 2 places (Nachkommastellen) -- timeUsed: time used for getting data from db in seconds, only for analyse backend performance \ No newline at end of file +- timeUsed: time used for getting data from db in seconds, only for analyse backend performance + +## Send Coins Transaction +Make a simple GDD Transaction, send Coins from one user to other. +With new Option set in Login-Server: +```ini +unsecure.allow_auto_sign_transactions = 1 +``` +transactions can be auto-signed directly with handing in transaction. +Normally a forwarding to login-server check transactions side is neccessary to minimize security risks. + +POST http://localhost/transaction-send-coins/ajaxCreate +```json +{"session_id" : -127182, "amount": 2000000, "email": "maxim.mustermann@gmail.com", "memo":"Thank you :)"} +``` +- amout: amount to transfer, 2000000 = 200,00 GDD +- email: receiver email address, must be differ from user email +- memo: Details about transaction + +return if everything is ok: +```json +{"state":"success", "timeUsed": 0.0122} +``` +- timeUsed: time used for getting data from db in seconds, only for analyse backend performance + +Than the transaction was created on community server, send to login-server, signed (if unsecure.allow_auto_sign_transactions = 1) +and send back to community server and put into db. +After you get this answear you see the new transaction if you list transactions or call for the balance + +