2024-04-16 12:05:06 +02:00
|
|
|
import { registerPaymentMethod } from '@woocommerce/blocks-registry';
|
2024-05-20 18:46:44 +02:00
|
|
|
import {CardFields} from "./Components/card-fields";
|
2024-04-16 12:05:06 +02:00
|
|
|
|
|
|
|
const config = wc.wcSettings.getSetting('ppcp-credit-card-gateway_data');
|
|
|
|
|
|
|
|
registerPaymentMethod({
|
|
|
|
name: config.id,
|
|
|
|
label: <div dangerouslySetInnerHTML={{__html: config.title}}/>,
|
2024-04-17 16:20:42 +02:00
|
|
|
content: <CardFields config={config}/>,
|
2024-05-20 18:46:44 +02:00
|
|
|
edit: <div></div>,
|
2024-04-16 12:05:06 +02:00
|
|
|
ariaLabel: config.title,
|
|
|
|
canMakePayment: () => {return true},
|
2024-05-21 10:39:40 +02:00
|
|
|
supports: {
|
|
|
|
showSavedCards: true,
|
2024-05-21 15:52:41 +02:00
|
|
|
features: config.supports
|
2024-05-21 10:39:40 +02:00
|
|
|
}
|
2024-04-16 12:05:06 +02:00
|
|
|
})
|