@@ -16,37 +16,37 @@ discard block |
||
| 16 | 16 | */ |
| 17 | 17 | class Settings extends GatewaySettings { |
| 18 | 18 | public function __construct() { |
| 19 | - add_filter( 'pronamic_pay_gateway_sections', array( $this, 'sections' ) ); |
|
| 20 | - add_filter( 'pronamic_pay_gateway_fields', array( $this, 'fields' ) ); |
|
| 19 | + add_filter('pronamic_pay_gateway_sections', array($this, 'sections')); |
|
| 20 | + add_filter('pronamic_pay_gateway_fields', array($this, 'fields')); |
|
| 21 | 21 | } |
| 22 | 22 | |
| 23 | - public function sections( array $sections ) { |
|
| 23 | + public function sections(array $sections) { |
|
| 24 | 24 | // General |
| 25 | 25 | $sections['ogone'] = array( |
| 26 | - 'title' => __( 'Ogone', 'pronamic_ideal' ), |
|
| 27 | - 'methods' => array( 'ogone_orderstandard_easy', 'ogone_orderstandard', 'ogone_directlink' ), |
|
| 28 | - 'description' => __( 'Account details are provided by the payment provider after registration. These settings need to match with the payment provider dashboard.', 'pronamic_ideal' ), |
|
| 26 | + 'title' => __('Ogone', 'pronamic_ideal'), |
|
| 27 | + 'methods' => array('ogone_orderstandard_easy', 'ogone_orderstandard', 'ogone_directlink'), |
|
| 28 | + 'description' => __('Account details are provided by the payment provider after registration. These settings need to match with the payment provider dashboard.', 'pronamic_ideal'), |
|
| 29 | 29 | ); |
| 30 | 30 | |
| 31 | 31 | // Payment page look and feel |
| 32 | 32 | $sections['ogone_advanced'] = array( |
| 33 | - 'title' => __( 'Advanced', 'pronamic_ideal' ), |
|
| 34 | - 'methods' => array( 'ogone_orderstandard_easy', 'ogone_orderstandard', 'ogone_directlink' ), |
|
| 35 | - 'description' => __( 'Optional settings for advanced usage only.', 'pronamic_ideal' ), |
|
| 33 | + 'title' => __('Advanced', 'pronamic_ideal'), |
|
| 34 | + 'methods' => array('ogone_orderstandard_easy', 'ogone_orderstandard', 'ogone_directlink'), |
|
| 35 | + 'description' => __('Optional settings for advanced usage only.', 'pronamic_ideal'), |
|
| 36 | 36 | ); |
| 37 | 37 | |
| 38 | 38 | // Direct HTTP server-to-server request |
| 39 | 39 | $sections['ogone_feedback'] = array( |
| 40 | - 'title' => __( 'Transaction feedback', 'pronamic_ideal' ), |
|
| 41 | - 'methods' => array( 'ogone_orderstandard', 'ogone_directlink' ), |
|
| 42 | - 'description' => __( 'The URLs below need to be copied to the payment provider dashboard to receive automatic transaction status updates.', 'pronamic_ideal' ), |
|
| 40 | + 'title' => __('Transaction feedback', 'pronamic_ideal'), |
|
| 41 | + 'methods' => array('ogone_orderstandard', 'ogone_directlink'), |
|
| 42 | + 'description' => __('The URLs below need to be copied to the payment provider dashboard to receive automatic transaction status updates.', 'pronamic_ideal'), |
|
| 43 | 43 | ); |
| 44 | 44 | |
| 45 | 45 | // Return sections |
| 46 | 46 | return $sections; |
| 47 | 47 | } |
| 48 | 48 | |
| 49 | - public function fields( array $fields ) { |
|
| 49 | + public function fields(array $fields) { |
|
| 50 | 50 | /* |
| 51 | 51 | * General |
| 52 | 52 | */ |
@@ -56,11 +56,11 @@ discard block |
||
| 56 | 56 | 'filter' => FILTER_SANITIZE_STRING, |
| 57 | 57 | 'section' => 'ogone', |
| 58 | 58 | 'meta_key' => '_pronamic_gateway_ogone_psp_id', |
| 59 | - 'title' => __( 'PSPID', 'pronamic_ideal' ), |
|
| 59 | + 'title' => __('PSPID', 'pronamic_ideal'), |
|
| 60 | 60 | 'type' => 'text', |
| 61 | - 'classes' => array( 'code' ), |
|
| 62 | - 'tooltip' => __( 'PSPID as mentioned in the payment provider dashboard.', 'pronamic_ideal' ), |
|
| 63 | - 'methods' => array( 'ogone_orderstandard_easy', 'ogone_orderstandard', 'ogone_directlink' ), |
|
| 61 | + 'classes' => array('code'), |
|
| 62 | + 'tooltip' => __('PSPID as mentioned in the payment provider dashboard.', 'pronamic_ideal'), |
|
| 63 | + 'methods' => array('ogone_orderstandard_easy', 'ogone_orderstandard', 'ogone_directlink'), |
|
| 64 | 64 | ); |
| 65 | 65 | |
| 66 | 66 | // API user ID |
@@ -68,11 +68,11 @@ discard block |
||
| 68 | 68 | 'filter' => FILTER_SANITIZE_STRING, |
| 69 | 69 | 'section' => 'ogone', |
| 70 | 70 | 'meta_key' => '_pronamic_gateway_ogone_user_id', |
| 71 | - 'title' => __( 'API user ID', 'pronamic_ideal' ), |
|
| 71 | + 'title' => __('API user ID', 'pronamic_ideal'), |
|
| 72 | 72 | 'type' => 'text', |
| 73 | - 'classes' => array( 'regular-text', 'code' ), |
|
| 74 | - 'methods' => array( 'ogone_orderstandard', 'ogone_directlink' ), |
|
| 75 | - 'tooltip' => __( 'User ID of the API user in the payment provider dashboard: Configuration » Users', 'pronamic_ideal' ), |
|
| 73 | + 'classes' => array('regular-text', 'code'), |
|
| 74 | + 'methods' => array('ogone_orderstandard', 'ogone_directlink'), |
|
| 75 | + 'tooltip' => __('User ID of the API user in the payment provider dashboard: Configuration » Users', 'pronamic_ideal'), |
|
| 76 | 76 | ); |
| 77 | 77 | |
| 78 | 78 | // API user password |
@@ -80,11 +80,11 @@ discard block |
||
| 80 | 80 | 'filter' => FILTER_SANITIZE_STRING, |
| 81 | 81 | 'section' => 'ogone', |
| 82 | 82 | 'meta_key' => '_pronamic_gateway_ogone_password', |
| 83 | - 'title' => __( 'API user password', 'pronamic_ideal' ), |
|
| 83 | + 'title' => __('API user password', 'pronamic_ideal'), |
|
| 84 | 84 | 'type' => 'password', |
| 85 | - 'classes' => array( 'regular-text', 'code' ), |
|
| 86 | - 'methods' => array( 'ogone_orderstandard', 'ogone_directlink' ), |
|
| 87 | - 'tooltip' => __( 'Password of the API user in the payment provider dashboard: Configuration » Users', 'pronamic_ideal' ), |
|
| 85 | + 'classes' => array('regular-text', 'code'), |
|
| 86 | + 'methods' => array('ogone_orderstandard', 'ogone_directlink'), |
|
| 87 | + 'tooltip' => __('Password of the API user in the payment provider dashboard: Configuration » Users', 'pronamic_ideal'), |
|
| 88 | 88 | ); |
| 89 | 89 | |
| 90 | 90 | // SHA-IN Pass phrase |
@@ -92,11 +92,11 @@ discard block |
||
| 92 | 92 | 'filter' => FILTER_SANITIZE_STRING, |
| 93 | 93 | 'section' => 'ogone', |
| 94 | 94 | 'meta_key' => '_pronamic_gateway_ogone_sha_in_pass_phrase', |
| 95 | - 'title' => __( 'SHA-IN Pass phrase', 'pronamic_ideal' ), |
|
| 95 | + 'title' => __('SHA-IN Pass phrase', 'pronamic_ideal'), |
|
| 96 | 96 | 'type' => 'password', |
| 97 | - 'classes' => array( 'regular-text', 'code' ), |
|
| 98 | - 'tooltip' => __( 'SHA-IN pass phrase as mentioned in the payment provider dashboard: Configuration » Technical information » Data and origin verification.', 'pronamic_ideal' ), |
|
| 99 | - 'methods' => array( 'ogone_orderstandard' ), |
|
| 97 | + 'classes' => array('regular-text', 'code'), |
|
| 98 | + 'tooltip' => __('SHA-IN pass phrase as mentioned in the payment provider dashboard: Configuration » Technical information » Data and origin verification.', 'pronamic_ideal'), |
|
| 99 | + 'methods' => array('ogone_orderstandard'), |
|
| 100 | 100 | ); |
| 101 | 101 | |
| 102 | 102 | // SHA-IN Pass phrase |
@@ -104,11 +104,11 @@ discard block |
||
| 104 | 104 | 'filter' => FILTER_SANITIZE_STRING, |
| 105 | 105 | 'section' => 'ogone', |
| 106 | 106 | 'meta_key' => '_pronamic_gateway_ogone_directlink_sha_in_pass_phrase', |
| 107 | - 'title' => __( 'SHA-IN Pass phrase', 'pronamic_ideal' ), |
|
| 107 | + 'title' => __('SHA-IN Pass phrase', 'pronamic_ideal'), |
|
| 108 | 108 | 'type' => 'password', |
| 109 | - 'classes' => array( 'regular-text', 'code' ), |
|
| 110 | - 'tooltip' => __( 'SHA-IN pass phrase as mentioned in the payment provider dashboard: Configuration » Technical information » Data and origin verification.', 'pronamic_ideal' ), |
|
| 111 | - 'methods' => array( 'ogone_directlink' ), |
|
| 109 | + 'classes' => array('regular-text', 'code'), |
|
| 110 | + 'tooltip' => __('SHA-IN pass phrase as mentioned in the payment provider dashboard: Configuration » Technical information » Data and origin verification.', 'pronamic_ideal'), |
|
| 111 | + 'methods' => array('ogone_directlink'), |
|
| 112 | 112 | ); |
| 113 | 113 | |
| 114 | 114 | // SHA-OUT Pass phrase |
@@ -116,11 +116,11 @@ discard block |
||
| 116 | 116 | 'filter' => FILTER_SANITIZE_STRING, |
| 117 | 117 | 'section' => 'ogone', |
| 118 | 118 | 'meta_key' => '_pronamic_gateway_ogone_sha_out_pass_phrase', |
| 119 | - 'title' => __( 'SHA-OUT Pass phrase', 'pronamic_ideal' ), |
|
| 119 | + 'title' => __('SHA-OUT Pass phrase', 'pronamic_ideal'), |
|
| 120 | 120 | 'type' => 'password', |
| 121 | - 'classes' => array( 'regular-text', 'code' ), |
|
| 122 | - 'tooltip' => __( 'SHA-OUT pass phrase as mentioned in the payment provider dashboard: Configuration » Technical information » Transaction feedback.', 'pronamic_ideal' ), |
|
| 123 | - 'methods' => array( 'ogone_orderstandard', 'ogone_directlink' ), |
|
| 121 | + 'classes' => array('regular-text', 'code'), |
|
| 122 | + 'tooltip' => __('SHA-OUT pass phrase as mentioned in the payment provider dashboard: Configuration » Technical information » Transaction feedback.', 'pronamic_ideal'), |
|
| 123 | + 'methods' => array('ogone_orderstandard', 'ogone_directlink'), |
|
| 124 | 124 | ); |
| 125 | 125 | |
| 126 | 126 | // Hash algorithm |
@@ -128,16 +128,16 @@ discard block |
||
| 128 | 128 | 'filter' => FILTER_SANITIZE_STRING, |
| 129 | 129 | 'section' => 'ogone', |
| 130 | 130 | 'meta_key' => '_pronamic_gateway_ogone_hash_algorithm', |
| 131 | - 'title' => __( 'Hash algorithm', 'pronamic_ideal' ), |
|
| 131 | + 'title' => __('Hash algorithm', 'pronamic_ideal'), |
|
| 132 | 132 | 'type' => 'optgroup', |
| 133 | 133 | 'tooltip' => 'Hash algorithm as mentioned in the payment provider dashboard: Configuration » Technical information', |
| 134 | 134 | 'options' => array( |
| 135 | - Ingenico::SHA_1 => __( 'SHA-1', 'pronamic_ideal' ), |
|
| 136 | - Ingenico::SHA_256 => __( 'SHA-256', 'pronamic_ideal' ), |
|
| 137 | - Ingenico::SHA_512 => __( 'SHA-512', 'pronamic_ideal' ), |
|
| 135 | + Ingenico::SHA_1 => __('SHA-1', 'pronamic_ideal'), |
|
| 136 | + Ingenico::SHA_256 => __('SHA-256', 'pronamic_ideal'), |
|
| 137 | + Ingenico::SHA_512 => __('SHA-512', 'pronamic_ideal'), |
|
| 138 | 138 | ), |
| 139 | 139 | 'default' => Ingenico::SHA_1, |
| 140 | - 'methods' => array( 'ogone_orderstandard', 'ogone_directlink' ), |
|
| 140 | + 'methods' => array('ogone_orderstandard', 'ogone_directlink'), |
|
| 141 | 141 | ); |
| 142 | 142 | |
| 143 | 143 | // 3-D Secure |
@@ -145,32 +145,32 @@ discard block |
||
| 145 | 145 | 'filter' => FILTER_VALIDATE_BOOLEAN, |
| 146 | 146 | 'section' => 'ogone', |
| 147 | 147 | 'meta_key' => '_pronamic_gateway_ogone_3d_secure_enabled', |
| 148 | - 'title' => __( '3-D Secure', 'pronamic_ideal' ), |
|
| 148 | + 'title' => __('3-D Secure', 'pronamic_ideal'), |
|
| 149 | 149 | 'type' => 'checkbox', |
| 150 | - 'label' => __( 'Enable 3-D Secure protocol', 'pronamic_ideal' ), |
|
| 151 | - 'methods' => array( 'ogone_directlink' ), |
|
| 150 | + 'label' => __('Enable 3-D Secure protocol', 'pronamic_ideal'), |
|
| 151 | + 'methods' => array('ogone_directlink'), |
|
| 152 | 152 | ); |
| 153 | 153 | |
| 154 | 154 | // Transaction feedback fields |
| 155 | 155 | $fields[] = array( |
| 156 | 156 | 'section' => 'ogone', |
| 157 | - 'title' => __( 'Transaction feedback', 'pronamic_ideal' ), |
|
| 157 | + 'title' => __('Transaction feedback', 'pronamic_ideal'), |
|
| 158 | 158 | 'type' => 'description', |
| 159 | - 'methods' => array( 'ogone_orderstandard_easy' ), |
|
| 159 | + 'methods' => array('ogone_orderstandard_easy'), |
|
| 160 | 160 | 'html' => sprintf( |
| 161 | 161 | '<span class="dashicons dashicons-no"></span> %s', |
| 162 | - __( 'Payment status updates are not supported by this payment provider.', 'pronamic_ideal' ) |
|
| 162 | + __('Payment status updates are not supported by this payment provider.', 'pronamic_ideal') |
|
| 163 | 163 | ), |
| 164 | 164 | ); |
| 165 | 165 | |
| 166 | 166 | $fields[] = array( |
| 167 | 167 | 'section' => 'ogone', |
| 168 | - 'title' => __( 'Transaction feedback', 'pronamic_ideal' ), |
|
| 168 | + 'title' => __('Transaction feedback', 'pronamic_ideal'), |
|
| 169 | 169 | 'type' => 'description', |
| 170 | - 'methods' => array( 'ogone_orderstandard', 'ogone_directlink' ), |
|
| 170 | + 'methods' => array('ogone_orderstandard', 'ogone_directlink'), |
|
| 171 | 171 | 'html' => sprintf( |
| 172 | 172 | '<span class="dashicons dashicons-warning"></span> %s', |
| 173 | - __( 'Receiving payment status updates needs additional configuration, if not yet completed.', 'pronamic_ideal' ) |
|
| 173 | + __('Receiving payment status updates needs additional configuration, if not yet completed.', 'pronamic_ideal') |
|
| 174 | 174 | ), |
| 175 | 175 | ); |
| 176 | 176 | |
@@ -183,11 +183,11 @@ discard block |
||
| 183 | 183 | 'filter' => FILTER_SANITIZE_STRING, |
| 184 | 184 | 'section' => 'ogone_advanced', |
| 185 | 185 | 'meta_key' => '_pronamic_gateway_ogone_form_action_url', |
| 186 | - 'title' => __( 'Form Action URL', 'pronamic_ideal' ), |
|
| 186 | + 'title' => __('Form Action URL', 'pronamic_ideal'), |
|
| 187 | 187 | 'type' => 'text', |
| 188 | - 'classes' => array( 'regular-text', 'code' ), |
|
| 189 | - 'tooltip' => __( 'With this setting you can override the default Ogone e-Commerce form action URL to the payment processing page.', 'pronamic_ideal' ), |
|
| 190 | - 'methods' => array( 'ogone_orderstandard_easy', 'ogone_orderstandard' ), |
|
| 188 | + 'classes' => array('regular-text', 'code'), |
|
| 189 | + 'tooltip' => __('With this setting you can override the default Ogone e-Commerce form action URL to the payment processing page.', 'pronamic_ideal'), |
|
| 190 | + 'methods' => array('ogone_orderstandard_easy', 'ogone_orderstandard'), |
|
| 191 | 191 | ); |
| 192 | 192 | |
| 193 | 193 | // Order ID |
@@ -195,19 +195,19 @@ discard block |
||
| 195 | 195 | 'filter' => FILTER_SANITIZE_STRING, |
| 196 | 196 | 'section' => 'ogone_advanced', |
| 197 | 197 | 'meta_key' => '_pronamic_gateway_ogone_order_id', |
| 198 | - 'title' => __( 'Order ID', 'pronamic_ideal' ), |
|
| 198 | + 'title' => __('Order ID', 'pronamic_ideal'), |
|
| 199 | 199 | 'type' => 'text', |
| 200 | - 'classes' => array( 'regular-text', 'code' ), |
|
| 200 | + 'classes' => array('regular-text', 'code'), |
|
| 201 | 201 | 'tooltip' => sprintf( |
| 202 | - __( 'The Ogone %s parameter.', 'pronamic_ideal' ), |
|
| 203 | - sprintf( '<code>%s</code>', 'ORDERID' ) |
|
| 202 | + __('The Ogone %s parameter.', 'pronamic_ideal'), |
|
| 203 | + sprintf('<code>%s</code>', 'ORDERID') |
|
| 204 | 204 | ), |
| 205 | 205 | 'description' => sprintf( |
| 206 | 206 | '%s<br />%s', |
| 207 | - sprintf( __( 'Available tags: %s', 'pronamic_ideal' ), sprintf( '<code>%s</code> <code>%s</code>', '{order_id}', '{payment_id}' ) ), |
|
| 208 | - sprintf( __( 'Default: <code>%s</code>', 'pronamic_ideal' ), '{payment_id}' ) |
|
| 207 | + sprintf(__('Available tags: %s', 'pronamic_ideal'), sprintf('<code>%s</code> <code>%s</code>', '{order_id}', '{payment_id}')), |
|
| 208 | + sprintf(__('Default: <code>%s</code>', 'pronamic_ideal'), '{payment_id}') |
|
| 209 | 209 | ), |
| 210 | - 'methods' => array( 'ogone_orderstandard_easy', 'ogone_orderstandard', 'ogone_directlink' ), |
|
| 210 | + 'methods' => array('ogone_orderstandard_easy', 'ogone_orderstandard', 'ogone_directlink'), |
|
| 211 | 211 | ); |
| 212 | 212 | |
| 213 | 213 | // Parameter Variable |
@@ -215,18 +215,18 @@ discard block |
||
| 215 | 215 | 'filter' => FILTER_SANITIZE_STRING, |
| 216 | 216 | 'section' => 'ogone_advanced', |
| 217 | 217 | 'meta_key' => '_pronamic_gateway_ogone_param_var', |
| 218 | - 'title' => __( 'Parameter Variable', 'pronamic_ideal' ), |
|
| 218 | + 'title' => __('Parameter Variable', 'pronamic_ideal'), |
|
| 219 | 219 | 'type' => 'text', |
| 220 | - 'classes' => array( 'regular-text', 'code' ), |
|
| 220 | + 'classes' => array('regular-text', 'code'), |
|
| 221 | 221 | 'tooltip' => sprintf( |
| 222 | - __( 'The Ogone %s parameter.', 'pronamic_ideal' ), |
|
| 223 | - sprintf( '<code>%s</code>', 'PARAMVAR' ) |
|
| 222 | + __('The Ogone %s parameter.', 'pronamic_ideal'), |
|
| 223 | + sprintf('<code>%s</code>', 'PARAMVAR') |
|
| 224 | 224 | ), |
| 225 | 225 | 'description' => sprintf( |
| 226 | - __( 'Available tags: %s', 'pronamic_ideal' ), |
|
| 227 | - sprintf( '<code>%s</code> <code>%s</code>', '{site_url}', '{home_url}' ) |
|
| 226 | + __('Available tags: %s', 'pronamic_ideal'), |
|
| 227 | + sprintf('<code>%s</code> <code>%s</code>', '{site_url}', '{home_url}') |
|
| 228 | 228 | ), |
| 229 | - 'methods' => array( 'ogone_orderstandard', 'ogone_directlink' ), |
|
| 229 | + 'methods' => array('ogone_orderstandard', 'ogone_directlink'), |
|
| 230 | 230 | ); |
| 231 | 231 | |
| 232 | 232 | // Template Page |
@@ -234,13 +234,13 @@ discard block |
||
| 234 | 234 | 'filter' => FILTER_SANITIZE_STRING, |
| 235 | 235 | 'section' => 'ogone_advanced', |
| 236 | 236 | 'meta_key' => '_pronamic_gateway_ogone_template_page', |
| 237 | - 'title' => __( 'Template Page', 'pronamic_ideal' ), |
|
| 237 | + 'title' => __('Template Page', 'pronamic_ideal'), |
|
| 238 | 238 | 'type' => 'text', |
| 239 | 239 | 'tooltip' => sprintf( |
| 240 | - __( 'The Ogone %s parameter.', 'pronamic_ideal' ), |
|
| 241 | - sprintf( '<code>%s</code>', 'TP' ) |
|
| 240 | + __('The Ogone %s parameter.', 'pronamic_ideal'), |
|
| 241 | + sprintf('<code>%s</code>', 'TP') |
|
| 242 | 242 | ), |
| 243 | - 'methods' => array( 'ogone_orderstandard', 'ogone_directlink' ), |
|
| 243 | + 'methods' => array('ogone_orderstandard', 'ogone_directlink'), |
|
| 244 | 244 | ); |
| 245 | 245 | |
| 246 | 246 | /* |
@@ -250,22 +250,22 @@ discard block |
||
| 250 | 250 | // URL accepted, on hold or uncertain |
| 251 | 251 | $fields[] = array( |
| 252 | 252 | 'section' => 'ogone_feedback', |
| 253 | - 'title' => __( 'URL accepted, on hold or uncertain', 'pronamic_ideal' ), |
|
| 253 | + 'title' => __('URL accepted, on hold or uncertain', 'pronamic_ideal'), |
|
| 254 | 254 | 'type' => 'text', |
| 255 | - 'value' => site_url( '/' ), |
|
| 256 | - 'classes' => array( 'regular-text', 'code' ), |
|
| 257 | - 'tooltip' => __( 'Direct HTTP server-to-server request URL for payment statuses accepted, on hold or uncertain".', 'pronamic_ideal' ), |
|
| 255 | + 'value' => site_url('/'), |
|
| 256 | + 'classes' => array('regular-text', 'code'), |
|
| 257 | + 'tooltip' => __('Direct HTTP server-to-server request URL for payment statuses accepted, on hold or uncertain".', 'pronamic_ideal'), |
|
| 258 | 258 | 'readonly' => true, |
| 259 | 259 | ); |
| 260 | 260 | |
| 261 | 261 | // URL cancel or deny |
| 262 | 262 | $fields[] = array( |
| 263 | 263 | 'section' => 'ogone_feedback', |
| 264 | - 'title' => __( 'URL cancel or deny', 'pronamic_ideal' ), |
|
| 264 | + 'title' => __('URL cancel or deny', 'pronamic_ideal'), |
|
| 265 | 265 | 'type' => 'text', |
| 266 | - 'value' => site_url( '/' ), |
|
| 267 | - 'classes' => array( 'regular-text', 'code' ), |
|
| 268 | - 'tooltip' => __( 'Direct HTTP server-to-server request URL for payment statuses "cancelled by the client" or "too many rejections by the acquirer".', 'pronamic_ideal' ), |
|
| 266 | + 'value' => site_url('/'), |
|
| 267 | + 'classes' => array('regular-text', 'code'), |
|
| 268 | + 'tooltip' => __('Direct HTTP server-to-server request URL for payment statuses "cancelled by the client" or "too many rejections by the acquirer".', 'pronamic_ideal'), |
|
| 269 | 269 | 'readonly' => true, |
| 270 | 270 | ); |
| 271 | 271 | |
@@ -57,32 +57,32 @@ |
||
| 57 | 57 | * |
| 58 | 58 | * @return bool|OrderResponse |
| 59 | 59 | */ |
| 60 | - public function order_direct( array $data = array() ) { |
|
| 60 | + public function order_direct(array $data = array()) { |
|
| 61 | 61 | $order_response = false; |
| 62 | 62 | |
| 63 | - $result = Util::remote_get_body( $this->api_url, 200, array( |
|
| 63 | + $result = Util::remote_get_body($this->api_url, 200, array( |
|
| 64 | 64 | 'method' => 'POST', |
| 65 | 65 | 'sslverify' => false, |
| 66 | 66 | 'body' => $data, |
| 67 | - ) ); |
|
| 67 | + )); |
|
| 68 | 68 | |
| 69 | - if ( is_wp_error( $result ) ) { |
|
| 69 | + if (is_wp_error($result)) { |
|
| 70 | 70 | $this->error = $result; |
| 71 | 71 | } else { |
| 72 | - $xml = Util::simplexml_load_string( $result ); |
|
| 72 | + $xml = Util::simplexml_load_string($result); |
|
| 73 | 73 | |
| 74 | - if ( is_wp_error( $xml ) ) { |
|
| 74 | + if (is_wp_error($xml)) { |
|
| 75 | 75 | $this->error = $xml; |
| 76 | 76 | } else { |
| 77 | - $order_response = OrderResponseParser::parse( $xml ); |
|
| 77 | + $order_response = OrderResponseParser::parse($xml); |
|
| 78 | 78 | |
| 79 | - if ( ! empty( $order_response->nc_error ) ) { |
|
| 79 | + if ( ! empty($order_response->nc_error)) { |
|
| 80 | 80 | $ogone_error = new Error( |
| 81 | - Security::filter( $order_response->nc_error ), |
|
| 82 | - Security::filter( $order_response->nc_error_plus ) |
|
| 81 | + Security::filter($order_response->nc_error), |
|
| 82 | + Security::filter($order_response->nc_error_plus) |
|
| 83 | 83 | ); |
| 84 | 84 | |
| 85 | - $this->error = new WP_Error( 'ogone_error', (string) $ogone_error, $ogone_error ); |
|
| 85 | + $this->error = new WP_Error('ogone_error', (string) $ogone_error, $ogone_error); |
|
| 86 | 86 | } |
| 87 | 87 | } |
| 88 | 88 | } |
@@ -37,13 +37,13 @@ discard block |
||
| 37 | 37 | * |
| 38 | 38 | * @param Config $config |
| 39 | 39 | */ |
| 40 | - public function __construct( Config $config ) { |
|
| 41 | - parent::__construct( $config ); |
|
| 40 | + public function __construct(Config $config) { |
|
| 41 | + parent::__construct($config); |
|
| 42 | 42 | |
| 43 | - $this->set_method( Gateway::METHOD_HTTP_REDIRECT ); |
|
| 44 | - $this->set_has_feedback( true ); |
|
| 45 | - $this->set_amount_minimum( 1.20 ); |
|
| 46 | - $this->set_slug( self::SLUG ); |
|
| 43 | + $this->set_method(Gateway::METHOD_HTTP_REDIRECT); |
|
| 44 | + $this->set_has_feedback(true); |
|
| 45 | + $this->set_amount_minimum(1.20); |
|
| 46 | + $this->set_slug(self::SLUG); |
|
| 47 | 47 | |
| 48 | 48 | $this->client = new Client(); |
| 49 | 49 | $this->client->psp_id = $config->psp_id; |
@@ -60,94 +60,94 @@ discard block |
||
| 60 | 60 | * |
| 61 | 61 | * @param Payment $payment |
| 62 | 62 | */ |
| 63 | - public function start( Payment $payment ) { |
|
| 63 | + public function start(Payment $payment) { |
|
| 64 | 64 | $ogone_data = new Data(); |
| 65 | 65 | |
| 66 | 66 | // General |
| 67 | - $ogone_data_general = new DataGeneralHelper( $ogone_data ); |
|
| 67 | + $ogone_data_general = new DataGeneralHelper($ogone_data); |
|
| 68 | 68 | |
| 69 | 69 | $ogone_data_general |
| 70 | - ->set_psp_id( $this->client->psp_id ) |
|
| 71 | - ->set_order_id( $payment->format_string( $this->config->order_id ) ) |
|
| 72 | - ->set_order_description( $payment->get_description() ) |
|
| 73 | - ->set_param_plus( 'payment_id=' . $payment->get_id() ) |
|
| 74 | - ->set_currency( $payment->get_currency() ) |
|
| 75 | - ->set_amount( $payment->get_amount()->get_amount() ) |
|
| 76 | - ->set_language( $payment->get_locale() ); |
|
| 70 | + ->set_psp_id($this->client->psp_id) |
|
| 71 | + ->set_order_id($payment->format_string($this->config->order_id)) |
|
| 72 | + ->set_order_description($payment->get_description()) |
|
| 73 | + ->set_param_plus('payment_id=' . $payment->get_id()) |
|
| 74 | + ->set_currency($payment->get_currency()) |
|
| 75 | + ->set_amount($payment->get_amount()->get_amount()) |
|
| 76 | + ->set_language($payment->get_locale()); |
|
| 77 | 77 | |
| 78 | 78 | // Customer |
| 79 | - $ogone_data_customer = new DataCustomerHelper( $ogone_data ); |
|
| 79 | + $ogone_data_customer = new DataCustomerHelper($ogone_data); |
|
| 80 | 80 | |
| 81 | 81 | $ogone_data_customer |
| 82 | - ->set_name( $payment->get_customer_name() ) |
|
| 83 | - ->set_email( $payment->get_email() ) |
|
| 84 | - ->set_address( $payment->get_address() ) |
|
| 85 | - ->set_zip( $payment->get_zip() ) |
|
| 86 | - ->set_town( $payment->get_city() ) |
|
| 87 | - ->set_country( $payment->get_country() ) |
|
| 88 | - ->set_telephone_number( $payment->get_telephone_number() ); |
|
| 82 | + ->set_name($payment->get_customer_name()) |
|
| 83 | + ->set_email($payment->get_email()) |
|
| 84 | + ->set_address($payment->get_address()) |
|
| 85 | + ->set_zip($payment->get_zip()) |
|
| 86 | + ->set_town($payment->get_city()) |
|
| 87 | + ->set_country($payment->get_country()) |
|
| 88 | + ->set_telephone_number($payment->get_telephone_number()); |
|
| 89 | 89 | |
| 90 | 90 | // DirectLink |
| 91 | - $ogone_data_directlink = new DataHelper( $ogone_data ); |
|
| 91 | + $ogone_data_directlink = new DataHelper($ogone_data); |
|
| 92 | 92 | |
| 93 | 93 | $ogone_data_directlink |
| 94 | - ->set_user_id( $this->client->user_id ) |
|
| 95 | - ->set_password( $this->client->password ); |
|
| 94 | + ->set_user_id($this->client->user_id) |
|
| 95 | + ->set_password($this->client->password); |
|
| 96 | 96 | |
| 97 | 97 | // Credit card |
| 98 | - $ogone_data_credit_card = new DataCreditCardHelper( $ogone_data ); |
|
| 98 | + $ogone_data_credit_card = new DataCreditCardHelper($ogone_data); |
|
| 99 | 99 | |
| 100 | 100 | $credit_card = $payment->get_credit_card(); |
| 101 | 101 | |
| 102 | - if ( $credit_card ) { |
|
| 102 | + if ($credit_card) { |
|
| 103 | 103 | $ogone_data_credit_card |
| 104 | - ->set_number( $credit_card->get_number() ) |
|
| 105 | - ->set_expiration_date( $credit_card->get_expiration_date() ) |
|
| 106 | - ->set_security_code( $credit_card->get_security_code() ); |
|
| 104 | + ->set_number($credit_card->get_number()) |
|
| 105 | + ->set_expiration_date($credit_card->get_expiration_date()) |
|
| 106 | + ->set_security_code($credit_card->get_security_code()); |
|
| 107 | 107 | } |
| 108 | 108 | |
| 109 | - $ogone_data->set_field( 'OPERATION', 'SAL' ); |
|
| 109 | + $ogone_data->set_field('OPERATION', 'SAL'); |
|
| 110 | 110 | |
| 111 | 111 | // 3-D Secure |
| 112 | - if ( $this->config->enabled_3d_secure ) { |
|
| 113 | - $secure_data_helper = new SecureDataHelper( $ogone_data ); |
|
| 112 | + if ($this->config->enabled_3d_secure) { |
|
| 113 | + $secure_data_helper = new SecureDataHelper($ogone_data); |
|
| 114 | 114 | |
| 115 | 115 | $secure_data_helper |
| 116 | - ->set_3d_secure_flag( true ) |
|
| 117 | - ->set_http_accept( Server::get( 'HTTP_ACCEPT' ) ) |
|
| 118 | - ->set_http_user_agent( Server::get( 'HTTP_USER_AGENT' ) ) |
|
| 119 | - ->set_window( 'MAINW' ); |
|
| 120 | - |
|
| 121 | - $ogone_data->set_field( 'ACCEPTURL', $payment->get_return_url() ); |
|
| 122 | - $ogone_data->set_field( 'DECLINEURL', $payment->get_return_url() ); |
|
| 123 | - $ogone_data->set_field( 'EXCEPTIONURL', $payment->get_return_url() ); |
|
| 124 | - $ogone_data->set_field( 'COMPLUS', '' ); |
|
| 116 | + ->set_3d_secure_flag(true) |
|
| 117 | + ->set_http_accept(Server::get('HTTP_ACCEPT')) |
|
| 118 | + ->set_http_user_agent(Server::get('HTTP_USER_AGENT')) |
|
| 119 | + ->set_window('MAINW'); |
|
| 120 | + |
|
| 121 | + $ogone_data->set_field('ACCEPTURL', $payment->get_return_url()); |
|
| 122 | + $ogone_data->set_field('DECLINEURL', $payment->get_return_url()); |
|
| 123 | + $ogone_data->set_field('EXCEPTIONURL', $payment->get_return_url()); |
|
| 124 | + $ogone_data->set_field('COMPLUS', ''); |
|
| 125 | 125 | } |
| 126 | 126 | |
| 127 | 127 | // Signature |
| 128 | 128 | $calculation_fields = Security::get_calculations_parameters_in(); |
| 129 | 129 | |
| 130 | - $fields = Security::get_calculation_fields( $calculation_fields, $ogone_data->get_fields() ); |
|
| 130 | + $fields = Security::get_calculation_fields($calculation_fields, $ogone_data->get_fields()); |
|
| 131 | 131 | |
| 132 | - $signature = Security::get_signature( $fields, $this->config->sha_in_pass_phrase, $this->config->hash_algorithm ); |
|
| 132 | + $signature = Security::get_signature($fields, $this->config->sha_in_pass_phrase, $this->config->hash_algorithm); |
|
| 133 | 133 | |
| 134 | - $ogone_data->set_field( 'SHASIGN', $signature ); |
|
| 134 | + $ogone_data->set_field('SHASIGN', $signature); |
|
| 135 | 135 | |
| 136 | 136 | // Order |
| 137 | - $result = $this->client->order_direct( $ogone_data->get_fields() ); |
|
| 137 | + $result = $this->client->order_direct($ogone_data->get_fields()); |
|
| 138 | 138 | |
| 139 | 139 | $error = $this->client->get_error(); |
| 140 | 140 | |
| 141 | - if ( is_wp_error( $error ) ) { |
|
| 141 | + if (is_wp_error($error)) { |
|
| 142 | 142 | $this->error = $error; |
| 143 | 143 | } else { |
| 144 | - $payment->set_transaction_id( $result->pay_id ); |
|
| 145 | - $payment->set_action_url( $payment->get_return_url() ); |
|
| 146 | - $payment->set_status( Statuses::transform( $result->status ) ); |
|
| 144 | + $payment->set_transaction_id($result->pay_id); |
|
| 145 | + $payment->set_action_url($payment->get_return_url()); |
|
| 146 | + $payment->set_status(Statuses::transform($result->status)); |
|
| 147 | 147 | |
| 148 | - if ( ! empty( $result->html_answer ) ) { |
|
| 149 | - $payment->set_meta( 'ogone_directlink_html_answer', $result->html_answer ); |
|
| 150 | - $payment->set_action_url( add_query_arg( 'payment_redirect', $payment->get_id(), home_url( '/' ) ) ); |
|
| 148 | + if ( ! empty($result->html_answer)) { |
|
| 149 | + $payment->set_meta('ogone_directlink_html_answer', $result->html_answer); |
|
| 150 | + $payment->set_action_url(add_query_arg('payment_redirect', $payment->get_id(), home_url('/'))); |
|
| 151 | 151 | } |
| 152 | 152 | } |
| 153 | 153 | } |
@@ -157,22 +157,22 @@ discard block |
||
| 157 | 157 | * |
| 158 | 158 | * @param Payment $payment |
| 159 | 159 | */ |
| 160 | - public function update_status( Payment $payment ) { |
|
| 160 | + public function update_status(Payment $payment) { |
|
| 161 | 161 | $data = Security::get_request_data(); |
| 162 | 162 | |
| 163 | - $data = array_change_key_case( $data, CASE_UPPER ); |
|
| 163 | + $data = array_change_key_case($data, CASE_UPPER); |
|
| 164 | 164 | |
| 165 | 165 | $calculation_fields = Security::get_calculations_parameters_out(); |
| 166 | 166 | |
| 167 | - $fields = Security::get_calculation_fields( $calculation_fields, $data ); |
|
| 167 | + $fields = Security::get_calculation_fields($calculation_fields, $data); |
|
| 168 | 168 | |
| 169 | 169 | $signature = $data['SHASIGN']; |
| 170 | - $signature_out = Security::get_signature( $fields, $this->config->sha_out_pass_phrase, $this->config->hash_algorithm ); |
|
| 170 | + $signature_out = Security::get_signature($fields, $this->config->sha_out_pass_phrase, $this->config->hash_algorithm); |
|
| 171 | 171 | |
| 172 | - if ( 0 === strcasecmp( $signature, $signature_out ) ) { |
|
| 173 | - $status = Statuses::transform( $data[ Parameters::STATUS ] ); |
|
| 172 | + if (0 === strcasecmp($signature, $signature_out)) { |
|
| 173 | + $status = Statuses::transform($data[Parameters::STATUS]); |
|
| 174 | 174 | |
| 175 | - $payment->set_status( $status ); |
|
| 175 | + $payment->set_status($status); |
|
| 176 | 176 | } |
| 177 | 177 | } |
| 178 | 178 | } |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | /** |
| 26 | 26 | * Constructs and initialize a Ogone data default helper class |
| 27 | 27 | */ |
| 28 | - public function __construct( Data $data ) { |
|
| 28 | + public function __construct(Data $data) { |
|
| 29 | 29 | $this->data = $data; |
| 30 | 30 | } |
| 31 | 31 | |
@@ -36,8 +36,8 @@ discard block |
||
| 36 | 36 | * |
| 37 | 37 | * @return DataHelper |
| 38 | 38 | */ |
| 39 | - public function set_user_id( $user_id ) { |
|
| 40 | - $this->data->set_field( 'USERID', $user_id ); |
|
| 39 | + public function set_user_id($user_id) { |
|
| 40 | + $this->data->set_field('USERID', $user_id); |
|
| 41 | 41 | |
| 42 | 42 | return $this; |
| 43 | 43 | } |
@@ -49,8 +49,8 @@ discard block |
||
| 49 | 49 | * |
| 50 | 50 | * @return DataHelper |
| 51 | 51 | */ |
| 52 | - public function set_password( $password ) { |
|
| 53 | - $this->data->set_field( 'PSWD', $password ); |
|
| 52 | + public function set_password($password) { |
|
| 53 | + $this->data->set_field('PSWD', $password); |
|
| 54 | 54 | |
| 55 | 55 | return $this; |
| 56 | 56 | } |
@@ -15,25 +15,25 @@ discard block |
||
| 15 | 15 | * @version 2.0.0 |
| 16 | 16 | */ |
| 17 | 17 | class ConfigFactory extends GatewayConfigFactory { |
| 18 | - public function get_config( $post_id ) { |
|
| 18 | + public function get_config($post_id) { |
|
| 19 | 19 | $config = new Config(); |
| 20 | 20 | |
| 21 | - $config->mode = get_post_meta( $post_id, '_pronamic_gateway_mode', true ); |
|
| 22 | - $config->psp_id = get_post_meta( $post_id, '_pronamic_gateway_ogone_psp_id', true ); |
|
| 23 | - $config->hash_algorithm = get_post_meta( $post_id, '_pronamic_gateway_ogone_hash_algorithm', true ); |
|
| 24 | - $config->sha_out_pass_phrase = get_post_meta( $post_id, '_pronamic_gateway_ogone_sha_out_pass_phrase', true ); |
|
| 25 | - $config->user_id = get_post_meta( $post_id, '_pronamic_gateway_ogone_user_id', true ); |
|
| 26 | - $config->password = get_post_meta( $post_id, '_pronamic_gateway_ogone_password', true ); |
|
| 27 | - $config->sha_in_pass_phrase = get_post_meta( $post_id, '_pronamic_gateway_ogone_directlink_sha_in_pass_phrase', true ); |
|
| 28 | - $config->enabled_3d_secure = get_post_meta( $post_id, '_pronamic_gateway_ogone_3d_secure_enabled', true ); |
|
| 29 | - $config->order_id = get_post_meta( $post_id, '_pronamic_gateway_ogone_order_id', true ); |
|
| 21 | + $config->mode = get_post_meta($post_id, '_pronamic_gateway_mode', true); |
|
| 22 | + $config->psp_id = get_post_meta($post_id, '_pronamic_gateway_ogone_psp_id', true); |
|
| 23 | + $config->hash_algorithm = get_post_meta($post_id, '_pronamic_gateway_ogone_hash_algorithm', true); |
|
| 24 | + $config->sha_out_pass_phrase = get_post_meta($post_id, '_pronamic_gateway_ogone_sha_out_pass_phrase', true); |
|
| 25 | + $config->user_id = get_post_meta($post_id, '_pronamic_gateway_ogone_user_id', true); |
|
| 26 | + $config->password = get_post_meta($post_id, '_pronamic_gateway_ogone_password', true); |
|
| 27 | + $config->sha_in_pass_phrase = get_post_meta($post_id, '_pronamic_gateway_ogone_directlink_sha_in_pass_phrase', true); |
|
| 28 | + $config->enabled_3d_secure = get_post_meta($post_id, '_pronamic_gateway_ogone_3d_secure_enabled', true); |
|
| 29 | + $config->order_id = get_post_meta($post_id, '_pronamic_gateway_ogone_order_id', true); |
|
| 30 | 30 | |
| 31 | 31 | // API URL |
| 32 | - $is_utf8 = strcasecmp( get_bloginfo( 'charset' ), 'UTF-8' ) === 0; |
|
| 32 | + $is_utf8 = strcasecmp(get_bloginfo('charset'), 'UTF-8') === 0; |
|
| 33 | 33 | |
| 34 | - switch ( $config->mode ) { |
|
| 34 | + switch ($config->mode) { |
|
| 35 | 35 | case Gateway::MODE_TEST: |
| 36 | - if ( $is_utf8 ) { |
|
| 36 | + if ($is_utf8) { |
|
| 37 | 37 | $config->api_url = DirectLink::API_TEST_UTF8_URL; |
| 38 | 38 | } else { |
| 39 | 39 | $config->api_url = DirectLink::API_TEST_URL; |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | |
| 42 | 42 | break; |
| 43 | 43 | default: |
| 44 | - if ( $is_utf8 ) { |
|
| 44 | + if ($is_utf8) { |
|
| 45 | 45 | $config->api_url = DirectLink::API_PRODUCTION_UTF8_URL; |
| 46 | 46 | } else { |
| 47 | 47 | $config->api_url = DirectLink::API_PRODUCTION_URL; |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | /** |
| 24 | 24 | * Constructs and initialize a payment methods list |
| 25 | 25 | */ |
| 26 | - public function __construct( array $list = array() ) { |
|
| 26 | + public function __construct(array $list = array()) { |
|
| 27 | 27 | $this->list = $list; |
| 28 | 28 | } |
| 29 | 29 | |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | * |
| 33 | 33 | * @param string $payment_method |
| 34 | 34 | */ |
| 35 | - public function add_payment_method( $payment_method ) { |
|
| 35 | + public function add_payment_method($payment_method) { |
|
| 36 | 36 | $this->list[] = $payment_method; |
| 37 | 37 | } |
| 38 | 38 | |
@@ -44,6 +44,6 @@ discard block |
||
| 44 | 44 | * @return string |
| 45 | 45 | */ |
| 46 | 46 | public function __toString() { |
| 47 | - return implode( ';', $this->list ); |
|
| 47 | + return implode(';', $this->list); |
|
| 48 | 48 | } |
| 49 | 49 | } |
@@ -33,7 +33,7 @@ |
||
| 33 | 33 | * @param string $code |
| 34 | 34 | * @param string $explanation |
| 35 | 35 | */ |
| 36 | - public function __construct( $code, $explanation ) { |
|
| 36 | + public function __construct($code, $explanation) { |
|
| 37 | 37 | $this->code = $code; |
| 38 | 38 | $this->explanation = $explanation; |
| 39 | 39 | } |
@@ -22,8 +22,8 @@ discard block |
||
| 22 | 22 | * |
| 23 | 23 | * @param string $url |
| 24 | 24 | */ |
| 25 | - public function set_accept_url( $url ) { |
|
| 26 | - return $this->set_field( Parameters::ACCEPT_URL, $url ); |
|
| 25 | + public function set_accept_url($url) { |
|
| 26 | + return $this->set_field(Parameters::ACCEPT_URL, $url); |
|
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | /** |
@@ -33,8 +33,8 @@ discard block |
||
| 33 | 33 | * |
| 34 | 34 | * @param string $url |
| 35 | 35 | */ |
| 36 | - public function set_cancel_url( $url ) { |
|
| 37 | - return $this->set_field( Parameters::CANCEL_URL, $url ); |
|
| 36 | + public function set_cancel_url($url) { |
|
| 37 | + return $this->set_field(Parameters::CANCEL_URL, $url); |
|
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 | /** |
@@ -44,8 +44,8 @@ discard block |
||
| 44 | 44 | * |
| 45 | 45 | * @param string $url |
| 46 | 46 | */ |
| 47 | - public function set_exception_url( $url ) { |
|
| 48 | - return $this->set_field( Parameters::EXCEPTION_URL, $url ); |
|
| 47 | + public function set_exception_url($url) { |
|
| 48 | + return $this->set_field(Parameters::EXCEPTION_URL, $url); |
|
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | /** |
@@ -57,8 +57,8 @@ discard block |
||
| 57 | 57 | * |
| 58 | 58 | * @param string $url |
| 59 | 59 | */ |
| 60 | - public function set_decline_url( $url ) { |
|
| 61 | - return $this->set_field( Parameters::DECLINE_URL, $url ); |
|
| 60 | + public function set_decline_url($url) { |
|
| 61 | + return $this->set_field(Parameters::DECLINE_URL, $url); |
|
| 62 | 62 | } |
| 63 | 63 | |
| 64 | 64 | /** |
@@ -66,8 +66,8 @@ discard block |
||
| 66 | 66 | * |
| 67 | 67 | * @param string $url |
| 68 | 68 | */ |
| 69 | - public function set_home_url( $url ) { |
|
| 70 | - return $this->set_field( 'home', $url ); |
|
| 69 | + public function set_home_url($url) { |
|
| 70 | + return $this->set_field('home', $url); |
|
| 71 | 71 | } |
| 72 | 72 | |
| 73 | 73 | /** |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | * |
| 76 | 76 | * @param string $url |
| 77 | 77 | */ |
| 78 | - public function set_back_url( $url ) { |
|
| 79 | - return $this->set_field( 'backurl', $url ); |
|
| 78 | + public function set_back_url($url) { |
|
| 79 | + return $this->set_field('backurl', $url); |
|
| 80 | 80 | } |
| 81 | 81 | } |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | /** |
| 24 | 24 | * Constructs and initialize a Ogone data default helper class |
| 25 | 25 | */ |
| 26 | - public function __construct( Data $data ) { |
|
| 26 | + public function __construct(Data $data) { |
|
| 27 | 27 | $this->data = $data; |
| 28 | 28 | } |
| 29 | 29 | |
@@ -33,8 +33,8 @@ discard block |
||
| 33 | 33 | * @param string $name |
| 34 | 34 | * @param string $value |
| 35 | 35 | */ |
| 36 | - public function set_field( $name, $value ) { |
|
| 37 | - $this->data->set_field( $name, $value ); |
|
| 36 | + public function set_field($name, $value) { |
|
| 37 | + $this->data->set_field($name, $value); |
|
| 38 | 38 | |
| 39 | 39 | return $this; |
| 40 | 40 | } |