Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Signature Verify Fail #3

Open
patsiee opened this issue Mar 5, 2021 · 4 comments
Open

Signature Verify Fail #3

patsiee opened this issue Mar 5, 2021 · 4 comments

Comments

@patsiee
Copy link

patsiee commented Mar 5, 2021

Fatal error: Uncaught Exception: Response signature verify fail. in C:\laragon\www\alipay-sdk\BaseAlipayClient.php:64 Stack trace: #0 C:\laragon\www\alipay-sdk\example\UserPresentedCodePaymentTest.php(62): BaseAlipayClient->execute(Object(UserPresentedCodePaymentRequest)) #1 {main} thrown in C:\laragon\www\alipay-sdk\BaseAlipayClient.php on line 64

$result = $alipayRsp->result;
//return this message
{#19 ▼
+"resultCode": "SUCCESS"
+"resultMessage": "success."
+"resultStatus": "S"
}

$verifyResult = openssl_verify($rspContent, $originalRspSignValue, $pubKey, OPENSSL_ALGO_SHA256);
//always return 0

@lifelong-creator
Copy link
Contributor

lifelong-creator commented Jun 22, 2021

Fatal error: Uncaught Exception: Response signature verify fail. in C:\laragon\www\alipay-sdk\BaseAlipayClient.php:64 Stack trace: #0 C:\laragon\www\alipay-sdk\example\UserPresentedCodePaymentTest.php(62): BaseAlipayClient->execute(Object(UserPresentedCodePaymentRequest)) #1 {main} thrown in C:\laragon\www\alipay-sdk\BaseAlipayClient.php on line 64

$result = $alipayRsp->result;
//return this message
{#19 ▼
+"resultCode": "SUCCESS"
+"resultMessage": "success."
+"resultStatus": "S"
}

$verifyResult = openssl_verify($rspContent, $originalRspSignValue, $pubKey, OPENSSL_ALGO_SHA256);
//always return 0


Could you tell me which shop you are? Is $alipayPublicKey correct?

@patsiee
Copy link
Author

patsiee commented Feb 4, 2022

I'm using SANDBOX client_id, everything is working except for the $this->checkRspSign($httpMethod, $path, $clientId, $rspTime, $rspBody, $rspSignValue);.
And also after using it for 3- 5 times I always receiving this error message "{"result":{"resultCode":"UNKNOWN_EXCEPTION","resultMessage":"unknown exception","resultStatus":"U"}}".

@jf-xufangjie
Copy link

hello,patsiee.could you make sure your alipayPublicKey is correct?This publicKey is provided by Ant Group.Not created by tool.

@jf-xufangjie
Copy link

By the way.Could you tell me which shop you are?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants