From ec6fc11a6dda3c43d80c31e6c500ebe70dcc2e75 Mon Sep 17 00:00:00 2001 From: TQCasey <494294315@qq.com> Date: Sat, 23 May 2026 23:02:36 +0800 Subject: [PATCH] =?UTF-8?q?phonepe=20business=20otp=20=E6=A8=A1=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- android/app/src/main/AndroidManifest.xml | 1 + components/WalletBindComponents.tsx | 8 --- screens/HomeScreen.tsx | 71 +++--------------------- 3 files changed, 9 insertions(+), 71 deletions(-) diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index b74894b..41a541d 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -16,6 +16,7 @@ void; onError: (error: string) => void; isDebug: boolean; - deviceId: string; - tuneUserId: string; - androidId: string; initialMobile?: string; }> { render() { @@ -50,11 +47,6 @@ export class MobikwikOTPBind extends Component<{ onSuccess={this.props.onSuccess} onError={this.props.onError} isDebug={this.props.isDebug} - additionalParams={{ - deviceId: this.props.deviceId, - tuneUserId: this.props.tuneUserId, - androidId: this.props.androidId, - }} initialMobile={this.props.initialMobile} /> ); diff --git a/screens/HomeScreen.tsx b/screens/HomeScreen.tsx index 48b25ee..696df57 100644 --- a/screens/HomeScreen.tsx +++ b/screens/HomeScreen.tsx @@ -22,7 +22,6 @@ import { GooglePayBusinessBind, WalletType, PaytmBusinessBindResult, - PhonePeBusinessBindResult, PaytmPersonalBind, MobikwikPersonalBindResult, FreechargePersonalBindResult, @@ -518,65 +517,14 @@ export default class HomeScreen extends Component { onRequestClose={close('showPhonePeBusinessBind')} > + this.wrapOtpCall(() => Api.instance.requestOTP(wt, p.mobile, {}))} + onVerifyOTP={async (wt, p) => + this.wrapOtpCall(() => Api.instance.verifyOTP(wt, p.mobile, p.otp, { sessionToken: p.sessionToken }))} onSuccess={this.onOtpBindSuccess('showPhonePeBusinessBind', 'PhonePe Business bound successfully')} - onError={(e: string) => { Alert.alert('Bind Failed', e); close('showPhonePeBusinessBind')(); }} - onRenderBottomView={({ - showOtpInput, - loading, - formError, - phone, - otp, - onPhoneChange, - onOtpChange, - onGetOtp, - onSubmitOtp, - }) => ( - - {!showOtpInput ? ( - <> - - {!!formError && {formError}} - - {loading ? 'Loading...' : 'GET OTP'} - - - ) : ( - <> - - {!!formError && {formError}} - - {loading ? 'Loading...' : 'Verify OTP'} - - - )} - - )} + onError={() => {}} /> ); @@ -626,14 +574,11 @@ export default class HomeScreen extends Component { > - this.wrapOtpCall(() => Api.instance.requestOTP(wt, p.mobile, { deviceId: p.deviceId, tuneUserId: p.tuneUserId, androidId: p.androidId }))} + this.wrapOtpCall(() => Api.instance.requestOTP(wt, p.mobile))} onVerifyOTP={async (wt, p) => - this.wrapOtpCall(() => Api.instance.verifyOTP(wt, p.mobile, p.otp, { sessionId: p.sessionId, deviceId: p.deviceId, tuneUserId: p.tuneUserId, nid: p.nid }))} + this.wrapOtpCall(() => Api.instance.verifyOTP(wt, p.mobile, p.otp, { generateOtpRequestTimeId: p.generateOtpRequestTimeId }))} onSuccess={this.onOtpBindSuccess('showMobikwikPersonalBind', 'Mobikwik bound successfully')} onError={() => {}} />