int
CSaleUserCards::Update(
int ID,
array arFields
);
The method Update modifies the information about a new user credit
card.
Parameters
Parameter | Description |
ID |
The ID of the record to modify. |
arFields |
Associated array containing new parameters of the credit card with the
following keys:
- USER_ID - the user ID;
- SORT - sort weight;
- PAY_SYSTEM_ACTION_ID - the ID of the payment system handler;
- CURRENCY - the currency in which money can be withdrawn;
- CARD_CODE - the CVC2 code;
- CARD_TYPE - the type of the card;
- CARD_NUM - the credit card number;
- CARD_EXP_MONTH - the month of the credit card expiration;
- CARD_EXP_YEAR - the year of the credit card expiration;
- DESCRIPTION - brief description;
- SUM_MIN - minimum amount which can be withdrawn from the card
within a single transaction;
- SUM_MAX - maximum amount which can be withdrawn from the card
within a single transaction;
- SUM_CURRENCY - the currency of the minimum/maximum amounts;
- LAST_STATUS - the status of the last card usage;
- LAST_STATUS_CODE - the ID of the status of the last card usage;
- LAST_STATUS_DESCRIPTION - the description of the status of the
last card usage;
- LAST_STATUS_MESSAGE - the response received from the payment
system;
- LAST_SUM - the last amount withdrawn from the card;
- LAST_CURRENCY - the currency of the last amount withdrawn from
the card;
- ACTIVE - active state flag;
- LAST_DATE - the date when the credit card was last used.
Note
The credit card number must be encrypted using the CSaleUserCards::CryptData
method before adding the record. |
Return Values
The method returns the ID of the modified record on success, or false
otherwise.