Bank Transfer

From WHMCS Documentation

Revision as of 07:19, 18 August 2013 by John (talk | contribs) (Duplication)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Using Mail In Payment as a gateway will give you a text area to enter payment details for the client that will be displayed on the printable invoice. This can be used to enter the bank routing code (sometimes called sortcode) and account numbers and any references required to allocate the payment correctly. As a result the 'forward user to payment gateway' order redirect option will redirect the client to the invoice.

When you receive the payment, you would need to add the transaction manually into WHMCS by using the Add Payment section of the invoice.

Duplication

This module, along with Mail in Payment are open-source meaning it can be easily duplicated if you wish to offer multiple options. Duplicating these modules is a simple process:

  • Create a copy of /modules/gateways/banktransfer.php. The new filename must be all lowercase, alphanumeric characters only and contain no spaces.
  • Open the new file in a text editor such as Notepad and change the following three lines to the name of your new module;
function banktransfer_config() {
"Value" => "Bank Transfer"
function banktransfer_link($params) {

For example:

<?php

# Bank Transfer Payment Gateway Module

function banktransfercopy_config() {

    $configarray = array(
     "FriendlyName" => array(
        "Type" => "System",
        "Value" => "Bank Transfer Copy"
        ),
     "instructions" => array(
        "FriendlyName" => "Bank Transfer Instructions",
        "Type" => "textarea",
        "Rows" => "5",
        "Value" => "Bank Name:\nPayee Name:\nSort Code:\nAccount Number:",
        "Description" => "The instructions you want displaying to customers who choose this payment method - the invoice number will be shown underneath the text entered above",
        ),
    );

	return $configarray;

}

function banktransfercopy_link($params) {
    global $_LANG;

    $code = '<p>'.nl2br($params['instructions']).'<br />'.$_LANG['invoicerefnum'].': '.$params['invoiceid'].'</p>';

    return $code;

}

?>
  • The above code would create a new payment gateway module called Bank Transfer Copy.
  • Finally save the file as banktrasnfercopy.php (the file name must match the function name ie. banktransfercopy) and upload to your /modules/gateways/ directory.

That's all there is to it, your new module will be available for activation under Setup > Payments > Payment Gateways.

Server Modules
cPanel/WHM - DirectAdmin - Plesk - Helm 3 - Helm 4 - Ensim - InterWorx - WebsitePanel - Cloudmin - VePortal
Lxadmin - Virtualmin Pro - XPanel - HyperVM - FluidVM - SolusVM - Cloudmin - WHMSonic - VPS.Net
CentovaCast - SCPanel - MediaCP - GameCP - TCAdmin - Reseller Central - Auto Release - Heart Internet

Registrar Modules
Enom - ResellerClub - Nominet - OpenSRS - ResellOne - OnlineNIC - PlanetDomain - Affordable Domains
TPP Wholesale - TPPInternet - Stargate - Namecheap - NetEarthOne - Bizcn - InternetBS - GMO Internet
12Register - Registercom - DotDNS - WebNIC - Dot.TK - HexoNet - Realtime Register - Registereu
RRPProxy - ResellerCamp - TransIP - Heart Internet - IPMirror - NetRegistry - OVH - VentraIP Wholesale
Email - 101Domain

Fraud Modules
MaxMind - VariLogiX FraudCall - Telesign

Gateway Modules
2CheckOut - AsiaPay - Auth.net Echeck - Authorize.net - Authorize.net CIM - Bank Transfer - BidPay
BluePay - BluePay Echeck - BluePay Remote - Boleto - CamTech - CashU - CC Avenue - ChronoPay
Cyberbit - Direct Debit - EEECurrency - E-Gold - EMatters - E-Path - eProcessingNetwork
eWAY Tokens - F2B - FastHosts - Finansbank - GarantiBank - Gate2Shop - LinkPoint
IMSP - Inpay - InternetSecure - IP.Pay - Kuveytturk - Modulo Moip - Mail In Payment
Merchant Partners - Merchant Warrior - IDEALMollie - Moneris - Moneris Vault
Skrill - SlimPay - My iDEAL - NaviGate - NETbilling - Netregistry Pay - NoChex - NTPNow
Offline Credit Card - Optimal Payments - PagSeguro - Payflow Pro - Pay Junction
Paymate AU and NZ - Payment Express - Paymex - PayPal - PayPal Express Checkout - PayPal Payments Pro
PayPoint.net (SecPay) - Payson - Payza - Planet Authorize - SagePay - ProtX VSP Form - PSIGate
Quantum Gateway - Quantum Vault - SagePay - SagePay Tokens - SecPay - SecurePay - SecurePay AU
Secure Trading - StormPay - TrustCommerce - USA ePay - WorldPay - WorldPay Invisible