From 7f44cb3984b0010885dbdb4daa301599c243053b Mon Sep 17 00:00:00 2001 From: fbriere Date: Fri, 17 Feb 2006 23:32:37 +0000 Subject: [PATCH] Rewrote parts of the manpage --- InternetSecure.pm | 86 +++++++++++++++++++++++++++++++++---------------------- 1 file changed, 52 insertions(+), 34 deletions(-) diff --git a/InternetSecure.pm b/InternetSecure.pm index 34acc97..13e1858 100755 --- a/InternetSecure.pm +++ b/InternetSecure.pm @@ -315,10 +315,10 @@ Business::OnlinePayment::InternetSecure - InternetSecure backend for Business::O $txn->content( action => 'Normal Authorization', - type => 'Visa', - card_number => '0000000000000000', + type => 'Visa', # Optional + card_number => '4111 1111 1111 1111', exp_date => '2004-07', - cvv2 => '000', # Optional + cvv2 => '000', # Optional name => "Fr\x{e9}d\x{e9}ric Bri\x{e8}re", company => '', @@ -330,10 +330,10 @@ Business::OnlinePayment::InternetSecure - InternetSecure backend for Business::O phone => '(555) 555-1212', email => 'fbriere@fbriere.net', - description => 'Online purchase', amount => 49.95, currency => 'CAD', taxes => 'GST PST', + description => 'Test transaction', ); $txn->submit; @@ -346,8 +346,8 @@ Business::OnlinePayment::InternetSecure - InternetSecure backend for Business::O =head1 DESCRIPTION -Business::OnlinePayment::InternetSecure is an implementation of -L that allows for processing online credit card +C is an implementation of +C that allows for processing online credit card payments through InternetSecure. See L for more information about the generic @@ -355,31 +355,27 @@ Business::OnlinePayment interface. =head1 CREATOR -Object creation is done via L; see its manpage for -details. The I processor option is required, and corresponds +Object creation is done via C; see its manpage for +details. The B processor option is required, and corresponds to the merchant ID assigned to you by InternetSecure. =head1 METHODS -(Other methods are also available -- see L for more -details.) - -=head2 Before order submission +=head2 Transaction setup and transmission =over 4 =item content( CONTENT ) -Sets up the data prior to a transaction (overwriting any previous data by the -same occasion). CONTENT is an associative array (hash), containing some of -the following fields: +Sets up the data prior to a transaction. CONTENT is an associative array +(hash), containing some of the following fields: =over 4 =item action (required) What to do with the transaction. Only C is supported -for the moment. +at the moment. =item type @@ -405,9 +401,9 @@ Credit card number. Spaces are allowed, and will be automatically removed. =item exp_date (required) -Credit card expiration date. Since L does not specify +Credit card expiration date. Since C does not specify any syntax, this module is rather lax regarding what it will accept. The -recommended syntax is I, but forms such as I or I are +recommended syntax is C, but forms such as C or C are allowed as well. =item cvv2 @@ -422,7 +418,7 @@ Code (CVC2) or Card Identification number (CID), depending on the card issuer. =item description -A short description of the purchase. See L<"Products list syntax"> for +A short description of the transaction. See L<"Products list syntax"> for an alternate syntax that allows a list of products to be specified. =item amount (usually required) @@ -448,20 +444,38 @@ by concatenating them with spaces, such as C. =item name / company / address / city / state / zip / country / phone / email -Customer information. B should be a two-letter code taken from ISO +Customer information. B should be a two-letter code taken from ISO 3166-1. =back +=item submit() + +Submit the transaction to InternetSecure. + =back -=head2 After order submission +=head2 Post-submission methods =over 4 +=item is_success() + +Returns true if the transaction was submitted successfully. + +=item result_code() + +Response code returned by InternetSecure. + +=item error_message() + +Text description of the response code. (Do not rely on this to check for +errors, as a description will also be returned for successful transactions. +Use B() instead.) + =item receipt_number() -Receipt number of this transaction; this is actually a string, unique to all +Receipt number (a string, actually) of this transaction, unique to all InternetSecure transactions. =item sales_number() @@ -478,6 +492,15 @@ UUIDs. B() is provided as an alias to this method. +=item authorization() + +Authorization code for this transaction. + +=item avs_response() / cvv2_response() + +Results of the AVS and CVV2 checks. See the InternetSecure documentation for +the list of possible values. + =item date() Date and time of the transaction. Format is C. @@ -489,7 +512,7 @@ Total amount billed for this order, including taxes. =item cardholder() Cardholder's name. This is currently a mere copy of the B field passed -to B. +to B(). =item card_type() @@ -508,11 +531,6 @@ following: =back -=item avs_response() / cvv2_response() - -Results of the AVS and CVV2 checks. See the InternetSecure documentation for -the list of possible values. - =item products_raw() ... @@ -525,7 +543,7 @@ the list of possible values. =head2 Products list syntax -Optionally, the B field of B can contain a reference +Optionally, the B field of B() can contain a reference to an array of products, instead of a simple string. Each element of this array represents a different product, and must be a reference to a hash with the following fields: @@ -551,11 +569,11 @@ Description of this product =item taxes Taxes that should be automatically added to this product. If specified, this -overrides the B field passed to B. +overrides the B field passed to B(). =back -When using a products list, the B field passed to B should +When using a products list, the B field passed to B() should be left undefined. @@ -563,12 +581,12 @@ be left undefined. Since communication to/from InternetSecure is encoded with UTF-8, all Unicode characters are theoretically available when submitting information via -B. (Further restrictions may be imposed by InternetSecure itself.) +B(). (Further restrictions may be imposed by InternetSecure itself.) -When using non-ASCII characters, all data provided to B should either +When using non-ASCII characters, all data provided to B() should either be in the current native encoding (typically latin-1, unless it was modified via the C pragma), or be decoded via the C module. -Conversely, all data returned after calling B will be automatically +Conversely, all data returned after calling B() will be automatically decoded. -- 2.11.0