本文整理汇总了PHP中payment类的典型用法代码示例。如果您正苦于以下问题:PHP payment类的具体用法?PHP payment怎么用?PHP payment使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了payment类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: payment_payvision
function payment_payvision($config)
{
parent::payment($config);
add_member_field('payvision_cardid', '', 'hidden');
add_member_field('payvision_cardguid', '', 'hidden');
if ($this->config['testing']) {
$this->paurl = "https://testprocessor.payvisionservices.com";
} else {
$this->paurl = "https://testprocessor.payvisionservices.com";
}
}
示例2: doPay
public function doPay($filter)
{
if (!$filter['pay_app_id']) {
throw new \LogicException(app::get('systrade')->_("请选择支付方式!"));
return false;
}
//检测该支付单是否被支付
//检测该支付单中的订单是否有异常
$payments = $this->checkTradeData($filter['payment_id']);
if (!$payments) {
throw new \LogicException(app::get('systrade')->_("支付失败"));
return false;
}
$payments['pay_app_id'] = $filter['pay_app_id'];
$payments['return_url'] = $filter['return_url'];
//更新支付单的支付方式
//请求第三方支付接口
$updateResult = payment::update($payments);
if (!$updateResult) {
throw new \LogicException(app::get('systrade')->_("支付信息更新失败"));
return false;
}
$objPayment = kernel::single('ectools_pay');
$result = $objPayment->generate($payments);
if (!$result) {
throw new \LogicException(app::get('systrade')->_("支付失败"));
return false;
}
return true;
}
示例3: postCreate
public function postCreate()
{
$payment = new payment();
$payment->name = Input::get('name');
$payment->acc_holder = Input::get('acc_holder');
$payment->acc_no = Input::get('acc_no');
$payment->acc_type = Input::get('acc_type');
$payment->status = Input::get('status');
$logo = Input::file('logo');
$filename = date('m-d-Y-H_i_s') . "-" . $logo->getClientOriginalName();
$path = public_path('img/payment/' . $filename);
Image::make($logo->getRealPath())->resize(150, null, function ($constraint) {
$constraint->aspectRatio();
})->save($path);
$payment->logo = 'img/payment/' . $filename;
$payment->save();
return redirect('admin/payments')->with('flash_message', 'payment created');
}
示例4: requestMerchant
function requestMerchant()
{
$payment = new payment();
$datenow = date("d/m/Y h:m:s");
$modifiedDate = str_replace(" ", "%20", $datenow);
$payment->url = $this->paymentConfig->Url;
$postFields = "";
$postFields .= "&login=" . $this->paymentConfig->Login;
$postFields .= "&pass=" . $this->paymentConfig->Password;
$postFields .= "&ttype=" . $_POST['TType'];
$postFields .= "&prodid=" . $_POST['product'];
$postFields .= "&amt=" . $_POST['amount'];
$postFields .= "&txncurr=" . $this->paymentConfig->TxnCurr;
$postFields .= "&txnscamt=" . $this->paymentConfig->TxnScAmt;
$postFields .= "&clientcode=" . urlencode(base64_encode($_POST['clientcode']));
$postFields .= "&txnid=" . rand(0, 999999);
$postFields .= "&date=" . $modifiedDate;
$postFields .= "&custacc=" . $_POST['AccountNo'];
$postFields .= "&ru=" . $_POST['ru'];
$postFields .= "&udf1=" . str_replace(" ", "%20", $_POST['udf1']);
$postFields .= "&udf2=" . $_POST['udf2'];
$postFields .= "&udf3=" . $_POST['udf3'];
$postFields .= "&udf4=" . str_replace(" ", "%20", $_POST['udf4']);
// Not required for merchant
//$postFields .= "&bankid=".$_POST['bankid'];
$sendUrl = $payment->url . "?" . substr($postFields, 1) . "\n";
$this->writeLog($sendUrl);
$returnData = $payment->sendInfo($postFields);
$this->writeLog($returnData . "\n");
$xmlObjArray = $this->xmltoarray($returnData);
$url = $xmlObjArray['url'];
$postFields = "";
$postFields .= "&ttype=" . $_POST['TType'];
$postFields .= "&tempTxnId=" . $xmlObjArray['tempTxnId'];
$postFields .= "&token=" . $xmlObjArray['token'];
$postFields .= "&txnStage=1";
$url = $payment->url . "?" . $postFields;
$this->writeLog($url . "\n");
header("Location: " . $url);
}
示例5: order
if ($check_address->fields['total'] != '1') {
$_SESSION['billto'] = $_SESSION['customer_default_address_id'];
$_SESSION['payment'] = '';
}
}
require DIR_WS_CLASSES . 'order.php';
$order = new order();
// Load the selected shipping module(needed to calculate tax correctly)
require DIR_WS_CLASSES . 'shipping.php';
$shipping_modules = new shipping($_SESSION['shipping']);
require DIR_WS_CLASSES . 'order_total.php';
$order_total_modules = new order_total();
$order_total_modules->collect_posts();
$order_total_modules->pre_confirmation_check();
// $_SESSION['comments'] = '';
$comments = $_SESSION['comments'];
$showTotal = $_SESSION['cart']->show_total();
$total_weight = $_SESSION['cart']->show_weight();
$total_count = $_SESSION['cart']->count_contents();
// load all enabled payment modules
require DIR_WS_CLASSES . 'payment.php';
$payment_modules = new payment();
$flagOnSubmit = sizeof($payment_modules->selection());
require DIR_WS_MODULES . zen_get_module_directory('require_languages.php');
if (isset($_GET['payment_error']) && is_object(${$_GET['payment_error']}) && ($error = ${$_GET['payment_error']}->get_error())) {
$messageStack->add('checkout_payment', $error['error'], 'error');
}
$breadcrumb->add(NAVBAR_TITLE_1, zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
$breadcrumb->add(NAVBAR_TITLE_2);
// This should be last line of the script:
$zco_notifier->notify('NOTIFY_HEADER_END_CHECKOUT_PAYMENT');
示例6: session_start
<?php
/*
* Скрипт для приёма и отправки запросов
* by Semen4ik
* Skype: Semenov1215
* to RuBukkit.ORG
*/
session_start();
include "config.php";
require_once "payment.class.php";
$pay = new payment();
if (isset($_REQUEST['amount']) && isset($_REQUEST['payment'])) {
header("Location: " . $pay->pay_form($_REQUEST['amount'], $pay->config['user_param'], $_REQUEST['payment']));
} else {
if (isset($_REQUEST['method']) && isset($_REQUEST['params'])) {
switch (strtolower($_REQUEST['method'])) {
case "check":
echo $pay->up_sign($_REQUEST['params']);
break;
case "pay":
echo $pay->up_sign($_REQUEST['params']);
$pay->pay($_REQUEST['params']['sum'], $_REQUEST['params']['account']);
break;
default:
$pay->up_json_reply("error", $_REQUEST['params']);
break;
}
exit;
} else {
if (isset($_GET['reply'])) {
示例7: zen_session_destroy
}
$_SESSION['payment_attempt']++;
$zco_notifier->notify('NOTIFY_CHECKOUT_SLAMMING_ALERT');
if ($_SESSION['payment_attempt'] > 3) {
$zco_notifier->notify('NOTIFY_CHECKOUT_SLAMMING_LOCKOUT');
$_SESSION['cart']->reset(TRUE);
zen_session_destroy();
zen_redirect(zen_href_link(FILENAME_TIME_OUT));
}
// END CC SLAM PREVENTION
if (!isset($credit_covers)) {
$credit_covers = FALSE;
}
// load selected payment module
require DIR_WS_CLASSES . 'payment.php';
$payment_modules = new payment($_SESSION['payment']);
// load the selected shipping module
require DIR_WS_CLASSES . 'shipping.php';
$shipping_modules = new shipping($_SESSION['shipping']);
require DIR_WS_CLASSES . 'order.php';
$order = new order();
// prevent 0-entry orders from being generated/spoofed
if (sizeof($order->products) < 1) {
zen_redirect(zen_href_link(FILENAME_SHOPPING_CART));
}
require DIR_WS_CLASSES . 'order_total.php';
$order_total_modules = new order_total();
$zco_notifier->notify('NOTIFY_CHECKOUT_PROCESS_BEFORE_ORDER_TOTALS_PRE_CONFIRMATION_CHECK');
if (strpos($GLOBALS[$_SESSION['payment']]->code, 'paypal') !== 0) {
$order_totals = $order_total_modules->pre_confirmation_check();
}
示例8: __construct
public function __construct()
{
parent::__construct();
$this->payment_fields = implode(':', array($_POST['bill_primary_name']));
}
示例9: order
require_once DIR_WS_CLASSES . 'order.php';
$order = new order();
require_once DIR_WS_CLASSES . 'order_total.php';
// GV Code ICW ADDED FOR CREDIT CLASS SYSTEM
$order_total_modules = new order_total();
// GV Code ICW ADDED FOR CREDIT CLASS SYSTEM
$total_weight = $_SESSION['cart']->show_weight();
// $total_count = $_SESSION['cart']->count_contents();
$total_count = $_SESSION['cart']->count_contents_virtual();
// GV Code ICW ADDED FOR CREDIT CLASS SYSTEM
if ($order->billing['country']['iso_code_2'] != EMPTY_STRING) {
$_SESSION['delivery_zone'] = $order->billing['country']['iso_code_2'];
}
// load all enabled payment modules
require_once DIR_WS_CLASSES . 'payment.php';
$payment_modules = new payment();
$breadcrumb->add(NAVBAR_TITLE_1_CHECKOUT_PAYMENT, olc_href_link(FILENAME_CHECKOUT_SHIPPING, EMPTY_STRING, SSL));
$breadcrumb->add(NAVBAR_TITLE_2_CHECKOUT_PAYMENT, olc_href_link(FILENAME_CHECKOUT_PAYMENT, EMPTY_STRING, SSL));
//W. Kaiser - AJAX
$checkout_payment_text = 'checkout_payment';
$smarty->assign('FORM_ACTION', olc_draw_form($checkout_payment_text, olc_href_link(FILENAME_CHECKOUT_CONFIRMATION, EMPTY_STRING, SSL), 'post', 'onsubmit="return check_form_payment(\'' . $checkout_payment_text . '\');"'));
//W. Kaiser - AJAX
//---PayPal WPP Modification START ---//--
if (!$ec_enabled || $_GET['ec_cancel'] || !($_SESSION['paypal_ec_payer_id'] || $_SESSION['paypal_ec_payer_info'])) {
//---PayPal WPP Modification END ---//--
$smarty->assign('ADDRESS_LABEL', olc_address_label($_SESSION['customer_id'], $_SESSION['billto'], true, BLANK, HTML_BR));
$smarty->assign('BUTTON_ADDRESS', HTML_A_START . olc_href_link(FILENAME_CHECKOUT_PAYMENT_ADDRESS, EMPTY_STRING, SSL) . '">' . olc_image_button('button_change_address.gif', IMAGE_BUTTON_CHANGE_ADDRESS) . HTML_A_END);
$smarty->assign('BUTTON_CONTINUE', olc_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE));
require DIR_WS_INCLUDES . 'header.php';
if (isset($_GET['payment_error']) && is_object(${$_GET['payment_error']}) && ($error = ${$_GET['payment_error']}->get_error())) {
$smarty->assign('error', '<table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBoxNotice">
示例10: payment
if ($_POST['conditions'] == false) {
$_SESSION['navigation']->remove_current_page();
$_SESSION['navigation']->remove_last_page();
$_SESSION['error_message'] = $aLang['error_conditions_not_accepted'];
MyOOS_CoreApi::redirect(oos_href_link($aPages['checkout_payment'], '', 'SSL', true, false));
}
}
// load the selected payment module
require 'includes/classes/class_payment.php';
if ($credit_covers) $_SESSION['payment'] = '';
$oPaymentModules = new payment($_SESSION['payment']);
require 'includes/classes/class_order_total.php';
require 'includes/classes/class_order.php';
$oOrder = new order;
if ( (isset($_SESSION['shipping'])) && ($_SESSION['shipping']['id'] == 'free_free')) {
if ( ($oOrder->info['total'] - $oOrder->info['shipping_cost']) < MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER ) {
MyOOS_CoreApi::redirect(oos_href_link($aPages['checkout_shipping'], '', 'SSL'));
}
}
$oPaymentModules->update_status();
$oOrderTotalModules = new order_total;
$oOrderTotalModules->collect_posts();
示例11: server_callback
function server_callback()
{
$payment_name = is_array($payment_name = IReq::get('payment_name')) ? IFilter::act($payment_name[0]) : IFilter::act(IReq::get('payment_name'));
//初始化参数
$money = null;
$message = null;
$tradeno = null;
//获取支付payment的id值
$pObj = new IModel('payment as a,pay_plugin as b');
$paymentRow = $pObj->getObj('b.file_path = "' . $payment_name . '" and a.plugin_id = b.id', 'a.id');
//载入支付接口文件
$paymentObj = new Payment();
$payObj = $paymentObj->loadMethod($payment_name);
if (!is_object($payObj)) {
echo 'fail';
exit;
}
//执行接口回调函数
$return = $payObj->serverCallback(array_merge($_POST, $_GET), $paymentRow['id'], $money, $message, $tradeno);
//判断返回状态
if ($return == 1) {
if (stripos($tradeno, 'recharge_') !== false) {
$tradenoArray = explode('_', $tradeno);
$recharge_no = isset($tradenoArray[1]) ? $tradenoArray[1] : 0;
if (payment::updateRecharge($recharge_no)) {
echo 'success';
exit;
} else {
echo 'fail';
}
} else {
if (payment::updateOrder($tradeno)) {
echo 'success';
exit;
} else {
echo 'fail';
}
}
} else {
echo 'fail';
}
}
示例12: order
// get all available shipping quotes
$quotes = $shipping_modules->quote();
// if no shipping method has been selected, automatically select the cheapest method.
// if the modules status was changed when none were available, to save on implementing
// a javascript force-selection method, also automatically select the cheapest shipping
// method if more than one module is now enabled
if (!isset($_SESSION['shipping']) || isset($_SESSION['shipping']) && $_SESSION['shipping'] == false && xtc_count_shipping_modules() > 1) {
$_SESSION['shipping'] = $shipping_modules->cheapest();
}
if ($kein_versand == 1) {
$_SESSION['shipping'] = false;
}
$order = new order();
// load all enabled payment modules
require DIR_WS_CLASSES . 'payment.php';
$payment_modules = new payment($_SESSION['payment']);
$payment_modules->update_status();
require DIR_WS_CLASSES . 'order_total.php';
// GV Code ICW ADDED FOR CREDIT CLASS SYSTEM
$order_total_modules = new order_total();
$order_total_modules->process();
// GV Code Start
$order_total_modules->collect_posts();
$order_total_modules->pre_confirmation_check();
// GV Code End
if (is_array($payment_modules->modules)) {
$payment_modules->pre_confirmation_check();
}
$breadcrumb->add(NAVBAR_TITLE_PAYPAL_CHECKOUT, xtc_href_link(FILENAME_PAYPAL_CHECKOUT, '', 'SSL'));
require DIR_WS_INCLUDES . 'header.php';
if (SHOW_IP_LOG == 'true') {
示例13: order_total
require DIR_WS_CLASSES . 'order_total.php';
$order_total_modules = new order_total();
$order_total_modules->collect_posts();
$order_total_modules->pre_confirmation_check();
// load the selected payment module
require DIR_WS_CLASSES . 'payment.php';
if (!isset($credit_covers)) {
$credit_covers = FALSE;
}
//echo 'credit covers'.$credit_covers;
if ($credit_covers) {
unset($_SESSION['payment']);
$_SESSION['payment'] = '';
}
//@debug echo ($credit_covers == true) ? 'TRUE' : 'FALSE';
$payment_modules = new payment($_SESSION['payment']);
$payment_modules->update_status();
if (($_SESSION['payment'] == '' || !is_object(${$_SESSION}['payment'])) && $credit_covers === FALSE) {
$messageStack->add_session('checkout_payment', ERROR_NO_PAYMENT_MODULE_SELECTED, 'error');
}
if (is_array($payment_modules->modules)) {
$payment_modules->pre_confirmation_check();
}
if ($messageStack->size('checkout_payment') > 0) {
zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
}
//echo $messageStack->size('checkout_payment');
//die('here');
// Stock Check
$flagAnyOutOfStock = false;
$stock_check = array();
示例14: tep_session_register
}
if (!tep_session_is_registered('payment')) {
tep_session_register('payment');
}
if (isset($HTTP_POST_VARS['payment'])) {
$payment = $HTTP_POST_VARS['payment'];
}
if (!tep_session_is_registered('comments')) {
tep_session_register('comments');
}
if (tep_not_null($HTTP_POST_VARS['comments'])) {
$comments = tep_db_prepare_input($HTTP_POST_VARS['comments']);
}
// load the selected payment module
require DIR_WS_CLASSES . 'payment.php';
$payment_modules = new payment($payment);
require DIR_WS_CLASSES . 'order.php';
$order = new order();
$payment_modules->update_status();
if ($payment_modules->selected_module != $payment || is_array($payment_modules->modules) && sizeof($payment_modules->modules) > 1 && !is_object(${$payment}) || is_object(${$payment}) && ${$payment}->enabled == false) {
tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(ERROR_NO_PAYMENT_MODULE_SELECTED), 'SSL'));
}
if (is_array($payment_modules->modules)) {
$payment_modules->pre_confirmation_check();
}
// load the selected shipping module
require DIR_WS_CLASSES . 'shipping.php';
$shipping_modules = new shipping($shipping);
require DIR_WS_CLASSES . 'order_total.php';
$order_total_modules = new order_total();
$order_total_modules->process();
示例15: order_info
$order = order_info($order_id);
/*if ($payment['is_cod'] == 1)
{
$order = order_info($order_id);
$region_id_list = array(
$order['country'], $order['province'], $order['city'], $order['district']
);
$shipping = shipping_area_info($order['shipping_id'], $region_id_list);
$pay_fee = pay_fee($pay_id, $order_amount, $shipping['pay_fee']);
}
else
{
$pay_fee = pay_fee($pay_id, $order_amount);
}*/
include_once '../includes/modules/payment/payment.php';
$pay_obj = new payment();
$order['pay_num'] = $pay_obj->pay_set($order_id, $pay_id, $order_amount);
/* 保存订单 */
/* $order = array(
'pay_id' => $pay_id,
'pay_name' => addslashes($payment['pay_name']),
'pay_fee' => $pay_fee
);
update_order($order_id, $order);*/
update_order_amount($order_id);
/* 更新 pay_log */
update_pay_log($order_id);
/* todo 记录日志 */
$sn = $old_order['order_sn'];
$new_order = order_info($order_id);
if ($old_order['total_fee'] != $new_order['total_fee']) {