Skip to content

Commit 389c7f3

Browse files
author
dmitriy.tsvetkov
committed
Fix
1 parent ee8bca1 commit 389c7f3

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

expresspay/config/changelog.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
1.0.2
2+
Поправлена некорректная проверка цифровой подписи
3+
1.0.1
4+
Публикация первой версии

expresspay/model/paymenttype/expresspay.inc.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public function getFormObject()
106106
'is_test_mode' => new Type\Integer([
107107
'description' => t('Использовать тестовый режим?'),
108108
'maxLength' => 1,
109-
'default' => 0,
109+
'default' => 1,
110110
'CheckboxView' => [1,0]
111111
]),
112112
'token' => new Type\Varchar([
@@ -136,7 +136,7 @@ public function getFormObject()
136136
'is_show_qr_code' => new Type\Integer([
137137
'description' => t('Показывать QR код для оплаты'),
138138
'maxLength' => 1,
139-
'default' => 0,
139+
'default' => 1,
140140
'CheckboxView' => [1,0]
141141
]),
142142
'is_name_editable' => new Type\Integer([
@@ -300,10 +300,10 @@ public function getTransactionIdFromRequest(\RS\Http\Request $request)
300300
$signature = $request->post('Signature', TYPE_STRING, '');
301301

302302
$config = \RS\Config\Loader::byModule($this);
303-
$useSignatureForNotification = $config['is_use_signature_for_notification'] ? true : false;
303+
$useSignatureForNotification = $config['is_use_signature_for_notification'];
304304
$secretWordForNotification = $config['secret_word_for_notification'];
305305

306-
if ($useSignatureForNotification || self::computeSignature(array("data" => $dataJSON), $secretWordForNotification, 'notification') == $signature) {
306+
if ($useSignatureForNotification == 0 || self::computeSignature(array("data" => $dataJSON), $secretWordForNotification, 'notification') == $signature) {
307307
try {
308308
$data = json_decode($dataJSON, true);
309309
}

0 commit comments

Comments
 (0)