-
Notifications
You must be signed in to change notification settings - Fork 0
API Specification
b5510546140 edited this page Dec 6, 2014
·
14 revisions
Method | URL |
---|---|
POST | /payment |
<payment>
<orderID> {orderID} </orderID>
<merchantID> {merchantID} </merchantID>
<amount> {amount} </amount>
<datetime> {date time} </datetime>
</payment>
Status | Response Message |
---|---|
400 | Can’t creat a new payment |
409 | Id is already exist. |
## 2. Get All Payment Transaction
### Request
|Mehod|URL|
|------|---|
|Admin only|
|GET|/payment|
### Response
* 200 OK
``` xml
<paymentTransaction>
<payment id="1">
<orderID>1</orderID>
<merchantID>1</merchantID>
<amount>29</amount>
<status>Pending</status>
<datetime>today</datetime>
</payment>
<payment id="2">
<orderID>1</orderID>
<merchantID>1</merchantID>
<amount>100</amount>
<status>Pending</status>
<datetime>today</datetime>
</payment>
</paymentTransaction>
Method | URL |
---|---|
GET | /kupayment/{id} |
Param Name | Type |
---|---|
id | long |
- (Optional) If-Non-Match
- 200 OK
<paymentid="505">
<orderID>353</orderID>
<merchantID>24</merchantID>
<amount>100.0</amount>
<status>Pending</status>
<datetime>02/12/2014 17:59:42</datetime>
</payment>
Method | URL |
---|---|
GET | /payment/user/{email} |
Param Name | Type |
---|---|
String |
- (Optional) If-Non-Match
- 200 OK
<paymentTransaction>
<payment id="1">
<orderID>1</orderID>
<merchantID>1</merchantID>
<amount>29</amount>
<status>Pending</status>
<datetime>today</datetime>
</payment>
<payment id="2">
<orderID>1</orderID>
<merchantID>1</merchantID>
<amount>100</amount>
<status>Pending</status>
<datetime>today</datetime>
</payment>
</paymentTransaction>
Method | URL |
---|---|
GET | /payment/login |
authenticate |
- 200 OK
http://128.199.212.108:25052/payment/{user id}
Method | URL |
---|---|
PUT | /payment/accept/{id} |
Param Name | Type |
---|---|
id | long |
- 200 OK
http://128.199.212.108:25052/payment/{id}
Method | URL |
---|---|
GET | /wallet/ |
- 200 OK
<wallets>
<walletid="6">
<ownerID>23</ownerID>
<balance>1.21253241E8</balance>
<accountNumber>123123124124</accountNumber>
</wallet>
<walletid="7">
<ownerID>24</ownerID>
<balance>929.0</balance>
<accountNumber>123123124145</accountNumber>
</wallet>
</wallets>
Method | URL |
---|---|
GET | /wallet/{id} |
Param Name | Type |
---|---|
id | long |
- 200 OK
<walletid="7">
<ownerID>24</ownerID>
<balance>929.0</balance>
<accountNumber>123123124145</accountNumber>
</wallet>
Method | URL |
---|---|
POST | /wallet/ |
Param Name | Type |
---|---|
id | long |
- 200 OK
Method | URL |
---|---|
PUT | /wallet/ |
Param Name | Type |
---|---|
id | long |
- 200 OK
Method | URL |
---|---|
GET | /user/ |
Admin only |
- 200 OK
<users>
<userid="23">
<email>[email protected]</email>
<password>1q2w3e4r5t</password>
<firstName>Parinthorn</firstName>
<lastName>Panya</lastName>
<address>Eieieieieie</address>
</user>
<userid="24">
<email>[email protected]</email>
<password>1q2w3e4r5t</password>
<firstName>jf</firstName>
<lastName>shop</lastName>
<address>Eieieieieie</address>
</user>
<users>
Method | URL |
---|---|
GET | /user/{email} |
Param Name | Type |
---|---|
String |
- 200 OK
<userid="23">
<email>[email protected]</email>
<password>1q2w3e4r5t</password>
<firstName>Parinthorn</firstName>
<lastName>Panya</lastName>
<address>Eieieieieie</address>
</user>
Method | URL |
---|---|
POST | /user/ |
- 200 OK
Method | URL |
---|---|
PUT | /user/{id} |
Param Name | Type |
---|---|
String |
<user id="23">
<email>[email protected]</email>
<password>1q2w3e4r5t</password>
<firstName>Parinthorn</firstName>
<lastName>Panya</lastName>
<address>Eieieieieie</address>
</user>
- 200 OK
http://128.199.212.108:25052/user/23