本文整理汇总了PHP中Sessions::setOnlinePaymentRate方法的典型用法代码示例。如果您正苦于以下问题:PHP Sessions::setOnlinePaymentRate方法的具体用法?PHP Sessions::setOnlinePaymentRate怎么用?PHP Sessions::setOnlinePaymentRate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Sessions
的用法示例。
在下文中一共展示了Sessions::setOnlinePaymentRate方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: validOffers
//.........这里部分代码省略.........
} else {
$discount_freeN = $discount_freeN;
}
if ($discount_freeN > 0) {
$offerAvailable = true;
}
$offerAmount = $tot_pay - ($discount_freeN * $no_of_rooms);
}
//Custom
if ($this->disType() == "3") {
// $custom = $this->des(); //if appilicable with custom other offers :)
// if ($custom != "") {
// $customOffer = true;
// $offerAvailable = true;
if ($f_validity == "on") { //if appilicable with custom other offers :)
$custom_cus_array[] = array("id" => $this->id(), "title" => $this->title(), "des" => $this->des());
} else {
$c = 1;
if ($c == 1) {
$custom_cus_array1[] = array("id" => $this->id(), "title" => $this->title(), "des" => $this->des());
$c++;
}
}
$customOffer = true;
// $offerAvailable = true;
}
}
} else {
//echo "no offers available";
$offerAvailable = false;
}
if ($offerAmount != "") {
$offerAmtArray[$f_id] = $offerAmount;
}
}
// if($customOffer==true){
// $entitled_offer
// }else{
// $entitled_offer
// }
$entitled_offer = array_search(min($offerAmtArray), $offerAmtArray);
$this->setId($entitled_offer);
$data = $this->getById();
$this->extractor($data);
$offer_title=$this->title();
$description = $this->des();
if (empty($offerAmtArray)) { //if you only have custom offers
$custom_array = array_merge($custom_cus_array, $custom_cus_array1);
//$discount_price = $tot_pay - min($offerAmtArray);
} else { //if you found good offers :) -- adding on custom offers to thta
$custom_array = $custom_cus_array;
//$discount_price = $tot_pay - min($offerAmtArray);
$discount_price = min($offerAmtArray);
}
$discounted_total=min($offerAmtArray);
//$discounted_total=$tot_pay - min($offerAmtArray);
// $tot_pay_lkr = Common::currencyConvert("USD", "LKR", $tot_pay);
// $discounted_total_lkr = Common::currencyConvert("USD", "LKR", $discounted_total);
if ($_SESSION['display_rate_in'] == "LKR") {
$tot_pay_lkr = $tot_pay;
} else {
$tot_pay_lkr = $tot_pay;
}
if ($_SESSION['display_rate_in'] == "LKR") {
$discounted_total_lkr = $discounted_total;
} else {
$discounted_total_lkr = $discounted_total; //Common::currencyConvert($_SESSION['display_rate_in'], "LKR", $discounted_total);
}
$off_array = array("Total" => $tot_pay, "TotalLKR" => $tot_pay_lkr, "OfferAvailable" => $offerAvailable, "CustomOffer" => $customOffer, "DiscountedTotal" => $discounted_total, "DiscountedTotalLKR" => $discounted_total_lkr, "Discount" => $discount_price, "CurrencyType" => $_SESSION['display_rate_in'], "offer_id" => $entitled_offer, "Title" => $offer_title, "Description" => $description, "Custom" => $custom_array);
if($offerAvailable==true || $customOffer==true ){
Sessions::setOnlinePaymentOffer(urlencode(serialize($off_array)));
if($customOffer==false) {
if ($_SESSION['display_rate_in'] == "LKR") {
Sessions::setOnlinePaymentRate($discounted_total_lkr);
} else {
Sessions::setOnlinePaymentRate($discounted_total);
}
}else{
if ($_SESSION['display_rate_in'] == "LKR") {
Sessions::setOnlinePaymentRate($tot_pay_lkr);
}else if($customOffer==true){
Sessions::setOnlinePaymentRate($tot_pay);
}
}
}else {
Sessions::resetOnlinePaymentOffer();
if ($_SESSION['display_rate_in'] == "LKR") {
Sessions::setOnlinePaymentRate($tot_pay_lkr);
}else{
Sessions::setOnlinePaymentRate($tot_pay);
}
}
return $off_array;
}