正在显示
2 个修改的文件
包含
6 行增加
和
4 行删除
@@ -166,6 +166,7 @@ class Client extends Base | @@ -166,6 +166,7 @@ class Client extends Base | ||
166 | */ | 166 | */ |
167 | public function orderinfo(){ | 167 | public function orderinfo(){ |
168 | $order_id=$this->postParam['id']; | 168 | $order_id=$this->postParam['id']; |
169 | + | ||
169 | $where['a.id']=$order_id; | 170 | $where['a.id']=$order_id; |
170 | $where['a.user_id']=$this->auth->id; | 171 | $where['a.user_id']=$this->auth->id; |
171 | $verification_store_id=$this->store_id; | 172 | $verification_store_id=$this->store_id; |
@@ -177,7 +178,7 @@ class Client extends Base | @@ -177,7 +178,7 @@ class Client extends Base | ||
177 | ->join('verification_activity c','a.verification_activity_id=c.id') | 178 | ->join('verification_activity c','a.verification_activity_id=c.id') |
178 | ->field('a.id,a.type,a.status,c.image,a.order_no,c.title,b.address,b.lng,b.lat,a.price,a.payMode,DATE_FORMAT(FROM_UNIXTIME(a.paytime), "%Y-%m-%d %H:%i:%S") AS paytime') | 179 | ->field('a.id,a.type,a.status,c.image,a.order_no,c.title,b.address,b.lng,b.lat,a.price,a.payMode,DATE_FORMAT(FROM_UNIXTIME(a.paytime), "%Y-%m-%d %H:%i:%S") AS paytime') |
179 | ->find(); | 180 | ->find(); |
180 | - | 181 | + |
181 | if($order){ | 182 | if($order){ |
182 | $receivewhere['verification_order_id']=$order_id; | 183 | $receivewhere['verification_order_id']=$order_id; |
183 | $receive=Db::name('verification_receive') | 184 | $receive=Db::name('verification_receive') |
@@ -498,13 +498,14 @@ class Wechat extends Api | @@ -498,13 +498,14 @@ class Wechat extends Api | ||
498 | public function grant_red_packets($pid=0,$order_id=0){ | 498 | public function grant_red_packets($pid=0,$order_id=0){ |
499 | try{ | 499 | try{ |
500 | //测试 https://coupon.xp.yn.cn/api/v1/wechat/grant_red_packets | 500 | //测试 https://coupon.xp.yn.cn/api/v1/wechat/grant_red_packets |
501 | - //$order_id = 14; | ||
502 | - | 501 | + $order_id = 58; |
502 | + $pid = 2; | ||
503 | + //测试结束 | ||
503 | $send_result = 0; | 504 | $send_result = 0; |
504 | $verification_order = Db::name('verification_order')->where(['id'=>$order_id])->find(); | 505 | $verification_order = Db::name('verification_order')->where(['id'=>$order_id])->find(); |
505 | $verification_store = Db::name('verification_store')->where(['id'=>$verification_order['verification_store_id']])->find(); | 506 | $verification_store = Db::name('verification_store')->where(['id'=>$verification_order['verification_store_id']])->find(); |
506 | $user_info = Db::name('user')->where(['id'=>$pid])->find(); | 507 | $user_info = Db::name('user')->where(['id'=>$pid])->find(); |
507 | - $total_amount = $verification_store['commission'] = 100; | 508 | + $total_amount = $verification_store['commission'] * 100; |
508 | $app = WehcatModule::getInstance()->initWechatPay(); | 509 | $app = WehcatModule::getInstance()->initWechatPay(); |
509 | $result = $app->redpack->sendNormal([ | 510 | $result = $app->redpack->sendNormal([ |
510 | 'mch_billno' => $verification_order['order_no'], | 511 | 'mch_billno' => $verification_order['order_no'], |
-
请 注册 或 登录 后发表评论