Requirements
------------
Authorize.net account, PHP + CURL enabled


Security
--------

Note: This module will not work without an SSL certificate.

Any time you are collecting credit card data or other sensitive information,
you should always transfer the sensitive data securely.


Installation
------------
1. Copy the authorizenetwebform directory to the Drupal modules directory for your site

2. Login as an administrator. Enable the module in the "Administer" -> "Modules"

3. Go to "Administer" -> "Configuration" -> "Content" -> "Authorize.net Webform"

   Transaction mode:
   - the Main Authorize.Net account, or
   - Test (Sandbox) account

   Authorize.net Login
   - Enter a valid Authorize.net API Login ID - NOT your username.
   - Enter the corresponding Account Transaction Key - NOT your password.
   - Enter the corresponding Public Client Key. To generate the Client Key, log
     in to the Merchant Interface as an Administrator and navigate to
     Account > Settings > Security Settings > General Security Settings >
     Manage Public Client Key. If the Public Client Key does not yet exist,
     answer your security question to generate the key.


   If you have any additional fields you'd like to pass to Authorize.net, enter
   them into the 'Custom Fields' box. Enter in the format key|description.

   Save the configuration.

4. Create or edit a webform where you would like people to submit a payment.

   For each component added, you may select a Authorize.net field to map to.
   The standard fields are listed for easy mapping. Custom fields must be
   entered into the "Administer" -> "Site Configuration" -> "Authorize.net
   Webform" section.

   Special fields:

   * As the first field in the Webform, you must have a field for transaction
     type. If you do not want your site visitors to see this field make it either
     a hidden, or a value. Transaction type will allow people to choose between a
     one-time transaction, or a subscription.
      - One time transactions are straightforward and need no additional fields.
      - Recurring subscriptions must also specify a 'length' and 'interval'. The
     length and unit elements together define the interval in between payments.
     If specified in terms of days, the interval can be between seven (7) and
     365 days. If specified in terms of months, the interval can be between
     one (1) and twelve (12) months.
      - Interval (1 to 365)
      - unit (days or months)
     With subscriptions, you may also want to include (hidden) fields for
     'subscriptionId', 'customerProfileId', and 'customerPaymentProfileId'.
     These values are returned from Auth.net and may be useful for customers
     or admins in the future.

   * As the last field in the Webform, add a hidden field 'Transaction ID'.
     Select 'Transaction ID' as the Authorize.net key to map to. The transaction
     ID must be mapped, or the module will not work correctly.

   Save the webform.

5. As your webform is submitted, the credit card information will be authorized
   and charged. There will be a slight delay during submission while the
   transaction is processed. The credit card number will not be stored in your
   database, for security purposes. The last 4 digits will be saved, while the
   other digits will be replaced with x's.
