Function to verify payment gateway accepted currency and, if necessary convert amount
array
check_currency
(string $gateway, integer $currencyid, integer $total)
-
string
$gateway: payment gateway
-
integer
$currencyid: currency id
-
integer
$total: amount
Function to generate a credit card country pulldown 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])
Function to generate a credit card month pulldown 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])
Function to generate a credit card type pulldown 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])
Function to generate a credit card year pulldown 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])
Function to create a new bank account deposit account for a registered member.
bool
insert_bank_account
([array $form = array()], [integer $userid = 0])
-
array
$form: array holding all $form['xx'] field values
-
integer
$userid: user id
Function to create a new credit card account for a registered member.
bool
insert_creditcard
([array $form = array()], [integer $userid = 0])
-
array
$form: array holding all $form['xx'] field values
-
integer
$userid: user id
Function for processing a valid ILance transaction.
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
Function to print a bank account type pulldown menu
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
Function to print the destination currency pulldown menu
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)
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
Function for processing a regular debit or commission related transaction.
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)
Function to remove a bank account account for a registered member.
bool
remove_bank_account
([integer $bankid = 0], [integer $userid = 0])
-
integer
$bankid: bank account id number
-
integer
$userid: user id
Function to remove a credit card account for a registered member.
bool
remove_creditcard
([integer $ccid = 0], [integer $userid = 0])
-
integer
$ccid: credit card id number
-
integer
$userid: user id
Function to update an existing bank account for a registered member.
bool
update_bank_account
([array $form = array()], [integer $userid = 0])
-
array
$form: array holding all $form['xx'] field values
-
integer
$userid: user id
Function to update an existing credit card account for a registered member.
bool
update_creditcard
([array $form = array()], [integer $userid = 0])
-
array
$form: array holding all $form['xx'] field values
-
integer
$userid: user id
Function to verify mod-10 characteristics of a credit card number.
bool
verify_creditcard_mod10
([string $strccno = ''])
-
string
$strccno: credit card number