当前位置:网站首页>PHP Apple internal purchase callback processing
PHP Apple internal purchase callback processing
2022-06-12 10:30:00 【P P PHP】
public function notify(){
$response = file_get_contents( "php://input");
$result = json_decode($response,true);
if($result['password']!=' Secret key '){// Judgement key
$this->error("password error","",500);
}
// product ID
$product_id = $result['auto_renew_product_id'];
// Get the original transaction ID
foreach ($result['unified_receipt']['pending_renewal_info'] as $kk => $vv){
if($vv['product_id'] == $product_id){
$original_transaction_id = $vv['original_transaction_id'];
}
}
if(!$original_transaction_id){
$this->error("original_transaction_id error","",500);
}
// Current transaction information
$latest_receipt_info = $result['unified_receipt']['latest_receipt_info'][0];
// Expiration time
$ex边栏推荐
- Halcon combined with C # to detect surface defects -- affine transformation (III)
- Introduction to IOT
- A snare - Cookie spoofing
- CONDA install tensorflow test tensorflow
- One test for twoorthree years, recording some thoughts on test exchange experience
- [MySQL] index invalidation and index optimization
- ASP. Net core permission system practice (zero)
- The solution of Lenovo notebook ThinkPad t440 WiFi dropping all the time
- CTF freshman cup PHP deserialization question - EzPop
- How to refund the pre-sale deposit of JD 618 in 2022? Can JD 618 deposit be refunded?
猜你喜欢
Detailed explanation and use of redis data types: key and string types

Code types and data structures corresponding to the five object types of redis

Pagoda chevereto1.6.2 the latest version of stepping on the pit tutorial in Chinese

MQTT 协议中文版

Pseudo static setting of access database in win2008 R2 iis7.5

How to play the 2022 Taobao 618 Super Cat Games? What are the strategies for the Super Cat Games

远程桌面不能复制粘贴解决办法

The solution of Lenovo notebook ThinkPad t440 WiFi unable to connect to the Internet

MYSQL用户与权限管理,角色管理

properties中文乱码
随机推荐
PHP: seven cattle cloud upload file
数组,整型,字符变量在全局和局部的存在形式
A few secrets - a special day
淺談調和形狀上下文特征HSC對3DSC的改進
Add jar package under idea2018 web project
验收标准到底是不是测试用例?
IIS add MIME type
[CEGUI] font resource loading process
Set SVG color
Timers in golang
[CEGUI] resource loading process
Pycharm view the current version of opencv
2022 Taobao 618 Super Cat Games introduction 618 super cat games playing skills
What can QA do in a "de QA" project?
PHP maximum balance method to solve the problem that the sum of the final percentages is not equal to 100
XML Parsing Error: mismatched tag. Expected
[MySQL] learn more about the clustered indexes and auxiliary indexes (b+ tree indexes) in InnoDB
pycharm 查看opencv当前的版本
The name of a great man
看看你有没有陷入“标签化”客户和 用户 的陷阱?