Jump to content

ajnavy

Members
  • Content count

    2
  • Joined

  • Last visited

Everything posted by ajnavy

  1. ajnavy

    CCBill Gateway Module

    Below is the install.txt file included with the php code to get an idea of how it works. It is not a module, it is a code that runs from cron jobs in the background to update the mySQL database. Included is a generic mySQL database file for people who don't have a members database but you can change the text code for the fields to work with any members fields. Information on how to install datalink post, approval post, and cron job in 8 detailed easy steps #################################################### ##Name this file "install.txt" ## ##CCBill data extract is compatible with all versions of PHP on all platforms. ## ##The script is limited to licensee ## ##Redistribution of the script is not permitted. ## ##Developed and published by Web Spade Network LLC ## ##Email: sales@wsn123.com ## ##Toll free: 888-539-5527 ## ##Fax: 888-202-7721 ## #################################################### (Included Files) install.txt - detailed installation instructions memberDB.sql - sql member database approvalPost.php - file to approve subscription when customer signs up with CCBill approve.inc - file to modify to connect to database parsing.php - file that parses data from parse.txt file datalink.php - file that passes parse.txt file data to the SQL member database account.inc - file to modify to connect to database and ccbill passToFile.php - file that gets data from CCBill and inserts to parse.txt parse.txt - empty text file that holds CCBill data from passToFile.php (chmod 777) Cron_Job_Command.txt - Basic Cron commands for manual setup CCBill Provided Documentation Folder 1. Create your database to hold member information *Create you mySQL database(**remember your database name, user name, and password for step 2) *insert the "memberDB.sql" file to your database. The table name is "member"(need it for the code) *(the table names are already created and set per CCBill guidelines) 2. Make sure you modify your "approve.inc" and "account.inc" file to connect to your mySQL database and CCBill account (****These are the only 2 files that you need to modify****) 3. Upload your "approvalPost.php" and "approve.inc" to your website and make sure both files are in the same directory.(DO NOT password protected the directory you upload this file to. CCBill is not part of your server and would be denied access) 4. Upload your "datalink.php", "parsing.php", "passToFile.php, and "account.inc" to your website.(You should password protected the directory so someone doesn't access your script accidentally or on purpose) 5. Upload the "parse.txt" file in the same folder as step 4 and make sure to chmod this file to 777 (which is drwxrwxrwx). 6. How to set up your approval post to add members to your database as soon as a customer signs up *Go to http://ccbill.com *In the top-right screen after login click on "premium features" *On the tab, click on "value added features" *Scroll down and click on "Background Post" *Select sub account (typically "0000 - sitename.com) and click "go" *in the empty space under "Approval Post URL" enter the entire address location to the approvalPost.php file where you uploaded it. ex. "http://www.mysite.com/approvalPost.php" 7. How to set up your datalink extract post to add/update members to your database *Go to http://ccbill.com *In the top-right screen after login click on "premium features" *On the tab, click on "value added features" *Scroll down and click on "Data Link Services Suite" *Select Sub Account (usually "0000 - sitename.com") *Click "Add User" *Enter a user name (this is the same user name in your "passToFile.php" file *Enter a password (this is the same password in your "passToFile.php" file *Retype your password *Where valid IPs, enter the IP address of your website (Note:your website ip might not be the ip displayed(if you did a whois)needed especially if you are on a shared server. Your best bet is to ask you host provider(The people who host your website) what IP address to use. *Click "Store User" *You might need to get this function activated by CCBill(call CCBill at 800-510-2859) just to make sure! 8. Setting up a Cron Job for your site in Cpanel *log onto your cpanel ex. "http://mysite.com/cpanel" then enter your username and password *At the bottom of the page under "Advanced", click on the "cron jobs" icon *Click on "standard" *in entry1 enter without the quotations "php -q /home/your server user name/public_html/password protected subDirectory/passToFile.php" *if your file is in the root directory, just remove the "password protected subDirectory/" part or change the subDirectory to whatever your subDirectory is *Select 0 Minutes, Every Other Hour, Every Day, Every Month, Every Week(This will run your passToFile.php code every other hour)CCBill only allows parsing once every other hour so don't set it sooner than that or you will hanve problems!! *Click "Save Crontab" *Go back to your crontab and click on "standard" again *in entry2 enter "php -q /home/your server user name/public_html/password protected subDirectory/datalink.php" *if your file is in the root directory, just remove the "password protected subDirectory/" part or change the subDirectory to whatever your subDirectory is *Select 2 Minutes, Every Other Hour, Every Day, Every Month, Every Week(This will run your datalink.php code every other hour and 2 minutes)After your "passToFile.php" inserts data to your "parse.txt file", setting will get data 2 minutes after every other hour to make sure passToFile.php has had time to update the parse.txt file. *Click "Save Crontab" Congratulations!! You are now getting immediate member information(approvalPost.php) and hourly member update information(passToFile.php to datalink.php) from CCBill. All you have to do is code your website to receive the member login and password info from your database. If you need to set up a cron job manually, included is the "Cron_Job_Commands.txt" file for basic commands.
  2. ajnavy

    CCBill Gateway Module

    CCBill offers absolutely no support for approval postback or datalink. The code posted here is only for the posting of credit card info to their signup page, not signup from them and post back to the site. This code will not update current "members" if they cancel their account or expire which is not a big deal if your only charging 1 time. For those who have rebill customers, you have to have the "datalink" code to update, which ccbill does not provide. There is a link to the approval post and datalink extract code that is universal written in PHP. https://www.wsn123.com/hosting/helpdesk/ind...cement&id=1
×