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

feat/MSSDK-2090: Add support for GCash payment method #446

Merged
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
3 changes: 2 additions & 1 deletion src/api/Customer/types/getPaymentDetails.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ type PaymentDetailCardGooglePay = GeneralPaymentDetail & {
| 'android'
| 'ideal'
| 'bancontact_card'
| 'bancontact_mobile';
| 'bancontact_mobile'
| 'gcash';
Saddage marked this conversation as resolved.
Show resolved Hide resolved

paymentMethodSpecificParams: {
holderName: string;
Expand Down
3 changes: 2 additions & 1 deletion src/appRedux/types/publisherConfigSlice.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ export type PaymentMethodName =
| 'ideal'
| 'bancontact_card'
| 'bancontact_mobile'
| 'free-offer';
| 'free-offer'
| 'gcash';

export type PaymentGateway = 'adyen' | 'paypal' | 'free-offer';

Expand Down
6 changes: 6 additions & 0 deletions src/assets/images/paymentMethods/gcash.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions src/components/PaymentCard/Payment.const.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import Discover from 'assets/images/paymentMethods/discover.svg';
import Diners from 'assets/images/paymentMethods/diners.svg';
import Ideal from 'assets/images/paymentMethods/ideal.svg';
import Bancontact from 'assets/images/paymentMethods/bancontact.svg';
import GCash from 'assets/images/paymentMethods/gcash.svg';

// eslint-disable-next-line import/prefer-default-export
export const CardTypes = {
Expand Down Expand Up @@ -94,6 +95,11 @@ export const CardTypes = {
icon: Bancontact,
caption: 'Bancontact Mobile',
title: 'Bancontact Mobile'
},
gcash: {
icon: GCash,
caption: 'GCash',
title: 'GCash'
}
};

Expand Down
1 change: 1 addition & 0 deletions src/components/PaymentMethod/PaymentMethod.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ const PaymentMethod = () => {
case 'ideal':
case 'bancontact_card':
case 'bancontact_mobile':
case 'gcash':
Saddage marked this conversation as resolved.
Show resolved Hide resolved
return <PaymentCard key={id} details={paymentDetail} />;
default:
return (
Expand Down
13 changes: 9 additions & 4 deletions src/util/paymentMethodHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import GiftLogo from 'assets/images/gift.svg';
import RokuLogo from 'assets/images/paymentMethods/roku_color.svg';
import AmazonLogo from 'assets/images/paymentMethods/amazon_color.svg';
import AndroidLogo from 'assets/images/paymentMethods/android_color.svg';
import GCashLogo from 'assets/images/paymentMethods/gcash.svg';

import store from 'appRedux/store';
import { currencyFormat, isPeriod, periodMapper } from './planHelper';
Expand All @@ -21,13 +22,15 @@ export const supportedPaymentMethods = [
'googlepay',
'ideal',
'bancontact_card',
'bancontact_mobile'
'bancontact_mobile',
'gcash'
];

export const bankPaymentMethods = [
'ideal',
'bancontact_mobile', // Bancontact Mobile name in cleeng-admin
'bcmc_mobile' // Bancontact Mobile name in Adyen
'bcmc_mobile', // Bancontact Mobile name in Adyen
'gcash'
];

export const standardPaymentMethods = [
Expand All @@ -51,7 +54,8 @@ export const readablePaymentMethodNames = {
googlepay: 'GooglePay',
ideal: 'iDEAL',
bancontact_card: 'Bancontact Card',
bancontact_mobile: 'Bancontact Mobile'
bancontact_mobile: 'Bancontact Mobile',
gcash: 'GCash'
};

export const supportedPaymentGateways = ['adyen', 'paypal'];
Expand All @@ -68,7 +72,8 @@ export const logos = {
gift: GiftLogo,
roku: RokuLogo,
amazon: AmazonLogo,
android: AndroidLogo
android: AndroidLogo,
gcash: GCashLogo
};

export default logos;
Expand Down
Loading