Excel Posted April 4, 2010 Share Posted April 4, 2010 We developed custom code to enable clients to set their payment method preference themselves, without requesting it manually or having an administrator make the change. For example, say a client has been paying using PayPal, but then decides to use a credit card payment gateway. Currently, WHMCS would continue to send out PayPal invoices even with the credit card on file, since the default payment method would still be set to what they originally signed up with. The only way to have the default payment method changed is if an administrator changes the default payment gateway manually in the client's profile. It's not too complicated to code on your own, but since we already developed this, I am wondering if anyone else would be interested to obtain a copy of the modifications. The script also features the following: - Prevents switching of default payment gateway to credit card when a credit card is not stored on billing system - Displays the Unique Package ID on the Product details screen (enables clients to easily refer to them on tickets, etc.) - Clients can set different payment gateway as default for each product/service they have - Notifies customer if they currently have a PayPal Subscription vs. manual PayPal (it only checks if subscription ID is present on WHMCS, not actual PayPal Subscription status) - Displays PayPal Subscription ID if applicable to client If anyone is interested in this script, or have suggestions to improve it, please post here so I can judge interest before releasing it as free or paid contribution. Cheers, Excel 0 Quote Link to comment Share on other sites More sharing options...
EasyWHMCS Posted April 4, 2010 Share Posted April 4, 2010 Possibly interested. 0 Quote Link to comment Share on other sites More sharing options...
HostRW Posted April 5, 2010 Share Posted April 5, 2010 interested too 0 Quote Link to comment Share on other sites More sharing options...
martynh Posted April 6, 2010 Share Posted April 6, 2010 *Possibly interested, screen shots would be great 0 Quote Link to comment Share on other sites More sharing options...
Excel Posted April 7, 2010 Author Share Posted April 7, 2010 (edited) Sure, here are 4 screenshots. Since this forum seems to crop the images, I have linked them to imageshack: The first one shows the "main" page displayed once a client clicks on the "Set Default Payment Method" link from the Client Area > My Details section. It allows the client to select the appropriate package to make the payment method changed. The second screenshot shows a client having a credit card on file with WHMCS. The third screenshot shows a client having a PayPal Subscription on file, as well as what happens when a client tries to switch to the credit card gateway without having a CC on file. The fourth screenshot shows a client having only a manual PayPal payment method, and a drop down list of available gateways to choose from. ----- Due to the interest shown, I want to provide the script for free... but I am considering releasing this script as closed source (i.e. encrypted). The template file, where the bulk of the end-user options are configured, can still be customized easily, and without issue. Users can also pay a nominal fee to get the full source of the code and customize according to their needs. Please let me know your feedback and any suggestions or questions you may have Edited April 7, 2010 by Excel 0 Quote Link to comment Share on other sites More sharing options...
GNS_Harrison Posted April 7, 2010 Share Posted April 7, 2010 sounds good. would like to give this a try 0 Quote Link to comment Share on other sites More sharing options...
martynh Posted April 7, 2010 Share Posted April 7, 2010 I do like what you have done but its never not too much inconvenience for us to change it for a user and its rarely asked for, but id add it for an extra feature. We would not be able to use encrypted script on our installation, its just too risky not knowing what's in the file... Could you possibly PM me letting me know what you are thinking of charging for open source? Not for modifying but more checking before use. Thanks 0 Quote Link to comment Share on other sites More sharing options...
xister Posted April 7, 2010 Share Posted April 7, 2010 I am interessted 0 Quote Link to comment Share on other sites More sharing options...
apignard Posted April 7, 2010 Share Posted April 7, 2010 maybe interrested too since could buy source 0 Quote Link to comment Share on other sites More sharing options...
Excel Posted April 8, 2010 Author Share Posted April 8, 2010 Thanks for everyone's comments, I'll get the package ready and let you know the pricing for full source soon. 0 Quote Link to comment Share on other sites More sharing options...
efisher Posted April 8, 2010 Share Posted April 8, 2010 We look forward to seeing this released. The other day we were just talking about how this is lacking. 0 Quote Link to comment Share on other sites More sharing options...
martynh Posted April 8, 2010 Share Posted April 8, 2010 Great stuff, thank you! 0 Quote Link to comment Share on other sites More sharing options...
jnet Posted April 8, 2010 Share Posted April 8, 2010 + 1 from my side 0 Quote Link to comment Share on other sites More sharing options...
sgrayban Posted April 8, 2010 Share Posted April 8, 2010 Interesting -- I possibly would use it. 0 Quote Link to comment Share on other sites More sharing options...
thernes Posted April 9, 2010 Share Posted April 9, 2010 Interested. Subscribing to thread. 0 Quote Link to comment Share on other sites More sharing options...
Erik H. Posted April 11, 2010 Share Posted April 11, 2010 Very interested! 0 Quote Link to comment Share on other sites More sharing options...
kylevorster Posted April 12, 2010 Share Posted April 12, 2010 Very Interested, Please update when more info is available ? 0 Quote Link to comment Share on other sites More sharing options...
hypertoast Posted April 12, 2010 Share Posted April 12, 2010 +1 from me... 0 Quote Link to comment Share on other sites More sharing options...
Excel Posted April 19, 2010 Author Share Posted April 19, 2010 (edited) Hi Everyone, I'm excited to announce the immediate availability of the script: Set Payment Method v1.1! As mentioned, the free release is encoded with Zend Optimizer (v3.30+ required on your server), but without any license checks or restrictions. It's 100% clean and safe code that we use on our own sites. You also have full editing capabilities on the template file. However, if you would like to purchase the unencoded PHP file, the fee is $25 (one-time), which includes 6 months of free updates. To order, go to https://clients.excellenthost.com/cart.php?a=add&pid=34. We will do the best to process your order within 1-24 hours. To download the free encoded version, click on the attachment below. The README file contains important install instructions and tips for customization, so I have included a copy below: CHANGE LOG ----------- v1.1 - April 18, 2010 - First Public Release [+] automatically identifies default CC gateway, if applicable [+] automatically generates list of payment gateways to select from v1.0 - October 2009 - Initial Internal Release INFORMATION ----------- This WHMCS custom page allows a client to set their preferred payment method, without having the administrator set it manually. This script also ensures that a client has an existing credit card on file when attempting to switch to a CC-type payment gateway (or it will display an informative error message to add one). ENCODED FILE ----------- The main PHP file is encoded with Zend Optimizer if downloaded for free in order to protect intellectual property. No license is required. However, the template is fully editable and customizable, and this is where the bulk of customization can be done. To get an unencoded release for further customization purposes, the fee is currently set at $25, with free updates for six months from date of purchase. A nominal fee applies for unencoded updates thereafter. Please note the unencoded release ONLY entitles you to modify for your own personal customization purposes on your registered domain. You may NOT distribute, resell or repackage the product without the prior written consent of the author. TO ORDER UNENCODED RELEASE: https://clients.excellenthost.com/cart.php?a=add&pid=34 INSTALL INSTRUCTIONS ----------- 1) Unzip archive to your computer 2) Upload (in **BINARY MODE ** if encoded) paymentgateway.php to your WHMCS main directory (e.g. where index.php resides) 3) Upload paymentgateway.tpl to your WHMCS templates directory (usually under /templates/portal/) 4) Edit clientareadetails.tpl (usually under /templates/portal) and add the following near the top, before the HTML code for changing the user's password: ===CODE=== | <span style="background: #FFFF66;" class="bold"><a href="paymentmethod.php?action=select">Set Default Payment Method</a></span> | ========== CUSTOMIZATION INSTRUCTIONS ---------- 1) If you have a SSL certificate and want to make sure it is enforced when displaying this file (as it displays sensitive payment details): a) Edit your header.tpl (under templates/portal) and add the following just after the closing </title> tag: ===CODE=== {php}global $CONFIG;$this->assign('url', (($_SERVER['HTTPS'] == 'on') ? $CONFIG['SystemSSLURL'] : $CONFIG['SystemURL']));{/php} ========== b) (optional) Edit the same header.tpl file and add this at the very beginning, before any HTML code: ===CODE=== {php}if($_SERVER["PHP_SELF"] == '/paymentmethod.php') { if ($_SERVER['SERVER_PORT'] != 443) { header("Location: https://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']); } }{/php} ========== SUPPORT ---------- This product is provided as-is, and we make no claims or warranties as to its fitness for use. We assume no liability for any improper use of the product. We will make updates from time to time to enhance the functionality of the product based on user feedback. Visit the thread at http://forum.whmcs.com/showthread.php?t=28512 for help, suggestions and further updates. Thank you for using this product, we appreciate your support! Hope you enjoy using it as much as I do! Please let me know if you have any suggestions, feature requests or other feedback with respect to this contribution. set_payment_method_v1.1.zip Edited April 19, 2010 by Excel 0 Quote Link to comment Share on other sites More sharing options...
Excel Posted April 19, 2010 Author Share Posted April 19, 2010 Please note: for the credit card gateway to be detected properly (if you have one setup, and want the user to add a credit card to their profile before proceeding to switch to the CC gateway), ensure you have sorted the payment gateways in WHMCS Admin area, otherwise all new gateways default to "0" for the order 0 Quote Link to comment Share on other sites More sharing options...
HerrZ Posted April 19, 2010 Share Posted April 19, 2010 (edited) The only way to have the default payment method changed is if an administrator changes the default payment gateway manually in the client's profile please, i dont know what you mean. EDIT: do you mean Backend->Clients Profile->Products/Services-><service>->Paymentmethod (Select)? Regards Edited April 19, 2010 by HerrZ 0 Quote Link to comment Share on other sites More sharing options...
Excel Posted April 19, 2010 Author Share Posted April 19, 2010 Yes, that is the manual method an admin can change a client's payment method for a service. But this script allows clients to change the default payment method themselves, and get more information about their payment preferences ( eg their PayPal Subscription ID, etc.) 0 Quote Link to comment Share on other sites More sharing options...
Excel Posted June 19, 2010 Author Share Posted June 19, 2010 (edited) Hi All, We have diligently incorporated suggestions we received, and we are now making available a new version of this script: Set Payment Method v1.2 CHANGE LOG ----------- v1.2 - June 19, 2010 - New Features Release [+] ability to set payment method for domain registration products [+] displays package name instead of just ID [+] better multilingual support v1.1 - April 18, 2010 - First Public Release [+] automatically identifies default CC gateway, if applicable [+] automatically generates list of payment gateways to select from v1.0 - October 2009 - Initial Internal Release NOTE: For default Credit Card gateway autodetection to work properly, please make sure to sort payment gateways in WHMCS Admin area to set an order, or else all new gateways default to "0" and the script will not be able to identify the preferred CC gateway. For a limited time, you can obtain the fully commented UNENCODED version for only $19. The coupon code to use during checkout at https://clients.excellenthost.com/cart.php?a=add&pid=34 is "EXCEL19" Remember, by buying the unencoded version, you also obtain at least 6 months of free updates and have more say into making suggestions for future versions of the product. We currently encode the free version of this script using Zend. If you would like an IonCube version, please request it here, and it will be posted as well. All feedback and suggestions are appreciated on this thread. set_payment_method_v1.2.zip Edited June 19, 2010 by Excel 0 Quote Link to comment Share on other sites More sharing options...
bullfrog3459 Posted June 19, 2010 Share Posted June 19, 2010 Hi All, We have diligently incorporated suggestions we received, and we are now making available a new version of this script: Set Payment Method v1.2 CHANGE LOG ----------- v1.2 - June 19, 2010 - New Features Release [+] ability to set payment method for domain registration products [+] displays package name instead of just ID [+] better multilingual support v1.1 - April 18, 2010 - First Public Release [+] automatically identifies default CC gateway, if applicable [+] automatically generates list of payment gateways to select from v1.0 - October 2009 - Initial Internal Release NOTE: For default Credit Card gateway autodetection to work properly, please make sure to sort payment gateways in WHMCS Admin area to set an order, or else all new gateways default to "0" and the script will not be able to identify the preferred CC gateway. For a limited time, you can obtain the fully commented UNENCODED version for only $19. The coupon code to use during checkout at https://clients.excellenthost.com/cart.php?a=add&pid=34 is "EXCEL19" Remember, by buying the unencoded version, you also obtain at least 6 months of free updates and have more say into making suggestions for future versions of the product. We currently encode the free version of this script using Zend. If you would like an IonCube version, please request it here, and it will be posted as well. All feedback and suggestions are appreciated on this thread. +1 for Ioncube, i dont like mixing encryption methods on my installation. Thanks 0 Quote Link to comment Share on other sites More sharing options...
Excel Posted June 20, 2010 Author Share Posted June 20, 2010 Hi, Please find the IonCube version of Set Payment Method v1.2 attached. Make sure to upload using BINARY mode. set_payment_method_v1.2i.zip 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.