woocommerce-paypal-payments/modules/ppcp-local-alternative-payment-methods/resources/js/trustly-payment-method.js
Emili Castells Guasch dd990ca44a Add trustly gateway
2024-08-21 16:24:37 +02:00

18 lines
462 B
JavaScript

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