StatusRequest::get_signature_data()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 12
ccs 5
cts 5
cp 1
rs 10
cc 1
nc 1
nop 0
crap 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