source/index/recharge_wxpay.ctrl.php
(开头部分) 5KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
class recharge_wxpayControl extends skymvc{
public function __construct(){
parent::__construct();
}
public function onDefault(){
echo "hi";
}
public function _log($str){
skyLog("wxapp_pay.txt",$str);
}
public function getWeixin(){
$wid=get_post('wid','i');
if($wid){
$where=" id=".$wid;
}else{
$where="";
}
$wx=M("weixin")->selectRow(array("where"=>$where,"order"=>"id DESC"));
return $wx;
}
public function onGo(){
/*
if(!M("login")->userid && empty($_SESSION['ssshopadmin'])){
M("login")->checkLogin();
}
*/
$orderno=get('orderno','h');
$INWXAPP=false;
require_once ROOT_PATH."api/wxpay/lib/WxPay.Config.php";
$wx=$this->getWeixin();
if(empty($wx)){
exit("微信支付未配置");
}
WxPayConfig::init($wx);
require_once (ROOT_PATH.'/api/wxpay/lib/WxPay.Api.php');
require_once ROOT_PATH."api/wxpay/lib/WxPay.JsApiPay.php";
$tools = new JsApiPay();
$openId = $tools->GetOpenid();
$order=M("recharge")->selectRow(array("where"=>" orderno='".$orderno."' "));
//②、统一下单
$input = new WxPayUnifiedOrder();
$input->SetBody($_SESSION['ssuser']['nickname']."支付订单");
$input->SetAttach("test");
$input->SetOut_trade_no($order['orderno']);
$input->SetTotal_fee($order['money']*100);
$input->SetTime_start(date("YmdHis"));
$input->SetTime_expire(date("YmdHis", time() + 600));
$input->SetGoods_tag("test");
$input->SetNotify_url(HTTP_HOST."/index.php/recharge_wxpay/notify/wid-{$wx['id']}/");
$input->SetTrade_type("JSAPI");
$input->SetOpenid($openId);
$url="/index.php";
//处理点击返回
后面还有 103 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。