Class authorizenet

Description

Authorize.Net class to perform the majority of functions for handling payment gateway logic

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

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


	
			
Variable Summary
Method Summary
array authorizenet ([array $authnet_post_vars = array()])
nothing build_recurring_subscription_xml ([string $mode = 'create'], [ $data = array()], [ $gateway = ''])
nothing error_out ([string $text = ''])
void format_length ([ $length = 0], [ $unit = ''])
void format_unit ([ $length = 0], [ $unit = ''])
array parse_return ([string $content = ''])
string print_recurring_payment_form ([string $startdate = ''], [integer $subscriptionid = 0], [string $roleid = 0], [integer $amount = 0], [string $totaloccurrences = 9999], [integer $trialamount = 0], [string $trialoccurrences = 0], [integer $units = ''], [string $length = 0], [string $description = ''], [integer $onsubmit = ''], [integer $ismodify = 0], [string $iscancel = 0])
nothing send_response ([string $type = 'curl'], [string $xml = ''], [string $host = ''], [string $path = ''])
string substring_between (string $haystack, string $start, string $end)
Variables
mixed $authnet_post_vars = array() (line 25)
mixed $authnet_response (line 26)
mixed $error_email (line 28)
mixed $send_time (line 29)
mixed $timeout (line 27)
Methods
Constructor authorizenet (line 38)

Function for parsing incoming variables from the payment gateway

array authorizenet ([array $authnet_post_vars = array()])
  • array $authnet_post_vars: posted authnet keys and values
build_recurring_subscription_xml (line 138)

Function to build a valid authorize.net recurring subscription document

nothing build_recurring_subscription_xml ([string $mode = 'create'], [ $data = array()], [ $gateway = ''])
  • string $mode: mode (create, update or cancel) default is create
  • $data
  • $gateway
error_out (line 359)

Function for sending any error emails from the process to the administrator.

nothing error_out ([string $text = ''])
  • string $text: error message text
format_length (line 103)
void format_length ([ $length = 0], [ $unit = ''])
  • $length
  • $unit
format_unit (line 113)
void format_unit ([ $length = 0], [ $unit = ''])
  • $length
  • $unit
parse_return (line 317)

Function for parsing Authorize.Net response

  • return: Returns formatted array based on Authorize.Net response values
array parse_return ([string $content = ''])
  • string $content: xml content data
print_recurring_payment_form (line 69)

Function for printing the recurring payment processor custom generated form via POST method.

  • return: HTML representation of the form (without the ending </form>)
string print_recurring_payment_form ([string $startdate = ''], [integer $subscriptionid = 0], [string $roleid = 0], [integer $amount = 0], [string $totaloccurrences = 9999], [integer $trialamount = 0], [string $trialoccurrences = 0], [integer $units = ''], [string $length = 0], [string $description = ''], [integer $onsubmit = ''], [integer $ismodify = 0], [string $iscancel = 0])
  • string $startdate: subscription start date (default now/today) format: YYYY-MM-DD
  • integer $subscriptionid: subscription id
  • string $roleid: amount to process
  • integer $amount: total occurrences (max 9999) default 9999 (no end date until user cancels themselve)
  • string $totaloccurrences: trial amount to process (default 0)
  • integer $trialamount: trial occurrences (max 99) default 0
  • string $trialoccurrences: unit (format: months or days)
  • integer $units: length (format: can be 1 - 12 or 7 - 365)
  • string $length: transaction description
  • string $description: js onsubmit form code
  • integer $onsubmit: ismodify subscription modify update for authorize.net (default 0 = no)
  • integer $ismodify: iscancel subscription cancellation request (default 0 = no)
  • string $iscancel: custom subscription info
send_response (line 228)

Function for sending a repsonse to the payment gateway for verification of payment authentication and status.

nothing send_response ([string $type = 'curl'], [string $xml = ''], [string $host = ''], [string $path = ''])
  • string $type: gateway php communication mode (default curl) (curl or fsockopen can be used)
  • string $xml: xml payment gateway data to send for a response
  • string $host: host name of the merchant gateway
  • string $path: server path of the script we're posting (optional)
substring_between (line 337)

Function for parsing xml response from Authorize.Net gateway

  • return: Returns string between start and eng tags
string substring_between (string $haystack, string $start, string $end)
  • string $haystack: haystack
  • string $start: start tag
  • string $end: end tag

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