<?php
/**
 * @copyright   2008-2020 伯乐发卡 <http://www.lailiyun.com>
 * @creatdate   2020-9-10 Mr wang <634273662@qq.com>
 * @version   伯乐发卡V3（个人自动发卡系统）
 */

require_once '../inc.php';
use BL\app\libs\Log;
$model = '蓝支付';
$payconf = $payDao->checkAcp("1");
require  WEB_ROOT."/pay/lailiyun/pay/Pay.class.php";
$pay = new Lanpay($payconf['pay_yzfid'], $payconf['pay_yzfkey']);

$data = $_REQUEST;
if ($pay->verify($data)) {
    if ($data['trade_status'] == 'TRADE_SUCCESS') {
		$res = $payDao->updateOrder($data['out_trade_no'],$model,$data['trade_no']);
        exit('success');
    } else {
        exit('fail');
    }
} else {
    exit('fail');
}
