Skip to content

Commit

Permalink
Merge pull request #350 from FranciscoOnt/INT-2919
Browse files Browse the repository at this point in the history
feat(checkout): INT-2919 Display bolt in checkout page
  • Loading branch information
Luis Sanchez authored Jul 29, 2020
2 parents 27a8656 + e3b50eb commit 3dbf91f
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/app/locale/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@
"amazon_name_text": "Amazon Pay",
"barclaycard_continue_action": "Continue",
"bluesnap_v2_continue_action": "Continue",
"bolt_continue_action": "Continue with Bolt",
"braintreevisacheckout_continue_action": "Continue with Visa Checkout",
"ccavenuemars_description_text": "Checkout with CCAvenue",
"chasepay_continue_action": "Continue with Chase Pay",
Expand Down
9 changes: 9 additions & 0 deletions src/app/payment/PaymentSubmitButton.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,15 @@ describe('PaymentSubmitButton', () => {
.toEqual(languageService.translate('payment.amazon_continue_action'));
});

it('renders button with special label for Bolt', () => {
const component = mount(
<PaymentSubmitButtonTest methodId="bolt" />
);

expect(component.text())
.toEqual(languageService.translate('payment.bolt_continue_action'));
});

it('renders button with special label for Barclaycard', () => {
const component = mount(
<PaymentSubmitButtonTest methodGateway="barclaycard" />
Expand Down
4 changes: 4 additions & 0 deletions src/app/payment/PaymentSubmitButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ const PaymentSubmitButtonText: FunctionComponent<PaymentSubmitButtonTextProps> =
return <TranslatedString id="payment.amazon_continue_action" />;
}

if (methodId === PaymentMethodId.Bolt) {
return <TranslatedString id="payment.bolt_continue_action" />;
}

if (methodGateway === PaymentMethodId.Barclaycard) {
return <TranslatedString id="payment.barclaycard_continue_action" />;
}
Expand Down
1 change: 1 addition & 0 deletions src/app/payment/paymentMethod/PaymentMethod.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ const PaymentMethodComponent: FunctionComponent<PaymentMethodProps & WithCheckou
}

if (method.gateway === PaymentMethodId.Afterpay ||
method.id === PaymentMethodId.Bolt ||
method.id === PaymentMethodId.Laybuy ||
method.id === PaymentMethodId.Sezzle ||
method.id === PaymentMethodId.Zip ||
Expand Down
1 change: 1 addition & 0 deletions src/app/payment/paymentMethod/PaymentMethodId.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ enum PaymentMethodId {
AmazonPay = 'amazonpay',
Barclaycard = 'barclaycard',
BlueSnapV2 = 'bluesnapv2',
Bolt = 'bolt',
Braintree = 'braintree',
AuthorizeNetGooglePay = 'googlepayauthorizenet',
BraintreeGooglePay = 'googlepaybraintree',
Expand Down

0 comments on commit 3dbf91f

Please sign in to comment.