1 | <?php |
||
20 | class Payment extends Transaction |
||
21 | { |
||
22 | /** |
||
23 | * Currency euro |
||
24 | * |
||
25 | * @var string |
||
26 | */ |
||
27 | const EUROS = 'EUR'; |
||
28 | |||
29 | /** |
||
30 | * REQUIRED |
||
31 | * |
||
32 | * Transaction currency. Only 'EUR' is allowed at the moment. |
||
33 | * |
||
34 | * @var string |
||
35 | */ |
||
36 | private $currency; |
||
37 | |||
38 | /** |
||
39 | * REQUIRED |
||
40 | * |
||
41 | * URL pointing to the ipn.php page, to which PayPlug will send payment and refund notifications. |
||
42 | * This URL must be accessible from anywhere on the Internet (usually not the case in localhost environments). |
||
43 | * |
||
44 | * @var string |
||
45 | */ |
||
46 | private $ipnUrl; |
||
47 | |||
48 | /** |
||
49 | * URL pointing to your payment confirmation page, |
||
50 | * to which PayPlug will redirect your customer after the payment. |
||
51 | * |
||
52 | * @var string |
||
53 | */ |
||
54 | private $returnUrl; |
||
55 | |||
56 | /** |
||
57 | * URL pointing to your payment cancelation page, |
||
58 | * to which PayPlug will redirect your customer if he cancels the payment. |
||
59 | * |
||
60 | * @var string |
||
61 | */ |
||
62 | private $cancelUrl; |
||
63 | |||
64 | /** |
||
65 | * @param integer Transaction amount, in cents (such as 4207 for 42,07€). |
||
66 | * @param string $currency Transaction currency |
||
67 | */ |
||
68 | public function __construct($amount = 0, $currency = self::EUROS) |
||
75 | |||
76 | /** |
||
77 | * Set currency |
||
78 | * |
||
79 | * @param string $currency |
||
80 | * @return Payment |
||
81 | */ |
||
82 | public function setCurrency($currency) |
||
88 | |||
89 | /** |
||
90 | * Get currency |
||
91 | * |
||
92 | * @return string |
||
93 | */ |
||
94 | public function getCurrency() |
||
98 | |||
99 | /** |
||
100 | * Set ipnUrl |
||
101 | * |
||
102 | * @param string $ipnUrl |
||
103 | * @return Payment |
||
104 | */ |
||
105 | public function setIpnUrl($ipnUrl) |
||
111 | |||
112 | /** |
||
113 | * Get ipnUrl |
||
114 | * |
||
115 | * @return string |
||
116 | */ |
||
117 | public function getIpnUrl() |
||
121 | |||
122 | /** |
||
123 | * Set returnUrl |
||
124 | * |
||
125 | * @param string $returnUrl |
||
126 | * @return Payment |
||
127 | */ |
||
128 | public function setReturnUrl($returnUrl) |
||
134 | |||
135 | /** |
||
136 | * Get returnUrl |
||
137 | * |
||
138 | * @return string |
||
139 | */ |
||
140 | public function getReturnUrl() |
||
144 | |||
145 | /** |
||
146 | * Set cancelUrl |
||
147 | * |
||
148 | * @param string $cancelUrl |
||
149 | * @return Payment |
||
150 | */ |
||
151 | public function setCancelUrl($cancelUrl) |
||
157 | |||
158 | /** |
||
159 | * Get cancelUrl |
||
160 | * |
||
161 | * @return string |
||
162 | */ |
||
163 | public function getCancelUrl() |
||
167 | } |
||
168 |