Skip to content

Commit f197d93

Browse files
author
Leonix
committed
wa-plugins/payment/tinkoff v.1.0.22
* Исправили обработку HTTP-запросов (колбеков) от платёжной системы для обновления статуса заказов.
1 parent 010c33a commit f197d93

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

wa-plugins/payment/tinkoff/lib/config/plugin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
'icon' => 'img/tinkoff16.png',
66
'logo' => 'img/tinkoff.png',
77
'vendor' => 'webasyst',
8-
'version' => '1.0.21',
8+
'version' => '1.0.22',
99
'type' => waPayment::TYPE_ONLINE,
1010
'partial_refund' => true,
1111
'partial_capture' => true,

wa-plugins/payment/tinkoff/lib/tinkoffPayment.class.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,12 +175,14 @@ private function checkToken($args)
175175

176176

177177
ksort($args);
178-
foreach ($args as &$arg) {
178+
foreach ($args as $k => &$arg) {
179179
if (is_bool($arg)) {
180180
$arg = $arg ? 'true' : 'false';
181+
} else if (!is_scalar($arg)) {
182+
unset($args[$k]);
181183
}
182-
unset($arg);
183184
}
185+
unset($arg);
184186

185187
$expected_token = hash('sha256', implode('', $args));
186188

@@ -789,7 +791,7 @@ protected function formalizeData($data)
789791
break;
790792

791793
case 'CONFIRMED':
792-
if ($parent_transaction) {
794+
if ($parent_transaction && $parent_transaction['type'] == self::OPERATION_AUTH_ONLY) {
793795
$transaction_data['type'] = self::OPERATION_CAPTURE;
794796
} else {
795797
$transaction_data['type'] = self::OPERATION_AUTH_CAPTURE;

0 commit comments

Comments
 (0)