diff --git a/App.tsx b/App.tsx index 9f87d3b..4894d8a 100644 --- a/App.tsx +++ b/App.tsx @@ -248,12 +248,7 @@ export default class App extends Component { handleUploadPaytmPersonal = async (result: PaytmPersonalBindResult) => { try { console.log(result); - const response = await Api.instance.register(WalletType.PAYTM_PERSONAL, { - mobile: result.mobile, - token: result.token, - userId: result.userId, - profileDetail: result.profileDetail, - }); + const response = await Api.instance.register(WalletType.PAYTM_PERSONAL, result); console.log(response); this.setState({ showPaytmPersonalBind: false }); } catch (error) { @@ -271,12 +266,7 @@ export default class App extends Component { handleUploadPaytmBusiness = async (result: PaytmBusinessBindResult) => { try { console.log(result); - const response = await Api.instance.register(WalletType.PAYTM_BUSINESS, { - contextData: result.contextData, - cookie: result.cookie, - xCsrfToken: result.xCsrfToken, - qrData: result.qrData - }); + const response = await Api.instance.register(WalletType.PAYTM_BUSINESS, result); console.log(response); this.setState({ showPaytmBusinessBind: false }); } catch (error) { @@ -293,7 +283,7 @@ export default class App extends Component { /* 上传 Mobikwik Personal 到服务器 */ handleUploadMobikwikPersonal = async (result: MobikwikPersonalBindResult) => { try { - console.log(result); + console.log(JSON.stringify(result)); // 已在 verifyOTP 中完成注册 this.setState({ showMobikwikPersonalBind: false }); Alert.alert('绑定成功', 'Mobikwik Personal 绑定成功'); @@ -311,7 +301,7 @@ export default class App extends Component { /* 上传 Freecharge Personal 到服务器 */ handleUploadFreechargePersonal = async (result: FreechargePersonalBindResult) => { try { - console.log(result); + console.log(JSON.stringify(result)); // 已经在 FreechargePersonalBind 中完成注册 this.setState({ showFreechargePersonalBind: false }); Alert.alert('绑定成功', 'Freecharge Personal 绑定成功'); @@ -329,14 +319,8 @@ export default class App extends Component { /* 上传 PhonePe Personal 到服务器 */ handleUploadPhonePePersonal = async (result: PhonePePersonalBindResult) => { try { - console.log(result); - const response = await Api.instance.register(WalletType.PHONEPE_PERSONAL, { - mobile: result.mobile, - token: result.token, - userId: result.userId, - extend: result.extend, - profileDetail: result.profileDetail, - }); + console.log(JSON.stringify(result)); + const response = await Api.instance.register(WalletType.PHONEPE_PERSONAL, result); console.log(response); this.setState({ showPhonePePersonalBind: false }); } catch (error) { @@ -353,18 +337,10 @@ export default class App extends Component { /* 上传 PhonePe Business 到服务器 */ handleUploadPhonePeBusiness = async (result: PhonePeBusinessBindResult) => { try { - console.log(result); - const response = await Api.instance.register(WalletType.PHONEPE_BUSINESS, { - cookie: result.cookie, - xCsrfToken: result.xCsrfToken, - qrData: result.qrData, - userAToken: result.userAToken, - userRToken: result.userRToken, - fingerprint: result.fingerprint, - userInfo: result.userInfo - }); + console.log(JSON.stringify(result)); + const response = await Api.instance.register(WalletType.PHONEPE_BUSINESS, result); console.log(response); - this.setState({ showPhonePeBusinessBind: false }); + // this.setState({ showPhonePeBusinessBind: false }); } catch (error) { Alert.alert('Bind PhonePe Business Error', (error as Error).message || 'Unknown error'); this.setState({ showPhonePeBusinessBind: false }); @@ -379,15 +355,8 @@ export default class App extends Component { /* 上传 GooglePay Business 到服务器 */ handleUploadGooglePayBusiness = async (result: GooglePayBusinessBindResult) => { try { - console.log(result); - const response = await Api.instance.register(WalletType.GOOGLEPAY_BUSINESS, { - cookie: result.cookie, - url: result.url, - body: result.body, - channelUid: result.channelUid, - openUrl: result.openUrl, - merchantInfo: result.merchantInfo, - }); + console.log(JSON.stringify(result)); + const response = await Api.instance.register(WalletType.GOOGLEPAY_BUSINESS, result); console.log(response); this.setState({ showGooglePayBusinessBind: false }); } catch (error) { @@ -407,15 +376,14 @@ export default class App extends Component { console.log(result); const qrCode = await this.decodeQRFromUrl(result.qrUrl || ''); console.log('qrCode:', qrCode); - const response = await Api.instance.register(WalletType.BHARATPE_BUSINESS, { cookie: result.cookie, accessToken: result.accessToken, - merchantId: result.merchantId?.toString(), - userName: result.userName?.toString(), - email: result.email?.toString(), - mobile: result.mobile?.toString(), - qrCode: qrCode?.toString(), + merchantId: result.merchantId, + userName: result.userName, + email: result.email, + mobile: result.mobile, + qrCode: qrCode, }); console.log(response); this.setState({ showBharatPeBusinessBind: false }); diff --git a/android/.idea/vcs.xml b/android/.idea/vcs.xml index 64713b8..20f6ea5 100644 --- a/android/.idea/vcs.xml +++ b/android/.idea/vcs.xml @@ -3,5 +3,7 @@ + + \ No newline at end of file diff --git a/libs/rnwalletman b/libs/rnwalletman index db42db3..e130708 160000 --- a/libs/rnwalletman +++ b/libs/rnwalletman @@ -1 +1 @@ -Subproject commit db42db3e95463c7fa50f6e0e451232bb62eab01c +Subproject commit e13070803b6691365b62204be46e3b4ea9f23d28 diff --git a/servers/walletman b/servers/walletman index 4163dfb..f5b0b09 160000 --- a/servers/walletman +++ b/servers/walletman @@ -1 +1 @@ -Subproject commit 4163dfbacede4a88ccad2156c2c9e762c2e2c8e3 +Subproject commit f5b0b09bc93a629ddcb36fbf772c056ae9515391