Options
All
  • Public
  • Public/Protected
  • All
Menu
class

BaseTransaction(config: ITransactionConfig) Class for requesting for payments from customers

method

initialize()

method

pollStatus()

method

getDetails()

property

{ string } referenceId

property

{ IStatus } status

property

{ number } timeout Number of microseconds before pollStatus times out; defaults to 35000 (35 seconds)

Hierarchy

Index

Constructors

constructor

Properties

Protected apiToken

apiToken: IApiToken | undefined

commonHeaders

commonHeaders: object

Type declaration

  • Authorization: string
  • Content-Type: string
  • Ocp-Apim-Subscription-Key: string
  • X-Target-Environment: string

Private details

details: ITransactionDetails | undefined

Private interval

interval: number = 30000

Protected receipientType

receipientType: string

referenceId

referenceId: string

Private requestBody

requestBody: ITransactionBody

Private timeout

timeout: number = 35000

Private transactionResource

transactionResource: IResource

Protected transactionType

transactionType: string

Methods

Private _pollStatus

  • _pollStatus(): Promise<object>

Protected authenticate

  • authenticate(): Promise<void>

getDetails

initialize

  • initialize(): Promise<AxiosResponse<any>>
  • makes a POST request to the resourceUrl ednpoint to create a transaction request

    Returns Promise<AxiosResponse<any>>

pollStatus

  • pollStatus(): Promise<object>
  • makes repetitive GET requests to the '${resourceUrl}/{this.referenceId}' until timeout or until status is not PENDING

    Returns Promise<object>

Protected secondsSince

  • secondsSince(startingTime: Date): number

Protected shouldAuthenticate

  • shouldAuthenticate(): boolean

Private updateDetails

  • updateDetails(__namedParameters: object): void
  • It updates the details of this payment request

    Parameters

    • __namedParameters: object
      • amount: any
      • currency: any
      • externalId: any
      • financialTransactionId: any
      • payee: any
      • payer: any
      • reason: any
      • status: any

    Returns void

Private updateStatus

  • updateStatus(__namedParameters: object): void
  • It updates the status of this payment request

    Parameters

    • __namedParameters: object
      • reason: any
      • status: any

    Returns void

Object literals

status

status: object

code

code: string = ""

reason

reason: string = ""

text

text: Status = Status.UNINITIALIZED

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc