|
@@ -313,8 +313,7 @@ export class SunPayAdapter implements ChannelAdapter {
|
|
|
return parseFloat(data.balance);
|
|
|
}
|
|
|
async getBanks(params: any = {}) {
|
|
|
- const res = await this.request('GET', '/Fiat/Banks', params);
|
|
|
- return res;
|
|
|
+ return await this.request('GET', '/Fiat/Banks', params);
|
|
|
}
|
|
|
async getBank(params: any = {}) {
|
|
|
console.log('getBank-=--=',params)
|
|
@@ -341,9 +340,15 @@ export class SunPayAdapter implements ChannelAdapter {
|
|
|
let res = null;
|
|
|
if (customer) {
|
|
|
params.customer_id = customer.customer_id;
|
|
|
- res = await this.request('PUT', '/Fiat/Customer', params);
|
|
|
+ res = await this.request('PUT', '/Fiat/Customer', {
|
|
|
+ ...params,
|
|
|
+
|
|
|
+ });
|
|
|
} else {
|
|
|
- res = await this.request('POST', '/Fiat/Customer', params);
|
|
|
+ res = await this.request('POST', '/Fiat/Customer', {
|
|
|
+ ...params,
|
|
|
+ webhook_url: this.globalConfig.callback.sunpay // 回调用fusionPay配置的的回调生成用户信息
|
|
|
+ });
|
|
|
}
|
|
|
await this.customerEntity.save({
|
|
|
type: params.customer_type,
|