易联云打印
phpsdk整合
微信支付模块notify方法中调用
$sql_seller = 'SELECT * FROM ' . tablename('wechats') . ' WHERE `weid`=:weid';
$seller = pdo_fetch($sql_seller,array(':weid'=>$log['weid']));
$sql_order_info = 'SELECT * FROM ' . tablename('shopping3_order') . ' WHERE `id`=:id';
$order_info = pdo_fetch($sql_order_info,array(':id'=>$log['tid']));
$sql_order_product_info = 'SELECT * FROM ' . tablename('shopping3_order_goods') . ' WHERE `orderid`=:orderid';
$order_product_info = pdo_fetchall($sql_order_product_info,array(':orderid'=>$order_info['id']));
$sql_goods = 'SELECT * FROM ' . tablename('shopping3_goods') . ' WHERE `id`=:goodsid';
foreach($order_product_info as $k=>$v){
$goods = pdo_fetch($sql_goods,array(':goodsid'=>$v['goodsid']));
$order_product_info[$k]['goods_info'] = $goods;
}
$elind = new Yprint();
$content = '<center>'.$seller['name'].$order_product_info['goodsid'].'</center>';
$content .= '<table>';
$content .= '<tr><td>名称</td><td>单价x数量</td><td>金额</td></tr>';
foreach($order_product_info as $v){
$content .= '<tr><td>'.$v['goods_info']['title'].'</td><td>'.$v['goods_info']['marketprice'].'x'.$v['total'].'</td><td>'.$v['goods_info']['marketprice']*$v['total'].'</td></tr>';
}
$content .= '@@2<tr><td>总价:</td><td></td><td>'.$order_info['totalprice'].'</td></tr>';
$content .= '</table>';
$content .= '<right>'.date('Y-m-d H:i:s').'</right>';
$elind->action_print(6052,'4004512478',$content,'91ffdc1fb247310dae54f3c3d6f9b02531442f92','xi7k8er7bhxy');