Passed
Push — master ( df4ed5...14d15a )
by Remco
21:23 queued 11:46
created

StatusRequest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
eloc 8
dl 0
loc 31
ccs 9
cts 9
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A get_signature_data() 0 12 1
A __construct() 0 4 1
1
<?php
2
/**
3
 * Status 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
 * Status request
18
 *
19
 * @author  Remco Tolsma
20
 * @version 2.0.0
21
 * @since   1.0.0
22
 */
23
class StatusRequest extends Request {
24
	/**
25
	 * Constructs status request object.
26
	 *
27
	 * @param string      $transaction_id Transaction ID.
28
	 * @param string      $merchant_id    Merchant ID.
29
	 * @param string|null $shop_id        Shop ID.
30
	 */
31 1
	public function __construct( $transaction_id, $merchant_id, $shop_id = null ) {
32 1
		parent::__construct( $merchant_id, $shop_id );
33
34 1
		$this->set_parameter( 'trxid', $transaction_id );
35 1
	}
36
37
	/**
38
	 * Get signature data.
39
	 *
40
	 * @return array
41
	 */
42 1
	public function get_signature_data() {
43
		return array(
44 1
			$this->get_parameter( 'trxid' ),
45
46
			/*
47
			 * Indien er geen gebruik wordt gemaakt van de shopid dan kunt u deze weglaten uit de berekening.
48
			 */
49 1
			$this->get_parameter( 'shopid' ),
50
51 1
			$this->get_parameter( 'merchantid' ),
52
53 1
			$this->get_parameter( 'merchantkey' ),
54
		);
55
	}
56
}
57