Skip to content
vadimicus edited this page Apr 13, 2018 · 3 revisions

Start guide:

Server use Socket.io

Socket Params

Example of android socket.io setup params:

Socket Events

"event:receiver:on"  //send client to become receiver
Expected JSON:
{"user_id":"some_string_user_id","currency_id":0,"amount":123456567,"user_code":"123456"}
!!!! USER_CODE is the STRING !!!!

"event:new:receiver"   //send server to sender to notify that there is new receiver
Expected JSON:
{"user_id":"some_string_user_id","currency_id":0,"amount":123456567,"user_code":"123456"}
!!!! USER_CODE is the STRING !!!!
"event:sender:on"  //send client to the server for become an sender
Expected JSON:
{"user_code":"123456","user_id":"some_user_id"}

"event:pay"   //sender emit this event when found the receiver and make payment
Expected JSON:
{"from_id":"sender_id","to_id":"receiver_id","currency_id":"0","amount":"1233456778"}
"event:payment:send"   //receiver should listen this event for process payment from sender
Expected JSON:
{"from_id":"sender_id","to_id":"receiver_id","currency_id":"0","amount":"1233456778"}

Clone this wiki locally