woocommerce-paypal-payments/tests/qa/resources/pcp-payments.ts
Misha Utkin a0b0d06cb2
Some checks failed
CI / static-code-analysis-php (push) Has been cancelled
CI / tests-unit-php (7.4) (push) Has been cancelled
CI / tests-unit-php (8.0) (push) Has been cancelled
CI / tests-unit-php (8.1) (push) Has been cancelled
CI / tests-unit-php (8.2) (push) Has been cancelled
CI / tests-unit-php (8.3) (push) Has been cancelled
CI / tests-unit-php (8.4) (push) Has been cancelled
CI / coding-standards-analysis-php (push) Has been cancelled
Fixed references to standardCardButton and debitOrCreditCard
2026-04-28 17:24:15 +02:00

86 lines
1.5 KiB
TypeScript

/**
* Internal dependencies
*/
import { cards } from './cards';
import { Pcp } from './types';
import { gateways } from './pcp-gateways';
import { payPalAccounts } from './paypal-accounts';
const country = process.env.WC_DEFAULT_COUNTRY || 'usa';
const payPal: Pcp.Payment = {
gateway: gateways.payPal,
payPalAccount: payPalAccounts[ country ],
};
const payPalVaulted: Pcp.Payment = {
...payPal,
isVaulted: true,
};
const payLater: Pcp.Payment = {
gateway: gateways.payLater,
payPalAccount: payPalAccounts[ country ],
};
const oxxo: Pcp.Payment = {
gateway: gateways.oxxo,
};
const venmo: Pcp.Payment = {
gateway: gateways.venmo,
payPalAccount: payPalAccounts.usa,
};
const acdc: Pcp.Payment = {
gateway: gateways.acdc,
card: cards.mastercard,
};
const acdc3ds: Pcp.Payment = {
gateway: gateways.acdc3ds,
card: cards.visa3ds,
};
const fastlaneGary: Pcp.Payment = {
gateway: gateways.fastlane,
fastlaneFlow: 'gary',
card: cards.visa,
};
const fastlaneRyan: Pcp.Payment = {
gateway: gateways.fastlane,
fastlaneFlow: 'ryan',
fastlaneOtp: '111111',
card: cards.visaFastlane,
};
const bcdc: Pcp.Payment = {
gateway: gateways.bcdc,
card: cards.visa,
};
const payUponInvoice: Pcp.Payment = {
gateway: gateways.payUponInvoice,
birthDate: '01.01.1991',
};
const googlePay: Pcp.Payment = {
gateway: gateways.googlepay,
card: cards.visa,
};
export const payments = {
payPal,
payPalVaulted,
payLater,
oxxo,
venmo,
acdc,
acdc3ds,
fastlaneGary,
fastlaneRyan,
bcdc,
payUponInvoice,
googlePay,
};