作者 chencheng

0531-10

@@ -448,7 +448,7 @@ class Wechat extends Api @@ -448,7 +448,7 @@ class Wechat extends Api
448 448
449 // 发放佣金 企业付款到零钱 449 // 发放佣金 企业付款到零钱
450 public function grant_commission($pid=0,$order_id=0){ 450 public function grant_commission($pid=0,$order_id=0){
451 - //测试 451 + //测试 https://coupon.xp.yn.cn/api/v1/wechat/grant_commission
452 $order_id = 14; 452 $order_id = 14;
453 try{ 453 try{
454 $send_result = 0; 454 $send_result = 0;
@@ -466,6 +466,8 @@ class Wechat extends Api @@ -466,6 +466,8 @@ class Wechat extends Api
466 'amount' => 1, // 企业付款金额,单位为分 466 'amount' => 1, // 企业付款金额,单位为分
467 'desc' => '分销佣金', // 企业付款操作说明信息。必填 467 'desc' => '分销佣金', // 企业付款操作说明信息。必填
468 ]); 468 ]);
  469 + return json($result);
  470 + die;
469 if($result['return_code'] == 'SUCCESS' && $result['result_code'] == 'SUCCESS'){ 471 if($result['return_code'] == 'SUCCESS' && $result['result_code'] == 'SUCCESS'){
470 //记录佣金表 后台没有配置 472 //记录佣金表 后台没有配置
471 $send_result = 1; 473 $send_result = 1;
@@ -487,6 +489,7 @@ class Wechat extends Api @@ -487,6 +489,7 @@ class Wechat extends Api
487 // 发放红包 489 // 发放红包
488 public function grant_red_packets($pid=0,$order_id=0){ 490 public function grant_red_packets($pid=0,$order_id=0){
489 try{ 491 try{
  492 + //测试 https://coupon.xp.yn.cn/api/v1/wechat/grant_red_packets
490 $order_id = 14; 493 $order_id = 14;
491 $verification_order = Db::name('verification_order')->where(['id'=>$order_id])->find(); 494 $verification_order = Db::name('verification_order')->where(['id'=>$order_id])->find();
492 $app = WehcatModule::getInstance()->initWechatPay(); 495 $app = WehcatModule::getInstance()->initWechatPay();