$Id: INSTALL.txt,v 1.1.2.2 2009/07/21 02:05:55 whoastdev Exp $
Requirements
------------
Drupal 6.x, BluePay account, PHP + CURL enabled

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

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

3. Go to "Administer" -> "site configuration" -> "BluePay Payment Webform"

   From the Post Mode dropdown, you can select to Post in Test or Live mode.  The default is TEST mode, so make sure to change
   the server selection when putting the module into production. 
   
   Enter the BluePay Post URL. Default URL provided.

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

   Enter a valid BluePay API Account ID - NOT your username.

   Enter the corresponding Account Transaction Key AKA Secret Key- NOT your password.

   Make sure that you check the 'Change Login Information' box.

   Save the configuration.  Note that the password will not display (for security reasons),
   but is stored in the database.

4. Create or edit a webform that you would like to have users submit a payment for.

   Under 'Webform Advanced Settings', add the following code for 'Additional Validation', with
   the leading space removed before the <?php line:
   
	<?php
	  require_once(drupal_get_path('module', 'bluepaywebform') . '/bluepaywebform.module');
	  $form_state = bluepaywebform_process("validate", $node, $form_id, $form_state);
	?>

   Then, in the 'Additional Processing' box, add the following code, again removing the leading
   space removed before the <?php line:

	<?php
	  require_once(drupal_get_path('module', 'bluepaywebform') . '/bluepaywebform.module');
	  $form_state = bluepaywebform_process("submit", $node, $form_id, $form_state);
	?>


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

   As the last entry in the Webform, add a hidden field 'Transaction ID'.  Select 'Transaction ID'
   as the BluePay 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.
