Skip to content

Commit d1adc73

Browse files
1.6.5
1 parent d0e79e4 commit d1adc73

File tree

2 files changed

+8
-15
lines changed

2 files changed

+8
-15
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mage2pro/securepay"
3-
,"version": "1.6.4"
3+
,"version": "1.6.5"
44
,"description": "The «SecurePay» payment extension for Magento 2."
55
,"type": "magento2-module"
66
,"homepage": "https://mage2.pro/c/extensions/securepay"

view/frontend/web/main.js

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,16 @@ return parent.extend({
1616
* @returns {String}
1717
*/
1818
debugMessage: df.c(function() {
19-
/** @type {String} */
20-
var forceResult = this.config('forceResult');
21-
/** @type {Boolean} */
22-
var approved = -1 !== ['00', '08', '11', '16'].indexOf(this.amountLast2());
23-
/** @type {Boolean} */
24-
var approve = 'approve' === forceResult;
25-
/** @type {Boolean} */
26-
var needAdjust = ('no' !== forceResult) && (approve !== approved);
19+
/** @type {String} */ var forceResult = this.config('forceResult');
20+
/** @type {Boolean} */ var approved = -1 !== ['00', '08', '11', '16'].indexOf(this.amountLast2());
21+
/** @type {Boolean} */ var approve = 'approve' === forceResult;
22+
/** @type {Boolean} */ var needAdjust = ('no' !== forceResult) && (approve !== approved);
2723
/**
2824
* @param {Boolean} approved
2925
* @returns {String}
3026
*/
3127
function label(approved) {return df.t(approved ? 'approved' : 'declined');}
32-
/** @type {String} */
33-
var result;
28+
/** @type {String} */ var result;
3429
if (!needAdjust) {
3530
result = df.t(
3631
'The transaction will be <b>{result}</b>, because the payment amount (<b>{amount}</b>) in the payment currency (<b>{currency}</b>) ends with «<b>{last2}</b>».'
@@ -43,10 +38,8 @@ return parent.extend({
4338
);
4439
}
4540
else {
46-
/** @type {Number} */
47-
var currentA = this.amountP();
48-
/** @type {Number} */
49-
var newA = approve ? Math.round(currentA) : currentA + 0.01;
41+
/** @type {Number} */ var currentA = this.amountP();
42+
/** @type {Number} */ var newA = approve ? Math.round(currentA) : currentA + 0.01;
5043
result = df.t(
5144
'The payment amount in the payment currency (<b>{currency}</b>) will be adjusted from <b>{current}</b> to <b>{new}</b> for the transaction to be <b>{result}</b>.'
5245
,{

0 commit comments

Comments
 (0)