amazonpay
This commit is contained in:
+5
-18
@@ -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>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user