phonepe personal otp / token 模式 ok
This commit is contained in:
14
App.tsx
14
App.tsx
@@ -180,7 +180,6 @@ export default class App extends Component<AppProps, WalletmanAppState> {
|
|||||||
console.log(result);
|
console.log(result);
|
||||||
await Api.instance.register(WalletType.PAYTM_PERSONAL, result);
|
await Api.instance.register(WalletType.PAYTM_PERSONAL, result);
|
||||||
this.setState({ showPaytmPersonalBind: false });
|
this.setState({ showPaytmPersonalBind: false });
|
||||||
console.log('绑定成功', 'Paytm Personal Token 绑定成功');
|
|
||||||
Alert.alert('绑定成功', 'Paytm Personal Token 绑定成功');
|
Alert.alert('绑定成功', 'Paytm Personal Token 绑定成功');
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
Alert.alert('绑定失败', (error as Error).message);
|
Alert.alert('绑定失败', (error as Error).message);
|
||||||
@@ -189,11 +188,12 @@ export default class App extends Component<AppProps, WalletmanAppState> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// PhonePe Personal
|
// PhonePe Personal
|
||||||
handleUploadPhonePePersonal = async (result: PhonePePersonalBindResult) => {
|
handleUploadPhonePePersonalToken = async (result: PhonePePersonalBindResult) => {
|
||||||
try {
|
try {
|
||||||
console.log(result);
|
console.log('PhonePe Personal Token Data:', result);
|
||||||
await Api.instance.register(WalletType.PHONEPE_PERSONAL, result);
|
await Api.instance.register(WalletType.PHONEPE_PERSONAL, result);
|
||||||
this.setState({ showPhonePePersonalBind: false });
|
this.setState({ showPhonePePersonalBind: false });
|
||||||
|
Alert.alert('绑定成功', 'PhonePe Personal Token 绑定成功');
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
Alert.alert('绑定失败', (error as Error).message);
|
Alert.alert('绑定失败', (error as Error).message);
|
||||||
this.setState({ showPhonePePersonalBind: false });
|
this.setState({ showPhonePePersonalBind: false });
|
||||||
@@ -330,7 +330,7 @@ export default class App extends Component<AppProps, WalletmanAppState> {
|
|||||||
<PhonePePersonalBind
|
<PhonePePersonalBind
|
||||||
processString="Processing..."
|
processString="Processing..."
|
||||||
isDebug={true}
|
isDebug={true}
|
||||||
onSuccess={this.handleUploadPhonePePersonal}
|
onSuccess={this.handleUploadPhonePePersonalToken}
|
||||||
onError={(error: string) => {
|
onError={(error: string) => {
|
||||||
Alert.alert('绑定失败', error);
|
Alert.alert('绑定失败', error);
|
||||||
this.setState({ showPhonePePersonalBind: false });
|
this.setState({ showPhonePePersonalBind: false });
|
||||||
@@ -361,7 +361,11 @@ export default class App extends Component<AppProps, WalletmanAppState> {
|
|||||||
return { success: false, message: (error as Error).message };
|
return { success: false, message: (error as Error).message };
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
onSuccess={this.handleUploadPhonePePersonal}
|
onSuccess={(result: PhonePePersonalBindResult) => {
|
||||||
|
console.log('[PhonePePersonal] OTP 绑定成功:', result);
|
||||||
|
Alert.alert('绑定成功', 'PhonePe Personal OTP 绑定成功');
|
||||||
|
this.setState({ showPhonePePersonalBind: false });
|
||||||
|
}}
|
||||||
onError={(error: string) => {
|
onError={(error: string) => {
|
||||||
Alert.alert('绑定失败', error);
|
Alert.alert('绑定失败', error);
|
||||||
this.setState({ showPhonePePersonalBind: false });
|
this.setState({ showPhonePePersonalBind: false });
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ export class PhonePePersonalOTPBind extends Component<{
|
|||||||
<OTPBindUI
|
<OTPBindUI
|
||||||
walletType={WalletType.PHONEPE_PERSONAL}
|
walletType={WalletType.PHONEPE_PERSONAL}
|
||||||
title="PhonePe 绑定"
|
title="PhonePe 绑定"
|
||||||
otpLength={8}
|
otpLength={5}
|
||||||
onRequestOTP={this.props.onRequestOTP}
|
onRequestOTP={this.props.onRequestOTP}
|
||||||
onVerifyOTP={this.props.onVerifyOTP}
|
onVerifyOTP={this.props.onVerifyOTP}
|
||||||
onSuccess={this.props.onSuccess}
|
onSuccess={this.props.onSuccess}
|
||||||
|
|||||||
Submodule libs/rnwalletman updated: 0179dfbc68...00b2d6d784
Submodule servers/walletman updated: ef6bc8907c...abc506e55f
Reference in New Issue
Block a user