PGClient
Payment Gateway Client Library
PGClient Documentation

Payment Gateway Client Library

Files

C/C++

  • Header files
    • PgcClient.h : Contains data type and function definitions
    • PgcKeys.h : Contains data key definitions
    • PgcHelper.h : Contains convenience helper function definitions
  • LIB files
    • PgcClientDll.lib
  • DLL files
    • PgcClientDll.dll
  • Sample files
    • PgcClientTstDll.cpp : Contains simple code to perform an auth transaction

C# / .Net

  • Source files
    • PgcConsts.cs : Contains data type definitions
    • PgcKeys.cs : Contains data key definitions
  • LIB files
    • PgcClientCom.tlb
  • DLL files
    • PgcClientCom.dll
  • Sample files
    • Program.cs : Contains simple code to perform an auth transaction

Terms

  • Connection : The link between the client and the Payment Gateway.
    • The connection is persistent so it should be created and kept until not needed.
    • There can be separate connections for transactions, batches and data APIs.
  • Session : The container for requests and responses.
    • Create a new session for each request and close it immediately after use.

Sequence

  1. Upon application startup
    1. call PgcInit function to initialize the library
  2. When need to connect to Payment Gateway
    1. call PgcNewConn function to create a new connection
    2. call PgcConnect function to connect to Payment Gateway (Optional; the first session will auto-connect)
  3. For each transaction
    1. call PgcNewSess function to create a new session
    2. call PgcSet functions to set data to the session
    3. call PgcRequest function to perform the transaction
    4. call PgcGet functions to get data from the session
    5. call PgcCloseSess function to close the session
  4. When finished with Payment Gateway
    1. call PgcDisconnect function to disconnect from Payment Gateway (Optional; PgcCloseConn will auto-disconnect)
    2. call PgcCloseConn function to close the connection
  5. Upon application shutdown
    1. call PgcUninit function to Uninitialize the library