Skip to content

Commit

Permalink
Wallets India (wallet_IN) and browserInfo for Netbanking India (onlin…
Browse files Browse the repository at this point in the history
…ebanking_IN) (#1602)

* Adds Wallets India (wallet_IN) component

* Adds browserInfo for Online Banking and Wallets India components
  • Loading branch information
priyankagupta14 authored May 20, 2022
1 parent 95959dc commit 9310e9b
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 0 deletions.
15 changes: 15 additions & 0 deletions packages/lib/src/components/OnlineBankingIN/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import IssuerListContainer from '../helpers/IssuerListContainer';
import collectBrowserInfo from '../../utils/browserInfo';

class OnlineBankingINElement extends IssuerListContainer {
public static type = 'onlinebanking_IN';
Expand All @@ -9,6 +10,20 @@ class OnlineBankingINElement extends IssuerListContainer {
showImage: false
};
}

/**
* Formats the component data output
*/
formatData() {
return {
...super.formatData(),
browserInfo: this.browserInfo
};
}

get browserInfo() {
return collectBrowserInfo();
}
}

export default OnlineBankingINElement;
29 changes: 29 additions & 0 deletions packages/lib/src/components/WalletIN/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import IssuerListContainer from '../helpers/IssuerListContainer';
import collectBrowserInfo from '../../utils/browserInfo';

class WalletINElement extends IssuerListContainer {
public static type = 'wallet_IN';

formatProps(props) {
return {
...super.formatProps(props),
showImage: false
};
}

/**
* Formats the component data output
*/
formatData() {
return {
...super.formatData(),
browserInfo: this.browserInfo
};
}

get browserInfo() {
return collectBrowserInfo();
}
}

export default WalletINElement;
2 changes: 2 additions & 0 deletions packages/lib/src/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ import Twint from './Twint';
import MealVoucherFR from './MealVoucherFR';
import OnlineBankingINElement from './OnlineBankingIN';
import RatePayDirectDebit from "./RatePay/RatePayDirectDebit";
import WalletINElement from './WalletIN';

/**
* Maps each component with a Component element.
Expand Down Expand Up @@ -146,6 +147,7 @@ const componentsMap = {
threeDS2Challenge: ThreeDS2Challenge,
threeDS2DeviceFingerprint: ThreeDS2DeviceFingerprint,
visa: Card,
wallet_IN: WalletINElement,
wechatpay: WeChat,
wechatpayQR: WeChat,
oxxo: Oxxo,
Expand Down

0 comments on commit 9310e9b

Please sign in to comment.