int
CSaleRecurring::Add(
array arFields
);
The method Add adds a new subscription renewal with parameters passed
in arFields.
Parameters
Parameter | Description |
arFields |
Associated array containing parameters of the new subscription renewal. The following keys are possible:
- USER_ID - the user ID;
- MODULE - the module whose product is to be renewed;
- PRODUCT_ID - the ID of the product to be renewed;
- PRODUCT_NAME - the name of the product to be renewed;
- PRODUCT_URL - the reference to the product to be renewed;
- RECUR_SCHEME_TYPE - type of the paid subscription validity
period;
- RECUR_SCHEME_LENGTH - length of the paid subscription validity
period;
- WITHOUT_ORDER - flag: without ordering;
- ORDER_ID - the ID of the base renewal order;
- CANCELED - flag: renewal is cancelled;
- DESCRIPTION - the description;
- CALLBACK_FUNC - the callback function used to update the renewal
parameters;
- REMAINING_ATTEMPTS - number of attempts left to accomplish the
renewal;
- SUCCESS_PAYMENT - the renewal was successful;
- CANCELED_REASON - reason of cancellation;
- DATE_CANCELED - the date of cancellation;
- PRIOR_DATE - the date of the last renewal;
- NEXT_DATE - the date of the next renewal.
|
Returned values
The method returns the ID of the added record on success, or false
otherwise.