Download the PHP package yzh52521/apple without Composer
On this page you can find all versions of the php package yzh52521/apple. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package apple
安装 composer
// $orderId 本地订单号 // $storeProductId 苹果商店产品ID // $tradeNo 苹果交易号
$order = findOrder($orderId);
$applePay = new ApplePay($_POST['receipt'], '');
if ($applePay->verifyReceipt()) {
$result = $applePay->query($storeProductId,$bundleId, function ($tradeNo, $returnData) use ($order) {
// 检查此交易号是否被使用
if (!$order->checkTradeNoIsUsed($tradeNo)) {
// 更新本地订单状态等...
return $this->notify($order, $returnData, $tradeNo);
} else {
echo '此笔交易号已经被使用,这笔交易有可能是伪造的!';
return false;
}
});
if ($result) {
echo 'success';
} else {
echo $applePay->getError();
}
} else {
echo $applePay->getError();
}
All versions of apple with dependencies
PHP Build Version
Package Version
Requires
php Version
>=7.1.0
The package yzh52521/apple contains the following files
Loading the files please wait ....