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
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
Function for sending any error emails from the process to the administrator.
nothing
error_out
([string $text = ''])
-
string
$text: error message text
void
format_length
([ $length = 0], [ $unit = ''])
void
format_unit
([ $length = 0], [ $unit = ''])
Function for parsing Authorize.Net response
array
parse_return
([string $content = ''])
-
string
$content: xml content data
Function for printing the recurring payment processor custom generated form via POST method.
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
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)
Function for parsing xml response from Authorize.Net gateway
string
substring_between
(string $haystack, string $start, string $end)
-
string
$haystack: haystack
-
string
$start: start tag
-
string
$end: end tag