当前位置: 首页>>代码示例>>PHP>>正文


PHP payment::count方法代码示例

本文整理汇总了PHP中payment::count方法的典型用法代码示例。如果您正苦于以下问题:PHP payment::count方法的具体用法?PHP payment::count怎么用?PHP payment::count使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在payment的用法示例。


在下文中一共展示了payment::count方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: foreach

$logger->log('ACH API page called', Zend_Log::INFO);
if ($_POST['pg_response_code'] == 'A01') {
    $logger->log('ACH validate success', Zend_Log::INFO);
    //insert into payments
    $paypal_data = "";
    foreach ($_POST as $key => $value) {
        $paypal_data .= "\n{$key}: {$value}";
    }
    $logger->log('ACH Data:', Zend_Log::INFO);
    $logger->log($paypal_data, Zend_Log::INFO);
    $check_payment = new payment();
    $check_payment->filter = 'online_payment_id';
    $check_payment->online_payment_id = $_POST['pg_consumerorderid'];
    $check_payment->domain_id = '1';
    $number_of_payments = $check_payment->count();
    $logger->log('ACH - number of times this payment is in the db: ' . $number_of_payments, Zend_Log::INFO);
    if ($number_of_payments > 0) {
        $xml_message = 'Online payment for invoices: ' . $_POST['pg_consumerorderid'] . ' has already been entered into Simple Invoices';
        $logger->log($xml_message, Zend_Log::INFO);
    }
    if ($number_of_payments == '0') {
        $payment = new payment();
        $payment->ac_inv_id = $_POST['pg_consumerorderid'];
        $payment->ac_amount = $_POST['pg_total_amount'];
        $payment->ac_notes = $paypal_data;
        $payment->ac_date = date('Y-m-d');
        $payment->online_payment_id = $_POST['pg_consumerorderid'];
        $payment->domain_id = '1';
        $payment_type = new payment_type();
        $payment_type->type = "ACH";
开发者ID:dadigo,项目名称:simpleinvoices,代码行数:30,代码来源:ach.php


注:本文中的payment::count方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。