Skip to content

Commit

Permalink
Merge pull request #65 from wirecard/payment-method-overwrite
Browse files Browse the repository at this point in the history
#64 Add overwrite payment method in order before redirect
  • Loading branch information
tomazpu authored Apr 18, 2018
2 parents 621aa56 + edca954 commit 3d34dab
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
*/

define( 'WOOCOMMERCE_GATEWAY_WCS_NAME', 'WirecardCheckoutSeamless' );
define( 'WOOCOMMERCE_GATEWAY_WCS_VERSION', '1.0.14' );
define( 'WOOCOMMERCE_GATEWAY_WCS_VERSION', '1.0.15' );

/**
* Config class
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,11 @@ public function process_payment( $order_id ) {

$payment_type = $_POST['wcs_payment_method'];

$paymentClass = 'WC_Gateway_Wirecard_Checkout_Seamless_'. str_replace('-', '_', ucfirst(strtolower($payment_type)));
$paymentClass = new $paymentClass( $this->settings );
update_post_meta( $order_id, '_payment_method_title', $paymentClass->get_label());


$page_url = $order->get_checkout_payment_url(true);
$page_url = add_query_arg( 'key', $order->get_order_key(), $page_url );
$page_url = add_query_arg( 'order-pay', $order_id, $page_url );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: Wirecard Checkout Seamless
* Plugin URI: https://github.com/wirecard/woocommerce-wcs
* Description: Wirecard Checkout Seamless plugin for WooCommerce
* Version: 1.0.13
* Version: 1.0.15
* Author: Wirecard
* Author URI: https://www.wirecard.at/
* License: GPL2
Expand Down

0 comments on commit 3d34dab

Please sign in to comment.