Class MpgsDirectIntegrationService

Hierarchy

Constructors

Methods

  • Type Parameters

    • AuthResponse

    Returns Promise<AuthResponse>

  • Gets the current configuration of the SDK

    Returns {
        apiKey: string;
        consumerSecret: string;
        enableAuthorization: boolean;
        enableLogging: boolean;
        env: string;
        merchantCode: string;
        privateKeyPath: string;
        verbose: boolean;
    }

    • apiKey: string
    • consumerSecret: string
    • enableAuthorization: boolean
    • enableLogging: boolean
    • env: string
    • merchantCode: string
    • privateKeyPath: string
    • verbose: boolean
  • MPGS Authenticate Payment

    https://developer.jengaapi.io/reference/mpgs-authenticate-payment

    This API will be used to authenticate payments on MPGS.cardNumber and cardSecurity are encrypted using AES encryption then the cypher is base64 encoded.

    Type Parameters

    • T

    Parameters

    • options: {
          data: mpgsAuthenticatePaymentData;
          headers?: any;
      }
      • data: mpgsAuthenticatePaymentData
      • Optional headers?: any

    Returns Promise<T>

  • MPGS Authorize Payment

    https://developer.jengaapi.io/reference/mpgs-authorize-payment

    This API will be initiated by the merchant and will authorize payment on Mastercard.cardNumber and cardSecurity are encrypted using AES encryption then the cypher is base64 encoded.

    Type Parameters

    • T

    Parameters

    • options: {
          data: mpgsAuthorizePaymentData;
          headers?: any;
      }
      • data: mpgsAuthorizePaymentData
      • Optional headers?: any

    Returns Promise<T>

  • MPGS Query Payment

    https://developer.jengaapi.io/reference/payment-payment

    This API will query the status of a transaction.

    Type Parameters

    • T

    Parameters

    • options: {
          data: mpgsQueryPaymentData;
          headers?: any;
      }
      • data: mpgsQueryPaymentData
      • Optional headers?: any

    Returns Promise<T>

  • MPGS Refund Payment

    https://developer.jengaapi.io/reference/mpgs-refund-payment

    This API will refund a payment.

    Type Parameters

    • T

    Parameters

    • options: {
          data: mpgsRefundPaymentData;
          headers?: any;
      }
      • data: mpgsRefundPaymentData
      • Optional headers?: any

    Returns Promise<T>

  • MPGS Validate Payment

    https://developer.jengaapi.io/reference/mpgs-validate-payment

    This API will validate payment before card authorization. The API will do the following

    Check if the merchant is subscribed to the Card APIs service

    Check if they are subscribed to the MID they are using.

    Fetch the relevant charges

    cardNumber and cardSecurity are encrypted using AES encryption then the cypher is base64 encoded.

    Type Parameters

    • T

    Parameters

    • options: {
          data: mpgsValidatePaymentData;
          headers?: any;
      }
      • data: mpgsValidatePaymentData
      • Optional headers?: any

    Returns Promise<T>

  • Updates the current configuration of the SDK

    Parameters

    • config: UpdateConfig
    • callback: Function = null

    Returns {
        apiKey: string;
        consumerSecret: string;
        enableAuthorization: boolean;
        enableLogging: boolean;
        env: string;
        merchantCode: string;
        privateKeyPath: string;
        verbose: boolean;
    }

    • apiKey: string
    • consumerSecret: string
    • enableAuthorization: boolean
    • enableLogging: boolean
    • env: string
    • merchantCode: string
    • privateKeyPath: string
    • verbose: boolean