mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Add p24 gateway
This commit is contained in:
parent
cf97f0becd
commit
83cb9d607a
15 changed files with 378 additions and 49 deletions
|
@ -1,4 +1,4 @@
|
|||
export function EPS( { config, components } ) {
|
||||
export function APM( { config, components } ) {
|
||||
const { PaymentMethodIcons } = components;
|
||||
|
||||
return (
|
|
@ -1,9 +0,0 @@
|
|||
export function Bancontact( { config, components } ) {
|
||||
const { PaymentMethodIcons } = components;
|
||||
|
||||
return (
|
||||
<div>
|
||||
<PaymentMethodIcons icons={ [ config.icon ] } align="right" />
|
||||
</div>
|
||||
);
|
||||
}
|
|
@ -1,12 +1,12 @@
|
|||
import { registerPaymentMethod } from '@woocommerce/blocks-registry';
|
||||
import { Bancontact } from './bancontact-block';
|
||||
import { APM } from './apm-block';
|
||||
|
||||
const config = wc.wcSettings.getSetting( 'ppcp-bancontact_data' );
|
||||
|
||||
registerPaymentMethod( {
|
||||
name: config.id,
|
||||
label: <div dangerouslySetInnerHTML={ { __html: config.title } } />,
|
||||
content: <Bancontact config={ config } />,
|
||||
content: <APM config={ config } />,
|
||||
edit: <div></div>,
|
||||
ariaLabel: config.title,
|
||||
canMakePayment: () => {
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
export function Blik( { config, components } ) {
|
||||
const { PaymentMethodIcons } = components;
|
||||
|
||||
return (
|
||||
<div>
|
||||
<PaymentMethodIcons icons={ [ config.icon ] } align="right" />
|
||||
</div>
|
||||
);
|
||||
}
|
|
@ -1,12 +1,12 @@
|
|||
import { registerPaymentMethod } from '@woocommerce/blocks-registry';
|
||||
import { Blik } from './blik-block';
|
||||
import { APM } from './apm-block';
|
||||
|
||||
const config = wc.wcSettings.getSetting( 'ppcp-blik_data' );
|
||||
|
||||
registerPaymentMethod( {
|
||||
name: config.id,
|
||||
label: <div dangerouslySetInnerHTML={ { __html: config.title } } />,
|
||||
content: <Blik config={ config } />,
|
||||
content: <APM config={ config } />,
|
||||
edit: <div></div>,
|
||||
ariaLabel: config.title,
|
||||
canMakePayment: () => {
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
import { registerPaymentMethod } from '@woocommerce/blocks-registry';
|
||||
import { EPS } from './eps-block';
|
||||
import { APM } from './apm-block';
|
||||
|
||||
const config = wc.wcSettings.getSetting( 'ppcp-eps_data' );
|
||||
|
||||
registerPaymentMethod( {
|
||||
name: config.id,
|
||||
label: <div dangerouslySetInnerHTML={ { __html: config.title } } />,
|
||||
content: <EPS config={ config } />,
|
||||
content: <APM config={ config } />,
|
||||
edit: <div></div>,
|
||||
ariaLabel: config.title,
|
||||
canMakePayment: () => {
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
export function IDeal( { config, components } ) {
|
||||
const { PaymentMethodIcons } = components;
|
||||
|
||||
return (
|
||||
<div>
|
||||
<PaymentMethodIcons icons={ [ config.icon ] } align="right" />
|
||||
</div>
|
||||
);
|
||||
}
|
|
@ -1,12 +1,12 @@
|
|||
import { registerPaymentMethod } from '@woocommerce/blocks-registry';
|
||||
import { IDeal } from './ideal-block';
|
||||
import { APM } from './apm-block';
|
||||
|
||||
const config = wc.wcSettings.getSetting( 'ppcp-ideal_data' );
|
||||
|
||||
registerPaymentMethod( {
|
||||
name: config.id,
|
||||
label: <div dangerouslySetInnerHTML={ { __html: config.title } } />,
|
||||
content: <IDeal config={ config } />,
|
||||
content: <APM config={ config } />,
|
||||
edit: <div></div>,
|
||||
ariaLabel: config.title,
|
||||
canMakePayment: () => {
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
export function MyBank( { config, components } ) {
|
||||
const { PaymentMethodIcons } = components;
|
||||
|
||||
return (
|
||||
<div>
|
||||
<PaymentMethodIcons icons={ [ config.icon ] } align="right" />
|
||||
</div>
|
||||
);
|
||||
}
|
|
@ -1,12 +1,12 @@
|
|||
import { registerPaymentMethod } from '@woocommerce/blocks-registry';
|
||||
import { MyBank } from './mybank-block';
|
||||
import { APM } from './apm-block';
|
||||
|
||||
const config = wc.wcSettings.getSetting( 'ppcp-mybank_data' );
|
||||
|
||||
registerPaymentMethod( {
|
||||
name: config.id,
|
||||
label: <div dangerouslySetInnerHTML={ { __html: config.title } } />,
|
||||
content: <MyBank config={ config } />,
|
||||
content: <APM config={ config } />,
|
||||
edit: <div></div>,
|
||||
ariaLabel: config.title,
|
||||
canMakePayment: () => {
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
import { registerPaymentMethod } from '@woocommerce/blocks-registry';
|
||||
import { APM } from './apm-block';
|
||||
|
||||
const config = wc.wcSettings.getSetting( 'ppcp-p24_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,
|
||||
},
|
||||
} );
|
Loading…
Add table
Add a link
Reference in a new issue