Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Dec 2005
    Posts
    3

    Default Send to paypal while account is being created

    This being my first post, I would like to thank all of you for helping me demistify the account creation process. You will recognize the scripts I have used. What I would like to do is this;

    The new hosting client fills out a form, after submit they get sent to Paypal immediately. While they are at Paypal paying for their hosting, my account creation script kicks in and does its work. By the time they are finished with paypal, they are brought back to my site and they never had to sit through that wait. Make sense?

    I am trying this with a header redirect at the top, but it still makes me sit through the account creation process, then sends me over to paypal afterwards.

    This is my current code

    PHP Code:
    header ("location: http://www.paypal.com");
    require 
    '/usr/local/cpanel/Cpanel/Accounting.php.inc';
        
    $host "localhost";
        
    $user "WHM Username";
        
    $accesshash =  "WHM Access Key";    

    $usessl "0"
    //this section takes the info from the form, putting it into variables for the below section
    $acctdomain $_POST['domain'];
    $acctuser $_POST['username'];
    $acctpass $_POST['password'];
    $email $_POST['email'];
    $acctplan "HOSTING PLAN GOES HERE";
    $do createacct($host,$user,$accesshash,$usessl,$acctdomain,$acctuser,$acctpass,$acctplan,$email);
    //way to get their contact email associated with their acct
    $objFile fopen("dump/contactemail_"$acctuser .".txt""w+");
    fwrite($objFile$email);
    fclose($objFile);
    $conn_id ftp_connect("nn.nnn.nn.nn");
    $login_result ftp_login($conn_id$acctuser$acctpass);
    $upload ftp_put($conn_id".contactemail""dump/contactemail_"$acctuser .".txt"FTP_BINARY); 
    if (!
    eregi("wwwacct creation finished",$do)){
    echo 
    "There has been a problem with your account creation!<br>Please contact support for help!";
    }
    else
    {
    }
    ?> 
    Suggestions?

  2. #2
    cPanel Partner NOC cPanel Partner NOC Badge AndyReed's Avatar
    Join Date
    May 2004
    Location
    Minneapolis, MN
    Posts
    2,223

    Default

    With my respect, your question has nothing to do with the cPanel. You can try one of these two forums:
    http://www.daniweb.com/techtalkforums/forum31.html
    or
    http://www.phpbuilder.com/
    Andy Reed
    RHCE and CCNA
    ServerTune.com

  3. #3
    Registered User
    Join Date
    Dec 2005
    Posts
    3

    Default

    I can see why it would appear that way lol

    The only reason why I asked is because perhaps some other folks here might have something similiar setup as far as account creation/payment gateway goes. I am trying to build up a hosting and billing system from scratch since I'm not really too pleased with Whoiscart and was hoping for more indepth control features. I will keep tinkering, thanks for the heads up.

  4. #4
    Member dave9000's Avatar
    Join Date
    Apr 2003
    Location
    arkansas
    Posts
    891
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    give modernbill a look at it will fully manage a cpanel server account

    www.modernbill.com
    Dave Browning
    Intersite Technologies
    Greenbrier Ar
    dave@isitetech.com

  5. #5
    Registered User
    Join Date
    Dec 2005
    Posts
    3

    Default

    thanks. yea looked into that one a while ago. I guess I'm somewhat of a control freak when it comes to my site and its functions. If something goes down, I wanna be accountable and I wanna be able to fix it.

    Also, it's a nice bit of php education to get under the belt

    Thanks though!

  6. #6
    Member dave9000's Avatar
    Join Date
    Apr 2003
    Location
    arkansas
    Posts
    891
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    It will be a nice education in php and cpanel to do that, My problem is not the skill part as much as the hours required to implement and debug

    If you got the time go for it, Wish ya good luck
    Dave Browning
    Intersite Technologies
    Greenbrier Ar
    dave@isitetech.com

  7. #7
    Member
    Join Date
    Apr 2003
    Posts
    35

    Default

    I think you would need to fork a background process and then continue redirecting them to PayPal.

    http://www.phpfreaks.com/tutorials/71/0.php

Similar Threads & Tags
Similar threads

  1. New account created
    By daferub in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 08-19-2009, 03:51 PM
  2. Packages created dont show when new account is being created in WHM-Pls help!!
    By net4hosting in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 08-22-2008, 05:24 AM
  3. cpanel account file not created, account invisible in WHM
    By Cristi4n in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 01-04-2007, 09:13 PM
  4. Created Created New Account - Can't logon to new account
    By web3k in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 06-02-2006, 07:22 PM
  5. Account Creation Complete!!! but account not created
    By dwykofka in forum cPanel and WHM Discussions
    Replies: 16
    Last Post: 02-02-2006, 06:55 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube