mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-31 06:52:50 +08:00
17 lines
533 B
JavaScript
17 lines
533 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,
|
|
showSaveOption: true
|
|
}
|
|
})
|