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


PHP Payment::getPayment方法代码示例

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


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

示例1: asyncCallback

 public function asyncCallback($callbackData, &$paymentId, &$money, &$message, &$orderNo)
 {
     //使用通用通知接口
     $notify = new Notify_pub();
     $xml = $GLOBALS['HTTP_RAW_POST_DATA'];
     $notify->saveData($xml);
     //验证签名,并回应微信。
     //对后台通知交互时,如果微信收到商户的应答不是成功或超时,微信认为通知失败,
     //微信会通过一定的策略(如30分钟共8次)定期重新发起通知,
     //尽可能提高通知的成功率,但微信不保证通知最终能成功。
     $payment = new Payment($paymentId);
     $paymentInfo = $payment->getPayment();
     $paymentInfo['partner_key'];
     if ($notify->checkSign($paymentInfo['partner_key']) == FALSE) {
         $notify->setReturnParameter("return_code", "FAIL");
         //返回状态码
         $notify->setReturnParameter("return_msg", "签名失败");
         //返回信息
         echo $notify->returnXml();
     } else {
         $notify->setReturnParameter("return_code", "SUCCESS");
         //设置返回码
         $this->returnXml = $notify->returnXml();
     }
     if ($notify->checkSign($paymentInfo['partner_key']) == TRUE) {
         if ($notify->data["return_code"] == "SUCCESS" && $notify->data["return_code"] == "SUCCESS") {
             $orderNo = $notify->data['out_trade_no'];
             $money = $notify->data['total_fee'] / 100;
             return true;
         }
     }
     return false;
 }
开发者ID:sammychan1981,项目名称:quanpin,代码行数:33,代码来源:pay_wxpayqr.php

示例2: getPaymentPaid

 public function getPaymentPaid($projid = null)
 {
     if ($projid != null) {
         $payment = Payment::getPayment($projid);
         // possible user loading method
     } else {
         return "project id is null";
     }
     return $payment;
 }
开发者ID:incizon,项目名称:HicreteWebApp,代码行数:10,代码来源:PaymentController.php

示例3: asyncCallback

 public function asyncCallback($callbackData, &$paymentId, &$money, &$message, &$orderNo)
 {
     //除去待签名参数数组中的空值和签名参数
     $filter_param = $this->filterParam($callbackData);
     //对待签名参数数组排序
     $para_sort = $this->argSort($filter_param);
     //生成签名结果
     $payment = new Payment($paymentId);
     $paymentInfo = $payment->getPayment();
     $mysign = $this->buildSign($para_sort, $paymentInfo['partner_key']);
     if ($callbackData['sign'] == $mysign) {
         //回传数据
         $orderNo = $callbackData['out_trade_no'];
         $money = $callbackData['total_fee'];
         if ($callbackData['trade_status'] == 'TRADE_FINISHED' || $callbackData['trade_status'] == 'TRADE_SUCCESS') {
             return true;
         }
     }
     return false;
 }
开发者ID:sammychan1981,项目名称:quanpin,代码行数:20,代码来源:pay_alipaydirectInter.php

示例4: asyncCallback

 public function asyncCallback($callbackData, &$paymentId, &$money, &$message, &$orderNo)
 {
     //除去待签名参数数组中的空值和签名参数
     $filter_param = $this->filterParam($callbackData);
     //对待签名参数数组排序
     $para_sort = $this->argSort($filter_param);
     //生成签名结果
     $payment = new Payment($paymentId);
     $paymentInfo = $payment->getPayment();
     $mysign = $this->buildSign($para_sort, $paymentInfo['partner_key']);
     if ($callbackData['sign'] == strtoupper($mysign)) {
         //回传数据
         $orderNo = $callbackData['out_trade_no'];
         $money = $callbackData['total_fee'] / 100;
         $message = isset($callbackData['pay_info']) ? $callbackData['pay_info'] : '';
         if ($message == '' && $callbackData['trade_state'] == '0') {
             return true;
         }
     }
     return false;
 }
开发者ID:sammychan1981,项目名称:quanpin,代码行数:21,代码来源:pay_tenpay.php

示例5: callback

 public function callback($callbackData, &$paymentId, &$money, &$message, &$orderNo)
 {
     //除去待签名参数数组中的空值和签名参数
     $filter_param = $this->filterParam($callbackData);
     //对待签名参数数组排序
     $para_sort = $this->argSort($filter_param);
     //生成签名结果
     $payment = new Payment($paymentId);
     $paymentInfo = $payment->getPayment();
     $mysign = $this->buildSign($para_sort, $paymentInfo['partner_key']);
     if ($callbackData['sign'] == $mysign) {
         //回传数据
         $orderNo = $callbackData['order_no'];
         $money = $callbackData['total_fee'];
         if ($callbackData['order_status'] == 'TINY_SECCESS') {
             return true;
         }
         $message = '支付失败';
     } else {
         $message = '签名不正确';
     }
     return false;
 }
开发者ID:sammychan1981,项目名称:quanpin,代码行数:23,代码来源:pay_balance.php

示例6: afterAsync

 public function afterAsync()
 {
     $payment = new Payment($this->paymentId);
     $paymentObj = $payment->getPayment();
     return new AlipayDelivery($paymentObj['partner_id'], $paymentObj['partner_key']);
 }
开发者ID:sammychan1981,项目名称:quanpin,代码行数:6,代码来源:pay_alipaytrad.php

示例7: callback

 public function callback()
 {
     //从URL中获取支付方式
     $payment_id = Filter::int(Req::get('payment_id'));
     $payment = new Payment($payment_id);
     $paymentPlugin = $payment->getPaymentPlugin();
     if (!is_object($paymentPlugin)) {
         $msg = array('type' => 'fail', 'msg' => '支付方式不存在!');
         $this->redirect('/index/msg', false, $msg);
         exit;
     }
     //初始化参数
     $money = '';
     $message = '支付失败';
     $orderNo = '';
     //执行接口回调函数
     $callbackData = Req::args();
     //array_merge($_POST,$_GET);
     unset($callbackData['con']);
     unset($callbackData['act']);
     unset($callbackData['payment_id']);
     unset($callbackData['tiny_token_redirect']);
     $return = $paymentPlugin->callback($callbackData, $payment_id, $money, $message, $orderNo);
     //支付成功
     if ($return == 1) {
         // 海关发送报文位置  待定
         //充值方式
         if (stripos($orderNo, 'recharge_') !== false) {
             $tradenoArray = explode('_', $orderNo);
             $recharge_no = isset($tradenoArray[1]) ? $tradenoArray[1] : 0;
             $recharge_id = Order::recharge($recharge_no, $payment_id, $callbackData);
             if ($recharge_id) {
                 //$this->redirect("/ucenter/account/$recharge_id");
                 $model = new Model('recharge');
                 $obj = $model->where("id=" . $recharge_id . ' and status=1')->find();
                 if ($obj) {
                     $msg = array('type' => 'success', 'msg' => '充值成功!', 'content' => '充值编号:' . $recharge_no . ',充值方式:' . $obj['payment_name'], 'redirect' => '/ucenter/account');
                     $this->redirect('/index/msg', true, $msg);
                 }
                 exit;
             }
             $msg = array('type' => 'fail', 'msg' => '支充值失败!');
             $this->redirect('/index/msg', false, $msg);
             exit;
         } else {
             $payment_plugin = $payment->getPayment();
             //货到付款的处理
             if ($payment_plugin['class_name'] == 'received') {
                 $model = new Model("order");
                 $order = $model->where("order_no='" . $orderNo . "'")->find();
                 if (!empty($order)) {
                     $model->where("order_no='" . $orderNo . "'")->data(array('payment' => $payment_id))->update();
                     $this->redirect("/simple/order_completed/order_id/" . $order['id']);
                     exit;
                 }
             } else {
                 // 海关发送报文位置  待定
                 // todo SKM 海关发送报文位置  待定
                 // todo 更新订单表中数据  尤其是状态
                 // $strXML
                 $order_id = Order::updateStatus($orderNo, $payment_id, $callbackData);
                 if ($order_id) {
                     $erpmsg = ApiToErp::callerporder($orderNo);
                     //SKM-SMS 支付成功  发送支付完成信息  在Order.php 里面的方法处理 updateStatus
                     //SKM-CUSTOMS  支付完成 把订单信息发送给 海关一步达系统  下面代码仅用于国际支付宝业务
                     $orderNo = $callbackData['out_trade_no'];
                     //$money   = $callbackData['total_fee'];
                     $trade_no = $callbackData['trade_no'];
                     $conf = array('payNumber' => $trade_no);
                     // 交易号
                     //$orderNo = "88"; //订单编号 callbackData 中的out_trade_no
                     // 导出订单数据,以XML文件格式
                     $order_export_inst = new OrderExport();
                     $ret = $order_export_inst->toXML($orderNo, $conf);
                     if (isset($ret['status']) && $ret['status'] == 1) {
                         $strXML = $ret['data'];
                         // TEST-LOG
                         //$strDate = date("Y-m-d-h-i-s");
                         //file_put_contents("/var/www/html/quanpin/logs/gateway_$strDate.xml", $strXML);
                         // 发送XML数据到海关
                         $gateway_inst = new GatewayModel();
                         $gateway_inst->callWebService($strXML, "IMPORTORDER");
                         //Tiny::log(__FILE__.__LINE__."---ALIPAY----".$strXML);
                         $data = array('tax_api_status' => 1);
                         Order::updateStatusByNo($orderNo, $data);
                     } else {
                         $message = '支付成功, 发送海关数据失败,请从新发送';
                         // 这部分信息保存到数据库中
                         $data = array('tax_api_status' => 0);
                         Order::updateStatusByNo($orderNo, $data);
                     }
                     //E SKM-CUSTOMS
                     $this->redirect("/simple/order_completed/order_id/" . $order_id);
                     exit;
                 }
                 $msg = array('type' => 'fail', 'msg' => '订单修改失败!');
                 $this->redirect('/index/msg', false, $msg);
                 exit;
             }
         }
//.........这里部分代码省略.........
开发者ID:sammychan1981,项目名称:quanpin,代码行数:101,代码来源:payment.php

示例8: nl2br

										<td class="tdname">Пожелания к заказу</td>
										<td><?php 
echo nl2br($message);
?>
</td>
									</tr>
								</table>
							</li>
							<li class="edit_form_section edit_form_section_info plugin_orders_info">
								<?php 
Delivery::getDelivery();
?>
							</li>
							<li class="edit_form_section edit_form_section_info plugin_orders_info">
								<?php 
Payment::getPayment();
?>
							</li>
							<li class="edit_form_section edit_form_section_description">
								<header class="edit_form_section_header">
									<strong>Дополнительная информация</strong>
								</header>
								<div class="ckeditor_layout">
									<textarea class="ckeditor_textarea input_text" id="info" name=info><?php 
echo $info;
?>
</textarea>
									<script language="javascript">
										$(document).ready( function(){	
											initEditor($("#info"));
										});
开发者ID:sov-20-07,项目名称:billing,代码行数:31,代码来源:edit.php


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