本文整理汇总了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>";
}