method | 参数 | 返回值 |
---|---|---|
notify | 无/array/ServerRequestInterface | Collection |
支付回调
$pay = new \fengkui\Pay\Unionpay($unionConfig);
// 支付回调
try {
$data = $pay->notify(); // 验签并获取支付回调相关参数
if ($data) {
// 支付成功后操作
}
} catch (\Exception $e) {
$e->getMessage(); // 错误信息
}
通知参数
相关通知参数说明,请参考这里,查看「通知参数」一栏。
{
"accNo": "6216***********0018",
"accessType": "0",
"bizType": "000201",
"currencyCode": "156",
"encoding": "UTF-8",
"exchangeRate": "0",
"merId": "777290058207330",
"orderId": "1718354454",
"queryId": "192406140840544025268",
"respCode": "00",
"respMsg": "success",
"settleAmt": "1",
"settleCurrencyCode": "156",
"settleDate": "0614",
"signMethod": "01",
"traceNo": "402526",
"traceTime": "0614084054",
"txnAmt": "1",
"txnSubType": "01",
"txnTime": "20240614084054",
"txnType": "01",
"version": "5.1.0"
}