/
Wallet integration guide

Wallet integration guide

Functions marked with * are mandatory, other functions are optional


Before we start with wallet integration please provide us with two sets (staging,production) of the following:

  • An Ip list for us to whitelist

After we whitelist addresses we will provide you following details:

  • Api Endpoint url
  • Api credentials


To help you started, we have created a gadget: Tool for faster integration


The dev.example.com domain in this document is not to be confused with the real domain. Please see email with api credentials for real development/production domain name.

All calls can be executed either via the Xapi class provided to you, or using a REST service (POST request, JSON response combination).

Rest service can be called by calling the url http://dev.example.com:8090/soap/gameproviderrest/.
Please see 'REST REQUEST' and 'REST RESPONSE' sections of every available method for information how to implement the REST service, rest responses can be formated using the 'render' parameter (not listed below) which can accept two values, 'json' and 'text'.
Example responses for REST are provided for 'render' type 'json'.

You can use following rest testing form to start with integration:

<html>
    <body>
        <form action="http://dev.example.com/soap/gameproviderrest/" method="POST">
            api username:<input type="text" name="api_login" value="">
            api password:<input type="text" name="api_password" value="">
            <select name="method">
                <option value="giveMoney">giveMoney</option>
                <option value="takeMoney">takeMoney</option>
                <option value="getPlayerBalance">getPlayerBalance</option>
                <option value="getDailyReport">getDailyReport</option>
                <option value="getDailyBalances">getDailyBalances</option>
                <option value="playerExists">playerExists</option>
                <option value="getGame">getGame</option>
                <option value="getGameDirect">getGameDirect</option>
                <option value="getGameList" >getGameList</option>
                <option value="createPlayer">createPlayer</option>
                <option value="addFreeRounds">addFreeRounds</option>
                <option value="getSystemUsername">getSystemUsername</option>
                <option value="setSystemUsername">setSystemUsername</option>
                <option value="setSystemPassword">setSystemPassword</option>
            </select>
            amount:<input type="text" name="amount" value="">
            transid:<input type="text" name="transactionid" value="">
            player username:<input type="text" name="user_username" value="">
            player password:<input type="text" name="user_password" value="">
            gameid:<input type="text" name="gameid" value="898">
            play for fun:<input type="checkbox" name="play_for_fun" value="1">
            <input type="text" name="date" value="2012-01-26"> 
            render type:<select name="render">
                <option value="text">text</option>
                <option value="json">json</option>
            </select>
            <br /><br />
            <table>
                <tr>
                    <td valign='top'>
                        <table>
                            <caption><i>addFreeRounds params</i></caption>
                                <tr>
                                    <td>Tittle</td>
                                    <td><input type="text" value="freeround 1" name="tittle"></td>
                                </tr>
                                <tr>
                                    <td>Player ids</td>
                                    <td><input type="text" value="220650,21352" name="playerids"></td>
                                </tr>
                                <tr>
                                    <td>Game ids</td>
                                    <td><input type="text" value="787,789" name="gameids"></td>
                                </tr>
                                <tr>
                                    <td>Avaliable</td>
                                    <td><input type="text" value="2" name="available"></td>
                                </tr>
                                 <tr>
                                    <td>Valid from</td>
                                    <td><input type="text" value="" name="validFrom"></td>
                                </tr>
                                <tr>
                                    <td>Valid to</td>
                                    <td><input type="text" value="2016-05-11" name="validTo"></td>
                                </tr>
                        </table>
                   </td>
                   <td valign='top'>
                        <table>
                            <caption><i>System player operations</i>(getSystemUsername, setSystemUsername, setSystemPassword)</caption>
                                <tr>
                                    <td>System</td>
                                    <td><input type="text" value="hi" name="system"></td>
                                </tr>
                                <tr>
                                    <td>System_Player_Username</td>
                                    <td><input type="text" value="thebadmother" name="splayer_username"></td>
                                </tr>  
                                <tr>
                                    <td>System_Player_Password</td>
                                    <td><input type="password" value="testpass" name="splayer_password"></td>
                                </tr>          
                        </table>
                    </td>
                </tr>
            </table>
            <input type="submit">
      </form>
    </body>
</html>


Soap requests need to be sent via HTTP/1.0 version protocol or you may recieve "Premature end of data in tag definitions line 2..." errors when trying to initialize the soapClient.

We recommend you start with simplest call getGameList().

Recommended method implementation workflow:

  1. getGameList()
  2. createPlayer()
  3. playerExists()
  4. getPlayerBalance()
  5. giveMoney()
  6. takeMoney()
  7. loginPlayer()
  8. getGame()
  9. getGameDirect()
  10. addFreeRounds()
  11. logoutPlayer()
  12. getAgentBalance()
  13. getDailyBalances()
  14. getDailyReport()
  15. getPaymentTransactions()
  16. getSystemUsername()
  17. setSystemPassword()
  18. setSystemUsername()

If you have any questions regarding wallet integration please take a look at F.A.Q. before contacting support.



Related content