作者 chencheng

0601-3

... ... @@ -166,6 +166,7 @@ class Client extends Base
*/
public function orderinfo(){
$order_id=$this->postParam['id'];
$where['a.id']=$order_id;
$where['a.user_id']=$this->auth->id;
$verification_store_id=$this->store_id;
... ...
... ... @@ -498,13 +498,14 @@ class Wechat extends Api
public function grant_red_packets($pid=0,$order_id=0){
try{
//测试 https://coupon.xp.yn.cn/api/v1/wechat/grant_red_packets
//$order_id = 14;
$order_id = 58;
$pid = 2;
//测试结束
$send_result = 0;
$verification_order = Db::name('verification_order')->where(['id'=>$order_id])->find();
$verification_store = Db::name('verification_store')->where(['id'=>$verification_order['verification_store_id']])->find();
$user_info = Db::name('user')->where(['id'=>$pid])->find();
$total_amount = $verification_store['commission'] = 100;
$total_amount = $verification_store['commission'] * 100;
$app = WehcatModule::getInstance()->initWechatPay();
$result = $app->redpack->sendNormal([
'mch_billno' => $verification_order['order_no'],
... ...