qgw
    Preparing search index...

    The class that communicates w/ the TransparentQGW Database Engine @ POST URL: https://secure.quantumgateway.com/cgi/tqgwdbe.php It acts as a middleman between this library and the engine.

    Class Flow:

    1. It sends a request to Db Engine containing the values it needs using the class's send(transactionRequest) method.
    2. Gets back a response from the Engine
    3. Returns a formatted version of that response with the TransactionResponse object. It's just a fancy way of calling a POST method for Quantum Gateway's Transparent QuantumGateway Database Engine resource.

    Naming: Since this class's functionality is similar to just POSTing to TransQGWDb Engine URL directly w/ cUrl or Postman, we call it the TransparentDbEngine similar to how Quantum Gateway calls it the Engine. If it walks like a duck...

    One big difference between this class and the Official TransQGWDb Engine is that this class sends a better formatted response compared to POSTing directly.

    We do not support using API Keys for now.

    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    gatewayLogin: string
    strictMode: boolean = true

    if set to true, makes library validate your input before sending it to the server.

    postURL: string = postURL

    Methods

    • The main method that sends a transaction request to the Transparent DB Engine and updates your account's balance.

      Parameters

      • transactionRequest: DirectAPI | TransactionRequest
      • options: Record<string, string> = {}

        additional fields that you can append to your transaction request that QGW will also look at.

      Returns Promise<TransactionResponse>

      The response from the Transparent DB Engine. Since this function throws errors on declined, the only way to get a successful response is if the transaction was approved.

      a TransactionError - If the transaction request:

      • is formatted incorrectly
      • if the transaction was processed but the server declined it.
      • if there is an error in the server response.