mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-31 04:58:28 +08:00
19 lines
525 B
JavaScript
19 lines
525 B
JavaScript
import { registerPaymentMethod } from '@woocommerce/blocks-registry';
|
|
import { CardFields } from './Components/card-fields';
|
|
|
|
const config = wc.wcSettings.getSetting( 'ppcp-credit-card-gateway_data' );
|
|
|
|
registerPaymentMethod( {
|
|
name: config.id,
|
|
label: <div dangerouslySetInnerHTML={ { __html: config.title } } />,
|
|
content: <CardFields config={ config } />,
|
|
edit: <div></div>,
|
|
ariaLabel: config.title,
|
|
canMakePayment: () => {
|
|
return true;
|
|
},
|
|
supports: {
|
|
showSavedCards: true,
|
|
features: config.supports,
|
|
},
|
|
} );
|