Open xarr-sc opened 1 year ago
···
/**
@package App\Pay\Kvmpay\Impl */ class Signature implements \App\Pay\Signature {
@return string */ public static function generateSignature(array $data, string $key): string { ksort($data); $sign = ''; foreach ($data as $k => $v) { // 需要加一行此代码 过滤空数据进行校验 if($v == '') continue; $sign .= $k . '=' . $v . '&'; } $sign = trim($sign, '&');
return md5($sign . $key); }
这个会导致 客户支付后显示未支付吗
···
/**
@package App\Pay\Kvmpay\Impl */ class Signature implements \App\Pay\Signature {
/**
@return string */ public static function generateSignature(array $data, string $key): string { ksort($data); $sign = ''; foreach ($data as $k => $v) { // 需要加一行此代码 过滤空数据进行校验 if($v == '') continue; $sign .= $k . '=' . $v . '&'; } $sign = trim($sign, '&');
return md5($sign . $key); }
···