Network/wallet/tutorials/firstrun

= Wallet Service = Installation
 * Follow the general web service installation procedures with the following configuration:
 * Database schema: accounting_service
 * JNDI Name: jdbc/accountingDS

..or install the user/wallet/backoffice- bundle by following the quickstart tutorial.

Testing the API Creating an account is a good way to start. (If you have set up the bundle installation you need to use http://localhost:9091 as base URL) Example: curl -XPOST -H "Content-type: application/json" http://localhost:8080/wallet-service-rest/rest/wallet/accounts -d ' {     "userId" : "1", "type" : "STATIC_ACCOUNT", "currencyCode" : "EUR" }'

On windows you need to format the request in the following manner: curl -XPOST -H "Content-type: application/json" http://localhost:8080/wallet-service-rest/rest/wallet/accounts -d "{\"userId\" : \"1\",\"type\" : \"STATIC_ACCOUNT\",\"currencyCode\" : \"EUR\"}"

The service should reply with something like: {   "accountId":1123 }

Now you can GET the account by:

curl -XGET http://localhost:9091/wallet-service-rest/rest/wallet/lookup/1/EUR

The result should look lite this: { "created" : "2010-09-23 15:06:44.000", "currency" : "GBP", "id" : 1124, "information" : { "gameId" : -1, "objectId" : -1 }, "status" : "OPEN", "type" : "STATIC_ACCOUNT", "userId" : 1 }

That's it! You can now play around with it, I strongly recommend reading the documentation for the Wallet Service and trying the different API methods.