|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace Pronamic\WordPress\Pay\Gateways\MultiSafepay\Connect; |
|
4
|
|
|
|
|
5
|
|
|
use Pronamic\WordPress\Pay\Gateways\MultiSafepay\AbstractIntegration; |
|
6
|
|
|
|
|
7
|
|
|
/** |
|
8
|
|
|
* Title: MultiSafepay Connect integration |
|
9
|
|
|
* Description: |
|
10
|
|
|
* Copyright: 2005-2019 Pronamic |
|
11
|
|
|
* Company: Pronamic |
|
12
|
|
|
* |
|
13
|
|
|
* @author Remco Tolsma |
|
14
|
|
|
* @version 2.0.2 |
|
15
|
|
|
* @since 1.2.6 |
|
16
|
|
|
*/ |
|
17
|
|
|
class Integration extends AbstractIntegration { |
|
18
|
|
|
/** |
|
19
|
|
|
* Integration constructor. |
|
20
|
|
|
*/ |
|
21
|
|
|
public function __construct() { |
|
22
|
|
|
$this->id = 'multisafepay-connect'; |
|
23
|
|
|
$this->name = 'MultiSafepay - Connect'; |
|
24
|
|
|
$this->url = 'http://www.multisafepay.com/'; |
|
25
|
|
|
$this->product_url = __( 'http://www.multisafepay.com/', 'pronamic_ideal' ); |
|
26
|
|
|
$this->dashboard_url = 'https://merchant.multisafepay.com/'; |
|
27
|
|
|
$this->provider = 'multisafepay'; |
|
28
|
|
|
} |
|
29
|
|
|
|
|
30
|
|
|
/** |
|
31
|
|
|
* Get config factory class. |
|
32
|
|
|
* |
|
33
|
|
|
* @return string |
|
34
|
|
|
*/ |
|
35
|
|
|
public function get_config_factory_class() { |
|
36
|
|
|
return __NAMESPACE__ . '\ConfigFactory'; |
|
37
|
|
|
} |
|
38
|
|
|
|
|
39
|
|
|
public function get_settings_fields() { |
|
40
|
|
|
$fields = array(); |
|
41
|
|
|
|
|
42
|
|
|
// Account ID |
|
43
|
|
|
$fields[] = array( |
|
44
|
|
|
'section' => 'general', |
|
45
|
|
|
'filter' => FILTER_SANITIZE_STRING, |
|
46
|
|
|
'meta_key' => '_pronamic_gateway_multisafepay_account_id', |
|
47
|
|
|
'title' => __( 'Account ID', 'pronamic_ideal' ), |
|
48
|
|
|
'type' => 'text', |
|
49
|
|
|
'classes' => array( 'code' ), |
|
50
|
|
|
'methods' => array( 'multisafepay_connect' ), |
|
51
|
|
|
'tooltip' => sprintf( |
|
52
|
|
|
'%s %s.', |
|
53
|
|
|
__( 'Account ID', 'pronamic_ideal' ), |
|
54
|
|
|
/* translators: %s: MultiSafepay */ |
|
55
|
|
|
sprintf( __( 'as mentioned in the %s dashboard', 'pronamic_ideal' ), __( 'MultiSafepay', 'pronamic_ideal' ) ) |
|
56
|
|
|
), |
|
57
|
|
|
); |
|
58
|
|
|
|
|
59
|
|
|
// Site ID |
|
60
|
|
|
$fields[] = array( |
|
61
|
|
|
'section' => 'general', |
|
62
|
|
|
'filter' => FILTER_SANITIZE_STRING, |
|
63
|
|
|
'meta_key' => '_pronamic_gateway_multisafepay_site_id', |
|
64
|
|
|
'title' => __( 'Site ID', 'pronamic_ideal' ), |
|
65
|
|
|
'type' => 'text', |
|
66
|
|
|
'classes' => array( 'code' ), |
|
67
|
|
|
'methods' => array( 'multisafepay_connect' ), |
|
68
|
|
|
'tooltip' => sprintf( |
|
69
|
|
|
'%s %s.', |
|
70
|
|
|
__( 'Site ID', 'pronamic_ideal' ), |
|
71
|
|
|
/* translators: %s: MultiSafepay */ |
|
72
|
|
|
sprintf( __( 'as mentioned in the %s dashboard', 'pronamic_ideal' ), __( 'MultiSafepay', 'pronamic_ideal' ) ) |
|
73
|
|
|
), |
|
74
|
|
|
); |
|
75
|
|
|
|
|
76
|
|
|
// Site Security Code |
|
77
|
|
|
$fields[] = array( |
|
78
|
|
|
'section' => 'general', |
|
79
|
|
|
'filter' => FILTER_SANITIZE_STRING, |
|
80
|
|
|
'meta_key' => '_pronamic_gateway_multisafepay_site_code', |
|
81
|
|
|
'title' => __( 'Site Security Code', 'pronamic_ideal' ), |
|
82
|
|
|
'type' => 'text', |
|
83
|
|
|
'classes' => array( 'code' ), |
|
84
|
|
|
'methods' => array( 'multisafepay_connect' ), |
|
85
|
|
|
'tooltip' => sprintf( |
|
86
|
|
|
'%s %s.', |
|
87
|
|
|
__( 'Site Security Code', 'pronamic_ideal' ), |
|
88
|
|
|
/* translators: %s: MultiSafepay */ |
|
89
|
|
|
sprintf( __( 'as mentioned in the %s dashboard', 'pronamic_ideal' ), __( 'MultiSafepay', 'pronamic_ideal' ) ) |
|
90
|
|
|
), |
|
91
|
|
|
); |
|
92
|
|
|
|
|
93
|
|
|
return $fields; |
|
94
|
|
|
} |
|
95
|
|
|
} |
|
96
|
|
|
|