本文整理匯總了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';