Test Failed
Push — feature/post-pay ( 3d7a3c...4d62a9 )
by Remco
03:56
created

TransactionRequest::set_entrance_code()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 2
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
/**
3
 * Transaction request
4
 *
5
 * @author    Pronamic <[email protected]>
6
 * @copyright 2005-2018 Pronamic
7
 * @license   GPL-3.0-or-later
8
 * @package   Pronamic\WordPress\Pay\Payments
9
 */
10
11
namespace Pronamic\WordPress\Pay\Gateways\Sisow;
12
13
use Pronamic\WordPress\Pay\Core\Util as Pay_Util;
14
use Pronamic\WordPress\Pay\Payments\Items;
15
16
/**
17
 * Title: iDEAL Sisow transaction request
18
 * Description:
19
 * Copyright: Copyright (c) 2015
20
 * Company: Pronamic
21
 *
22
 * @author  Remco Tolsma
23
 * @version 2.0.0
24
 * @since   1.0.0
25
 */
26
class TransactionRequest extends Request {
27
	/**
28
	 * Get signature data.
29
	 *
30
	 * @return array
31
	 */
32
	public function get_signature_data() {
33
		return array(
34
			$this->get_parameter( 'purchaseid' ),
35
36
			/*
37
			 * Wordt er geen gebruik gemaakt van de entrancecode dan dient er twee keer de purchaseid te worden opgenomen, u krijgt dan onderstaande volgorde.
38
			 * purchaseid/purchaseid/amount/shopid/merchantid/merchantkey
39
			 */
40
			null !== $this->get_parameter( 'entrancecode' ) ? $this->get_parameter( 'entrancecode' ) : $this->get_parameter( 'purchaseid' ),
41
42
			$this->get_parameter( 'amount' ),
43
44
			/*
45
			 * Indien er geen gebruik wordt gemaakt van de shopid dan kunt u deze weglaten uit de berekening.
46
			 */
47
			$this->get_parameter( 'shopid' ),
48
49
			$this->get_parameter( 'merchantid' ),
50
51
			$this->get_parameter( 'merchantkey' ),
52
		);
53
	}
54
}
55