Showing
1 changed file
with
4 additions
and
1 deletions
@@ -530,18 +530,21 @@ class CartData | @@ -530,18 +530,21 @@ class CartData | ||
530 | * @param type int $productSku 产品sku | 530 | * @param type int $productSku 产品sku |
531 | * @param type int $buyNumber 购买数量,范围1-4 | 531 | * @param type int $buyNumber 购买数量,范围1-4 |
532 | * @param type int $yohoCoin yoho币 | 532 | * @param type int $yohoCoin yoho币 |
533 | + * @param type int $yohoCoinMode 是否使用有货币,0不使用,否则使用 | ||
533 | * @return type [] | 534 | * @return type [] |
534 | */ | 535 | */ |
535 | - public static function addTicket($uid, $productSku, $buyNumber, $yohoCoin = 0) | 536 | + public static function addTicket($uid, $productSku, $buyNumber, $yohoCoin = 0, $yohoCoinMode = 0) |
536 | { | 537 | { |
537 | $param = Yohobuy::param(); | 538 | $param = Yohobuy::param(); |
538 | $param['method'] = 'app.shopping.ticket'; | 539 | $param['method'] = 'app.shopping.ticket'; |
539 | $param['uid'] = intval($uid); | 540 | $param['uid'] = intval($uid); |
540 | $param['product_sku'] = intval($productSku); | 541 | $param['product_sku'] = intval($productSku); |
541 | $param['buy_number'] = intval($buyNumber); | 542 | $param['buy_number'] = intval($buyNumber); |
543 | + $param['yohoCoinMode'] = intval($yohoCoinMode); | ||
542 | //yoho币转换成元,1yoho币等于一分钱 | 544 | //yoho币转换成元,1yoho币等于一分钱 |
543 | if (isset($yohoCoin) && $yohoCoin > 0) { | 545 | if (isset($yohoCoin) && $yohoCoin > 0) { |
544 | $param['use_yoho_coin'] = $yohoCoin / 100; | 546 | $param['use_yoho_coin'] = $yohoCoin / 100; |
547 | + $param['yohoCoinMode'] = 1;//使用有货币 | ||
545 | } | 548 | } |
546 | $param['client_secret'] = Sign::getSign($param); | 549 | $param['client_secret'] = Sign::getSign($param); |
547 | 550 |
-
Please register or login to post a comment