fix: app 支付调起签名中参数大小写问题

This commit is contained in:
yansongda 2021-11-04 14:17:08 +08:00
parent 223732dbcc
commit 7916fdd74b
3 changed files with 3 additions and 1 deletions

View File

@ -43,7 +43,7 @@ class InvokePrepayPlugin extends \Yansongda\Pay\Plugin\Wechat\Pay\Common\InvokeP
{
$contents = $invokeConfig->get('appid', '')."\n".
$invokeConfig->get('timestamp', '')."\n".
$invokeConfig->get('nonceStr', '')."\n".
$invokeConfig->get('noncestr', '')."\n".
$invokeConfig->get('package', '')."\n";
return get_wechat_sign($params, $contents);

View File

@ -23,5 +23,6 @@ class InvokePrepayPluginTest extends TestCase
self::assertEquals('Sign=WXPay', $contents->get('package'));
self::assertArrayHasKey('sign', $contents->all());
self::assertArrayHasKey('timestamp', $contents->all());
self::assertArrayHasKey('noncestr', $contents->all());
}
}

View File

@ -23,6 +23,7 @@ class InvokePrepayPluginTest extends TestCase
self::assertArrayHasKey('package', $contents->all());
self::assertArrayHasKey('paySign', $contents->all());
self::assertArrayHasKey('timeStamp', $contents->all());
self::assertArrayHasKey('nonceStr', $contents->all());
}
public function testWrongPrepayId()