本文整理汇总了PHP中coupon::PayConsumeCode方法的典型用法代码示例。如果您正苦于以下问题:PHP coupon::PayConsumeCode方法的具体用法?PHP coupon::PayConsumeCode怎么用?PHP coupon::PayConsumeCode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类coupon
的用法示例。
在下文中一共展示了coupon::PayConsumeCode方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: tablename
}
}
}
if ($type == 'delivery') {
$sql = 'SELECT * FROM ' . tablename('core_paylog') . ' WHERE `plid`=:plid';
$pars = array();
$pars[':plid'] = $ps['tid'];
$log = pdo_fetch($sql, $pars);
if (!empty($log) && $log['status'] == '0') {
if ($log['is_usecard'] == 1 && $log['card_type'] == 1 && !empty($log['encrypt_code']) && $_W['acid']) {
load()->classs('coupon');
$acc = new coupon($_W['acid']);
$codearr['encrypt_code'] = $log['encrypt_code'];
$codearr['module'] = $log['module'];
$codearr['card_id'] = $log['card_id'];
$acc->PayConsumeCode($codearr);
}
if ($log['is_usecard'] == 1 && $log['card_type'] == 2) {
$now = time();
$log['card_id'] = intval($log['card_id']);
pdo_query('UPDATE ' . tablename('activity_coupon_record') . " SET status = 2, usetime = {$now}, usemodule = '{$log['module']}' WHERE uniacid = :aid AND couponid = :cid AND uid = :uid AND status = 1 LIMIT 1", array(':aid' => $_W['uniacid'], ':uid' => $log['openid'], ':cid' => $log['card_id']));
}
$site = WeUtility::createModuleSite($log['module']);
if (!is_error($site)) {
$site->weid = $_W['weid'];
$site->uniacid = $_W['uniacid'];
$site->inMobile = true;
$method = 'payResult';
if (method_exists($site, $method)) {
$ret = array();
$ret['result'] = 'failed';