amazonpay

This commit is contained in:
2026-07-28 15:52:19 +08:00
parent 5b0a3569a5
commit 7f4c8bb7d4
5 changed files with 163 additions and 20 deletions
+5 -18
View File
@@ -37,6 +37,7 @@ import {
PaytmPersonalBindResult,
MobikwikPersonalBind,
MobikwikPersonalBindResult,
AmazonPayPersonalBind,
BindErrorCode,
ProxyBackgroundService,
} from 'rnwalletman';
@@ -49,7 +50,6 @@ import {
BharatPeBusinessOTPBind,
PaytmBusinessOTPBind,
PhonePeBusinessOTPBind,
AmazonPayOTPBind,
} from '../components/WalletBindComponents';
import { WalletSelectModal, WALLET_ICONS, WALLET_TYPE_COLORS } from '../components/WalletSelectModal';
import { ServerSettingsModal } from '../components/ServerSettingsModal';
@@ -904,24 +904,11 @@ export default class HomeScreen extends Component<any, HomeScreenState> {
transparent
onRequestClose={close('showAmazonPayPersonalBind')}
>
<AmazonPayOTPBind
<AmazonPayPersonalBind
processString="Processing..."
isDebug
initialMobile={bindPrefillMobile}
onRequestOTP={async (wt, p) => {
this._otpCardId = this._pendingCardId ?? newCardId(Api.instance.getUserId(), wt, p.mobile);
return this.wrapOtpCall(() => Api.instance.requestOTP(wt, p.mobile, {
...(p.sessionId ? { sessionId: p.sessionId } : {}),
...(p.password ? { password: p.password } : {}),
}, this._otpCardId));
}}
onVerifyOTP={async (wt, p) => {
return this.wrapOtpCall(() => Api.instance.verifyOTP(wt, p.mobile, p.otp, {
sessionId: p.sessionId,
...(p.password ? { password: p.password } : {}),
}, this._otpCardId));
}}
onSuccess={this.onOtpBindSuccess('showAmazonPayPersonalBind', 'Amazon Pay bound successfully')}
onError={() => {}}
onSuccess={this.handleBindSuccess('showAmazonPayPersonalBind', WalletType.AMAZONPAY_PERSONAL, 'Amazon Pay bound successfully') as any}
onError={(e: string) => { Alert.alert('Bind Failed', e); close('showAmazonPayPersonalBind')(); }}
/>
</Modal>
);