StatusRequest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

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