时间:2021-07-01 10:21:17 帮助过:3人阅读
$file = './138/Lib/Action/Mopro/data.txt';
$check = file_get_contents("php://input");
file_put_contents($file, $check);
//处理方法
include('./index.php');
//手动载入处理方法
include("./Lib/Action/Mopro/Common/function.php");
$exs = explode('&Plain=', $check);//var_dump($exs);$this->log('line 59 ret',var_export($exs));
//分割字符串拿到两个参数
$signature = $exs[0];
$exp = explode('Signature=',$signature);
$signature = $exp[1];
$plain = $exs[1];
$plain = urldecode($plain);
$plain = explode('&ResponseCode=0000',$plain);
$plain = $plain[0];echo $plain.'
'.$Signature; exit('1');
//验签环节
$ret = srdecode($plain,$signature);
//$this->log('line 80 ret',var_export($ret));
//1:通过,0:不通过
$arrall = array();
最近用php做银行的一个购买服务的功能,用的是银行自己的企业网银接口。现在遇到个问题,
支付成功后,银行那边 还要调我写的一个回调函数,但是我写的这个总是验签失败,谁能给个例子吗?
//支付返回界面
public function receivehandle(){
$file = './138/Lib/Action/Mopro/data.txt';
$check = file_get_contents("php://input");
file_put_contents($file, $check);
//处理方法
include('./index.php');
//手动载入处理方法
include("./Lib/Action/Mopro/Common/function.php");
$exs = explode('&Plain=', $check);//var_dump($exs);$this->log('line 59 ret',var_export($exs));
//分割字符串拿到两个参数
$signature = $exs[0];
$exp = explode('Signature=',$signature);
$signature = $exp[1];
$plain = $exs[1];
$plain = urldecode($plain);
$plain = explode('&ResponseCode=0000',$plain);
$plain = $plain[0];echo $plain.'
'.$Signature; exit('1');
//验签环节
$ret = srdecode($plain,$signature);
//$this->log('line 80 ret',var_export($ret));
//1:通过,0:不通过
$arrall = array();