|
@@ -367,7 +367,11 @@ class account_helper
|
|
|
}
|
|
|
public function paysuccess_bonus($buyer_id, $total_amount)
|
|
|
{
|
|
|
+ Log::record("paysuccess_bonus 1",log::ERR);
|
|
|
+
|
|
|
$rate_moneys = $this->make_rates($total_amount);
|
|
|
+ Log::record("paysuccess_bonus 2",log::ERR);
|
|
|
+
|
|
|
|
|
|
$val = 0.00;
|
|
|
foreach ($rate_moneys as $rate_money)
|
|
@@ -383,16 +387,29 @@ class account_helper
|
|
|
$param['make_type'] = bonus\type::MakePayType;
|
|
|
$param['type_name'] = "支付奖励红包";
|
|
|
|
|
|
+ Log::record("paysuccess_bonus 3",log::ERR);
|
|
|
$ret = bonus_helper::make_bonus($param,array($rate_money));
|
|
|
+ Log::record("paysuccess_bonus 4",log::ERR);
|
|
|
+
|
|
|
if($ret != false) {
|
|
|
$type_sn = $ret['type_sn'];
|
|
|
+ Log::record("paysuccess_bonus 5",log::ERR);
|
|
|
+
|
|
|
$bonus = bonus_helper::send($type_sn,array($buyer_id));
|
|
|
+ Log::record("paysuccess_bonus 6",log::ERR);
|
|
|
+
|
|
|
$val += $bonus[0]['bonus_value'];
|
|
|
}
|
|
|
}
|
|
|
+ Log::record("paysuccess_bonus 7",log::ERR);
|
|
|
+
|
|
|
|
|
|
push_helper::paysuccess_bonus($buyer_id,$val);
|
|
|
+ Log::record("paysuccess_bonus 8",log::ERR);
|
|
|
+
|
|
|
Model('member')->inc_rate_version($buyer_id);
|
|
|
+ Log::record("paysuccess_bonus 9",log::ERR);
|
|
|
+
|
|
|
|
|
|
return array('money' => $val,'total_num' => self::total_number,'sender_name' => '熊猫美妆');
|
|
|
}
|