Exemple #1
0
    public function CallbackVerify($payment)
    {
		unset($_POST['mod']);
		if(true === DEBUG_LIANLIANPAY || 'POST' == $_SERVER['REQUEST_METHOD'] || $_POST){
			if (!class_exists('LLpayNotify')){
				include DRIVER_PATH.'payment/lianlianpay/llpay_notify.class.php';
				include DRIVER_PATH.'payment/lianlianpay/llpay_cls_json.php';
			}
			$lianlianpay = new LLpayNotify($payment['config']);
			if(true === $this->__Is_Nofity()) {
				$return = $lianlianpay->verifyReturn();
			} else {
								sleep(rand(1, 3));
				$return = $lianlianpay->verifyNotify();
			}
			$this->lpreturn = $lianlianpay->notifyResp;
			if(true === $return && 'SUCCESS' == $this->lpreturn['result_pay']) {
				$order = logic('order')->GetOne($this->lpreturn['no_order']);
				if($order && $order['paytype'] == $payment['id']){
					if($order['product']['type'] == 'ticket'){
						return 'TRADE_FINISHED';
					}else{
						return 'WAIT_SELLER_SEND_GOODS';
					}
				}else{
					return 'VERIFY_FAILED';
				}
			}else{
				return 'VERIFY_FAILED';
			}
		}else{
			return 'VERIFY_FAILED';
		}
    }
Exemple #2
0
 /**
  * 支付返回数据校验
  */
 public function Callback()
 {
     $llpayNotify = new LLpayNotify($this->llpay_config);
     $llpayNotify->verifyNotify();
     if ($llpayNotify->result) {
         //验证成功
         //获取连连支付的通知返回参数,可参考技术文档中服务器异步通知参数列表
         $no_order = $llpayNotify->notifyResp['no_order'];
         //商户订单号
         $result_pay = $llpayNotify->notifyResp['result_pay'];
         //支付结果,SUCCESS:为支付成功
         $money_order = $llpayNotify->notifyResp['money_order'];
         // 支付金额
         if ($result_pay == "SUCCESS") {
             return array('result' => true, 'amount' => $money_order, 'trans_no' => $no_order, 'type' => 2);
         } else {
             return array('result' => true, 'amount' => 0, 'trans_no' => $no_order, 'type' => 2);
         }
     } else {
         return array('result' => false, 'type' => 2);
     }
 }
Exemple #3
0
 /**
  * 支付返回数据校验
  */
 public function Callback()
 {
     //计算得出通知验证结果
     $llpayNotify = new LLpayNotify($this->llpay_config);
     $verify_notify_result = $llpayNotify->verifyNotify();
     if ($verify_notify_result) {
         $is_notify = true;
         include_once 'lib/llpay_cls_json.php';
         $json = new JSON();
         $str = file_get_contents("php://input");
         $val = $json->decode($str);
         $no_order = trim($val->{'no_order'});
         $money_order = trim($val->{'money_order'});
         $result_pay = trim($val->{'result_pay'});
         if ($result_pay == 'SUCCESS') {
             return array('result' => true, 'amount' => $money_order, 'trans_no' => $no_order, 'type' => 2);
         } else {
             return array('result' => true, 'amount' => $money_order, 'trans_no' => $no_order, 'type' => 2);
         }
     } else {
         return array('result' => false, 'type' => 2);
     }
 }
Exemple #4
0
/* *
 * 功能:连连支付服务器异步通知页面
 * 版本:1.0
 * 日期:2014-06-16
 * 说明:
 * 以下代码只是为了方便商户测试而提供的样例代码,商户可以根据自己网站的需要,按照技术文档编写,并非一定要使用该代码。
 *************************页面功能说明*************************
 * 创建该页面文件时,请留心该页面文件中无任何HTML代码及空格。
 * 该页面不能在本机电脑测试,请到服务器上做测试。请确保外部可以访问该页面。
 */
require_once "llpay.config.php";
require_once "lib/llpay_notify.class.php";
//计算得出通知验证结果
$llpayNotify = new LLpayNotify($llpay_config);
$verify_result = $llpayNotify->verifyNotify();
if ($verify_result) {
    //验证成功
    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    //请在这里加上商户的业务逻辑程序代
    //——请根据您的业务逻辑来编写程序(以下代码仅作参考)——
    //获取连连支付的通知返回参数,可参考技术文档中服务器异步通知参数列表
    $is_notify = true;
    include_once 'lib/llpay_cls_json.php';
    $json = new JSON();
    $str = file_get_contents("php://input");
    $val = $json->decode($str);
    $oid_partner = trim($val->{'oid_partner'});
    $dt_order = trim($val->{'dt_order'});
    $no_order = trim($val->{'no_order'});
    $oid_paybill = trim($val->{'oid_paybill'});