Class accounting_creditcard

Description

Class to handle credit card logic

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

Located in /api/class.accounting_creditcard.inc.php (line 28)

accounting
   |
   --accounting_creditcard
Method Summary
string creditcard_authentication_refund ([string $input_auth = ''], [integer $v3customer_ccid = ''], [string $v3customer_fname = ''], [string $v3customer_lname = ''], [string $v3customer_address = ''], [string $v3customer_city = ''], [string $v3customer_state = ''], [string $v3customer_zip = ''], [string $v3customer_country = ''])
bool creditcard_authentication_step_one ([integer $userid = 0], [integer $v3customer_ccid = 0], [string $v3customer_fname = ''], [string $v3customer_lname = ''], [string $v3customer_address = ''], [string $v3customer_city = ''], [string $v3customer_state = ''], [string $v3customer_zip = ''], [integer $v3customer_country = ''])
bool creditcard_authentication_step_two ([integer $input_auth = ''], [integer $v3customer_ccid = ''], [string $v3customer_fname = ''], [string $v3customer_lname = ''], [string $v3customer_address = ''], [string $v3customer_city = ''], [string $v3customer_state = ''], [string $v3customer_zip = ''], [integer $v3customer_country = ''])
mixed process_creditcard_deposit ([integer $ccid = 0], [integer $userid = 0], [string $deposit = 0], [string $credit = 0], [array $custom = array()])
Variables

Inherited Variables

Inherited from accounting

accounting::$currencyid
Methods
creditcard_authentication_refund (line 734)

Function for processing a credit card refund for the credit card authentication step process.

  • return: Returns formatted template with success or failure message.
string creditcard_authentication_refund ([string $input_auth = ''], [integer $v3customer_ccid = ''], [string $v3customer_fname = ''], [string $v3customer_lname = ''], [string $v3customer_address = ''], [string $v3customer_city = ''], [string $v3customer_state = ''], [string $v3customer_zip = ''], [string $v3customer_country = ''])
  • string $input_auth: amount to refund
  • integer $v3customer_ccid: credit card id
  • string $v3customer_fname: credit card first name
  • string $v3customer_lname: credit card last name
  • string $v3customer_address: customer address
  • string $v3customer_city: customer city
  • string $v3customer_state: customer state
  • string $v3customer_zip: customer zip code
  • string $v3customer_country: customer country
creditcard_authentication_step_one (line 267)

Function for processing a credit card authentication step 1 through a major creditcard gateway.

This function will connect to the pre-configured payment gateway, send the card details, charge the credit card 2 amounts both under 2.00 each. The user would have to wait for the billing statement to complete this process (or they can view online debits using their merchant web site to learn amounts) which is then handled in the creditcard_authentication_step_two() function.

  • return: returns true or false
bool creditcard_authentication_step_one ([integer $userid = 0], [integer $v3customer_ccid = 0], [string $v3customer_fname = ''], [string $v3customer_lname = ''], [string $v3customer_address = ''], [string $v3customer_city = ''], [string $v3customer_state = ''], [string $v3customer_zip = ''], [integer $v3customer_country = ''])
  • integer $userid: user id
  • integer $v3customer_ccid: credit card id
  • string $v3customer_fname: customer first name
  • string $v3customer_lname: customer last name
  • string $v3customer_address: customer address
  • string $v3customer_city: customer city
  • string $v3customer_state: customer state
  • string $v3customer_zip: customer zip / postal code
  • integer $v3customer_country: customer country code
creditcard_authentication_step_two (line 609)

Function to update a customers credit card in the database as active based on the authentication amounts taken during the authentication process step 1.

  • return: returns true or false
bool creditcard_authentication_step_two ([integer $input_auth = ''], [integer $v3customer_ccid = ''], [string $v3customer_fname = ''], [string $v3customer_lname = ''], [string $v3customer_address = ''], [string $v3customer_city = ''], [string $v3customer_state = ''], [string $v3customer_zip = ''], [integer $v3customer_country = ''])
  • integer $input_auth: authentication amount sum
  • integer $v3customer_ccid: credit card id
  • string $v3customer_fname: customer first name
  • string $v3customer_lname: customer last name
  • string $v3customer_address: customer address
  • string $v3customer_city: customer city
  • string $v3customer_state: customer state
  • string $v3customer_zip: customer zip / postal code
  • integer $v3customer_country: customer country code
process_creditcard_deposit (line 41)

Functions for processing a deposit payment from a credit card payment

  • return: Returns 1 for true, 2 for card not authenticated via account menu or false for gateway transaction error response
mixed process_creditcard_deposit ([integer $ccid = 0], [integer $userid = 0], [string $deposit = 0], [string $credit = 0], [array $custom = array()])
  • integer $ccid: credit card id
  • integer $userid: user id
  • string $deposit: deposit amount to process
  • string $credit: deposit account credit amount
  • array $custom: custom array argument (used for sending credit card details of user's supplied card info)

Inherited Methods

Inherited From accounting

accounting::check_currency()
accounting::creditcard_country_pulldown()
accounting::creditcard_month_pulldown()
accounting::creditcard_type_pulldown()
accounting::creditcard_year_pulldown()
accounting::insert_bank_account()
accounting::insert_creditcard()
accounting::insert_transaction()
accounting::print_bank_account_type_pulldown()
accounting::print_destination_currency_pulldown()
accounting::process_credential_payment()
accounting::process_debit_payment()
accounting::remove_bank_account()
accounting::remove_creditcard()
accounting::update_bank_account()
accounting::update_creditcard()
accounting::verify_creditcard_mod10()

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