Skip to content

Commit

Permalink
Merge pull request #105 from yoomoney/release/v2.0.9
Browse files Browse the repository at this point in the history
Release/2.0.9
  • Loading branch information
tonchik-tm authored Apr 15, 2021
2 parents fd7199b + 6057ab8 commit c1ef3c7
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 13 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
### v2.0.9 от 15.04.2021
* Проверка на наличие jQuery.fn.button

### v2.0.8 от 23.03.2021
* Проверка суммы платежа через кошелек

Expand Down
2 changes: 1 addition & 1 deletion src/install.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<modification>
<name>YooMoney for Opencart 3.x</name>
<code>YooMoney</code>
<version>2.0.8</version>
<version>2.0.9</version>
<author>YooMoney</author>
<link>https://github.com/yoomoney/cms-opencart3</link>
<!-- Вставка кнопки в историю заказов-->
Expand Down
2 changes: 1 addition & 1 deletion src/upload/admin/controller/extension/payment/yoomoney.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
class ControllerExtensionPaymentYoomoney extends Controller
{
const MODULE_NAME = 'yoomoney';
const MODULE_VERSION = '2.0.8';
const MODULE_VERSION = '2.0.9';

const WIDGET_INSTALL_STATUS_SUCCESS = true;
const WIDGET_INSTALL_STATUS_FAIL = false;
Expand Down
2 changes: 1 addition & 1 deletion src/upload/admin/model/extension/payment/yoomoney.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class ModelExtensionPaymentYoomoney extends Model
/**
* string
*/
const MODULE_VERSION = '2.0.8';
const MODULE_VERSION = '2.0.9';
const YOOMONEY_EVENT_SECOND_RECEIPT_CODE = 'yoomoney_second_receipt_trigger';

private $kassaModel;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
class ControllerExtensionPaymentYoomoney extends Controller
{
const MODULE_NAME = 'yoomoney';
const MODULE_VERSION = '2.0.8';
const MODULE_VERSION = '2.0.9';

/**
* @var ModelExtensionPaymentYoomoney
Expand Down
2 changes: 1 addition & 1 deletion src/upload/catalog/model/extension/payment/yoomoney.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
*/
class ModelExtensionPaymentYoomoney extends Model
{
const MODULE_VERSION = '2.0.8';
const MODULE_VERSION = '2.0.9';

private $kassaModel;
private $walletModel;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,20 @@
jQuery(id).css('display', 'block');
});
var continueButton = jQuery('#continue-button');
continueButton.off('click').on('click', function (event) {
event.preventDefault();
createPayment();
var continueButton = '#continue-button';
jQuery(document).off('click.default', continueButton).on('click.default', continueButton, function (e) {
e.preventDefault();
createPayment(jQuery(this));
});
function createPayment() {
function buttonAction(button, action) {
if (jQuery.fn.button && button) {
button.button(action);
}
}
function createPayment(button) {
button = button || null;
var form = jQuery("#yoomoney-payment-form")[0];
jQuery('#payment-form').hide();
jQuery.ajax({
Expand All @@ -130,7 +137,7 @@
alphaLogin: (form.alfaLogin ? form.alfaLogin.value : '')
},
beforeSend: function() {
continueButton.button('loading');
buttonAction(button, 'loading');
},
success: function (data) {
if (data.success) {
Expand All @@ -141,12 +148,12 @@
}
} else {
onValidateError(data.error);
continueButton.button('reset');
buttonAction(button, 'reset');
}
},
failure: function () {
onValidateError('Failed to create payment');
continueButton.button('reset');
buttonAction(button, 'reset');
}
});
}
Expand Down
Binary file modified yoomoney.oc3x.ocmod.zip
Binary file not shown.

0 comments on commit c1ef3c7

Please sign in to comment.