Commit 74f256bb authored by 蔡闯's avatar 蔡闯

支付回调侧测试

parent 95161b5f
...@@ -14,17 +14,21 @@ class Payreturn extends BaseController ...@@ -14,17 +14,21 @@ class Payreturn extends BaseController
require_once "../extend/aliPay/AopClient.php"; require_once "../extend/aliPay/AopClient.php";
//生成日志 //生成日志
file_put_contents('./log.text','1',FILE_APPEND);
$this->createPayLog($_POST,"支付宝"); $this->createPayLog($_POST,"支付宝");
file_put_contents('./log.text','2',FILE_APPEND);
$aop = new \AopClient(); $aop = new \AopClient();
$public_key = config('app.pay_alipay_public_key'); $public_key = config('app.pay_alipay_public_key');
$aop->alipayrsaPublicKey = $public_key; $aop->alipayrsaPublicKey = $public_key;
$flag = $aop->rsaCheckV1($_POST, NULL, "RSA2"); $flag = $aop->rsaCheckV1($_POST, NULL, "RSA2");
var_dump($flag); file_put_contents('./log.text','3',FILE_APPEND);
if($flag){ if($flag){
file_put_contents('./log.text','4',FILE_APPEND);
if($this->changePayStatus($_POST['out_trade_no'])){ if($this->changePayStatus($_POST['out_trade_no'])){
die('success'); die('success');
} }
} }
file_put_contents('./log.text','5',FILE_APPEND);
die('fail'); die('fail');
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment