人人商城微信支付回调 WeUtility::createModuleSite() 数据debug打印
在人人商城回调文件 ewei_shopv2/payment/wechat/notify.php 中,有如下两个方法 order() 和 wxapp_order(),都用到如下代码
//Yangjunwei: $site 输出示例详看 https://yangjunwei.com/4631.html
$site = WeUtility::createModuleSite($log['module']);
if (!is_error($site)) {
$method = 'payResult';
if (method_exists($site, $method)) {
$ret = array();
$ret['acid'] = $log['acid'];
$ret['uniacid'] = $log['uniacid'];
$ret['result'] = 'success';
$ret['type'] = $log['type'];
$ret['from'] = 'return';
$ret['tid'] = $log['tid'];
$ret['user'] = $log['openid'];
$ret['fee'] = $log['fee'];
$ret['tag'] = $log['tag'];
…………
// ewei_shopv2/site.php
$result = $site->{$method}($ret);
if ($result) {
$log['tag'] = iunserializer($log['tag']);
$log['tag']['transaction_id'] = $this->get['transaction_id'];
$record = array();
$record['status'] = '1';
$record['tag'] = iserializer($log['tag']);
pdo_update('core_paylog', $record, array('plid' => $log['plid']));
}
}
}