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

StatusRequest::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

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