From 4ad4781be05e1e306519c3305c328da48e3ac910 Mon Sep 17 00:00:00 2001 From: Christian Weiske <cweiske@cweiske.de> Date: Thu, 5 Jun 2025 18:36:27 +0200 Subject: [PATCH] More game purchase explanation --- README.rst | 1 + ...e-xxx-init-transaction-do.real-response1.json | 1 + ...nit-transaction-do.real-response1.pretty.json | 16 ++++++++++++++++ ...llet-payment-game-xxx-init-transaction-do.rst | 7 +++++++ api/payments.rst | 9 +++++++++ 5 files changed, 34 insertions(+) create mode 100644 api/l2.gamestickservices.net/api-rest-wallet-payment-game-xxx-init-transaction-do.real-response1.json create mode 100644 api/l2.gamestickservices.net/api-rest-wallet-payment-game-xxx-init-transaction-do.real-response1.pretty.json create mode 100644 api/payments.rst diff --git a/README.rst b/README.rst index 897bf0c..54498f8 100644 --- a/README.rst +++ b/README.rst @@ -53,6 +53,7 @@ Leaderboards Payments ******** +.. include:: api/payments.rst .. include:: api/l2.gamestickservices.net/api-rest-wallet-payment-game-xxx-init-transaction-do.rst .. include:: api/l2.gamestickservices.net/api-rest-wallet-payment-topupwallet-init-transaction-do.rst diff --git a/api/l2.gamestickservices.net/api-rest-wallet-payment-game-xxx-init-transaction-do.real-response1.json b/api/l2.gamestickservices.net/api-rest-wallet-payment-game-xxx-init-transaction-do.real-response1.json new file mode 100644 index 0000000..d5fbf4f --- /dev/null +++ b/api/l2.gamestickservices.net/api-rest-wallet-payment-game-xxx-init-transaction-do.real-response1.json @@ -0,0 +1 @@ +{"sid":"FD53B9B5F420D3C368ED22FB6CF06425","body":{"success":true,"message":"We have the Money","action":"INITPAYMENT","pageUrl":"http://l2.gamestickservices.net:80/api/webview/wallet/payment/object/GAME/do/view.html;jsessionid=FD53B9B5F420D3C368ED22FB6CF06425?trxid=95e86a16-fa17-4c91-b6cb-2d7bcb7f3296&action=CONFIRM_DIALOG"},"time":"1407016974405","lastaccessed":1407016974251,"x-forwarded-for":null,"created":1407016053631,"accessCount":29,"addr":"10.37.137.31","remoteaddr":"86.145.176.85"} \ No newline at end of file diff --git a/api/l2.gamestickservices.net/api-rest-wallet-payment-game-xxx-init-transaction-do.real-response1.pretty.json b/api/l2.gamestickservices.net/api-rest-wallet-payment-game-xxx-init-transaction-do.real-response1.pretty.json new file mode 100644 index 0000000..866609c --- /dev/null +++ b/api/l2.gamestickservices.net/api-rest-wallet-payment-game-xxx-init-transaction-do.real-response1.pretty.json @@ -0,0 +1,16 @@ +{ + "sid": "FD53B9B5F420D3C368ED22FB6CF06425", + "body": { + "success": true, + "message": "We have the Money", + "action": "INITPAYMENT", + "pageUrl": "http://l2.gamestickservices.net:80/api/webview/wallet/payment/object/GAME/do/view.html;jsessionid=FD53B9B5F420D3C368ED22FB6CF06425?trxid=95e86a16-fa17-4c91-b6cb-2d7bcb7f3296&action=CONFIRM_DIALOG" + }, + "time": "1407016974405", + "lastaccessed": 1407016974251, + "x-forwarded-for": null, + "created": 1407016053631, + "accessCount": 29, + "addr": "10.37.137.31", + "remoteaddr": "86.145.176.85" +} diff --git a/api/l2.gamestickservices.net/api-rest-wallet-payment-game-xxx-init-transaction-do.rst b/api/l2.gamestickservices.net/api-rest-wallet-payment-game-xxx-init-transaction-do.rst index 2de2a98..1391695 100644 --- a/api/l2.gamestickservices.net/api-rest-wallet-payment-game-xxx-init-transaction-do.rst +++ b/api/l2.gamestickservices.net/api-rest-wallet-payment-game-xxx-init-transaction-do.rst @@ -37,12 +37,19 @@ Everything must be on one single line! { "body": { "success": true, + "message": "We have the Money", + "action": "INITPAYMENT", "pageUrl": "xxx" } } ``pageUrl`` must point to a HTML page showing the "purchase confirmation" screen. +Real response (prettyfied): + +.. include:: api-rest-wallet-payment-game-xxx-init-transaction-do.real-response1.pretty.json + :code: + Purchase confirmation --------------------- diff --git a/api/payments.rst b/api/payments.rst new file mode 100644 index 0000000..8fee71c --- /dev/null +++ b/api/payments.rst @@ -0,0 +1,9 @@ +===================== +Game purchase process +===================== + +1. User clicks "buy game" +2. `GET http://l2.gamestickservices.net/api/rest/wallet/payment/game/xxx/init-transaction/do/view.json`_ is called +3. HTML page linked in init-transaction is called +4. User confirms purchase +5. Purchase confirmation/cancellation API is called -- 2.30.2