1
|
|
|
<?php |
2
|
|
|
/** |
3
|
|
|
* Notify return 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: Sisow notify return request |
15
|
|
|
* Description: |
16
|
|
|
* Copyright: Copyright (c) 2019 |
17
|
|
|
* Company: Pronamic |
18
|
|
|
* |
19
|
|
|
* @author Reüel van der Steege |
20
|
|
|
* @version 2.0.4 |
21
|
|
|
* @since 2.0.4 |
22
|
|
|
*/ |
23
|
|
|
class NotifyRequest extends Request { |
24
|
|
|
/** |
25
|
|
|
* Constructor. |
26
|
|
|
* |
27
|
|
|
* @param string $transaction_id Transaction ID. |
28
|
|
|
* @param string $entrance_code Entrance code. |
29
|
|
|
* @param string $status Status. |
30
|
|
|
* @param string $merchant_id Merchant ID. |
31
|
|
|
*/ |
32
|
|
|
public function __construct( $transaction_id, $entrance_code, $status, $merchant_id ) { |
33
|
|
|
parent::__construct( $merchant_id ); |
34
|
|
|
|
35
|
|
|
$this->set_parameter( 'trxid', $transaction_id ); |
36
|
|
|
$this->set_parameter( 'ec', $entrance_code ); |
37
|
|
|
$this->set_parameter( 'status', $status ); |
38
|
|
|
} |
39
|
|
|
|
40
|
|
|
/** |
41
|
|
|
* Get signature data. |
42
|
|
|
* |
43
|
|
|
* @return array<int,int|string|null> |
44
|
|
|
*/ |
45
|
|
|
public function get_signature_data() { |
46
|
|
|
return array( |
47
|
|
|
// Transaction ID. |
48
|
|
|
$this->get_parameter( 'trxid' ), |
49
|
|
|
|
50
|
|
|
// Entrance code. |
51
|
|
|
$this->get_parameter( 'ec' ), |
52
|
|
|
|
53
|
|
|
// Status. |
54
|
|
|
$this->get_parameter( 'status' ), |
55
|
|
|
|
56
|
|
|
// Merchant ID. |
57
|
|
|
$this->get_parameter( 'merchantid' ), |
58
|
|
|
); |
59
|
|
|
} |
60
|
|
|
} |
61
|
|
|
|