TransactionRequest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 10
Bugs 0 Features 0
Metric Value
wmc 2
eloc 7
c 10
b 0
f 0
dl 0
loc 24
ccs 6
cts 6
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A get_signature_data() 0 18 2
1
<?php
2
/**
3
 * Transaction request
4
 *
5
 * @author    Pronamic <[email protected]>
6
 * @copyright 2005-2022 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
/**
14
 * Title: iDEAL Sisow transaction request
15
 * Description:
16
 * Copyright: Copyright (c) 2015
17
 * Company: Pronamic
18
 *
19
 * @author  Remco Tolsma
20
 * @version 2.0.0
21
 * @since   1.0.0
22
 */
23
class TransactionRequest extends Request {
24
	/**
25
	 * Get signature data.
26
	 *
27
	 * @return array<int,int|string|null>
28
	 */
29 1
	public function get_signature_data() {
30
		return array(
31 1
			$this->get_parameter( 'purchaseid' ),
32
33
			/*
34
			 * Wordt er geen gebruik gemaakt van de entrancecode dan dient er twee keer de purchaseid te worden opgenomen, u krijgt dan onderstaande volgorde.
35
			 * purchaseid/purchaseid/amount/shopid/merchantid/merchantkey
36
			 */
37 1
			null !== $this->get_parameter( 'entrancecode' ) ? $this->get_parameter( 'entrancecode' ) : $this->get_parameter( 'purchaseid' ),
38
39 1
			$this->get_parameter( 'amount' ),
40
41
			/*
42
			 * Indien er geen gebruik wordt gemaakt van de shopid dan kunt u deze weglaten uit de berekening.
43
			 */
44 1
			$this->get_parameter( 'shopid' ),
45
46 1
			$this->get_parameter( 'merchantid' ),
47
		);
48
	}
49
}
50