本文整理汇总了PHP中BFCHelper::getJsonEncodeString方法的典型用法代码示例。如果您正苦于以下问题:PHP BFCHelper::getJsonEncodeString方法的具体用法?PHP BFCHelper::getJsonEncodeString怎么用?PHP BFCHelper::getJsonEncodeString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BFCHelper
的用法示例。
在下文中一共展示了BFCHelper::getJsonEncodeString方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setOrder
public function setOrder($customerData = NULL, $suggestedStay = NULL, $creditCardData = NULL, $otherNoteData = NULL, $merchantId = 0, $orderType = NULL, $userNotes = NULL, $label = NULL, $cultureCode = NULL, $processOrder = NULL, $priceType = NULL)
{
$userId = '';
$user = JFactory::getUser();
if ($user->id != 0) {
$userId = $user->id . "|" . $user->username . "|" . $_SERVER["SERVER_NAME"];
}
if (!isset($creditCardData) || empty($creditCardData)) {
$creditCardData = "";
// }else{
// $creditCardData = BFCHelper::getJsonEncodeString($creditCardData);
}
if (!isset($otherNoteData) || empty($otherNoteData)) {
$otherNoteData = "";
}
if (!isset($userNotes) || empty($userNotes)) {
$userNotes = "";
}
//$suggestedStay = null;
$options = array('path' => $this->urlCreateOrder, 'data' => array('customerData' => BFCHelper::getQuotedString(BFCHelper::getJsonEncodeString($customerData)), 'suggestedStay' => BFCHelper::getQuotedString(BFCHelper::getJsonEncodeString($suggestedStay)), 'creditCardData' => $creditCardData, 'otherNoteData' => BFCHelper::getQuotedString($otherNoteData), 'merchantId' => $merchantId, 'orderType' => BFCHelper::getQuotedString($orderType), 'userNotes' => BFCHelper::getQuotedString($userNotes), 'label' => BFCHelper::getQuotedString($label), 'cultureCode' => BFCHelper::getQuotedString($cultureCode), 'processOrder' => $processOrder, 'priceType' => BFCHelper::getQuotedString($priceType), 'addedBy' => BFCHelper::getQuotedString($userId), '$format' => 'json'));
$url = $this->helper->getQuery($options);
$order = null;
//$r = $this->helper->executeQuery($url);
$r = $this->helper->executeQuery($url, "POST");
if (isset($r)) {
$res = json_decode($r);
// $order = $res->d->results ?: $res->d;
if (!empty($res->d->results)) {
$order = $res->d->results;
} elseif (!empty($res->d)) {
$order = $res->d;
}
}
return $order;
}
示例2: setAlertOnSell
public function setAlertOnSell($customerData = NULL, $searchData = NULL, $merchantId = NULL, $type = NULL, $label = NULL, $cultureCode = NULL, $processRequest = NULL, $enabled = NULL)
{
$options = array('path' => $this->urlCreateUserAlert, 'data' => array('customerData' => BFCHelper::getQuotedString(BFCHelper::getJsonEncodeString($customerData)), 'searchData' => BFCHelper::getQuotedString(BFCHelper::getJsonEncodeString($searchData)), 'merchantId' => $merchantId, 'type' => BFCHelper::getQuotedString($type), 'label' => BFCHelper::getQuotedString($label), 'cultureCode' => BFCHelper::getQuotedString($cultureCode), 'processUserAlert' => $processRequest, 'enabled' => $enabled, '$format' => 'json'));
$url = $this->helper->getQuery($options);
$alert = null;
//$r = $this->helper->executeQuery($url);
$r = $this->helper->executeQuery($url, "POST");
if (isset($r)) {
$res = json_decode($r);
$alert = (int) $res->d->CreateUserAlert;
//$alert = $res->d->results ?: $res->d;
}
return $alert;
}
示例3: setMerchantAndUser
public function setMerchantAndUser($customerData = NULL, $password = NULL, $merchantType = 0, $merchantCategory = 0, $company = NULL, $userPhone = NULL, $webSite = NULL)
{
$options = array('path' => $this->urlCreateMerchantAndUser, 'data' => array('customerData' => BFCHelper::getQuotedString(BFCHelper::getJsonEncodeString($customerData)), 'password' => BFCHelper::getQuotedString($password), 'company' => BFCHelper::getQuotedString($company), 'userPhone' => BFCHelper::getQuotedString($userPhone), 'webSite' => BFCHelper::getQuotedString($webSite), 'merchantType' => $merchantType, 'merchantCategory' => $merchantCategory, '$format' => 'json'));
$url = $this->helper->getQuery($options);
$userId = -1;
//$r = $this->helper->executeQuery($url);
$r = $this->helper->executeQuery($url, "POST");
if (isset($r)) {
$res = json_decode($r);
$tmpuserId = $res->d->results ?: $res->d;
$userId = $tmpuserId->CreateMerchantAndUser;
}
return $userId;
}
示例4: setInfoRequest
public function setInfoRequest($customerData = NULL, $suggestedStay = NULL, $creditCardData = NULL, $otherNoteData = NULL, $merchantId = 0, $type = NULL, $userNotes = NULL, $label = NULL, $cultureCode = NULL, $processInfoRequest = NULL, $mailFrom = NULL)
{
$options = array('path' => $this->urlCreateInfoRequest, 'data' => array('customerData' => BFCHelper::getQuotedString(BFCHelper::getJsonEncodeString($customerData)), 'suggestedStay' => BFCHelper::getQuotedString(BFCHelper::getJsonEncodeString($suggestedStay)), 'otherNoteData' => BFCHelper::getQuotedString($otherNoteData), 'infoRequestType' => BFCHelper::getQuotedString($type), 'userNotes' => BFCHelper::getQuotedString($userNotes), 'label' => BFCHelper::getQuotedString($label), 'cultureCode' => BFCHelper::getQuotedString($cultureCode), 'processInfoRequest' => $processInfoRequest, 'mailFrom' => $mailFrom, '$format' => 'json'));
if (!empty($merchantId) && intval($merchantId) > 0) {
$options['data']['merchantId'] = $merchantId;
}
$url = $this->helper->getQuery($options);
$order = null;
//$r = $this->helper->executeQuery($url);
$r = $this->helper->executeQuery($url, "POST");
if (isset($r)) {
$res = json_decode($r);
$order = $res->d->results ?: $res->d;
}
return $order;
}
示例5: setCrew
public function setCrew($customerData = NULL, $merchantId = NULL, $orderId = NULL)
{
$params = $this->getState('params');
if ($customerData == null) {
$customerData = $params['customerData'];
}
if (COM_BOOKINGFORCONNECTOR_USEEXTERNALUPDATEORDER) {
$this->urlCreateCrew = '/CreateCrewFrom' . COM_BOOKINGFORCONNECTOR_USEEXTERNALUPDATEORDERSYSTEM;
}
$options = array('path' => $this->urlCreateCrew, 'data' => array('crewData' => BFCHelper::getQuotedString(BFCHelper::getJsonEncodeString($customerData)), 'merchantId' => $merchantId, 'orderId' => $orderId, '$format' => 'json', '$expand' => 'ChildCrews'));
$url = $this->helper->getQuery($options);
$crew = null;
//$r = $this->helper->executeQuery($url);
$r = $this->helper->executeQuery($url, "POST");
if (isset($r)) {
$res = json_decode($r);
$crew = $res->d->results ?: $res->d;
}
return $crew[0];
}