Skip to content

Commit

Permalink
Updated the class name to reflect allowed_payment_methods array ite…
Browse files Browse the repository at this point in the history
…m name from /rest/v1.1/me/shopping-cart

Updated nav title and icon for bank transfer
  • Loading branch information
ramonjd committed Apr 20, 2018
1 parent e65b2e7 commit dec9717
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 2 deletions.
2 changes: 1 addition & 1 deletion client/lib/cart-values/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ function paymentMethodClassName( method ) {
ideal: 'WPCOM_Billing_Stripe_Source_Ideal',
paypal: 'WPCOM_Billing_PayPal_Express',
p24: 'WPCOM_Billing_Stripe_Source_P24',
tef: 'WPCOM_Billing_Ebanx_Tef',
tef: 'WPCOM_Billing_Ebanx_Redirect_Tef',
};

return paymentMethodsClassNames[ method ] || '';
Expand Down
26 changes: 26 additions & 0 deletions client/lib/checkout/constants.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/**
* External dependencies
*
* @format
*/

/**
* Object contains countries for which Ebanx payment processing is possible
* PAYMENT_PROCESSOR_EBANX_COUNTRIES[ {countryCode} ].fields - defines form field names we can display for extra payment information
*/
export const PAYMENT_PROCESSOR_EBANX_COUNTRIES = {
BR: {
fields: [
'document',
'street-number',
'address-1',
'address-2',
'state',
'city',
'phone-number',
],
},
MX: {
fields: [],
},
};
Empty file.
4 changes: 4 additions & 0 deletions client/my-sites/checkout/checkout/payment-box.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ export class PaymentBox extends PureComponent {
case 'ideal':
labelAdditionalText = paymentMethodName( method );
break;
case 'tef':
labelLogo = <Gridicon icon="institution" className="checkout__institution" />;
labelAdditionalText = paymentMethodName( method );
break;
}

return (
Expand Down
3 changes: 2 additions & 1 deletion client/my-sites/checkout/checkout/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -859,7 +859,8 @@
margin: -10px 0;
}

.checkout__credit-card {
.checkout__credit-card,
.checkout__institution {
margin-right: 5px;
}

Expand Down

0 comments on commit dec9717

Please sign in to comment.