Skip to content

Commit

Permalink
feat(payment): PI-1546 Refactor the existing moneris payment strate…
Browse files Browse the repository at this point in the history
…gy in Checkout SDK to use the new checkout payment integration JS API
  • Loading branch information
bc-sebastianszafraniec committed Oct 29, 2024
1 parent 1b70604 commit 33a50d0
Show file tree
Hide file tree
Showing 22 changed files with 552 additions and 530 deletions.
17 changes: 0 additions & 17 deletions packages/core/src/payment/create-payment-strategy-registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import {
SpamProtectionActionCreator,
SpamProtectionRequestSender,
} from '../spam-protection';
import { StoreCreditActionCreator, StoreCreditRequestSender } from '../store-credit';

import createPaymentStrategyRegistryV2 from './create-payment-strategy-registry-v2';
import PaymentActionCreator from './payment-action-creator';
Expand Down Expand Up @@ -56,7 +55,6 @@ import {
import { CBAMPGSPaymentStrategy, CBAMPGSScriptLoader } from './strategies/cba-mpgs';
import { ConvergePaymentStrategy } from './strategies/converge';
import { MasterpassPaymentStrategy, MasterpassScriptLoader } from './strategies/masterpass';
import { MonerisPaymentStrategy } from './strategies/moneris';
import { OpyPaymentStrategy, OpyScriptLoader } from './strategies/opy';
import { PaypalExpressPaymentStrategy, PaypalScriptLoader } from './strategies/paypal';
import {
Expand Down Expand Up @@ -94,9 +92,6 @@ export default function createPaymentStrategyRegistry(
new OrderRequestSender(requestSender),
checkoutValidator,
);
const storeCreditActionCreator = new StoreCreditActionCreator(
new StoreCreditRequestSender(requestSender),
);
const paymentHumanVerificationHandler = new PaymentHumanVerificationHandler(
createSpamProtection(createScriptLoader()),
);
Expand Down Expand Up @@ -242,18 +237,6 @@ export default function createPaymentStrategyRegistry(
),
);

registry.register(
PaymentStrategyType.MONERIS,
() =>
new MonerisPaymentStrategy(
hostedFormFactory,
store,
orderActionCreator,
paymentActionCreator,
storeCreditActionCreator,
),
);

registry.register(
PaymentStrategyType.OPY,
() =>
Expand Down
7 changes: 0 additions & 7 deletions packages/core/src/payment/payment-request-options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {
} from './strategies/braintree';
import { DigitalRiverPaymentInitializeOptions } from './strategies/digitalriver';
import { MasterpassPaymentInitializeOptions } from './strategies/masterpass';
import { MonerisPaymentInitializeOptions } from './strategies/moneris';
import { OpyPaymentInitializeOptions } from './strategies/opy';
import { PaypalExpressPaymentInitializeOptions } from './strategies/paypal';
import { SquarePaymentInitializeOptions } from './strategies/square';
Expand Down Expand Up @@ -78,12 +77,6 @@ export interface BasePaymentInitializeOptions extends PaymentRequestOptions {
*/
masterpass?: MasterpassPaymentInitializeOptions;

/**
* The options that are required to initialize the Moneris payment method.
* They can be omitted unless you need to support Moneris.
*/
moneris?: MonerisPaymentInitializeOptions;

/**
* The options that are required to initialize the Opy payment
* method. They can be omitted unless you need to support Opy.
Expand Down
3 changes: 0 additions & 3 deletions packages/core/src/payment/strategies/moneris/index.ts

This file was deleted.

This file was deleted.

Loading

0 comments on commit 33a50d0

Please sign in to comment.