Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • PayU

Index

Constructors

  • new PayU(clientId: number, clientSecret: string, merchantPosId: number, secondKey: string, options?: PayUOptions): PayU
  • Creates an instance of PayU.

    memberof

    PayU

    Parameters

    • clientId: number

      client id for merchant

    • clientSecret: string

      client secret from panel

    • merchantPosId: number

      pos id from panel

    • secondKey: string

      second key from panel

    • options: PayUOptions = ...

    Returns PayU

Properties

baseEndpoint: string
client: AxiosInstance
ips: string[]
oAuth: OAuth

Methods

  • getAccessToken(): Promise<string>
  • Get access token

    throws

    {AuthenticationError}

    memberof

    PayU

    Returns Promise<string>

  • isIpValid(ip: string): boolean
  • Validates the IP address with PayU servers

    memberof

    PayU

    Parameters

    • ip: string

      ip address

    Returns boolean

  • parseHeaderToJson(data: string): Record<string, string>
  • Convert a key=value; list to json

    memberof

    PayU

    Parameters

    • data: string

      key value string

    Returns Record<string, string>

  • Refunds a PayU order

    memberof

    PayU

    Parameters

    • orderId: string

      payu order id

    • description: string

      description for refund

    Returns Promise<OrderStatusResponse>

  • verifyNotification(payuHeader: string, jsonNotification: string): boolean
  • Verify notification result with signature

    memberof

    PayU

    Parameters

    • payuHeader: string

      header string from OpenPayu-Signature

    • jsonNotification: string

      notification body as a string

    Returns boolean

Generated using TypeDoc