From: ivan Date: Sun, 15 Nov 2009 00:28:44 +0000 (+0000) Subject: Add fields to documentation: tax, freight, duty, tax_exempt, po_number X-Git-Url: http://git.freeside.biz/gitweb/?p=Business-OnlinePayment.git;a=commitdiff_plain;h=e31db55ebade22756e63dee922c7e4280652707a Add fields to documentation: tax, freight, duty, tax_exempt, po_number --- diff --git a/Changes b/Changes index 0e5ae71..1ea790d 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,9 @@ Revision history for Perl extension Business::OnlinePayment. +3.01 unreleased + - Add fields to documentation: tax, freight, duty, tax_exempt, + po_number. + 3.00 Mon Aug 17 15:55:11 PDT 2009 - It finally happened. - doc: add repo info diff --git a/OnlinePayment.pm b/OnlinePayment.pm index a3a262f..a43b87b 100644 --- a/OnlinePayment.pm +++ b/OnlinePayment.pm @@ -6,7 +6,7 @@ use Carp; require 5.005; -$VERSION = '3.00'; +$VERSION = '3.01_01'; $VERSION = eval $VERSION; # modperlstyle: convert the string into a number # Remember subclasses we have "wrapped" submit() with _pre_submit() @@ -197,6 +197,17 @@ sub build_subs { } } +#helper sub + +sub silly_bool { + my( $self, $value ) = @_; + return 1 if $value =~ /^[yt]/i; + return 0 if $value =~ /^[fn]/i; + #return 1 if $value == 1; + #return 0 if $value == 0; + $value; #die?? +} + 1; __END__ @@ -254,130 +265,156 @@ correct fields in the backend. The currently defined fields are: =over 4 -=item * login +=item login Your login name to use for authentication to the online processor. -=item * password +=item password Your password to use for authentication to the online processor. =back -=head3 GENERAL TRANSACTION FIELDS +=head3 REQUIRED TRANSACTION FIELDS =over 4 -=item * type +=item type Transaction type, supported types are: CC (credit card), ECHECK (electronic check) and LEC (phone bill billing). Deprecated types -are: Visa, MasterCard, American Express, Discover, Check (not all -processors support all these transaction types). +are: Visa, MasterCard, American Express, Discover, Check. Not all +processors support all transaction types. -=item * action +=item action What to do with the transaction (currently available are: Normal Authorization, Authorization Only, Credit, Post Authorization, Recurring Authorization, Modify Recurring Authorization, Cancel Recurring Authorization) -=item * description +=item amount -A description of the transaction (used by some processors to send -information to the client, normally not a required field). +The amount of the transaction. No dollar signs or currency identifiers, +just a whole or floating point number (i.e. 26, 26.1 or 26.13). -=item * amount +=back -The amount of the transaction, most processors don't want dollar signs -and the like, just a floating point number. +=head3 OPTIONAL TRANSACTION FIELDS + +=over 4 + +=item description + +A description of the transaction (used by some processors to send +information to the client, normally not a required field). -=item * invoice_number +=item invoice_number An invoice number, for your use and not normally required, many processors require this field to be a numeric only field. +=item po_number + +Purchase order number (normally not required). + +=item tax + +Tax amount (portion of amount field, not added to it). + +=item freight + +Freight amount (portion of amount field, not added to it). + +=item duty + +Duty amount (portion of amount field, not added to it). + +=item tax_exempt + +Tax exempt flag (i.e. TRUE, FALSE, T, F, YES, NO, Y, N, 1, 0). + =back =head3 CUSTOMER INFO FIELDS =over 4 -=item * customer_id +=item customer_id A customer identifier, again not normally required. -=item * name +=item name The customer's name, your processor may not require this. -=item * first_name +=item first_name -=item * last_name +=item last_name The customer's first and last name as separate fields. -=item * company +=item company The customer's company name, not normally required. -=item * address +=item address The customer's address (your processor may not require this unless you are requiring AVS Verification). -=item * city +=item city The customer's city (your processor may not require this unless you are requiring AVS Verification). -=item * state +=item state The customer's state (your processor may not require this unless you are requiring AVS Verification). -=item * zip +=item zip The customer's zip code (your processor may not require this unless you are requiring AVS Verification). -=item * country +=item country Customer's country. -=item * ship_first_name +=item ship_first_name -=item * ship_last_name +=item ship_last_name -=item * ship_company +=item ship_company -=item * ship_address +=item ship_address -=item * ship_city +=item ship_city -=item * ship_state +=item ship_state -=item * ship_zip +=item ship_zip -=item * ship_country +=item ship_country These shipping address fields may be accepted by your processor. Refer to the description for the corresponding non-ship field for general information on each field. -=item * phone +=item phone Customer's phone number. -=item * fax +=item fax Customer's fax number. -=item * email +=item email Customer's email address. -=item * customer_ip +=item customer_ip IP Address from which the transaction originated. @@ -387,28 +424,28 @@ IP Address from which the transaction originated. =over 4 -=item * card_number +=item card_number Credit card number. -=item * cvv2 +=item cvv2 CVV2 number (also called CVC2 or CID) is a three- or four-digit security code used to reduce credit card fraud. -=item * expiration +=item expiration Credit card expiration. -=item * track1 +=item track1 Track 1 on the magnetic stripe (Card present only) -=item * track2 +=item track2 Track 2 on the magnetic stripe (Card present only) -=item * recurring billing +=item recurring billing Recurring billing flag @@ -418,50 +455,50 @@ Recurring billing flag =over 4 -=item * account_number +=item account_number Bank account number for electronic checks or electronic funds transfer. -=item * routing_code +=item routing_code Bank's routing code for electronic checks or electronic funds transfer. -=item * account_type +=item account_type Account type for electronic checks or electronic funds transfer. Can be (case-insensitive): B, B, B or B. -=item * account_name +=item account_name Account holder's name for electronic checks or electronic funds transfer. -=item * bank_name +=item bank_name Bank's name for electronic checks or electronic funds transfer. -=item * check_type +=item check_type Check type for electronic checks or electronic funds transfer. -=item * customer_org +=item customer_org Customer organization type. -=item * customer_ssn +=item customer_ssn Customer's social security number. Typically only required for electronic checks or electronic funds transfer. -=item * license_num +=item license_num Customer's driver's license number. Typically only required for electronic checks or electronic funds transfer. -=item * license_dob +=item license_dob Customer's date of birth. Typically only required for electronic checks or electronic funds transfer. @@ -472,17 +509,17 @@ checks or electronic funds transfer. =over 4 -=item * interval +=item interval Interval expresses the amount of time between billings: digits, whitespace and units (currently "days" or "months" in either singular or plural form). -=item * start +=item start The date of the first transaction (used for processors which allow delayed start) expressed as YYYY-MM-DD. -=item * periods +=item periods The number of cycles of interval length for which billing should occur (inclusive of 'trial periods' if the processor supports recurring billing