Documentation

GetList

Description and parameters

CDBResult
CSalePaySystemAction::GetList(
 array arOrder = array(),
 array arFilter = array(),
 array arGroupBy = false,
 array arNavStartParams = false,
 array arSelectFields = array()
);

Method returns a selection of entries from payment system handlers according to its parameters. Non-static method.

Call parameters

ParameterDescription
arOrder Array, according to which resulting parameters are sorted. Array looks as follows:
array(
"field_name1" => "sort_direction1",
"field_name2" => "sort_direction2",
. . .
)
Any field can be inserted as the "field_nameN" for payment system handlers. And "sort_directionX" can have values "ASC" (by ascension) and "DESC" (by descension).

In case the sort array have several elements, the resulting set is sorted by each element (i. e. first sorts by the first element and then result is sorted by the second element, etc.). 

Default value - empty array(), in indicating that result won't be sorted.
arFilter Array, according to which the payment system entries are filtered. Array looks as follows:
array(
"[modifier1][operator1]field_name1" => "value1",
"[modifier2][operator2]field_name2" => "value2",
. . .
)
Entries that satisfy the filter are returned in the result and entries that do not satisfy the filter conditions are ignored.

The following modifiers are permissible:
  • ! - negation;
  • + - null, 0 and empty string values also satisfy the filter conditions.
The following operators are permitted:
  • >= - field value is higher or equal to value passed to filter;
  • > - field value is strict higher that value passed to filter;
  • <= - field value is lesser or equal to value passed to filter;
  • < - field value is strictly less than value passed to filter;
  • @ - field value is located in the comma-separated list with values passed to filter;
  • ~ - field value is checked for match to the value passed to template filter;
  • % - field value is checked for match to string passed to filter according to query language.
"field_name" can have any field for orders.

Filter example:
array("!PERSON_TYPE_ID" => 5)
This filter indicates "select all entries with PERSON_TYPE_ID values (payer type code) is not equal to 5".

Default value - empty array() - indicates that result won't be filtered.
arGroupBy Array with fields used to group entries of payment system handlers. Looks as follows:
array("field_name1",
      "group_function1" => " field_name2", ...)
"field_nameN" can contain any field for payment system handlers. Group function can have:
  • COUNT - count;
  • AVG - calculation of average value;
  • MIN - calculation of minimum value;
  • MAX - calculation of maximum value;
  • SUM - calculation of total.
This filter indicates "select all records with the field value LID (system site) is not en".

Default value - false - no grouping of results.
arNavStartParams Array with selection parameters. Can contain the following keys:
  • "nTopCount" - limits the number of entries/records, returned by the method;
  • any key, received by the method CDBResult::NavQuery as the third parameter.
Default value - false - indicates empty selection parameters.
arSelectFields Array with fields to be returned by the method. Can contain only the required fields. In case the array has the value for "*", returns all available fields.

Default value - array is empty array() - returns all fields of query main table.

Returned values

Returns CDBResult class object, containing associative arrays with payment system handler parameters with the following keys:

Key Description
ID Payment system handler code.
PAY_SYSTEM_ID Payment system code.
PERSON_TYPE_ID Payer type code.
NAME Payment system name.
ACTION_FILE Payment system script.
RESULT_FILE Result retrieval script.
NEW_WINDOW Flag (Y/N) to open payment system script in a new window.
PARAMS Handler call parameters.
HAVE_PAYMENT Available handler option for processing after order checkout.
HAVE_ACTION Available handler option for instant money transfer.
HAVE_RESULT Available result retrieving script.
HAVE_PREPAY Available handler option for processing order checkout.
PS_LID Payment system site.
PS_CURRENCY Payment system currency.
PS_NAME Payment system name.
PS_ACTIVE Payment system activity.
PS_SORT Payment system sort index.
PS_DESCRIPTION Payment system description.
PT_LID Payer type site.
PT_NAME Payer type name.
PT_SORT Payer type sort index.

In case empty array is passed as arGroupBy parameter, the method returns the number of entries, satisfying the filter.


© «Bitrix24», 2001-2024
Up