GitHub

DaffPaymentStateReducerAdapter

Manages DaffPaymentReducerState.

import { DaffPaymentStateReducerAdapter } from '@daffodil/payment/state'
class DaffPaymentStateReducerAdapter {
  generateToken(state: DaffPaymentReducerState): DaffPaymentReducerState
  tokenGenerated(state: DaffPaymentReducerState): DaffPaymentReducerState
  storeError(
    errors: DaffStateError[]
    state: DaffPaymentReducerState
  ): DaffPaymentReducerState
}

Properties

Name Type Description
generateToken DaffPaymentReducerState

Begins the payment operation flow. Sets loading to true.

tokenGenerated DaffPaymentReducerState

Sets loading to false and resets errors.

storeError DaffPaymentReducerState

Stores the from a failed payment. Also sets loading to false.