wp-pay-gateways /
multisafepay
| 1 | <?php |
||||
| 2 | |||||
| 3 | namespace Pronamic\WordPress\Pay\Gateways\MultiSafepay; |
||||
| 4 | |||||
| 5 | use Pronamic\WordPress\Pay\Core\GatewaySettings; |
||||
| 6 | |||||
| 7 | /** |
||||
| 8 | * Title: MultiSafepay gateway settings |
||||
| 9 | * Description: |
||||
| 10 | * Copyright: 2005-2019 Pronamic |
||||
| 11 | * Company: Pronamic |
||||
| 12 | * |
||||
| 13 | * @author Remco Tolsma |
||||
| 14 | * @version 2.0.2 |
||||
| 15 | * @since 1.0.0 |
||||
| 16 | */ |
||||
| 17 | class Settings extends GatewaySettings { |
||||
| 18 | public function __construct() { |
||||
| 19 | add_filter( 'pronamic_pay_gateway_sections', array( $this, 'sections' ) ); |
||||
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||||
| 20 | add_filter( 'pronamic_pay_gateway_fields', array( $this, 'fields' ) ); |
||||
| 21 | } |
||||
| 22 | |||||
| 23 | public function sections( array $sections ) { |
||||
| 24 | $sections['multisafepay'] = array( |
||||
| 25 | 'title' => __( 'MultiSafepay', 'pronamic_ideal' ), |
||||
|
0 ignored issues
–
show
The function
__ was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 26 | 'methods' => array( 'multisafepay' ), |
||||
| 27 | 'description' => sprintf( |
||||
| 28 | /* translators: 1: MultiSafepay */ |
||||
| 29 | __( 'Account details are provided by %1$s after registration. These settings need to match with the %1$s dashboard.', 'pronamic_ideal' ), |
||||
| 30 | __( 'MultiSafepay', 'pronamic_ideal' ) |
||||
| 31 | ), |
||||
| 32 | ); |
||||
| 33 | |||||
| 34 | // Return sections |
||||
| 35 | return $sections; |
||||
| 36 | } |
||||
| 37 | |||||
| 38 | public function fields( array $fields ) { |
||||
| 39 | // Account ID |
||||
| 40 | $fields[] = array( |
||||
| 41 | 'filter' => FILTER_SANITIZE_STRING, |
||||
| 42 | 'section' => 'multisafepay', |
||||
| 43 | 'meta_key' => '_pronamic_gateway_multisafepay_account_id', |
||||
| 44 | 'title' => __( 'Account ID', 'pronamic_ideal' ), |
||||
|
0 ignored issues
–
show
The function
__ was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 45 | 'type' => 'text', |
||||
| 46 | 'classes' => array( 'code' ), |
||||
| 47 | 'methods' => array( 'multisafepay_connect' ), |
||||
| 48 | 'tooltip' => sprintf( |
||||
| 49 | '%s %s.', |
||||
| 50 | __( 'Account ID', 'pronamic_ideal' ), |
||||
| 51 | /* translators: %s: MultiSafepay */ |
||||
| 52 | sprintf( __( 'as mentioned in the %s dashboard', 'pronamic_ideal' ), __( 'MultiSafepay', 'pronamic_ideal' ) ) |
||||
| 53 | ), |
||||
| 54 | ); |
||||
| 55 | |||||
| 56 | // Site ID |
||||
| 57 | $fields[] = array( |
||||
| 58 | 'filter' => FILTER_SANITIZE_STRING, |
||||
| 59 | 'section' => 'multisafepay', |
||||
| 60 | 'meta_key' => '_pronamic_gateway_multisafepay_site_id', |
||||
| 61 | 'title' => __( 'Site ID', 'pronamic_ideal' ), |
||||
| 62 | 'type' => 'text', |
||||
| 63 | 'classes' => array( 'code' ), |
||||
| 64 | 'methods' => array( 'multisafepay_connect' ), |
||||
| 65 | 'tooltip' => sprintf( |
||||
| 66 | '%s %s.', |
||||
| 67 | __( 'Site ID', 'pronamic_ideal' ), |
||||
| 68 | /* translators: %s: MultiSafepay */ |
||||
| 69 | sprintf( __( 'as mentioned in the %s dashboard', 'pronamic_ideal' ), __( 'MultiSafepay', 'pronamic_ideal' ) ) |
||||
| 70 | ), |
||||
| 71 | ); |
||||
| 72 | |||||
| 73 | // Site Security Code |
||||
| 74 | $fields[] = array( |
||||
| 75 | 'filter' => FILTER_SANITIZE_STRING, |
||||
| 76 | 'section' => 'multisafepay', |
||||
| 77 | 'meta_key' => '_pronamic_gateway_multisafepay_site_code', |
||||
| 78 | 'title' => __( 'Site Security Code', 'pronamic_ideal' ), |
||||
| 79 | 'type' => 'text', |
||||
| 80 | 'classes' => array( 'code' ), |
||||
| 81 | 'methods' => array( 'multisafepay_connect' ), |
||||
| 82 | 'tooltip' => sprintf( |
||||
| 83 | '%s %s.', |
||||
| 84 | __( 'Site Security Code', 'pronamic_ideal' ), |
||||
| 85 | /* translators: %s: MultiSafepay */ |
||||
| 86 | sprintf( __( 'as mentioned in the %s dashboard', 'pronamic_ideal' ), __( 'MultiSafepay', 'pronamic_ideal' ) ) |
||||
| 87 | ), |
||||
| 88 | ); |
||||
| 89 | |||||
| 90 | // Transaction feedback |
||||
| 91 | $fields[] = array( |
||||
| 92 | 'section' => 'multisafepay', |
||||
| 93 | 'title' => __( 'Transaction feedback', 'pronamic_ideal' ), |
||||
| 94 | 'type' => 'description', |
||||
| 95 | 'html' => sprintf( |
||||
| 96 | '<span class="dashicons dashicons-yes"></span> %s', |
||||
| 97 | __( 'Payment status updates will be processed without any additional configuration.', 'pronamic_ideal' ) |
||||
| 98 | ), |
||||
| 99 | ); |
||||
| 100 | |||||
| 101 | // Return fields |
||||
| 102 | return $fields; |
||||
| 103 | } |
||||
| 104 | } |
||||
| 105 |