ccvs_new
string ccvs_new(string session, string invoice)
Creates a new, blank invoice in a session.
Returns:
OK on success; on error, data problem, duplicate invoice, uninitialized, or unknown
Description:
ccvs_new() creates a blank invoice in the session identified by session. invoice
is the name by which this invoice will be called in future operations; if an invoice with this name already exists in this session, duplicate invoice is returned. session
must be a valid session ID as returned by ccvs_init().
The invoice name can be at most eight characters long, consisting only of alphabetic characters, and is not case-sensitive. If invoice
is shorter than eight characters, it will be right-padded with 'X' characters up to eight characters, although you can still refer to it using the shorter name.All invoice names are displayed in uppercase.
Version:
PHP 4 since 4.0.2
Example:
Create a new invoice
echo "Adding an invoice to the session:\n";
if (!ccvs_new($session, 'foo') === 'OK') {
echo "Could not create invoice; reason: " . ccvs_textvalue($session) . "\n";
}
|