Add eps payment

This commit is contained in:
Emili Castells Guasch 2024-08-20 17:27:03 +02:00
parent 11693c8df2
commit f36d6d08df
7 changed files with 374 additions and 1 deletions

View file

@ -0,0 +1,9 @@
export function EPS( { config, components } ) {
const { PaymentMethodIcons } = components;
return (
<div>
<PaymentMethodIcons icons={ [ config.icon ] } align="right" />
</div>
);
}

View file

@ -0,0 +1,18 @@
import { registerPaymentMethod } from '@woocommerce/blocks-registry';
import { EPS } from './eps-block';
const config = wc.wcSettings.getSetting( 'ppcp-eps_data' );
registerPaymentMethod( {
name: config.id,
label: <div dangerouslySetInnerHTML={ { __html: config.title } } />,
content: <EPS config={ config } />,
edit: <div></div>,
ariaLabel: config.title,
canMakePayment: () => {
return true;
},
supports: {
features: config.supports,
},
} );