本文整理匯總了PHP中secure::get_creditcards方法的典型用法代碼示例。如果您正苦於以下問題:PHP secure::get_creditcards方法的具體用法?PHP secure::get_creditcards怎麽用?PHP secure::get_creditcards使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類secure
的用法示例。
在下文中一共展示了secure::get_creditcards方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: SUM
$module_id = $args[3];
$selected_option = $args[0];
$chart_assign_id = $args[1];
$result = $this->db->query("SELECT * FROM payments WHERE chart_assign_id = '{$chart_assign_id}'");
$tmp1 = $this->db->fetch_assoc($this->db->query("SELECT grant_total FROM erp_order WHERE order_id = {$module_id}"));
$full_amount = $tmp1["grant_total"];
$bill_amount = $full_amount / 2;
$total_arr = $this->db->fetch_assoc($this->db->query("SELECT SUM( amount ) total FROM `payments` WHERE for_module_name = 'order' AND for_module_id = '{$module_id}' AND refund='no'"));
$already_payed = $total_arr["total"];
// $return["javascript"] = "alert('ba: $bill_amount|ap: $already_payed');";
//$return["javascript"] = "alert('" . $this->db->num_rows($result) . "| $already_payed | $bill_amount" . "');";
if ($this->db->num_rows($result) == 0 && $already_payed < $bill_amount) {
$return["stop"] = "YES";
$bill = $bill_amount - $already_payed;
$contacts = $this->get_contact_by_module($module_id, $module_name);
$credit_cards = $secure->get_creditcards("contacts", $contacts[0]);
$tmp1 = $this->db->fetch_assoc($this->db->query("SELECT ccid FROM erp_order WHERE order_id = {$module_id}"));
$ccid = $tmp1["ccid"];
if (array_key_exists($ccid, $credit_cards) == false && $ccid != '0') {
$cc2 = $secure->get_creditcard($ccid);
$credit_cards[$ccid] = $cc2[$ccid];
}
$ccoptions = '<option value="">--SELECT ONE--</option>';
foreach ($credit_cards as $num => $card) {
if ($num = $ccid) {
$select = " SELECTED ";
} else {
$select = '';
}
$ccoptions .= "<option {$select} value='" . $card["ccid"] . "' >" . $card["name"] . " - " . $card["type"] . " " . $card["expiration"] . "</option>";
}