Jump to content

Possible? Register user and store credit card


robb3369

Recommended Posts

I know WHMCS is a great billing platform for a potential client but they need to have users register in a very specific order...

 

First and last name, email address on page 1 (click continue) and the collect the user's credit card on page 2.

 

I got the register.php setup and working, but after you register, it dumps the user right to clientarea.php... Is there a "redirect" variable that I'm missing? Or is this going to have to be a ClientAdd api call to get the sequence correct...

Link to comment
Share on other sites

For those looking, here is what I used:

 

<?php

if (!defined("WHMCS"))
die("This file cannot be accessed directly");

function hook_gms_new_client($vars) {
update_query("tblclients",array("status"=>"Inactive"),array("id"=>$vars['userid']));
header("Location: " . $systemsslurl . "clientarea.php?action=creditcard&simple=1");
exit;
}

add_hook("ClientAreaRegister",1,"hook_gms_new_client");

?>

 

The update query sets the client to inactive, I'll add another hook to make active AFTER the credit card is added. and the redirect includes "simple=1" so I can hide some of the other links on the credit card page when landing here after registering...

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