Skip to content

Commit

Permalink
Release 2.0.5.1 (#87)
Browse files Browse the repository at this point in the history
**Fixes**
- Fix issue with payment validation when consumer adds spaces after cardholder name

**Changes**
- Set SAQ A to default ON for new installations
- Remove preselection of Qenta Payment Method to avoid interference with 3rd party payment plugins
- Test with version 5.9 of WP
  • Loading branch information
HMKnapp authored Feb 10, 2022
1 parent ecace6e commit cb02fed
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 13 deletions.
34 changes: 29 additions & 5 deletions woocommerce-qenta-checkout-seamless/assets/scripts/payment.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,34 @@
* Please do not use the plugin if you do not agree to these terms of use!
*/

function changeWCSPayment(code) {
function changeWCSPayment(code) {
var changer = document.getElementById('wcs_payment_method_changer');
changer.value = code;
qenta_wcs.build_iframe(code.toLowerCase());
}

const umlautMap = {
'\u00dc': 'UE',
'\u00c4': 'AE',
'\u00d6': 'OE',
'\u00fc': 'ue',
'\u00e4': 'ae',
'\u00f6': 'oe',
'\u00df': 'ss',
}

// thx to https://stackoverflow.com/a/54346022
function replaceUmlaute(str) {
return str
.replace(/[\u00dc|\u00c4|\u00d6][a-z]/g, (a) => {
const big = umlautMap[a.slice(0, 1)];
return big.charAt(0) + big.charAt(1).toLowerCase() + a.slice(1);
})
.replace(new RegExp('['+Object.keys(umlautMap).join('|')+']',"g"),
(a) => umlautMap[a]
);
}

if (!Element.prototype.trigger) {
Element.prototype.trigger = function (event) {
var ev;
Expand Down Expand Up @@ -185,7 +207,12 @@ let qenta_wcs = {
};

if (this.get_data(type + 'cardholder'))
payment_information.cardholdername = this.get_data(type + 'cardholder');
payment_information.cardholdername = replaceUmlaute(
this.get_data(type + 'cardholder')
.trim()
)
.replace(/[^a-z\ ]/gi, '')
.replace(/\ +/, ' ');
if (this.get_data(type + 'issueMonth'))
payment_information.issueMonth = this.get_data(type + 'issueMonth');
if (this.get_data(type + 'issueYear'))
Expand Down Expand Up @@ -246,9 +273,6 @@ form.addEventListener('submit', (event) => {
var giropay = document.getElementById('payment_method_wcs_GIROPAY');

var pmArray = Array.from(document.querySelectorAll('input.input-radio.qcs_payment_method_list'));
if(pmArray.length == 1) {
pmArray[0].click();
}

var pmSelected = !!pmArray.filter(function (pm) {
return pm.checked;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
*/

define( 'WOOCOMMERCE_GATEWAY_QMORE_NAME', 'QentaCheckoutSeamless' );
define( 'WOOCOMMERCE_GATEWAY_QMORE_VERSION', '2.0.5' );
define( 'WOOCOMMERCE_GATEWAY_QMORE_VERSION', '2.0.5.1' );

/**
* Config class
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@
'creditcardoptions' => array(
'woo_wcs_saqacompliance' => array(
'type' => 'switch',
'default' => 0,
'default' => 1,
'title' => __( 'SAQ A compliance', 'woocommerce-qenta-checkout-seamless' ),
'description' => __( 'Selecting \'NO\', the stringent SAQ A-EP is applicable. Selecting \'YES\', Qenta Checkout Seamless is integrated with the \'PCI DSS SAQ A Compliance\' feature and SAQ A is applicable.',
'woocommerce-qenta-checkout-seamless' )
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
msgid ""
msgstr ""
"Project-Id-Version: QentaCheckoutSeamless 2.0.5\n"
"Project-Id-Version: QentaCheckoutSeamless 2.0.5.1\n"
"Report-Msgid-Bugs-To: https://github.com/qenta-cee/woocommerce-qcs/issues\n"
"POT-Creation-Date: 2017-05-05 10:52+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
msgid ""
msgstr ""
"Project-Id-Version: QentaCheckoutSeamless 2.0.5\n"
"Project-Id-Version: QentaCheckoutSeamless 2.0.5.1\n"
"Report-Msgid-Bugs-To: https://github.com/qenta-cee/woocommerce-qcs\n"
"POT-Creation-Date: 2017-05-05 10:52+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
Expand Down
4 changes: 2 additions & 2 deletions woocommerce-qenta-checkout-seamless/readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
Contributors:
Tags: visa, mastercard, sofort, paypal, credit card, klarna, eps, giropay, sepa, ecommerce, checkout, payment
Requires at least: 5.5.1
Tested up to: 5.8.3
Stable tag: 2.0.5
Tested up to: 5.9
Stable tag: 2.0.5.1
License: GPLv2
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
* Plugin Name: Qenta Checkout Seamless
* Plugin URI: https://github.com/qenta-cee/woocommerce-qcs
* Description: Qenta Checkout Seamless plugin for WooCommerce
* Version: 2.0.5
* Version: 2.0.5.1
* Author: Qenta Payment CEE GmbH
* Author URI: https://www.qenta-cee.at/
* Author URI: https://www.qenta.com/
* License: GPL2
*/

Expand Down

0 comments on commit cb02fed

Please sign in to comment.