本文整理汇总了PHP中payment::respond方法的典型用法代码示例。如果您正苦于以下问题:PHP payment::respond方法的具体用法?PHP payment::respond怎么用?PHP payment::respond使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类payment
的用法示例。
在下文中一共展示了payment::respond方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: unset
$smarty->assign('payArr', $payArr);
assign_template();
$_SESSION['pay_sn'] = $order['order_sn'];
unset($_SESSION['message']);
unset($_SESSION['message_sn']);
$smarty->display('pay_respond.dwt');
} else {
header('location:flow.php?step=done');
}
} else {
include_once ROOT_PATH . 'includes/lib_transaction.php';
include_once 'includes/modules/payment/payment.php';
require ROOT_PATH . 'includes/lib_payment.php';
require ROOT_PATH . 'includes/lib_order.php';
$pay_obj = new payment();
$payArr = $pay_obj->respond();
if ($payArr != false && $payArr['status'] == 1) {
$message = '支付成功';
//$order_id = $db->getRow('select order_id from '.$ecs->table('order_info').' where order_sn='.$payArr['orderid'].'');
$order_id = $db->getRow("select user_id, email, order_id from " . $ecs->table('order_info') . " where order_sn='" . $payArr['orderid'] . "'");
$payArr['order_id'] = $order_id['order_id'];
$payArr['user_id'] = $order_id['user_id'];
$payArr['email'] = $order_id['email'];
//$url = '&message='.$message.'&order_id='.$payArr['order_id'].'&status='.$payArr['status'].'&money='.$payArr['payprice'];
$url = '&message=' . $message . '&order_id=' . $payArr['order_id'] . '&status=' . $payArr['status'] . '&money=' . $payArr['payprice'] . '&email=' . $payArr['email'] . '&user_id=' . $payArr['user_id'];
} else {
$message = "支付失败";
$url = '&message=' . $message;
}
$_SESSION['message_sn'] = $payArr['orderid'] ? $payArr['orderid'] : 0;
$_SESSION['message'] = $order_id['order_id'] ? $order_id['order_id'] : 0;