import { Payment, PaymentDraft, PaymentUpdateAction, Transaction } from '@commercetools/platform-sdk'; import { FindPaymentsByInterfaceId, FindTransaction, GetPayment, PaymentService, PaymentServiceOptions, TransactionData, UpdatePayment } from '../types/payment.type'; declare module '@commercetools/platform-sdk' { interface PaymentDraft { checkoutTransactionItemId?: string; } interface Payment { checkoutTransactionItemId?: string; } } /** * This is the default implementation of the PaymentService interface. */ export declare class DefaultPaymentService implements PaymentService { private ctAPI; private logger; constructor(opts: PaymentServiceOptions); getPayment(opts: GetPayment): Promise; findPaymentsByInterfaceId(opts: FindPaymentsByInterfaceId): Promise; createPayment(draft: PaymentDraft): Promise; updatePayment(opts: UpdatePayment): Promise; /** * Calculates exponential backoff delay with jitter * @param attempt - Current attempt number (0-based) * @returns Delay in milliseconds */ private calculateExponentialBackoff; /** * Sleep for a specified duration * @param ms - Duration in milliseconds */ private sleep; private consolidateUpdateActions; private populateSetInterfaceIdAction; private populateChangeTransactionInteractionId; private populateSetTransactionInterfaceId; private populateAddTransactionAction; private populateChangeTransactionState; private populateSetPaymentMethod; private populateSetMethodInfoToken; private populateSetMethodInfoInterface; private populateSetMethodInfoName; private populateSetMethodInfoInterfaceAccount; private populateSetMethodInfoCustomType; private populateSetMethodInfoCustomField; private populateSetCustomType; private populateAddInterfaceInteractions; findMatchingTransactions(payment: Payment, transaction: TransactionData): Transaction[]; hasTransactionInState(opts: FindTransaction): boolean; consolidateTransactionChanges(payment: Payment, newTransaction: TransactionData): PaymentUpdateAction[]; private shouldDiscardTransaction; private handleTransactionUpdates; private shouldUpdateTransactionState; private shouldUpdateInteractionId; private shouldUpdateTransactionInterfaceId; private throwMultipleMatchingTransactionsError; }