Jump to content

Direct Deposit payment method?


nitro

Recommended Posts

I'd like to add a new payment method - pretty much a duplicate of Mail In, but I wouldn't mind adding a field for the customer to input their payment ID / receipt.

 

I just tried to duplicate the mailin.php payment script but that is obviously not the way to do it - will I have to write my own script or is there something in existence I can use to do this?

 

Thanks.

Link to comment
Share on other sites

OK, being impatient I'm close to finishing the module myself. I'm a bit confused as to what I should be using in the:

 

function #####_link($params) { 
$code='Code Goes Here...'; 
return $code; 
}

part of the module as I don't actually want the form to post anywhere - well, only to record the details in my form in to the WHMCS db.

 

So far I have this (untested) code:

 

<?php 

# Direct Deposit Method Payment Gateway Module 

$GATEWAYMODULE["directdepositname"]="directdeposit"; 
$GATEWAYMODULE["directdepositvisiblename"]="Direct Deposit"; 
$GATEWAYMODULE["directdeposittype"]="Invoices"; 

function directdeposit_activate() { 
defineGatewayField("directdeposit","textarea","receipttext","Please enter the receipt details for your payment here: ","Receipt Text","","The instructions you want to be displayed to customers who choose this payment method"); 
defineGatewayField("directdeposit","yesno","demomode","","Demo Mode","",""); 
} 

function directdeposit_link($params) { 
$code=' 
<form action="" method="post"> 
<input type="hidden" name="company_name" value="'.$params['companyname'].'"> 
<input type="hidden" name="x_amount" value="'.$params['amount'].'"> 
'.$params['receipttext'].'<textarea name="x_Receipt Details" 
value="" rows="8" cols="30" /> 
<input type="hidden" name="x_First_Name" 
value="'.$params['clientdetails']['firstname'].'"> 
<input type="hidden" name="x_Last_Name" 
value="'.$params['clientdetails']['lastname'].'"> 
<input type="hidden" name="x_Email" 
value="'.$params['clientdetails']['email'].'"> 
<input type="hidden" name="x_Address" 
value="'.$params['clientdetails']['address1'].'"> 
<input type="hidden" name="x_City" 
value="'.$params['clientdetails']['city'].'"> 
<input type="hidden" name="x_State" 
value="'.$params['clientdetails']['state'].'"> 
<input type="hidden" name="x_Zip" 
value="'.$params['clientdetails']['postcode'].'"> 
<input type="hidden" name="x_Country" 
value="'.$params['clientdetails']['country'].'"> 
<input type="hidden" name="x_Phone" 
value="'.$params['clientdetails']['phone'].'"> 
<input type="hidden" name="x_login" value="'.$params['vendornumber'].'"> 
<input type="hidden" name="x_invoice_num" value="'.$params['invoiceid'].'"> 
<input type="hidden" name="fixed" value="Y"> 
<input type="hidden" name="c_tangible" value="Y">'; 
if ($params['demomode']=="on") { $code.='<input type="hidden" name="demo" 
value="Y">'; } 
$code.=' 
<input type="submit" value="'.$params['langpaynow'].'"> 
</form>  
'; 
return $code; 
} 

?>

 

Any input / corrections would be appreciated.

Link to comment
Share on other sites

  • WHMCS CEO

You would need to do something like this:

 

function #####_link($params) { 
$code='Please make cheques payable to xxx and send to WHMCS, PO Box 911, London, W12 6PA'; 
return $code; 
}

 

Matt

Link to comment
Share on other sites

Cool thanks, but what if I wanted to capture a note from them as a part of the transaction - ie. they would have to paste in the bank transaction reference / receipt details for their payment. Would I need to post the form to to a callback script?

 

I would only want to offer this payment method to existing clients - it's actually how most of them pay for hosting and consulting services at the moment. Matching up payments to invoices on the bank statements can get a bit confusing for the bookkeeper when there are multiple payments open.

 

I guess we could just enforce a policy of "your payment will be applied to the oldest open invoice" but that is sure to annoy some customers.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated