Skip to content

Commit

Permalink
wip: save point
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsonogwuru committed Feb 23, 2024
1 parent 8176764 commit 8a2903f
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions processor/src/services/processors/paypal-operation.processor.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { healthCheckCommercetoolsPermissions, statusHandler } from '@commercetools/connect-payments-sdk';
import { ErrorGeneral, healthCheckCommercetoolsPermissions, statusHandler } from '@commercetools/connect-payments-sdk';
import { config } from '../../config/config';
import { PaymentModificationStatus } from '../../dtos/operations/payment-intents.dto';
import { paymentSDK } from '../../payment-sdk';
import {
CancelPaymentRequest,
Expand Down Expand Up @@ -78,10 +77,12 @@ export class PaypalOperationProcessor implements OperationProcessor {
}

async cancelPayment(request: CancelPaymentRequest): Promise<PaymentProviderModificationResponse> {
return {
outcome: PaymentModificationStatus.REJECTED,
pspReference: `${request.payment.interfaceId} operation not supported`,
};
throw new ErrorGeneral('operation not supported', {
fields: {
pspReference: request.payment.interfaceId,
},
privateMessage: "connector doesn't support cancel operation",
});
}

async refundPayment(request: RefundPaymentRequest): Promise<PaymentProviderModificationResponse> {
Expand Down

0 comments on commit 8a2903f

Please sign in to comment.