You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
101 lines
4.5 KiB
PHP
101 lines
4.5 KiB
PHP
<?php
|
|
|
|
namespace App\Helper\Baofu;
|
|
|
|
use Exception;
|
|
|
|
class NotifyList
|
|
{
|
|
private static $list = [
|
|
'apply_auth' => [
|
|
'description' => '企业实名开户-小额鉴权',
|
|
'signParams' => 'orgNo|merchantNo|terminalNo|contractNo|loginNo|customerName|email|mobile|authFlag'
|
|
],
|
|
'apply_open_card' => [
|
|
'description' => '企业实名开户-小额打款',
|
|
'signParams' => 'orgNo|merchantNo|terminalNo|loginNo|applyNo|noticeType|successFlag'
|
|
],
|
|
'apply' => [
|
|
'description' => '企业实名开户成功通知(待激活)',
|
|
'signParams' => 'orgNo|merchantNo|terminalNo|contractNo|loginNo|customerName|email|mobile'
|
|
],
|
|
'register' => [
|
|
'description' => '注册(H5)',
|
|
'signParams' => 'orgNo|merchantNo|terminalNo|contractNo|loginNo',
|
|
],
|
|
'cardBind' => [
|
|
'description' => '绑卡(H5/API)',
|
|
'signParams' => 'orgNo|merchantNo|terminalNo|contractNo|loginNo|bindCardFlag',
|
|
],
|
|
'recharge' => [
|
|
'description' => '个人充值(API)',
|
|
'signParams' => 'orgNo|merchantNo|terminalNo|orderStatus|tradeId|paidType|orderMoney|loginId|finishTime|orderId|errorMsg',
|
|
],
|
|
'withdraw' => [
|
|
'description' => '个人提现(API)',
|
|
'signParams' => 'orgNo|merchantNo|terminalNo|orderStatus|tradeId|paidType|orderMoney|loginId|finishTime|orderId|errorMsg',
|
|
],
|
|
'enterpriseWithdraw' => [
|
|
'description' => '企业提现(API)',
|
|
'signParams' => 'orgNo|merchantNo|terminalNo|tradeId|orderStatus|loginId|finishTime',
|
|
],
|
|
'confirmSplit' => [
|
|
'description' => '确认分账',
|
|
'signParams' => 'orgNo|merchantNo|terminalNo|tradeId|subOutOrderNo|orderStatus|loginId|finishTime|confirmType',
|
|
],
|
|
'confirmEscrowSplit' => [
|
|
'description' => '自助交易确认分账',
|
|
'signParams' => 'orgNo|merchantNo|terminalNo|tradeId|subOutOrderNo|orderStatus|loginId|finishTime|confirmType',
|
|
],
|
|
'refund' => [
|
|
'description' => '退款',
|
|
'signParams' => 'orgNo|merchantNo|terminalNo|refundOrderId|refundTradeId|refundMoney|refundStatus|refundSuccTime|refundType|errorMsg',
|
|
],
|
|
'escrowRefund' => [
|
|
'description' => '退款',
|
|
'signParams' => 'orgNo|merchantNo|terminalNo|refundOrderId|refundTradeId|refundMoney|refundStatus|refundSuccTime|refundType|errorMsg',
|
|
],
|
|
'unifyRefund' => [
|
|
'description' => '匿名支付退款',
|
|
'signParams' => 'orgNo|merchantNo|terminalNo|refundOrderId|refundTradeId|refundMoney|refundStatus|refundSuccTime|refundType|errorMsg',
|
|
],
|
|
'payment' => [
|
|
'description' => '支付',
|
|
'signParams' => 'orgNo|merchantNo|terminalNo|orderStatus|tradeId|paidType|orderMoney|loginId|finishTime|orderId|errorMsg',
|
|
],
|
|
'escrowPayment' => [
|
|
'description' => '自助交易支付',
|
|
'signParams' => 'orgNo|merchantNo|terminalNo|orderStatus|tradeId|paidType|orderMoney|loginId|finishTime|orderId|errorMsg',
|
|
],
|
|
'unifyPayment' => [
|
|
'description' => '匿名支付',
|
|
'signParams' => 'orgNo|merchantNo|terminalNo|orderStatus|tradeId|paidType|orderMoney|finishTime|orderId|errorMsg',
|
|
],
|
|
'mEnterpriseUnbindCard' => [
|
|
'description' => '企业对公卡解绑',
|
|
'signParams' => 'orgNo|merchantNo|terminalNo|loginNo|noticeType|successFlag|agreementNo'
|
|
],
|
|
'EnterpriseUnbindCard' => [
|
|
'description' => '企业对公卡解绑',
|
|
'signParams' => 'orgNo|merchantNo|terminalNo|loginNo|noticeType|successFlag|agreementNo'
|
|
],
|
|
'applyBindCard' => [
|
|
'description' => '企业对公卡绑定',
|
|
'signParams' => 'orgNo|merchantNo|terminalNo|loginNo|applyNo|noticeType|successFlag'
|
|
]
|
|
];
|
|
|
|
public static function get($notifyName)
|
|
{
|
|
return self::$list[$notifyName] ?: null;
|
|
}
|
|
|
|
public static function getNotifyUrl($notifyName, $token)
|
|
{
|
|
$notifyItem = self::get($notifyName);
|
|
if (is_null($notifyItem)) {
|
|
throw new Exception('回调不存在');
|
|
}
|
|
return env('WEB_HOST') . '/notify/' . ($notifyItem['url'] ?: $notifyName) . '/' . $token;
|
|
}
|
|
} |