Skip to content

Commit 2781bb2

Browse files
feat(payment): PI-1564 Refactor the existing Moneris components in … (#2082)
* feat(payment): PI-1564 Refactor the existing `Moneris` components in Checkout JS to use the new checkout payment integration JS API * feat(payment): PI-1564 Refactor the existing Moneris components in Checkout JS to use the new checkout payment integration JS API * feat(payment): PI-1564 Refactor the existing Moneris components in Checkout JS to use the new checkout payment integration JS API
1 parent e9d0267 commit 2781bb2

15 files changed

+352
-187
lines changed

.github/CODEOWNERS

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ package-lock.json @bigcommerce/team-checkout @bigcommerce/team-integrations @big
2828
/packages/stripe-integration @bigcommerce/team-integrations
2929
/packages/klarna-integration @bigcommerce/team-integrations
3030
/packages/amazon-pay-v2-integration @bigcommerce/team-integrations
31+
/packages/moneris-integration @bigcommerce/team-integrations
3132

3233
# Core
3334
/packages/core/payment/paymentMethod/AffirmPaymentMethod.tsx @bigcommerce/team-integrations

packages/core/src/app/payment/paymentMethod/MonerisPaymentMethod.spec.tsx

-124
This file was deleted.

packages/core/src/app/payment/paymentMethod/MonerisPaymentMethod.tsx

-58
This file was deleted.

packages/core/src/app/payment/paymentMethod/PaymentMethod.tsx

-5
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import CCAvenueMarsPaymentMethod from './CCAvenueMarsPaymentMethod';
1717
import HostedCreditCardPaymentMethod from './HostedCreditCardPaymentMethod';
1818
import HostedPaymentMethod from './HostedPaymentMethod';
1919
import MasterpassPaymentMethod from './MasterpassPaymentMethod';
20-
import MonerisPaymentMethod from './MonerisPaymentMethod';
2120
import OpyPaymentMethod from './OpyPaymentMethod';
2221
import PaymentMethodId from './PaymentMethodId';
2322
import PaymentMethodProviderType from './PaymentMethodProviderType';
@@ -99,10 +98,6 @@ const PaymentMethodComponent: FunctionComponent<
9998
) {
10099
return <PaypalPaymentsProPaymentMethod {...props} />;
101100
}
102-
103-
if (method.id === PaymentMethodId.Moneris) {
104-
return <MonerisPaymentMethod {...props} />;
105-
}
106101

107102
if (method.id === PaymentMethodId.WorldpayAccess) {
108103
return <WorldpayCreditCardPaymentMethod {...props} />;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"extends": ["../../.eslintrc.json"],
3+
"overrides": [
4+
{
5+
"files": ["*.tsx"],
6+
"rules": {
7+
"@typescript-eslint/no-unsafe-assignment": "off"
8+
}
9+
}
10+
]
11+
}
+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# moneris-integration
2+
3+
This package contains the integration layer for the [Moneris](https://www.moneris.com/) provider.
4+
This library was generated with [Nx](https://nx.dev).
5+
6+
## Running unit tests
7+
8+
Run `nx test moneris-integration` to execute the unit tests via [Jest](https://jestjs.io).
9+
10+
## Running lint
11+
12+
Run `nx lint moneris-integration` to execute the lint via [ESLint](https://eslint.org/).
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
module.exports = {
2+
displayName: 'moneris-integration',
3+
preset: '../../jest.preset.js',
4+
globals: {
5+
'ts-jest': {
6+
tsconfig: '<rootDir>/tsconfig.spec.json',
7+
diagnostics: false,
8+
},
9+
},
10+
setupFilesAfterEnv: ['../../jest-setup.ts'],
11+
coverageDirectory: '../../coverage/packages/moneris-integration',
12+
};
+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"root": "packages/moneris-integration",
3+
"sourceRoot": "packages/moneris-integration/src",
4+
"projectType": "library",
5+
"targets": {
6+
"lint": {
7+
"executor": "@nrwl/linter:eslint",
8+
"outputs": ["{options.outputFile}"],
9+
"options": {
10+
"lintFilePatterns": ["packages/moneris-integration/**/*.ts"]
11+
}
12+
},
13+
"test": {
14+
"executor": "@nrwl/jest:jest",
15+
"outputs": ["coverage/packages/moneris-integration"],
16+
"options": {
17+
"jestConfig": "packages/moneris-integration/jest.config.js",
18+
"passWithNoTests": true
19+
}
20+
}
21+
},
22+
"tags": ["scope:integration"]
23+
}

0 commit comments

Comments
 (0)