Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
yansongda committed Sep 19, 2019
1 parent fc309c0 commit 0894e0d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Gateways/Alipay/Support.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,9 @@ public static function verifySign(array $data, $sync = false, $sign = null): boo
}

if (Str::endsWith($publicKey, '.pem')) {
$publicKey = openssl_pkey_get_public($publicKey);
$publicKey = openssl_pkey_get_public(
Str::startsWith($publicKey, 'file://') ? $publicKey : 'file://'.$publicKey
);
} else {
$publicKey = "-----BEGIN PUBLIC KEY-----\n".
wordwrap($publicKey, 64, "\n", true).
Expand Down

0 comments on commit 0894e0d

Please sign in to comment.