本文整理汇总了PHP中payment::get_type方法的典型用法代码示例。如果您正苦于以下问题:PHP payment::get_type方法的具体用法?PHP payment::get_type怎么用?PHP payment::get_type使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类payment
的用法示例。
在下文中一共展示了payment::get_type方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: change_payment
/**
* Change payment status of order
* @return void
* @param integer id of orde
* @param string new status
*/
public function change_payment($id, $new)
{
// Check user permission and type of payment
if (user::is_got() and payment::get_type($this->order->get_payment($id)) == "post") {
$this->order->change_payment($id, $new);
url::redirect('/order/order/' . $id);
} else {
url::redirect('/denied');
}
}
示例2: if
,- <?php
echo Kohana::lang('eshop.currency');
?>
</td>
</tr>
</table>
<? if(user::is_got()){ ?>
<h3><? echo Kohana::lang('eshop.admin'); ?></h3>
<div class="admin">
<p>
<?php
echo Kohana::lang('eshop.status_payment');
?>
:
<? if(payment::get_type($data['payment']) == "post"){ ?>
<? if($data['status_payment'] == 'none'){ echo "<strong>";} ?><a href="/order/change_payment/<? echo $data['id']; ?>/none"><?php
echo Kohana::lang('eshop.none');
?>
</a><? if($data['status_payment'] == 'none'){ echo "</strong>";} ?> |
<? if($data['status_payment'] == 'paid'){ echo "<strong>";} ?><a href="/order/change_payment/<? echo $data['id']; ?>/paid"><?php
echo Kohana::lang('eshop.paid');
?>
</a><? if($data['status_payment'] == 'paid'){ echo "</strong>";} ?>
<? } else { ?>
<? echo Kohana::lang('eshop.disabled_due_payment'); ?>
<? } ?>
</p>
<p>
<?php