Skip to content

Commit

Permalink
Merge 9f86548 into af18d0d
Browse files Browse the repository at this point in the history
  • Loading branch information
WizardPro committed Jan 9, 2020
2 parents af18d0d + 9f86548 commit a944cf4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"ext-simplexml":"*",
"ext-libxml": "*",
"ext-json": "*",
"ext-bcmath": "*",
"yansongda/supports": "^2.0",
"symfony/http-foundation": "^4.0",
"symfony/event-dispatcher": "^4.0"
Expand Down
4 changes: 3 additions & 1 deletion src/Gateways/Alipay/Support.php
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,9 @@ private static function bchexdec($hex)
$dec = 0;
$len = strlen($hex);
for ($i = 1; $i <= $len; $i++) {
$dec = bcadd($dec, bcmul(strval(hexdec($hex[$i - 1])), bcpow('16', strval($len - $i))));
if (ctype_xdigit($hex[$i - 1])) {
$dec = bcadd($dec, bcmul(strval(hexdec($hex[$i - 1])), bcpow('16', strval($len - $i))));
}
}
return $dec;
}
Expand Down

0 comments on commit a944cf4

Please sign in to comment.