@@ -20,17 +20,17 @@ discard block |
||
| 20 | 20 | $this->name = 'Rabobank - OmniKassa'; |
| 21 | 21 | $this->product_url = 'https://www.rabobank.nl/bedrijven/betalen/geld-ontvangen/rabo-omnikassa/'; |
| 22 | 22 | $this->dashboard_url = array( |
| 23 | - __( 'admin', 'pronamic_ideal' ) => 'https://dashboard.omnikassa.rabobank.nl/', |
|
| 24 | - __( 'download', 'pronamic_ideal' ) => 'https://download.omnikassa.rabobank.nl/', |
|
| 23 | + __('admin', 'pronamic_ideal') => 'https://dashboard.omnikassa.rabobank.nl/', |
|
| 24 | + __('download', 'pronamic_ideal') => 'https://download.omnikassa.rabobank.nl/', |
|
| 25 | 25 | ); |
| 26 | 26 | $this->provider = 'rabobank'; |
| 27 | 27 | $this->deprecated = true; |
| 28 | 28 | |
| 29 | 29 | // Actions |
| 30 | - $function = array( __NAMESPACE__ . '\Listener', 'listen' ); |
|
| 30 | + $function = array(__NAMESPACE__ . '\Listener', 'listen'); |
|
| 31 | 31 | |
| 32 | - if ( ! has_action( 'wp_loaded', $function ) ) { |
|
| 33 | - add_action( 'wp_loaded', $function ); |
|
| 32 | + if ( ! has_action('wp_loaded', $function)) { |
|
| 33 | + add_action('wp_loaded', $function); |
|
| 34 | 34 | } |
| 35 | 35 | } |
| 36 | 36 | |
@@ -47,9 +47,9 @@ discard block |
||
| 47 | 47 | 'section' => 'general', |
| 48 | 48 | 'filter' => FILTER_SANITIZE_STRING, |
| 49 | 49 | 'meta_key' => '_pronamic_gateway_omnikassa_merchant_id', |
| 50 | - 'title' => __( 'Merchant ID', 'pronamic_ideal' ), |
|
| 50 | + 'title' => __('Merchant ID', 'pronamic_ideal'), |
|
| 51 | 51 | 'type' => 'text', |
| 52 | - 'classes' => array( 'code' ), |
|
| 52 | + 'classes' => array('code'), |
|
| 53 | 53 | ); |
| 54 | 54 | |
| 55 | 55 | // Secret Key |
@@ -57,9 +57,9 @@ discard block |
||
| 57 | 57 | 'section' => 'general', |
| 58 | 58 | 'filter' => FILTER_SANITIZE_STRING, |
| 59 | 59 | 'meta_key' => '_pronamic_gateway_omnikassa_secret_key', |
| 60 | - 'title' => __( 'Secret Key', 'pronamic_ideal' ), |
|
| 60 | + 'title' => __('Secret Key', 'pronamic_ideal'), |
|
| 61 | 61 | 'type' => 'text', |
| 62 | - 'classes' => array( 'large-text', 'code' ), |
|
| 62 | + 'classes' => array('large-text', 'code'), |
|
| 63 | 63 | ); |
| 64 | 64 | |
| 65 | 65 | // Key Version |
@@ -67,11 +67,11 @@ discard block |
||
| 67 | 67 | 'section' => 'general', |
| 68 | 68 | 'filter' => FILTER_SANITIZE_STRING, |
| 69 | 69 | 'meta_key' => '_pronamic_gateway_omnikassa_key_version', |
| 70 | - 'title' => __( 'Key Version', 'pronamic_ideal' ), |
|
| 70 | + 'title' => __('Key Version', 'pronamic_ideal'), |
|
| 71 | 71 | 'type' => 'text', |
| 72 | - 'classes' => array( 'code' ), |
|
| 72 | + 'classes' => array('code'), |
|
| 73 | 73 | 'size' => 5, |
| 74 | - 'description' => sprintf( __( 'You can find the key version in the <a href="%s" target="_blank">OmniKassa Download Dashboard</a>.', 'pronamic_ideal' ), 'https://download.omnikassa.rabobank.nl/' ), |
|
| 74 | + 'description' => sprintf(__('You can find the key version in the <a href="%s" target="_blank">OmniKassa Download Dashboard</a>.', 'pronamic_ideal'), 'https://download.omnikassa.rabobank.nl/'), |
|
| 75 | 75 | ); |
| 76 | 76 | |
| 77 | 77 | // Purchase ID |
@@ -79,23 +79,23 @@ discard block |
||
| 79 | 79 | 'section' => 'advanced', |
| 80 | 80 | 'filter' => FILTER_SANITIZE_STRING, |
| 81 | 81 | 'meta_key' => '_pronamic_gateway_omnikassa_order_id', |
| 82 | - 'title' => __( 'Order ID', 'pronamic_ideal' ), |
|
| 82 | + 'title' => __('Order ID', 'pronamic_ideal'), |
|
| 83 | 83 | 'type' => 'text', |
| 84 | - 'classes' => array( 'regular-text', 'code' ), |
|
| 84 | + 'classes' => array('regular-text', 'code'), |
|
| 85 | 85 | 'tooltip' => sprintf( |
| 86 | - __( 'The OmniKassa %s parameter.', 'pronamic_ideal' ), |
|
| 87 | - sprintf( '<code>%s</code>', 'orderId' ) |
|
| 86 | + __('The OmniKassa %s parameter.', 'pronamic_ideal'), |
|
| 87 | + sprintf('<code>%s</code>', 'orderId') |
|
| 88 | 88 | ), |
| 89 | 89 | 'description' => sprintf( |
| 90 | 90 | '%s %s<br />%s', |
| 91 | - __( 'Available tags:', 'pronamic_ideal' ), |
|
| 91 | + __('Available tags:', 'pronamic_ideal'), |
|
| 92 | 92 | sprintf( |
| 93 | 93 | '<code>%s</code> <code>%s</code>', |
| 94 | 94 | '{order_id}', |
| 95 | 95 | '{payment_id}' |
| 96 | 96 | ), |
| 97 | 97 | sprintf( |
| 98 | - __( 'Default: <code>%s</code>', 'pronamic_ideal' ), |
|
| 98 | + __('Default: <code>%s</code>', 'pronamic_ideal'), |
|
| 99 | 99 | '{payment_id}' |
| 100 | 100 | ) |
| 101 | 101 | ), |
@@ -104,14 +104,14 @@ discard block |
||
| 104 | 104 | return $fields; |
| 105 | 105 | } |
| 106 | 106 | |
| 107 | - public function get_config( $post_id ) { |
|
| 107 | + public function get_config($post_id) { |
|
| 108 | 108 | $config = new Config(); |
| 109 | 109 | |
| 110 | - $config->merchant_id = get_post_meta( $post_id, '_pronamic_gateway_omnikassa_merchant_id', true ); |
|
| 111 | - $config->secret_key = get_post_meta( $post_id, '_pronamic_gateway_omnikassa_secret_key', true ); |
|
| 112 | - $config->key_version = get_post_meta( $post_id, '_pronamic_gateway_omnikassa_key_version', true ); |
|
| 113 | - $config->order_id = get_post_meta( $post_id, '_pronamic_gateway_omnikassa_order_id', true ); |
|
| 114 | - $config->mode = get_post_meta( $post_id, '_pronamic_gateway_mode', true ); |
|
| 110 | + $config->merchant_id = get_post_meta($post_id, '_pronamic_gateway_omnikassa_merchant_id', true); |
|
| 111 | + $config->secret_key = get_post_meta($post_id, '_pronamic_gateway_omnikassa_secret_key', true); |
|
| 112 | + $config->key_version = get_post_meta($post_id, '_pronamic_gateway_omnikassa_key_version', true); |
|
| 113 | + $config->order_id = get_post_meta($post_id, '_pronamic_gateway_omnikassa_order_id', true); |
|
| 114 | + $config->mode = get_post_meta($post_id, '_pronamic_gateway_mode', true); |
|
| 115 | 115 | |
| 116 | 116 | return $config; |
| 117 | 117 | } |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | * @param int $post_id Post ID. |
| 123 | 123 | * @return Gateway |
| 124 | 124 | */ |
| 125 | - public function get_gateway( $post_id ) { |
|
| 126 | - return new Gateway( $this->get_config( $post_id ) ); |
|
| 125 | + public function get_gateway($post_id) { |
|
| 126 | + return new Gateway($this->get_config($post_id)); |
|
| 127 | 127 | } |
| 128 | 128 | } |