woocommerce/packages/woocommerce-blocks/assets/js/payment-method-extensions/payment-methods/stripe/index.js
2021-12-10 12:03:04 +00:00

23 lines
599 B
JavaScript

/**
* External dependencies
*/
import {
registerPaymentMethod,
registerExpressPaymentMethod,
} from '@woocommerce/blocks-registry';
/**
* Internal dependencies
*/
import stripeCcPaymentMethod from './credit-card';
import paymentRequestPaymentMethod from './payment-request';
import { getStripeServerData } from './stripe-utils';
// Register Stripe Credit Card.
registerPaymentMethod( stripeCcPaymentMethod );
// Register Stripe Payment Request (Apple/Chrome Pay) if enabled.
if ( getStripeServerData().allowPaymentRequest ) {
registerExpressPaymentMethod( paymentRequestPaymentMethod );
}