Bitrix Site Manager

CSaleUserTransact::Add

int
CSaleUserTransact::Add(
 array arFields
);

The method Add adds a new specified transaction.

Parameters

ParameterDescription
arFields Associated array containing parameters of a new transaction. The array has the following keys:
  • USER_ID - the user ID;
  • AMOUNT - the amount;
  • CURRENCY - the currency of the amount;
  • DEBIT - "Y" places money to an account, "N" withdraws money from an account;
  • DESCRIPTION - the description;
  • ORDER_ID - the order ID (if applicable);
  • EMPLOYEE_ID - the ID of the user who performed the transaction;
  • TRANSACT_DATE - the date of the transaction.

Return Values

The method returns the ID of the added transaction on success, or false otherwise.