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


PHP Transaction::get_error_message方法代码示例

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


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

示例1: array

         }
     }
 } else {
     if ($transaction->anet_CIM(false)) {
         // success
         if (!empty($order_weekday->meals)) {
             $dbi->update('Orders', array('TransactionNumber' => $transaction->PymtRefCd), array('OrderID' => $order_weekday->OrderID));
             $_SESSION['successWeekly'][] = $order_weekday->OrderID;
         }
         if (!empty($order_weekend->meals)) {
             $dbi->update('Orders', array('TransactionNumber' => $transaction->PymtRefCd), array('OrderID' => $order_weekend->OrderID));
             $_SESSION['successWeekly'][] = $order_weekend->OrderID;
         }
     } else {
         // anet error
         Gadget::add_message("Error while processing Order {$orderID} - " . $transaction->get_error_message());
         //die($transaction->get_error_message());
         $orderSuccess = false;
     }
     $krustomer->First_Order_Date = $krustomer->First_Order_Date ? $krustomer->First_Order_Date : $date;
     $krustomer->Last_Order_Date = date('Y-m-d');
     $krustomer->Total_Orders++;
     $krustomer->update();
     $orderSuccess = true;
     // If they used a promocode that was an ammount, subtract total from promocode amount
     if ($promoCode->multiple_use == 0) {
         if ($promoCode->Amount > 0 && $promoCode->PromoCodeType == "Amount Discount") {
             $newPromoCodeAmount = $promoCode->Amount - $order->Amounts->Subtotal->amount;
             if ($newPromoCodeAmount < 0) {
                 $newPromoCodeAmount = 0;
             }
开发者ID:elliecm,项目名称:MadisonandRayne,代码行数:31,代码来源:checkout.php

示例2: intval

                    if ($PromoCode && $PromoCode->can_be_used($_SESSION['CustomerID'], 'GiftCertificates')) {
                        $promoCodeAmount = intval($PromoCode->Amount);
                        $giftCertAmount  = intval($data['GiftAmount']);

                        $newPromoCodeAmount = $promoCodeAmount - $giftCertAmount;
                        if ($newPromoCodeAmount < 0) {
                            $newPromoCodeAmount = 0;
                        }
                        $dbi->update('PromoCodes', array('Amount' => $newPromoCodeAmount), array('PromoCodeID' => $PromoCodeID));
                    }
                }

                //Gadget::add_message('success');
                Gadget::redirect('success2');
            } else {
                Gadget::add_message($transaction->get_error_message());
            }
        } catch (Exception $e) {
            s('Error: ' . $e->getMessage() . $transaction->get_error_message());
            Gadget::add_message($e->getMessage() . $transaction->get_error_message());
        }
    }
}

$page = Page::get_from_alias('giftcertificates');
$page->add_js('/js/giftcertificates.js');

require 'header.php';
?>
<div class="content-padding">
    <div><?php echo $page->content['main']; ?></div>
开发者ID:elliecm,项目名称:MadisonandRayne,代码行数:31,代码来源:giftcertificates.php

示例3: array

            $krustomer->Last_Order_Date  = $date;
            $krustomer->Total_Orders++;
            $krustomer->update();

            //make sure there is an order record
            //@golive change date - Gadget::$date_do->format(DATE_FORMAT_MYSQL)
            $insert_data = array(
                'CustomerID'   => $krustomer->CustomerID,
                'DeliveryDate' => $sub->DeliveryDate,
                'DateOrdered'  => array('NOW()', ''),
                'Total'        => 0,
            );

            //$dbi->insert('Orders', $insert_data, array(), 'IGNORE');
        } else { // anet error
            echo "Error while processing subscription for Customer $sub->CustomerID - {$transaction->get_error_message()}";
            b();
        }
    } else {
        echo "Can't process subscription for Customer $krustomer->CustomerID - missing authorize.net profiles";
        b();
    }
    h();
}

//insert new subscription rows
/*
$dbi->q("
    INSERT IGNORE INTO Subscriptions (DeliveryDate, CustomerID, WeeklyMeals, WeeklyReg, WeeklyVeg)
        SELECT DATE_ADD('$date', INTERVAL 6 DAY) AS DeliveryDate, CustomerID, WeeklyMeals, WeeklyReg, WeeklyVeg
        FROM Customers
开发者ID:elliecm,项目名称:MadisonandRayne,代码行数:31,代码来源:process_orders.php


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