@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | * @param Money $amount Amount. |
155 | 155 | * @param string $merchant_return_url Merchant return URL. |
156 | 156 | */ |
157 | - public function __construct( $merchant_order_id, $amount, $merchant_return_url ) { |
|
157 | + public function __construct($merchant_order_id, $amount, $merchant_return_url) { |
|
158 | 158 | $this->timestamp = new DateTime(); |
159 | 159 | $this->merchant_order_id = $merchant_order_id; |
160 | 160 | $this->amount = $amount; |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | * |
167 | 167 | * @param DateTime $timestamp Timestamp. |
168 | 168 | */ |
169 | - public function set_timestamp( DateTime $timestamp ) { |
|
169 | + public function set_timestamp(DateTime $timestamp) { |
|
170 | 170 | $this->timestamp = $timestamp; |
171 | 171 | } |
172 | 172 | |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | * |
176 | 176 | * @param string $description Description. |
177 | 177 | */ |
178 | - public function set_description( $description ) { |
|
178 | + public function set_description($description) { |
|
179 | 179 | $this->description = $description; |
180 | 180 | } |
181 | 181 | |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | * |
185 | 185 | * @param string $language Language. |
186 | 186 | */ |
187 | - public function set_language( $language ) { |
|
187 | + public function set_language($language) { |
|
188 | 188 | $this->language = $language; |
189 | 189 | } |
190 | 190 | |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | * |
194 | 194 | * @param string|null $payment_brand Payment brand. |
195 | 195 | */ |
196 | - public function set_payment_brand( $payment_brand ) { |
|
196 | + public function set_payment_brand($payment_brand) { |
|
197 | 197 | $this->payment_brand = $payment_brand; |
198 | 198 | } |
199 | 199 | |
@@ -202,7 +202,7 @@ discard block |
||
202 | 202 | * |
203 | 203 | * @param string $payment_brand_force Payment brand force. |
204 | 204 | */ |
205 | - public function set_payment_brand_force( $payment_brand_force ) { |
|
205 | + public function set_payment_brand_force($payment_brand_force) { |
|
206 | 206 | $this->payment_brand_force = $payment_brand_force; |
207 | 207 | } |
208 | 208 | |
@@ -222,7 +222,7 @@ discard block |
||
222 | 222 | * |
223 | 223 | * @param OrderItems|null $order_items Order items. |
224 | 224 | */ |
225 | - public function set_order_items( OrderItems $order_items = null ) { |
|
225 | + public function set_order_items(OrderItems $order_items = null) { |
|
226 | 226 | $this->order_items = $order_items; |
227 | 227 | } |
228 | 228 | |
@@ -231,7 +231,7 @@ discard block |
||
231 | 231 | * |
232 | 232 | * @param Address|null $shipping_detail Shipping address details. |
233 | 233 | */ |
234 | - public function set_shipping_detail( Address $shipping_detail = null ) { |
|
234 | + public function set_shipping_detail(Address $shipping_detail = null) { |
|
235 | 235 | $this->shipping_detail = $shipping_detail; |
236 | 236 | } |
237 | 237 | |
@@ -240,7 +240,7 @@ discard block |
||
240 | 240 | * |
241 | 241 | * @param Address|null $billing_detail Billing address details. |
242 | 242 | */ |
243 | - public function set_billing_detail( Address $billing_detail = null ) { |
|
243 | + public function set_billing_detail(Address $billing_detail = null) { |
|
244 | 244 | $this->billing_detail = $billing_detail; |
245 | 245 | } |
246 | 246 | |
@@ -249,7 +249,7 @@ discard block |
||
249 | 249 | * |
250 | 250 | * @param CustomerInformation $customer_information Customer information. |
251 | 251 | */ |
252 | - public function set_customer_information( CustomerInformation $customer_information ) { |
|
252 | + public function set_customer_information(CustomerInformation $customer_information) { |
|
253 | 253 | $this->customer_information = $customer_information; |
254 | 254 | } |
255 | 255 | |
@@ -261,42 +261,42 @@ discard block |
||
261 | 261 | public function get_json() { |
262 | 262 | $object = (object) array(); |
263 | 263 | |
264 | - $object->timestamp = $this->timestamp->format( DATE_ATOM ); |
|
264 | + $object->timestamp = $this->timestamp->format(DATE_ATOM); |
|
265 | 265 | $object->merchantOrderId = $this->merchant_order_id; |
266 | 266 | |
267 | - if ( null !== $this->description ) { |
|
267 | + if (null !== $this->description) { |
|
268 | 268 | $object->description = $this->description; |
269 | 269 | } |
270 | 270 | |
271 | - if ( null !== $this->order_items ) { |
|
271 | + if (null !== $this->order_items) { |
|
272 | 272 | $object->orderItems = $this->order_items->get_json(); |
273 | 273 | } |
274 | 274 | |
275 | 275 | $object->amount = $this->amount->get_json(); |
276 | 276 | |
277 | - if ( null !== $this->shipping_detail ) { |
|
277 | + if (null !== $this->shipping_detail) { |
|
278 | 278 | $object->shippingDetail = $this->shipping_detail->get_json(); |
279 | 279 | } |
280 | 280 | |
281 | - if ( null !== $this->billing_detail ) { |
|
281 | + if (null !== $this->billing_detail) { |
|
282 | 282 | $object->billingDetail = $this->billing_detail->get_json(); |
283 | 283 | } |
284 | 284 | |
285 | - if ( null !== $this->customer_information ) { |
|
285 | + if (null !== $this->customer_information) { |
|
286 | 286 | $object->customerInformation = $this->customer_information->get_json(); |
287 | 287 | } |
288 | 288 | |
289 | - if ( null !== $this->language ) { |
|
289 | + if (null !== $this->language) { |
|
290 | 290 | $object->language = $this->language; |
291 | 291 | } |
292 | 292 | |
293 | 293 | $object->merchantReturnURL = $this->merchant_return_url; |
294 | 294 | |
295 | - if ( null !== $this->payment_brand ) { |
|
295 | + if (null !== $this->payment_brand) { |
|
296 | 296 | $object->paymentBrand = $this->payment_brand; |
297 | 297 | } |
298 | 298 | |
299 | - if ( null !== $this->payment_brand_force ) { |
|
299 | + if (null !== $this->payment_brand_force) { |
|
300 | 300 | $object->paymentBrandForce = $this->payment_brand_force; |
301 | 301 | } |
302 | 302 | |
@@ -309,8 +309,8 @@ discard block |
||
309 | 309 | * @param array $fields Fields. |
310 | 310 | * @return array |
311 | 311 | */ |
312 | - public function get_signature_fields( $fields = array() ) { |
|
313 | - $fields[] = $this->timestamp->format( DATE_ATOM ); |
|
312 | + public function get_signature_fields($fields = array()) { |
|
313 | + $fields[] = $this->timestamp->format(DATE_ATOM); |
|
314 | 314 | $fields[] = $this->merchant_order_id; |
315 | 315 | $fields[] = $this->amount->get_currency(); |
316 | 316 | $fields[] = $this->amount->get_amount(); |
@@ -318,28 +318,28 @@ discard block |
||
318 | 318 | $fields[] = $this->description; |
319 | 319 | $fields[] = $this->merchant_return_url; |
320 | 320 | |
321 | - if ( null !== $this->order_items ) { |
|
322 | - $fields = $this->order_items->get_signature_fields( $fields ); |
|
321 | + if (null !== $this->order_items) { |
|
322 | + $fields = $this->order_items->get_signature_fields($fields); |
|
323 | 323 | } |
324 | 324 | |
325 | - if ( null !== $this->shipping_detail ) { |
|
326 | - $fields = $this->shipping_detail->get_signature_fields( $fields ); |
|
325 | + if (null !== $this->shipping_detail) { |
|
326 | + $fields = $this->shipping_detail->get_signature_fields($fields); |
|
327 | 327 | } |
328 | 328 | |
329 | - if ( null !== $this->payment_brand ) { |
|
329 | + if (null !== $this->payment_brand) { |
|
330 | 330 | $fields[] = $this->payment_brand; |
331 | 331 | } |
332 | 332 | |
333 | - if ( null !== $this->payment_brand_force ) { |
|
333 | + if (null !== $this->payment_brand_force) { |
|
334 | 334 | $fields[] = $this->payment_brand_force; |
335 | 335 | } |
336 | 336 | |
337 | - if ( null !== $this->customer_information ) { |
|
338 | - $fields = $this->customer_information->get_signature_fields( $fields ); |
|
337 | + if (null !== $this->customer_information) { |
|
338 | + $fields = $this->customer_information->get_signature_fields($fields); |
|
339 | 339 | } |
340 | 340 | |
341 | - if ( null !== $this->billing_detail ) { |
|
342 | - $fields = $this->billing_detail->get_signature_fields( $fields ); |
|
341 | + if (null !== $this->billing_detail) { |
|
342 | + $fields = $this->billing_detail->get_signature_fields($fields); |
|
343 | 343 | } |
344 | 344 | |
345 | 345 | return $fields; |