AuthorizationList Class

The AuthorizationList class processes the IPCAuthorizationList method, allowing you to fetch a list of all pending or completed authorizations tied to your myPOS merchant account.

Great for monitoring outstanding holds, auditing transactions, or building admin panels for pre-auth lifecycle management.

Class Overview

  • Namespace: Mypos\IPC
  • Located at: AuthorizationList.php
  • Extends: Mypos\IPC\Base
  • Purpose: Retrieve a list of all authorizations, optionally filtered by time or status (depending on implementation)

Method Summary

MethodReturn TypeDescription
__construct(Config $cnf)-Initializes the AuthorizationList object with IPC configuration.
setOrderID(string $orderID)AuthorizationListSets an order ID to filter the authorization list.
getOrderID()stringReturns the currently set order ID filter.
setStatus(int $status)AuthorizationListSets a status filter (e.g., pending, completed).
getStatus()intReturns the current status filter.
setDateFrom(string $dateFrom)AuthorizationListSets the start date for filtering (YYYY-MM-DD).
getDateFrom()stringReturns the start date filter.
setDateTo(string $dateTo)AuthorizationListSets the end date for filtering (YYYY-MM-DD).
getDateTo()stringReturns the end date filter.
validate()boolEnsures required fields and filters are set correctly.
process()ResponseSends the request and returns the IPC response object with the authorization list.

Inherited from Base

Provides access to these common SDK utilities:

  • _addPostParam()
  • _processPost(), _processHtmlPost()
  • getCnf(), setCnf()
  • getOutputFormat(), setOutputFormat()
  • isValidSignature()

Example Usage

use Mypos\IPC\Config;
use Mypos\IPC\AuthorizationList;

$config = new Config();
// Set SID, wallet number, keys, etc.

$authList = new AuthorizationList($config);

if ($authList->validate()) {
    $response = $authList->process();
    $authorizations = $response->getData();

    foreach ($authorizations as $auth) {
        echo "Order ID: " . $auth['OrderID'] . " | Status: " . $auth['Status'] . PHP_EOL;
    }
} else {
    echo " Authorization list request failed validation.";
}

Use cases

Use the AuthorizationList class when:

  • You want to track all active or completed authorizations
  • You need a reporting endpoint for a merchant control panel or back office
  • You want to sync your app’s state with the current authorization records from myPOS
  • You're implementing automated reconciling or transaction audits