1 | <?php |
||
19 | class IPN extends Transaction |
||
20 | { |
||
21 | /** |
||
22 | * Value of field $state when payment is done |
||
23 | * |
||
24 | * @var string |
||
25 | */ |
||
26 | const PAYMENT_PAID = 'paid'; |
||
27 | |||
28 | /** |
||
29 | * Value of field $state when payment has been refunded |
||
30 | * |
||
31 | * @var string |
||
32 | */ |
||
33 | const PAYMENT_REFUNDED = 'refunded'; |
||
34 | |||
35 | /** |
||
36 | * The new state of the transaction: 'paid' or 'refunded'. |
||
37 | * |
||
38 | * @var string |
||
39 | */ |
||
40 | private $state; |
||
41 | |||
42 | /** |
||
43 | * The PayPlug transaction ID. |
||
44 | * We recommend you save it and associate it with this order in your database. |
||
45 | * |
||
46 | * @var integer |
||
47 | */ |
||
48 | private $idTransaction; |
||
49 | |||
50 | /** |
||
51 | * If value is true, the payment was done in TEST (Sandbox) mode. |
||
52 | * |
||
53 | * @var boolean |
||
54 | */ |
||
55 | private $isTest; |
||
56 | |||
57 | /** |
||
58 | * Set state |
||
59 | * |
||
60 | * @param string $state |
||
61 | * @return IPN |
||
62 | */ |
||
63 | public function setState($state) |
||
69 | |||
70 | /** |
||
71 | * Get state |
||
72 | * |
||
73 | * @return string |
||
74 | */ |
||
75 | public function getState() |
||
79 | |||
80 | /** |
||
81 | * Set idTransaction |
||
82 | * |
||
83 | * @param integer $idTransaction |
||
84 | * @return IPN |
||
85 | */ |
||
86 | public function setIdTransaction($idTransaction) |
||
92 | |||
93 | /** |
||
94 | * Get idTransaction |
||
95 | * |
||
96 | * @return integer |
||
97 | */ |
||
98 | public function getIdTransaction() |
||
102 | |||
103 | /** |
||
104 | * Set isTest |
||
105 | * |
||
106 | * @param boolean $isTest |
||
107 | * @return IPN |
||
108 | */ |
||
109 | public function setIsTest($isTest) |
||
115 | |||
116 | /** |
||
117 | * Get isTest |
||
118 | * |
||
119 | * @return boolean |
||
120 | */ |
||
121 | public function getIsTest() |
||
125 | |||
126 | /** |
||
127 | * @return string |
||
128 | */ |
||
129 | public static function getClassName() |
||
133 | } |
||
134 |