1: <?php
2: /**
3: * Maniaplanet Web Services SDK for PHP
4: *
5: * @see http://code.google.com/p/maniaplanet-ws-sdk/
6: * @copyright Copyright (c) 2009-2011 NADEO (http://www.nadeo.com)
7: * @license http://www.gnu.org/licenses/lgpl.html LGPL License 3
8: * @author $Author: martin.gwendal $:
9: * @version $Revision: 110 $:
10: * @date $Date: 2012-05-04 11:51:42 +0200 (ven., 04 mai 2012) $:
11: */
12:
13: namespace Maniaplanet\WebServices;
14:
15: class Payments extends HTTPClient
16: {
17:
18: /**
19: * @param Transaction $t
20: * @return int ID of the created transaction
21: */
22: function create(Transaction $t)
23: {
24: return $this->execute('POST', '/transactions/', array($t));
25: }
26:
27: /**
28: * Pay a transaction without ingame validation
29: * Works only to give coppers from your account
30: * @param Transaction $t
31: */
32: function pay(Transaction $t)
33: {
34: return $this->execute('POST', '/transactions/pay/', array($t));
35: }
36:
37: /**
38: * @param int $id
39: * @return bool Whether the specified transaction was paid by the player
40: */
41: function isPaid($id)
42: {
43: return $this->execute('GET', '/transactions/%d/ispaid/', array($id));
44: }
45:
46: }
47:
48: ?>