/**
* External dependencies
*/
import { Card, CardFooter, CardBody, Button } from '@wordpress/components';
import { Text } from '@woocommerce/experimental';
import { __ } from '@wordpress/i18n';
import { getAdminLink } from '@woocommerce/settings';
import interpolateComponents from '@automattic/interpolate-components';
import { Link } from '@woocommerce/components';
/**
* Internal dependencies
*/
import {
Visa,
MasterCard,
Amex,
ApplePay,
Giropay,
GooglePay,
CB,
DinersClub,
Discover,
UnionPay,
JCB,
Sofort,
} from '../payments-welcome/cards';
import WCPayBannerImage from './wcpay-banner-image';
import './payment-recommendations.scss';
import { getAdminSetting } from '~/utils/admin-settings';
import { usePaymentExperiment } from './use-payments-experiment';
export const PaymentMethodsIcons = () => (
);
const WcPayBanner = () => {
const WC_PAY_SETUP_URL = getAdminLink(
'admin.php?wcpay-connect=1&_wpnonce=' +
getAdminSetting( 'wcpay_welcome_page_connect_nonce' )
);
return (
{ __(
'Accept Payments and manage your business.',
'woocommerce'
) }
{ interpolateComponents( {
mixedString: __(
'By using WooCommerce Payments you agree to be bound by our {{tosLink}}Terms of Service{{/tosLink}} and acknowledge that you have read our {{privacyLink}}Privacy Policy{{/privacyLink}} ',
'woocommerce'
),
components: {
tosLink: (
<>>
),
privacyLink: (
<>>
),
},
} ) }
{ __( 'Get started', 'woocommerce' ) }
{ __(
'Accepted payment methods include:',
'woocommerce'
) }
{ __( '& more.', 'woocommerce' ) }
);
};
const DefaultPaymentMethodsHeaderText = () => (
<>
Payment Methods
Installed payment methods are listed below and can be sorted to
control their display order on the frontend.
>
);
export const PaymentsBannerWrapper = () => {
const { isLoadingExperiment, experimentAssignment } =
usePaymentExperiment();
if (
! isLoadingExperiment &&
experimentAssignment?.variationName === 'treatment'
) {
return ;
}
return ;
};