...
|
...
|
@@ -529,10 +529,10 @@ class CartData |
|
|
* @param int $uid 用户ID
|
|
|
* @param type int $productSku 产品sku
|
|
|
* @param type int $buyNumber 购买数量,范围1-4
|
|
|
* @param type int $yohoNum yoho币
|
|
|
* @param type int $yohoCoin yoho币
|
|
|
* @return type []
|
|
|
*/
|
|
|
public static function addTicket($uid, $productSku, $buyNumber, $yohoNum = 0)
|
|
|
public static function addTicket($uid, $productSku, $buyNumber, $yohoCoin = 0)
|
|
|
{
|
|
|
$param = Yohobuy::param();
|
|
|
$param['method'] = 'app.shopping.ticket';
|
...
|
...
|
@@ -540,8 +540,8 @@ class CartData |
|
|
$param['product_sku'] = intval($productSku);
|
|
|
$param['buy_number'] = intval($buyNumber);
|
|
|
//yoho币转换成元,1yoho币等于一分钱
|
|
|
if (isset($yohoNum) && $yohoNum > 0) {
|
|
|
$param['use_yoho_coin'] = $yohoNum / 100;
|
|
|
if (isset($yohoCoin) && $yohoCoin > 0) {
|
|
|
$param['use_yoho_coin'] = $yohoCoin / 100;
|
|
|
}
|
|
|
$param['client_secret'] = Sign::getSign($param);
|
|
|
return Yohobuy::get(API_URL, $param);
|
...
|
...
|
@@ -553,10 +553,10 @@ class CartData |
|
|
* @param type int $productSku 产品sku
|
|
|
* @param type int $buyNumber 购买数量,范围1-4
|
|
|
* @param type string $mobile 手机号码
|
|
|
* @param type int $yohoNum yoho币
|
|
|
* @param type int $yohoCoin yoho币
|
|
|
* @return type []
|
|
|
*/
|
|
|
public static function submitTicket($uid, $productSku, $buyNumber, $mobile, $yohoNum = 0)
|
|
|
public static function submitTicket($uid, $productSku, $buyNumber, $mobile, $yohoCoin = 0)
|
|
|
{
|
|
|
$param = Yohobuy::param();
|
|
|
$param['method'] = 'app.shopping.submitTicket';
|
...
|
...
|
@@ -565,8 +565,8 @@ class CartData |
|
|
$param['buy_number'] = intval($buyNumber);
|
|
|
$param['mobile'] = $mobile;
|
|
|
//yoho币转换成元,1yoho币等于一分钱
|
|
|
if (isset($yohoNum) && $yohoNum > 0) {
|
|
|
$param['use_yoho_coin'] = $yohoNum / 100;
|
|
|
if (isset($yohoCoin) && $yohoCoin > 0) {
|
|
|
$param['use_yoho_coin'] = $yohoCoin / 100;
|
|
|
}
|
|
|
$param['client_secret'] = Sign::getSign($param);
|
|
|
return Yohobuy::get(API_URL, $param);
|
...
|
...
|
|