...
|
...
|
@@ -523,4 +523,66 @@ class CartData |
|
|
$param['client_secret'] = Sign::getSign($param);
|
|
|
return Yohobuy::get(API_URL, $param);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 电子票添加和查询
|
|
|
* @param int $uid 用户ID
|
|
|
* @param type int $productSku 产品sku
|
|
|
* @param type int $buyNumber 购买数量,范围1-4
|
|
|
* @param type int $yohoNum yoho币
|
|
|
* @return type []
|
|
|
*/
|
|
|
public static function addTicket($uid, $productSku, $buyNumber, $yohoNum = 0)
|
|
|
{
|
|
|
$param = Yohobuy::param();
|
|
|
$param['method'] = 'app.shopping.submitTicket';
|
|
|
$param['uid'] = intval($uid);
|
|
|
$param['product_sku'] = intval($productSku);
|
|
|
$param['buy_number'] = intval($buyNumber);
|
|
|
//yoho币转换成元,1yoho币等于一分钱
|
|
|
if (isset($yohoNum) && $yohoNum > 0) {
|
|
|
$param['use_yoho_coin'] = $yohoNum / 100;
|
|
|
}
|
|
|
$param['client_secret'] = Sign::getSign($param);
|
|
|
return Yohobuy::get(API_URL, $param);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 电子票下单
|
|
|
* @param type int $uid 用户ID
|
|
|
* @param type int $productSku 产品sku
|
|
|
* @param type int $buyNumber 购买数量,范围1-4
|
|
|
* @param type string $mobile 手机号码
|
|
|
* @param type int $yohoNum yoho币
|
|
|
* @return type []
|
|
|
*/
|
|
|
public static function submitTicket($uid, $productSku, $buyNumber, $mobile, $yohoNum = 0)
|
|
|
{
|
|
|
$param = Yohobuy::param();
|
|
|
$param['method'] = 'app.shopping.submitTicket';
|
|
|
$param['uid'] = intval($uid);
|
|
|
$param['product_sku'] = intval($productSku);
|
|
|
$param['buy_number'] = intval($buyNumber);
|
|
|
$param['mobile'] = $mobile;
|
|
|
//yoho币转换成元,1yoho币等于一分钱
|
|
|
if (isset($yohoNum) && $yohoNum > 0) {
|
|
|
$param['use_yoho_coin'] = $yohoNum / 100;
|
|
|
}
|
|
|
$param['client_secret'] = Sign::getSign($param);
|
|
|
return Yohobuy::get(API_URL, $param);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 根据订单号获取电子票二维码
|
|
|
* @param type $orderCode
|
|
|
* @return type
|
|
|
*/
|
|
|
public static function getQrByOrderCode($orderCode)
|
|
|
{
|
|
|
$param = Yohobuy::param();
|
|
|
$param['method'] = 'app.SpaceOrders.getQrByOrderCode';
|
|
|
$param['order_code'] = intval($orderCode);
|
|
|
$param['client_secret'] = Sign::getSign($param);
|
|
|
return Yohobuy::get(API_URL, $param);
|
|
|
}
|
|
|
} |
...
|
...
|
|