$uid,
'pid'=>$pid,
'amount'=>$pmt,
'name'=>$pnm,
'receiver'=>$rnm,
'time'=>date("Y-m-d H:i:s")
];
file_put_contents(
$payment_file,
json_encode($payments,JSON_UNESCAPED_UNICODE|JSON_PRETTY_PRINT)
);
// ===============================
// 这里调用你的订单系统
// ===============================
// 示例:
// update_order_status($uid,'paid');
// 不要根据金额匹配客户邮箱
// 不要根据姓名匹配客户邮箱
// 必须使用 uid 查订单
/*
$order = get_order_by_uid($uid);
if($order){
$email=$order['customer_email'];
send_email(
$email,
"Payment received",
"Your payment has been received."
);
}
*/
// 返回成功
http_response_code(200);
echo "OK";
?>