From bcc6342dbf756dd9e56ad19490e94e03a13df3d7 Mon Sep 17 00:00:00 2001 From: serucee Date: Mon, 12 Nov 2018 15:06:06 +0100 Subject: [PATCH] #76 Update cs --- .../classes/class-wirecard-backend-operations.php | 4 ++-- .../classes/class-wirecard-config.php | 6 +++--- .../classes/class-wirecard-gateway.php | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/woocommerce-wirecard-checkout-seamless/classes/class-wirecard-backend-operations.php b/woocommerce-wirecard-checkout-seamless/classes/class-wirecard-backend-operations.php index 2e91dfa..2d116dc 100644 --- a/woocommerce-wirecard-checkout-seamless/classes/class-wirecard-backend-operations.php +++ b/woocommerce-wirecard-checkout-seamless/classes/class-wirecard-backend-operations.php @@ -126,7 +126,7 @@ public function refund( $order_id = 0, $amount = 0, $reason = '' ) { // get transaction informations $tx_query = $wpdb->prepare( "SELECT * FROM {$wpdb->prefix}wirecard_checkout_seamless_tx WHERE id_order = %d", $order_id ); $tx_data = $wpdb->get_row( $tx_query ); - $tx_original = unserialize($tx_data->request); + $tx_original = unserialize( $tx_data->request ); $basket = null; @@ -155,7 +155,7 @@ public function refund( $order_id = 0, $amount = 0, $reason = '' ) { } } - $basket = $this->create_basket( $refund_items, $wc_order, $tx_original); + $basket = $this->create_basket( $refund_items, $wc_order, $tx_original ); $response_with_basket = $this->get_client()->refund( $wcs_order_number, $refund_amount, $order->getCurrency(), $basket ); if ( $response_with_basket->hasFailed() ) { $this->logResponseErrors( __METHOD__, $response_with_basket->getErrors() ); diff --git a/woocommerce-wirecard-checkout-seamless/classes/class-wirecard-config.php b/woocommerce-wirecard-checkout-seamless/classes/class-wirecard-config.php index 770a132..7174765 100644 --- a/woocommerce-wirecard-checkout-seamless/classes/class-wirecard-config.php +++ b/woocommerce-wirecard-checkout-seamless/classes/class-wirecard-config.php @@ -383,7 +383,7 @@ public function get_customer_statement( $order, $payment_type ) { * @since 1.0.0 * @return WirecardCEE_Stdlib_Basket */ - public function get_shopping_basket($order_amount = 0) { + public function get_shopping_basket( $order_amount = 0 ) { global $woocommerce; $cart = $woocommerce->cart; @@ -436,7 +436,7 @@ public function get_shopping_basket($order_amount = 0) { } if ( $order_amount > 0 ) { - $rounding_difference = $this->get_rounding_difference($basket, $order_amount); + $rounding_difference = $this->get_rounding_difference( $basket, $order_amount ); if ( $rounding_difference != 0 ) { $item = new WirecardCEE_Stdlib_Basket_Item( 'rounding' ); $item->setUnitGrossAmount( wc_format_decimal( $rounding_difference, wc_get_price_decimals() ) ) @@ -458,7 +458,7 @@ public function get_shopping_basket($order_amount = 0) { * @param float $total_amount * @return float */ - public function get_rounding_difference(WirecardCEE_Stdlib_Basket $basket, $total_amount) { + public function get_rounding_difference( WirecardCEE_Stdlib_Basket $basket, $total_amount ) { $total_amount_rounded = 0; $amount_difference = 0; $basket_data = $basket->getData(); diff --git a/woocommerce-wirecard-checkout-seamless/classes/class-wirecard-gateway.php b/woocommerce-wirecard-checkout-seamless/classes/class-wirecard-gateway.php index 44ac2ef..8915c6a 100644 --- a/woocommerce-wirecard-checkout-seamless/classes/class-wirecard-gateway.php +++ b/woocommerce-wirecard-checkout-seamless/classes/class-wirecard-gateway.php @@ -401,7 +401,7 @@ class="payment_box payment_method_wcs_has_payment_fields() ) ? $typ */ public function process_refund( $order_id, $amount = null, $reason = '' ) { - if( empty( $this->settings['woo_wcs_backendpassword'] ) ) { + if ( empty( $this->settings['woo_wcs_backendpassword'] ) ) { return new WP_Error( 'refund_error', 'No password for backend operations (Toolkit) provided. Please visit your settings!' ); } $backend_operations = new WC_Gateway_Wirecard_Checkout_Seamless_Backend_Operations( $this->settings ); @@ -570,7 +570,7 @@ public function initiate_payment( $order ) { if ( $this->get_option( 'woo_wcs_forwardbasketdata' ) || ( $this->_config->force_basket_data( $checkout_data['wcs_payment_method'], $this ) ) ) { - $client->setBasket( $this->_config->get_shopping_basket($order->get_total()) ); + $client->setBasket( $this->_config->get_shopping_basket( $order->get_total() ) ); } $client->wooOrderId = $order->get_id(); @@ -1003,7 +1003,7 @@ public function wirecard_transaction_do_page() { $this->_admin->include_backend_header( $this ); - if( empty( $this->settings['woo_wcs_backendpassword'] ) ) { + if ( empty( $this->settings['woo_wcs_backendpassword'] ) ) { $this->wirecard_transactions_error_page( 'No password for backend operations (Toolkit) provided. Please visit your settings!' ); return false; }