Documentation

Add

int
CSaleUserTransact::Add(
 array arFields
);

The method Add adds a new specified transaction.

Adding a transaction doesn't affect the user account. To update the account, use CSaleUserAccount::UpdateAccount

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.

Returned values

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

© «Bitrix24», 2001-2024
Up