|
@@ -89,25 +89,24 @@ export class WalletService extends BaseService {
|
|
currency: data.currency,
|
|
currency: data.currency,
|
|
},
|
|
},
|
|
});
|
|
});
|
|
- if (!wallet) {
|
|
|
|
|
|
+ const isWhiteLabel = this.config.callback.sunpay != wallet.webhook_url;
|
|
|
|
+ if(isWhiteLabel) {
|
|
// 获取商户的回调
|
|
// 获取商户的回调
|
|
- await this.request(wallet.webhook_url, {
|
|
|
|
- biz_status: 'FAIL',
|
|
|
|
- biz_type: 'CREATECUSTOMER',
|
|
|
|
- data: data
|
|
|
|
- })
|
|
|
|
|
|
+ await this.request(wallet.webhook_url, params)
|
|
|
|
+ }
|
|
|
|
+ if (!wallet) {
|
|
|
|
+ // // 获取商户的回调
|
|
|
|
+ // await this.request(wallet.webhook_url, {
|
|
|
|
+ // biz_status: 'FAIL',
|
|
|
|
+ // biz_type: 'CREATECUSTOMER',
|
|
|
|
+ // data: data
|
|
|
|
+ // })
|
|
return {
|
|
return {
|
|
is_success: false,
|
|
is_success: false,
|
|
message: '钱包不存在',
|
|
message: '钱包不存在',
|
|
};
|
|
};
|
|
}
|
|
}
|
|
if (wallet.status == 'SUCCESS') {
|
|
if (wallet.status == 'SUCCESS') {
|
|
- // 获取商户的回调
|
|
|
|
- await this.request(wallet.webhook_url, {
|
|
|
|
- biz_status: 'SUCCESS',
|
|
|
|
- biz_type: 'CREATECUSTOMER',
|
|
|
|
- data: data
|
|
|
|
- })
|
|
|
|
return {
|
|
return {
|
|
is_success: true,
|
|
is_success: true,
|
|
message: '成功',
|
|
message: '成功',
|