| @@ -193,7 +193,7 @@ | ||
| 193 | 193 | $signature_out = Security::get_signature( $fields, $this->config->sha_out_pass_phrase, $this->config->hash_algorithm ); | 
| 194 | 194 | |
| 195 | 195 |  		if ( 0 === strcasecmp( $signature, $signature_out ) ) { | 
| 196 | - $status = Statuses::transform( $data[ Parameters::STATUS ] ); | |
| 196 | + $status = Statuses::transform( $data[Parameters::STATUS] ); | |
| 197 | 197 | |
| 198 | 198 | $payment->set_status( $status ); | 
| 199 | 199 | } | 
| @@ -44,8 +44,8 @@ discard block | ||
| 44 | 44 |  	public function get_field( $name ) { | 
| 45 | 45 | $value = null; | 
| 46 | 46 | |
| 47 | -		if ( isset( $this->fields[ $name ] ) ) { | |
| 48 | - $value = $this->fields[ $name ]; | |
| 47 | +		if ( isset( $this->fields[$name] ) ) { | |
| 48 | + $value = $this->fields[$name]; | |
| 49 | 49 | } | 
| 50 | 50 | |
| 51 | 51 | return $value; | 
| @@ -60,7 +60,7 @@ discard block | ||
| 60 | 60 | * @return Data | 
| 61 | 61 | */ | 
| 62 | 62 |  	public function set_field( $name, $value ) { | 
| 63 | - $this->fields[ $name ] = $value; | |
| 63 | + $this->fields[$name] = $value; | |
| 64 | 64 | |
| 65 | 65 | return $this; | 
| 66 | 66 | } | 
| @@ -32,14 +32,14 @@ | ||
| 32 | 32 | |
| 33 | 33 | $order_response->order_id = Security::filter( $xml['orderID'] ); | 
| 34 | 34 | $order_response->pay_id = Security::filter( $xml['PAYID'] ); | 
| 35 | - $order_response->nc_status = Security::filter( $xml[ Parameters::NC_STATUS ] ); | |
| 36 | - $order_response->nc_error = Security::filter( $xml[ Parameters::NC_ERROR ] ); | |
| 37 | - $order_response->nc_error_plus = Security::filter( $xml[ Parameters::NC_ERROR_PLUS ] ); | |
| 35 | + $order_response->nc_status = Security::filter( $xml[Parameters::NC_STATUS] ); | |
| 36 | + $order_response->nc_error = Security::filter( $xml[Parameters::NC_ERROR] ); | |
| 37 | + $order_response->nc_error_plus = Security::filter( $xml[Parameters::NC_ERROR_PLUS] ); | |
| 38 | 38 | $order_response->acceptance = Security::filter( $xml['ACCEPTANCE'] ); | 
| 39 | - $order_response->status = Security::filter( $xml[ Parameters::STATUS ] ); | |
| 39 | + $order_response->status = Security::filter( $xml[Parameters::STATUS] ); | |
| 40 | 40 | $order_response->eci = Security::filter( $xml['ECI'] ); | 
| 41 | - $order_response->amount = Security::filter( $xml[ Parameters::AMOUNT ] ); | |
| 42 | - $order_response->currency = Security::filter( $xml[ Parameters::CURRENCY ] ); | |
| 41 | + $order_response->amount = Security::filter( $xml[Parameters::AMOUNT] ); | |
| 42 | + $order_response->currency = Security::filter( $xml[Parameters::CURRENCY] ); | |
| 43 | 43 | $order_response->pm = Security::filter( $xml['PM'] ); | 
| 44 | 44 | $order_response->brand = Security::filter( $xml['BRAND'] ); | 
| 45 | 45 | |
| @@ -214,7 +214,7 @@ discard block | ||
| 214 | 214 | $data = $this->client->verify_request( $data ); | 
| 215 | 215 | |
| 216 | 216 |  		if ( false !== $data ) { | 
| 217 | - $status = Statuses::transform( $data[ Parameters::STATUS ] ); | |
| 217 | + $status = Statuses::transform( $data[Parameters::STATUS] ); | |
| 218 | 218 | |
| 219 | 219 | $payment->set_status( $status ); | 
| 220 | 220 | |
| @@ -266,9 +266,9 @@ discard block | ||
| 266 | 266 | $note .= '<dl>'; | 
| 267 | 267 | |
| 268 | 268 |  		foreach ( $labels as $key => $label ) { | 
| 269 | -			if ( isset( $data[ $key ] ) && '' !== $data[ $key ] ) { | |
| 269 | +			if ( isset( $data[$key] ) && '' !== $data[$key] ) { | |
| 270 | 270 | $note .= sprintf( '<dt>%s</dt>', esc_html( $label ) ); | 
| 271 | - $note .= sprintf( '<dd>%s</dd>', esc_html( $data[ $key ] ) ); | |
| 271 | + $note .= sprintf( '<dd>%s</dd>', esc_html( $data[$key] ) ); | |
| 272 | 272 | } | 
| 273 | 273 | } | 
| 274 | 274 | |
| @@ -21,12 +21,12 @@ | ||
| 21 | 21 | $data = array_change_key_case( $data, CASE_UPPER ); | 
| 22 | 22 | |
| 23 | 23 | if ( isset( | 
| 24 | - $data[ Parameters::NC_ERROR ], | |
| 24 | + $data[Parameters::NC_ERROR], | |
| 25 | 25 | $data['PAYID'], | 
| 26 | - $data[ Parameters::ORDERID ], | |
| 27 | - $data[ Parameters::STATUS ] | |
| 26 | + $data[Parameters::ORDERID], | |
| 27 | + $data[Parameters::STATUS] | |
| 28 | 28 |  		) ) { | 
| 29 | - $payment_id = $data[ Parameters::ORDERID ]; | |
| 29 | + $payment_id = $data[Parameters::ORDERID]; | |
| 30 | 30 | |
| 31 | 31 |  			if ( isset( $data['PAYMENT_ID'] ) ) { | 
| 32 | 32 | $payment_id = filter_var( $data['PAYMENT_ID'], FILTER_SANITIZE_NUMBER_INT ); | 
| @@ -30,12 +30,12 @@ discard block | ||
| 30 | 30 | // WARNING WARNING WARNING! | 
| 31 | 31 | // These tests will DROP ALL TABLES in the database with the prefix named below. | 
| 32 | 32 | // DO NOT use a production database or one that is shared with something else. | 
| 33 | -define( 'DB_NAME' , getenv( 'WP_TESTS_DB_NAME' ) ?: 'wp_phpunit_tests' ); | |
| 34 | -define( 'DB_USER' , getenv( 'WP_TESTS_DB_USER' ) ?: 'root' ); | |
| 35 | -define( 'DB_PASSWORD' , getenv( 'WP_TESTS_DB_PASS' ) ?: '' ); | |
| 36 | -define( 'DB_HOST' , getenv( 'WP_TESTS_DB_HOST' ) ?: 'localhost' ); | |
| 37 | -define( 'DB_CHARSET' , 'utf8' ); | |
| 38 | -define( 'DB_COLLATE' , '' ); | |
| 33 | +define( 'DB_NAME', getenv( 'WP_TESTS_DB_NAME' ) ?: 'wp_phpunit_tests' ); | |
| 34 | +define( 'DB_USER', getenv( 'WP_TESTS_DB_USER' ) ?: 'root' ); | |
| 35 | +define( 'DB_PASSWORD', getenv( 'WP_TESTS_DB_PASS' ) ?: '' ); | |
| 36 | +define( 'DB_HOST', getenv( 'WP_TESTS_DB_HOST' ) ?: 'localhost' ); | |
| 37 | +define( 'DB_CHARSET', 'utf8' ); | |
| 38 | +define( 'DB_COLLATE', '' ); | |
| 39 | 39 | |
| 40 | 40 | /**#@+ | 
| 41 | 41 | * Authentication Unique Keys and Salts. | 
| @@ -43,14 +43,14 @@ discard block | ||
| 43 | 43 | * Change these to different unique phrases! | 
| 44 | 44 |   * You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service} | 
| 45 | 45 | */ | 
| 46 | -define( 'AUTH_KEY', 'put your unique phrase here' ); | |
| 47 | -define( 'SECURE_AUTH_KEY', 'put your unique phrase here' ); | |
| 48 | -define( 'LOGGED_IN_KEY', 'put your unique phrase here' ); | |
| 49 | -define( 'NONCE_KEY', 'put your unique phrase here' ); | |
| 50 | -define( 'AUTH_SALT', 'put your unique phrase here' ); | |
| 46 | +define( 'AUTH_KEY', 'put your unique phrase here' ); | |
| 47 | +define( 'SECURE_AUTH_KEY', 'put your unique phrase here' ); | |
| 48 | +define( 'LOGGED_IN_KEY', 'put your unique phrase here' ); | |
| 49 | +define( 'NONCE_KEY', 'put your unique phrase here' ); | |
| 50 | +define( 'AUTH_SALT', 'put your unique phrase here' ); | |
| 51 | 51 | define( 'SECURE_AUTH_SALT', 'put your unique phrase here' ); | 
| 52 | -define( 'LOGGED_IN_SALT', 'put your unique phrase here' ); | |
| 53 | -define( 'NONCE_SALT', 'put your unique phrase here' ); | |
| 52 | +define( 'LOGGED_IN_SALT', 'put your unique phrase here' ); | |
| 53 | +define( 'NONCE_SALT', 'put your unique phrase here' ); | |
| 54 | 54 | |
| 55 | 55 | define( 'WP_TESTS_DOMAIN', 'example.org' ); | 
| 56 | 56 | define( 'WP_TESTS_EMAIL', '[email protected]' ); |