wp-pay-gateways /
targetpay
| 1 | <?php |
||||
| 2 | |||||
| 3 | namespace Pronamic\WordPress\Pay\Gateways\TargetPay; |
||||
| 4 | |||||
| 5 | use Pronamic\WordPress\Pay\Core\GatewaySettings; |
||||
| 6 | |||||
| 7 | /** |
||||
| 8 | * Title: TargetPay gateway settings |
||||
| 9 | * Description: |
||||
| 10 | * Copyright: 2005-2019 Pronamic |
||||
| 11 | * Company: Pronamic |
||||
| 12 | * |
||||
| 13 | * @author Remco Tolsma |
||||
| 14 | * @version 2.0.0 |
||||
| 15 | * @since 1.0.0 |
||||
| 16 | */ |
||||
| 17 | class Settings extends GatewaySettings { |
||||
| 18 | /** |
||||
| 19 | * Settings constructor. |
||||
| 20 | */ |
||||
| 21 | public function __construct() { |
||||
| 22 | add_filter( 'pronamic_pay_gateway_sections', array( $this, 'sections' ) ); |
||||
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||||
| 23 | add_filter( 'pronamic_pay_gateway_fields', array( $this, 'fields' ) ); |
||||
| 24 | } |
||||
| 25 | |||||
| 26 | /** |
||||
| 27 | * Settings sections. |
||||
| 28 | * |
||||
| 29 | * @param array $sections Settings sections. |
||||
| 30 | * |
||||
| 31 | * @return array |
||||
| 32 | */ |
||||
| 33 | public function sections( array $sections ) { |
||||
| 34 | // TargetPay. |
||||
| 35 | $sections['targetpay'] = array( |
||||
| 36 | 'title' => __( 'TargetPay', '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...
|
|||||
| 37 | 'methods' => array( 'targetpay' ), |
||||
| 38 | 'description' => sprintf( |
||||
| 39 | /* translators: 1: TargetPay */ |
||||
| 40 | __( 'Account details are provided by %1$s after registration. These settings need to match with the %1$s dashboard.', 'pronamic_ideal' ), |
||||
| 41 | __( 'TargetPay', 'pronamic_ideal' ) |
||||
| 42 | ), |
||||
| 43 | ); |
||||
| 44 | |||||
| 45 | return $sections; |
||||
| 46 | } |
||||
| 47 | |||||
| 48 | /** |
||||
| 49 | * Settings fields. |
||||
| 50 | * |
||||
| 51 | * @param array $fields Settings fields. |
||||
| 52 | * |
||||
| 53 | * @return array |
||||
| 54 | */ |
||||
| 55 | public function fields( array $fields ) { |
||||
| 56 | // Layout Code. |
||||
| 57 | $fields[] = array( |
||||
| 58 | 'filter' => FILTER_SANITIZE_STRING, |
||||
| 59 | 'section' => 'targetpay', |
||||
| 60 | 'meta_key' => '_pronamic_gateway_targetpay_layoutcode', |
||||
| 61 | 'title' => __( 'Layout Code', '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...
|
|||||
| 62 | 'type' => 'text', |
||||
| 63 | 'tooltip' => __( 'Layout code as mentioned at <strong>Sub accounts</strong> in the TargetPay dashboard.', 'pronamic_ideal' ), |
||||
| 64 | ); |
||||
| 65 | |||||
| 66 | // Transaction feedback. |
||||
| 67 | $fields[] = array( |
||||
| 68 | 'section' => 'targetpay', |
||||
| 69 | 'title' => __( 'Transaction feedback', 'pronamic_ideal' ), |
||||
| 70 | 'type' => 'description', |
||||
| 71 | 'html' => sprintf( |
||||
| 72 | '<span class="dashicons dashicons-yes"></span> %s', |
||||
| 73 | __( 'Payment status updates will be processed without any additional configuration.', 'pronamic_ideal' ) |
||||
| 74 | ), |
||||
| 75 | ); |
||||
| 76 | |||||
| 77 | return $fields; |
||||
| 78 | } |
||||
| 79 | } |
||||
| 80 |