Class accounting

Description

Accounting class to perform the majority of accounting functions within ILance.

  • author: ILance
  • version: $Revision: 1.0.0 $

Located in /api/class.accounting.inc.php (line 23)


	
			
Direct descendents
Class Description
accounting_creditcard Class to handle credit card logic
accounting_fees Function to handle accounting fee logic
accounting_p2b Function to handle provider to buyer based accounting logic
accounting_reminders Function to handle accounting reminders
Variable Summary
mixed $currencyid
Method Summary
array check_currency (string $gateway, integer $currencyid, integer $total)
string creditcard_country_pulldown (string $countryid, [string $slng = 'eng'], [string $fieldname = 'form[countryid]'])
string creditcard_month_pulldown ([string $selected = ''], [string $fieldname = 'form[expmon]'])
string creditcard_type_pulldown ([string $selected = ''], [string $fieldname = 'form[type]'])
string creditcard_year_pulldown ([string $selected = ''], [string $fieldname = 'form[expyear]'])
bool insert_bank_account ([array $form = array()], [integer $userid = 0])
bool insert_creditcard ([array $form = array()], [integer $userid = 0])
integer insert_transaction ([integer $subscriptionid = 0], [integer $projectid = 0], [integer $buynowid = 0], [integer $user_id = 0], [integer $p2b_user_id = 0], [integer $storeid = 0], [integer $orderid = 0], [integer $description = ''], string $amount, string $paid, string $status, string $invoicetype, string $paymethod, string $createdate, string $duedate, string $paiddate, string $custommessage, bool $archive, [bool $ispurchaseorder = 0], [bool $returnid = 0], [string $transactionidx = ''], [bool $isdeposit = 0], [bool $iswithdraw = 0], [bool $dontprocesstax = 0])
string print_bank_account_type_pulldown ([string $selected = ''], [string $fieldname = 'form[bank_account_type]'])
string print_destination_currency_pulldown ([string $selected = ''], [string $fieldname = 'form[destination_currency_id]'], [boolean $uppercase = false])
nothing process_credential_payment ([integer $userid = 0], [string $method = 'account'], [integer $answerid = 0], [integer $questionid = 0], [string $answer = ''], [string $contactname = ''], [string $contactnumber = ''], [string $contactnotes = ''])
mixed process_debit_payment ([integer $userid = 0], [integer $invoiceid = 0], [string $invoicetype = 'subscription'], [string $amount = 0], [string $method = 'account'], [string $gateway = ''], [string $gatewaytxn = ''], [boolean $silentmode = false])
bool remove_bank_account ([integer $bankid = 0], [integer $userid = 0])
bool remove_creditcard ([integer $ccid = 0], [integer $userid = 0])
bool update_bank_account ([array $form = array()], [integer $userid = 0])
bool update_creditcard ([array $form = array()], [integer $userid = 0])
bool verify_creditcard_mod10 ([string $strccno = ''])
Variables
mixed $currencyid = 0 (line 25)
  • access: public
Methods
check_currency (line 1524)

Function to verify payment gateway accepted currency and, if necessary convert amount

  • return: Returns currency id and amount in array
array check_currency (string $gateway, integer $currencyid, integer $total)
  • string $gateway: payment gateway
  • integer $currencyid: currency id
  • integer $total: amount
creditcard_country_pulldown (line 1082)

Function to generate a credit card country pulldown menu.

  • return: returns HTML representation of the pulldown selection menu
string creditcard_country_pulldown (string $countryid, [string $slng = 'eng'], [string $fieldname = 'form[countryid]'])
  • string $countryid: selected year (optional)
  • string $slng: short language identifier (default eng)
  • string $fieldname: pulldown menu fieldname (default form[countryid])
creditcard_month_pulldown (line 1005)

Function to generate a credit card month pulldown menu.

  • return: returns HTML representation of the pulldown selection menu
string creditcard_month_pulldown ([string $selected = ''], [string $fieldname = 'form[expmon]'])
  • string $selected: selected month (optional)
  • string $fieldname: select menu field name (default is card[expmon])
creditcard_type_pulldown (line 964)

Function to generate a credit card type pulldown menu.

  • return: returns HTML representation of the pulldown selection menu
string creditcard_type_pulldown ([string $selected = ''], [string $fieldname = 'form[type]'])
  • string $selected: selected card type (optional)
  • string $fieldname: select menu field name (default is card[type])
creditcard_year_pulldown (line 1050)

Function to generate a credit card year pulldown menu.

  • return: returns HTML representation of the pulldown selection menu
string creditcard_year_pulldown ([string $selected = ''], [string $fieldname = 'form[expyear]'])
  • string $selected: selected year (optional)
  • string $fieldname: select menu field name (default is card[expyear])
insert_bank_account (line 1239)

Function to create a new bank account deposit account for a registered member.

  • return: true on success
bool insert_bank_account ([array $form = array()], [integer $userid = 0])
  • array $form: array holding all $form['xx'] field values
  • integer $userid: user id
insert_creditcard (line 1284)

Function to create a new credit card account for a registered member.

  • return: true on success
bool insert_creditcard ([array $form = array()], [integer $userid = 0])
  • array $form: array holding all $form['xx'] field values
  • integer $userid: user id
insert_transaction (line 56)

Function for processing a valid ILance transaction.

  • return: returns the newly generated invoice id (if parameter is set)
integer insert_transaction ([integer $subscriptionid = 0], [integer $projectid = 0], [integer $buynowid = 0], [integer $user_id = 0], [integer $p2b_user_id = 0], [integer $storeid = 0], [integer $orderid = 0], [integer $description = ''], string $amount, string $paid, string $status, string $invoicetype, string $paymethod, string $createdate, string $duedate, string $paiddate, string $custommessage, bool $archive, [bool $ispurchaseorder = 0], [bool $returnid = 0], [string $transactionidx = ''], [bool $isdeposit = 0], [bool $iswithdraw = 0], [bool $dontprocesstax = 0])
  • integer $subscriptionid: subscription id (optional)
  • integer $projectid: project id (optional)
  • integer $buynowid: buy now order id (optional)
  • integer $user_id: user id
  • integer $p2b_user_id: provider to buyer identification (which would be the service provider's id)
  • integer $storeid: store id (optional)
  • integer $orderid: buy now escrow order id (optional)
  • integer $description: transaction description
  • string $amount: transaction amount
  • string $paid: transaction amount paid
  • string $status: transaction status
  • string $invoicetype: transaction type
  • string $paymethod: transaction payment method
  • string $createdate: transaction create date
  • string $duedate: transaction due date
  • string $paiddate: transaction paid date
  • string $custommessage: custom transaction message (optional) may also be used for payment gateway transaction ids
  • bool $archive: archive this invoice (optional)
  • bool $ispurchaseorder: defines if this transaction is a purchase order (default is no)
  • bool $returnid: defines if this function should return the newly created invoice id
  • string $transactionidx: custom transaction id (optional)
  • bool $isdeposit: defines if this transaction is deposit related (default is no)
  • bool $iswithdraw: defines if this transaction is withdraw related (default is no)
  • bool $dontprocesstax: defines if we should force the non-processing of taxes even if we have any
print_bank_account_type_pulldown (line 1168)

Function to print a bank account type pulldown menu

  • return: Returns HTML representation of the bank account pulldown types
string print_bank_account_type_pulldown ([string $selected = ''], [string $fieldname = 'form[bank_account_type]'])
  • string $selected: selected pulldown option (optional)
  • string $fieldname: actual form field name
print_destination_currency_pulldown (line 1119)

Function to print the destination currency pulldown menu

  • return: Returns HTML representation of the destination currency pulldown types
string print_destination_currency_pulldown ([string $selected = ''], [string $fieldname = 'form[destination_currency_id]'], [boolean $uppercase = false])
  • string $selected: selected pulldown option (optional)
  • string $fieldname: actual form field name
  • boolean $uppercase: show currency names in pulldown menu in uppercase? (default false)
process_credential_payment (line 777)

Function for processing a credential verification payment request.

nothing process_credential_payment ([integer $userid = 0], [string $method = 'account'], [integer $answerid = 0], [integer $questionid = 0], [string $answer = ''], [string $contactname = ''], [string $contactnumber = ''], [string $contactnotes = ''])
  • integer $userid: user id
  • string $method: payment method
  • integer $answerid: answer id
  • integer $questionid: question id
  • string $answer: actual value
  • string $contactname: contact name of reference
  • string $contactnumber: contact phone of reference
  • string $contactnotes: contact notes
process_debit_payment (line 224)

Function for processing a regular debit or commission related transaction.

  • return: for ipn processing, boolean is used, others will use a print_notice() function to end user.
mixed process_debit_payment ([integer $userid = 0], [integer $invoiceid = 0], [string $invoicetype = 'subscription'], [string $amount = 0], [string $method = 'account'], [string $gateway = ''], [string $gatewaytxn = ''], [boolean $silentmode = false])
  • integer $userid: user id
  • integer $invoiceid: invoice id
  • string $invoicetype: invoice type (subscription, escrow, debit, commission, p2b)
  • string $amount: amount to process
  • string $method: method of payment (ipn/account/creditcard)
  • string $gateway: name of gateway processing this transaction
  • string $gatewaytxn: gateway transaction id
  • boolean $silentmode: silent mode (return only true or false; default false)
remove_bank_account (line 1454)

Function to remove a bank account account for a registered member.

  • return: true on success
bool remove_bank_account ([integer $bankid = 0], [integer $userid = 0])
  • integer $bankid: bank account id number
  • integer $userid: user id
remove_creditcard (line 1484)

Function to remove a credit card account for a registered member.

  • return: true on success
bool remove_creditcard ([integer $ccid = 0], [integer $userid = 0])
  • integer $ccid: credit card id number
  • integer $userid: user id
update_bank_account (line 1359)

Function to update an existing bank account for a registered member.

  • return: true on success
bool update_bank_account ([array $form = array()], [integer $userid = 0])
  • array $form: array holding all $form['xx'] field values
  • integer $userid: user id
update_creditcard (line 1393)

Function to update an existing credit card account for a registered member.

  • return: true on success
bool update_creditcard ([array $form = array()], [integer $userid = 0])
  • array $form: array holding all $form['xx'] field values
  • integer $userid: user id
verify_creditcard_mod10 (line 1198)

Function to verify mod-10 characteristics of a credit card number.

  • return: true or false valid mod10
bool verify_creditcard_mod10 ([string $strccno = ''])
  • string $strccno: credit card number

Documentation generated on Mon, 08 Aug 2011 17:40:44 +0200 by phpDocumentor 1.4.1