sn01615 / google-iap-php
Google iap verify
v1.0
2019-06-03 13:51 UTC
Requires
- ext-openssl: *
This package is not auto-updated.
Last update: 2025-04-02 16:14:31 UTC
README
Google支付验证
install
composer require sn01615/google-iap-php
use
use sn01615\iap\google\Verify; include "../vendor/autoload.php"; $cc = new Verify(); # 通过setPublicKey设置public key,然后输入data和sign,返回验证结果 $vv = $cc->setPublicKey('key')->verify('data', 'signature'); # Returns 1 if the signature is correct, 0 if it is incorrect, and -1 on error. # 如果$vv 等于1代表成功 0 代表失败 -1 表示错误 var_dump($vv);