Skip to content

Commit

Permalink
#76 Update cs
Browse files Browse the repository at this point in the history
  • Loading branch information
serucee committed Nov 12, 2018
1 parent 5ba8286 commit bcc6342
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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() );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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() ) )
Expand All @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ class="payment_box payment_method_wcs_<?= ( $type->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 );
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit bcc6342

Please sign in to comment.