diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c1e861..03eb0bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Release Notes - heidelpay Payment Gateway for WooCommerce +## 1.1.1 + +### Fixed: +- a bug that caused the payment requests to fail in some shops due to an invalid url. + ## 1.1.0 ### Added @@ -17,9 +22,9 @@ - Secured Invoice: added validation on checkout. ### Changed - +- payment methods will be deactivated by default. ## 1.0.1 ### Fixed -- A bug which caused that the sandbox mode was activated regadless of the state of the switch. \ No newline at end of file +- A bug which caused that the sandbox mode was activated regardless of the state of the switch. \ No newline at end of file diff --git a/includes/abstracts/abstract-wc-heidelpay-iframe-gateway.php b/includes/abstracts/abstract-wc-heidelpay-iframe-gateway.php index 060f76b..ada650c 100644 --- a/includes/abstracts/abstract-wc-heidelpay-iframe-gateway.php +++ b/includes/abstracts/abstract-wc-heidelpay-iframe-gateway.php @@ -133,7 +133,7 @@ protected function getIFrame( WC_Order $order) if (method_exists($this->payMethod, $bookingAction)) { $this->payMethod->$bookingAction( - $host, // PaymentFrameOrigin - uri of your application like https://dev.heidelpay.com + $host, 'FALSE', $cssPath ); @@ -144,7 +144,6 @@ protected function getIFrame( WC_Order $order) . $this->payMethod->getResponse()->getPaymentFormUrl() . '" frameborder="0" scrolling="no" style="height:360px;">
'; } else { - $iFrame .= get_home_url() . '/wp-content/plugins/woocommerce-heidelpay/vendor/'; $iFrame .= '
' . print_r($this->getErrorMessage(), 1) . '
'; } $iFrame .= ''; diff --git a/includes/abstracts/abstract-wc-heidelpay-payment-gateway.php b/includes/abstracts/abstract-wc-heidelpay-payment-gateway.php index 9b9a934..15f1752 100644 --- a/includes/abstracts/abstract-wc-heidelpay-payment-gateway.php +++ b/includes/abstracts/abstract-wc-heidelpay-payment-gateway.php @@ -233,7 +233,7 @@ protected function setAsync() { $this->payMethod->getRequest()->async( $this->getLanguage(), // Language code for the Frame - get_permalink(wc_get_page_id('shop')) . 'wc-api/' . strtolower(get_class($this)) + get_home_url() . '/wc-api/' . strtolower(get_class($this)) ); } @@ -371,7 +371,7 @@ protected function handleFormPost() */ protected function getErrorMessage(Response $response = null) { - if ($response !== null AND $this->payMethod->getResponse() !== null) { + if ($response !== null || $this->payMethod->getResponse() !== null) { if (!empty($response['code'])) { return htmlspecialchars($this->messageMapper->getMessage($response->getError()['code'])); } diff --git a/languages/woocommerce-heidelpay.pot b/languages/woocommerce-heidelpay.pot index f29219a..da6ce7d 100644 --- a/languages/woocommerce-heidelpay.pot +++ b/languages/woocommerce-heidelpay.pot @@ -2,7 +2,7 @@ # This file is distributed under the same license as the heidelpay WooCommerce package. msgid "" msgstr "" -"Project-Id-Version: heidelpay WooCommerce 1.1.0\n" +"Project-Id-Version: heidelpay WooCommerce 1.1.1\n" "Report-Msgid-Bugs-To: http://wordpress.org/support/plugin/woocommerce-" "heidelpay\n" "POT-Creation-Date: 2018-06-15 08:21:52+00:00\n" diff --git a/woocommerce-heidelpay.php b/woocommerce-heidelpay.php index 8b73d40..6fef7b3 100644 --- a/woocommerce-heidelpay.php +++ b/woocommerce-heidelpay.php @@ -10,7 +10,7 @@ * Plugin Name: heidelpay WooCommerce * Plugin URI: https://dev.heidelpay.com * Description: heidelpay payment integration for WooCommerce - * Version: 1.1.0 + * Version: 1.1.1 * Author: heidelpay * Author URI: htts://www.heidelpay.com * Developer: heidelpay @@ -29,7 +29,7 @@ /** * Required minimums and constants */ - define('WC_HEIDELPAY_VERSION', '1.1.0'); + define('WC_HEIDELPAY_VERSION', '1.1.1'); define('WC_HEIDELPAY_MIN_PHP_VER', '5.6.0'); define('WC_HEIDELPAY_MIN_WC_VER', '3.0.0'); define('WC_HEIDELPAY_MAIN_FILE', __FILE__);