mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-07 19:54:15 +08:00
♻️ Extract info links to own config file
This commit is contained in:
parent
123c204e50
commit
63f538fd62
2 changed files with 56 additions and 56 deletions
|
@ -1,5 +1,7 @@
|
|||
import { __ } from '@wordpress/i18n';
|
||||
import { useMemo } from '@wordpress/element';
|
||||
|
||||
import { learnMoreLinks } from '../../../../utils/countryInfoLinks';
|
||||
import {
|
||||
PayWithPayPal,
|
||||
PayLater,
|
||||
|
@ -12,7 +14,6 @@ import {
|
|||
Fastlane,
|
||||
CreditDebitCards,
|
||||
} from '../Components/PaymentOptions';
|
||||
import { useMemo } from '@wordpress/element';
|
||||
|
||||
// Default configuration, used for all countries, unless they override individual attributes below.
|
||||
const defaultConfig = {
|
||||
|
@ -35,61 +36,6 @@ const defaultConfig = {
|
|||
),
|
||||
};
|
||||
|
||||
const learnMoreLinks = {
|
||||
US: {
|
||||
PayPalCheckout:
|
||||
'https://www.paypal.com/us/business/accept-payments/checkout',
|
||||
PayLater:
|
||||
'https://www.paypal.com/us/business/accept-payments/checkout/installments',
|
||||
Venmo: 'https://www.paypal.com/us/enterprise/payment-processing/accept-venmo',
|
||||
Crypto: 'https://www.paypal.com/us/digital-wallet/manage-money/crypto',
|
||||
OptionalMethods:
|
||||
'https://www.paypal.com/us/business/accept-payments/checkout/integration#expanded-checkout',
|
||||
Fastlane:
|
||||
'https://www.paypal.com/us/enterprise/payment-processing/guest-checkout',
|
||||
},
|
||||
CA: {
|
||||
PayPalCheckout:
|
||||
'https://www.paypal.com/ca/business/accept-payments/checkout',
|
||||
},
|
||||
GB: {
|
||||
PayPalCheckout:
|
||||
'https://www.paypal.com/uk/business/accept-payments/checkout',
|
||||
PayLater:
|
||||
'https://www.paypal.com/uk/business/accept-payments/checkout/installments',
|
||||
},
|
||||
FR: {
|
||||
PayPalCheckout:
|
||||
'https://www.paypal.com/fr/business/accept-payments/checkout',
|
||||
PayLater:
|
||||
'https://www.paypal.com/fr/business/accept-payments/checkout/installments',
|
||||
},
|
||||
ES: {
|
||||
PayPalCheckout:
|
||||
'https://www.paypal.com/es/business/accept-payments/checkout',
|
||||
PayLater:
|
||||
'https://www.paypal.com/es/business/accept-payments/checkout/installments',
|
||||
},
|
||||
IT: {
|
||||
PayPalCheckout:
|
||||
'https://www.paypal.com/it/business/accept-payments/checkout',
|
||||
PayLater:
|
||||
'https://www.paypal.com/it/business/accept-payments/checkout/installments',
|
||||
},
|
||||
DE: {
|
||||
PayPalCheckout:
|
||||
'https://www.paypal.com/de/business/accept-payments/checkout',
|
||||
PayLater:
|
||||
'https://www.paypal.com/de/business/accept-payments/checkout/installments',
|
||||
},
|
||||
AU: {
|
||||
PayPalCheckout:
|
||||
'https://www.paypal.com/au/business/accept-payments/checkout',
|
||||
PayLater:
|
||||
'https://www.paypal.com/au/business/accept-payments/checkout/installments',
|
||||
},
|
||||
};
|
||||
|
||||
const countrySpecificConfigs = {
|
||||
US: {
|
||||
includedMethods: [
|
||||
|
|
54
modules/ppcp-settings/resources/js/utils/countryInfoLinks.js
Normal file
54
modules/ppcp-settings/resources/js/utils/countryInfoLinks.js
Normal file
|
@ -0,0 +1,54 @@
|
|||
export const learnMoreLinks = {
|
||||
US: {
|
||||
PayPalCheckout:
|
||||
'https://www.paypal.com/us/business/accept-payments/checkout',
|
||||
PayLater:
|
||||
'https://www.paypal.com/us/business/accept-payments/checkout/installments',
|
||||
Venmo: 'https://www.paypal.com/us/enterprise/payment-processing/accept-venmo',
|
||||
Crypto: 'https://www.paypal.com/us/digital-wallet/manage-money/crypto',
|
||||
OptionalMethods:
|
||||
'https://www.paypal.com/us/business/accept-payments/checkout/integration#expanded-checkout',
|
||||
Fastlane:
|
||||
'https://www.paypal.com/us/enterprise/payment-processing/guest-checkout',
|
||||
},
|
||||
CA: {
|
||||
PayPalCheckout:
|
||||
'https://www.paypal.com/ca/business/accept-payments/checkout',
|
||||
},
|
||||
GB: {
|
||||
PayPalCheckout:
|
||||
'https://www.paypal.com/uk/business/accept-payments/checkout',
|
||||
PayLater:
|
||||
'https://www.paypal.com/uk/business/accept-payments/checkout/installments',
|
||||
},
|
||||
FR: {
|
||||
PayPalCheckout:
|
||||
'https://www.paypal.com/fr/business/accept-payments/checkout',
|
||||
PayLater:
|
||||
'https://www.paypal.com/fr/business/accept-payments/checkout/installments',
|
||||
},
|
||||
ES: {
|
||||
PayPalCheckout:
|
||||
'https://www.paypal.com/es/business/accept-payments/checkout',
|
||||
PayLater:
|
||||
'https://www.paypal.com/es/business/accept-payments/checkout/installments',
|
||||
},
|
||||
IT: {
|
||||
PayPalCheckout:
|
||||
'https://www.paypal.com/it/business/accept-payments/checkout',
|
||||
PayLater:
|
||||
'https://www.paypal.com/it/business/accept-payments/checkout/installments',
|
||||
},
|
||||
DE: {
|
||||
PayPalCheckout:
|
||||
'https://www.paypal.com/de/business/accept-payments/checkout',
|
||||
PayLater:
|
||||
'https://www.paypal.com/de/business/accept-payments/checkout/installments',
|
||||
},
|
||||
AU: {
|
||||
PayPalCheckout:
|
||||
'https://www.paypal.com/au/business/accept-payments/checkout',
|
||||
PayLater:
|
||||
'https://www.paypal.com/au/business/accept-payments/checkout/installments',
|
||||
},
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue