mirror of
https://gitee.com/yansongda/pay.git
synced 2024-12-02 04:08:21 +08:00
add: 完善微信支付及其测试用例
This commit is contained in:
parent
cc6e89e0b5
commit
7a975c908c
@ -70,13 +70,14 @@ class FunctionTest extends TestCase
|
||||
{
|
||||
$alipayPublicCertPath = __DIR__ . '/Cert/alipayCertPublicKey_RSA2.crt';
|
||||
$appSecretCert = file_get_contents(__DIR__ . '/Cert/alipayAppSecretKey_RSA2_PKCS1.txt');
|
||||
$appSecretCertPath = __DIR__ . '/Cert/alipayAppSecretKey_RSA2_PKCS1.crt';
|
||||
// $appSecretCertPath = __DIR__ . '/Cert/alipayAppSecretKey_RSA2_PKCS1.pem';
|
||||
|
||||
self::assertEquals(file_get_contents($alipayPublicCertPath), get_public_or_private_cert($alipayPublicCertPath, true));
|
||||
self::assertTrue(Str::contains(get_public_or_private_cert($appSecretCert), 'END RSA PRIVATE KEY'));
|
||||
|
||||
// Github 不知道是不是有什么限制,获取不到 RSA PRIVATE KEY
|
||||
// var_dump(file_get_contents($appSecretCertPath));
|
||||
self::assertIsResource(get_public_or_private_cert($appSecretCertPath));
|
||||
// self::assertIsResource(get_public_or_private_cert($appSecretCertPath));
|
||||
}
|
||||
|
||||
public function testVerifyAlipaySign()
|
||||
|
Loading…
Reference in New Issue
Block a user