Skip to content

Commit

Permalink
Merge pull request #56 from yoomoney/release/v2.3.3
Browse files Browse the repository at this point in the history
Relese/2.3.3
  • Loading branch information
eugenelozn authored Feb 18, 2022
2 parents bad932f + 2089f9f commit 078efb0
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 6 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
### v2.3.3 от 18.02.2022
* Исправлен баг при формировании второго чека
* Исправлен баг неверного определения версии при обновлении Joomla! до версии >4.0
* Добавлена отправка письма при получении уведомления payment.waiting_for_capture

### v2.3.2 от 14.02.2022
* Отключен способ оплаты Webmoney
* Обноление SDK до версии 2.2.6
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ class JVersionDependenciesHelper
public function __construct()
{
$this->joomlaVersion = (version_compare(JVERSION, '3.0', '<') == 1) ? 2 : 3;
$this->joomlaVersion = (version_compare(JVERSION, '4.0', '<') == 1) ? $this->joomlaVersion : 4;
$this->joomlaVersion =
(version_compare(JVERSION, '4.0', '<') == 1) ? $this->joomlaVersion : 4;
}

/**
Expand Down Expand Up @@ -46,7 +47,7 @@ public function getJsDate()
*/
public function getAddonTableObj()
{
if (JVERSION == 4) {
if ($this->getJoomlaVersion() == 4) {
$app = \JFactory::getApplication();

/** @var MVCFactoryInterface $factory */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,17 @@ private function processWaitingForCaptureNtfctn($pmConfigs, $order, $payment, $k
$order->order_created = 1;
$order->order_status = $onHoldStatus;
$order->store();

$jshopConfig = \JSFactory::getConfig();

try {
if ($jshopConfig->send_order_email) {
$checkout->sendOrderEmail($order->order_id);
}
} catch (\Exception $exception) {
$this->logger->log('debug', $exception->getMessage());
}

$checkout->changeStatusOrder($order->order_id, $onHoldStatus, 0);
$this->orderHelper->saveOrderHistory(
$order,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
require_once JPATH_ROOT.'/components/com_jshopping/payments/pm_yoomoney_sbbol/SbbolException.php';

if (!defined(_JSHOP_YOO_VERSION)) {
define('_JSHOP_YOO_VERSION', '2.3.2');
define('_JSHOP_YOO_VERSION', '2.3.3');
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

require_once dirname(__FILE__).'/lib/autoload.php';

define('_JSHOP_YOO_VERSION', '2.3.2');
define('_JSHOP_YOO_VERSION', '2.3.3');

class pm_yoomoney extends PaymentRoot
{
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/jshoppingadmin/pm_yoomoney/pm_yoomoney.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function onBeforeChangeOrderStatusAdmin($order_id, &$status)
$pm_yoomoney = new pm_yoomoney();
$kassa = $pm_yoomoney->getKassaPaymentMethod($pmconfig);

$pm_yoomoney->sendSecondReceipt($order_id, $pmconfig, $status);
$pm_yoomoney->sendSecondReceipt($order_id, $kassa, $status);

if (!$kassa->isEnableHoldMode()) {
return;
Expand Down Expand Up @@ -90,7 +90,7 @@ public function onBeforeChangeOrderStatusAdmin($order_id, &$status)
$pm_yoomoney->saveOrderHistory($order, _JSHOP_YOO_HOLD_MODE_CAPTURE_PAYMENT_SUCCESS);


$pm_yoomoney->sendSecondReceipt($order_id, $pmconfig, $completeStatus);
$pm_yoomoney->sendSecondReceipt($order_id, $kassa, $completeStatus);

}

Expand Down
Binary file modified yoomoney-cms-joomshopping.zip
Binary file not shown.

0 comments on commit 078efb0

Please sign in to comment.