Skip to content

Commit 042d7c9

Browse files
committed
bugfix - auto upgrade
1 parent d58fba2 commit 042d7c9

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

inc/plugins/rexshop.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ function rexshop_info()
3333
"website" => "https://shop.rexdigital.group",
3434
"author" => "RexDigitalGroup",
3535
"authorsite" => "https://rexdigital.group",
36-
"version" => "1.12",
36+
"version" => "1.13",
3737
"guid" => "",
3838
"compatibility" => "18*,16*"
3939
);
@@ -377,7 +377,7 @@ function handleCompletedTransaction($request)
377377
$banned_groups[] = (int) $gid;
378378
}
379379

380-
if (in_array($usergroup, $banned_groups)) { //Move the user to the purchased usergroup if they get unbanned.
380+
if (!in_array($usergroup, $banned_groups)) { //Move the user to the purchased usergroup if they get unbanned.
381381
rexshop_change_usergroup($userId, $usergroup);
382382
} else { //Move the user to the purchased usergroup.
383383
rexshop_change_on_unban_usergroup($userId, $usergroup);
@@ -1015,13 +1015,11 @@ function rexshop_verify_webhook($request)
10151015
{
10161016
global $mybb;
10171017

1018-
$hash = hash_hmac(
1018+
return $request['RDG_WH_SIGNATURE'] === hash_hmac(
10191019
'sha256',
10201020
$request['order']['transaction_id'] . $request['status'],
10211021
$mybb->settings['rexshop_secret']
10221022
);
1023-
1024-
return $request['RDG_WH_SIGNATURE'] === $hash;
10251023
}
10261024

10271025
/**

0 commit comments

Comments
 (0)