alipay transfer 接口一直都存在问题,不解决一下么
smallerfan opened this issue · comments
smallerfan commented
转账明明成功就是一直被异常抓走,无奈之下自己改了yansongda/pay/src/Gateways/Alipay/Support.php 文件中的processingApiResult 方法
protected static function processingApiResult($data, $result): Collection
{
$method = str_replace('.', '_', $data['method']).'_response';
if (!isset($result['sign']) || '10000' != $result[$method]['code']) {
if($result[$method]['sub_code'] == 'PAYEE_NOT_EXIST'){
// dd($result[$method]);
throw new GatewayException($result[$method]['sub_msg'],$result[$method]['sub_code']);
}else{
throw new GatewayException('Get Alipay API Error:'.$result[$method]['msg'].(isset($result[$method]['sub_code']) ? (' - '.$result[$method]['sub_code']) : ''), $result);
}
}
// if (self::verifySign($result[$method], true, $result['sign'])) {
return new Collection($result[$method]);
// }
Events::dispatch(new Events\SignFailed('Alipay', '', $result));
throw new InvalidSignException('Alipay Sign Verify FAILED', $result);
}
yansongda commented
麻烦检查下验签是否通过
smallerfan commented
异常日志输出,验签过了大佬,但是就是会丢出
2020-04-26 23:51:14 > yansongda.pay.DEBUG > Result Of Alipay Api {"alipay_fund_trans_uni_transfer_response":{"code":"10000","msg":"Success","order_id":"","out_biz_no":"1587916273_chengzhuan_test","pay_fund_order_id":"","status":"SUCCESS","trans_date":"2020-04-26 23:51:14"},"alipay_cert_sn":"**************