本文整理匯總了PHP中payment::mod_info方法的典型用法代碼示例。如果您正苦於以下問題:PHP payment::mod_info方法的具體用法?PHP payment::mod_info怎麽用?PHP payment::mod_info使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類payment
的用法示例。
在下文中一共展示了payment::mod_info方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: pay_settings
function pay_settings()
{
$this->output->admin();
$f = $this->input->f;
// Set the default to be PayPal
if (!$this->default[adrevenue][payment_module]) {
$this->default[adrevenue][payment_module] = "paypal";
}
$mod = "pay." . $this->default[adrevenue][payment_module] . ".php";
include_once $mod;
$opt = payment::mod_vars();
$info = payment::mod_info();
if (count($f) > 0) {
reset($f);
while (list($key, $val) = each($f)) {
$this->save($key, $val);
}
$this->output->redirect("The payment settings were updated", "index.php?section=settings&action=pay_settings", 1);
exit;
}
// Show the form
$form = new formgen();
$form->comment("<b>" . lib_lang("Enter the settings for your {$info['name']} payment module") . "</b><br> ");
if ($info[extern] == TRUE) {
$form->comment(lib_lang($info[extern_description]) . ": <font color=red>" . $this->default[adrevenue][hostname] . "ipn.php<p>" . "</font>");
}
foreach ($opt as $rec) {
$name = $rec[name];
$v = $this->db->getsql("SELECT value FROM adrev_settings WHERE name=?", array($name));
$form->input(lib_lang($rec[label]), "f[{$name}]", stripslashes($v[0][value]), $rec[length]);
}
$form->hidden("submit", "1");
$this->title = lib_lang("Edit {$info['name']} Payment Settings");
$this->content = $form->generate("post", lib_lang("Save Payment Settings"));
$this->display();
$this->printpage();
exit;
}