Skip to content

Commit

Permalink
wa-plugins/payment/tinkoff v.1.0.22
Browse files Browse the repository at this point in the history
  * Исправили обработку HTTP-запросов (колбеков) от платёжной системы для обновления статуса заказов.
  • Loading branch information
Leonix committed Oct 19, 2023
1 parent 010c33a commit f197d93
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion wa-plugins/payment/tinkoff/lib/config/plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
'icon' => 'img/tinkoff16.png',
'logo' => 'img/tinkoff.png',
'vendor' => 'webasyst',
'version' => '1.0.21',
'version' => '1.0.22',
'type' => waPayment::TYPE_ONLINE,
'partial_refund' => true,
'partial_capture' => true,
Expand Down
8 changes: 5 additions & 3 deletions wa-plugins/payment/tinkoff/lib/tinkoffPayment.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,12 +175,14 @@ private function checkToken($args)


ksort($args);
foreach ($args as &$arg) {
foreach ($args as $k => &$arg) {
if (is_bool($arg)) {
$arg = $arg ? 'true' : 'false';
} else if (!is_scalar($arg)) {
unset($args[$k]);
}
unset($arg);
}
unset($arg);

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

Expand Down Expand Up @@ -789,7 +791,7 @@ protected function formalizeData($data)
break;

case 'CONFIRMED':
if ($parent_transaction) {
if ($parent_transaction && $parent_transaction['type'] == self::OPERATION_AUTH_ONLY) {
$transaction_data['type'] = self::OPERATION_CAPTURE;
} else {
$transaction_data['type'] = self::OPERATION_AUTH_CAPTURE;
Expand Down

0 comments on commit f197d93

Please sign in to comment.