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