Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds support for the Wallets India (wallet_IN) payment method and browserInfo for Netbanking India (onlinebanking_IN) payment method #1602

Merged
merged 2 commits into from
May 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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