In CRM/Core/SelectValues.php: - add new payment processor to function &paymentProcessor, around line 597 In CRM/Core/Payment/Config.php: - around line 155: switch ( $config->paymentProcessor ) { - add info for the payment processor. Use the same name as in the previous step. At the very least, you will need to set $config->paymentFile and $config->paymentBillingMode - The paymentFile should start with 'Payment_', indicating that it's in the Payment subdirectory of the relevant CiviCRM modules Decide what fields need to be displayed for the payment processor. Compare to existing fields. In templates/CRM/Admin/Form/Setting/Payment.tpl: - If necessary, if the new payment processor requires fields different from any of the currently available sets, add a div with the id representing the new payment processor. The format is like:
{$form.[field name].label}
{$form.[field name].html}
 
{ts}[field description]{/ts}
[repeat for each field]
In CRM/Admin/Form/Setting/Payment.php: - around line 59, specify what fields should be shown for the payment processor. - Add: showHideByValue('paymentProcessor', processor(s), processor div id, 'block', 'select', false); - this will not work if a showHideByValue() is added after a statement which starts with "return" - Also add the fields added to the template below this line. - showHideByValue ( trigger_field_id trigger_value target_element_id target_element_type field_type invert ) Begin your file in CRM/Core/Payment. The params available to doDirectPayment() are: - qfKey - email-(bltID) - billing_first_name (=first_name) - billing_middle_name (=middle_name) - billing_last_name (=last_name) - location_name-(bltID) = billing_first_name + billing_middle_name + billing_last_name - streeet_address-(bltID) - city-(bltID) - state_province_id-(bltID) (int) - state_province-(bltID) (XX) - postal_code-(bltID) - country_id-(bltID) (int) - country-(bltID) (XX) - credit_card_number - cvv2 - credit_card_exp_date - M - Y - credit_card_type - amount - amount_other - year (credit_card_exp_date => Y) - month (credit_card_exp_date => M) - ip_address - amount_level - currencyID (XXX) - payment_action - invoiceID (hex number. hash?) bltID = Billing Location Type ID. This is not actually seen by the payment class. Also needed is: CRM/Event/Payment/ CRM/Contribute/Payment/ important functions: __construct - should be obvious doDirectPayment - payment method in which CC info is entered on the web page checkConfig - defined as abstract in the parent class, find config errors doTransferCheckout - for redirecting user to a remote site to enter CC info. This must be done in each individual module, not in Core, to allow distinct URL's for the response page. IPN = Instant Payment Notification CiviCRM License: http://www.rosenlaw.com/AFL3.0.htm