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

feat: 新增支付宝APP同步回调验签 #1061

Merged
merged 4 commits into from
Feb 11, 2025
Merged

Conversation

suyar
Copy link
Contributor

@suyar suyar commented Feb 7, 2025

支付宝同步通知验证

补充了下支付宝同步回调通知验证插件 AppCallbackPlugin

$appCallbackParams = [
    'alipay_trade_app_pay_response' => [
        'code' => '10000',
        'msg' => 'Success',
        'order_id' => '20231220110070000002150000657610',
        'out_biz_no' => '2023122022560000',
        'pay_date' => '2023-12-20 22:56:33',
        'pay_fund_order_id' => '20231220110070001502150000660902',
        'status' => 'SUCCESS',
        'trans_amount' => '0.01',
    ],
    'sign' => 'eITxP5fZiJPB2+vZb90IRkv2iARxeNx/6Omxk7FStqflhG5lMoCvGjo2FZ6Szo1bGBMBReazZuqLaqsgomWAUO9onMVurB3enLbRvwUlpE7XEZaxk/sJYjgc2Y7pIAenvnLL9PEAiXmvUvuinUlvS9J2r1XysC0p/2wu7kEJ/GgZpFDIIYY9mdM6U1rGbi+RvirQXtQHmaEuuJWLA75NR1bvfG3L8znzW9xz1kOQqOWsQmD/bF1CDWbozNLwLCUmClRJz0Fj4mUYRF0zbW2VP8ZgHu1YvVKJ2+dWC9b+0o94URk7psIpc5NjiOM9Jsn6aoC2CfrJ/sqFMRCkYWzw6A==',
    'sign_type' => 'RSA2',
];

$url = 'http://127.0.0.1:8000/alipay/app_verify';
$request = new ServerRequest('POST', $url);
$request = $request->withParsedBody($appCallbackParams);
$result = Pay::alipay()->appCallback($request);

// 多租户
$result = Pay::alipay()->appCallback($appCallbackParams, ['_config' => 'default']);

Copy link

netlify bot commented Feb 7, 2025

Deploy Preview for pay-yansongda canceled.

Name Link
🔨 Latest commit ff67065
🔍 Latest deploy log https://app.netlify.com/sites/pay-yansongda/deploys/67a9bcc0b6673400085d0c1e

@yansongda
Copy link
Owner

然后,麻烦单测帮忙改一下

@suyar
Copy link
Contributor Author

suyar commented Feb 9, 2025

然后,麻烦单测帮忙改一下

单测修复了。

Copy link

codecov bot commented Feb 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.50%. Comparing base (522f6cb) to head (ff67065).
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #1061   +/-   ##
=========================================
  Coverage     97.49%   97.50%           
- Complexity     1066     1068    +2     
=========================================
  Files           382      383    +1     
  Lines          7026     7040   +14     
=========================================
+ Hits           6850     6864   +14     
  Misses          176      176           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@yansongda yansongda merged commit 92f84b4 into yansongda:master Feb 11, 2025
25 checks passed
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

Successfully merging this pull request may close these issues.

2 participants