Messing around with AutoAuth for whmcs

Client form wasn't getting populated with new values after a save - fixed
This commit is contained in:
drigato 2014-06-17 17:07:33 -04:00
parent 1f4c8b755d
commit dc583a6e41
2 changed files with 5 additions and 3 deletions

View File

@ -42,13 +42,15 @@ class BillingController extends Zend_Controller_Action {
//$result = $this->makeRequest($url, $query_string);
//$invoiceUrl = "https://account.sourcefabric.com/viewinvoice.php?id=".$result["invoiceid"];
$whmcsurl = "https://account.sourcefabric.com/dologin.php";
$autoauthkey = "MabIttEtkac2";
$timestamp = time(); //whmcs timezone?
$client = self::getClientDetails();
$email = $client["email"];
$hash = sha1($email.$timestamp.$autoauthkey);
$goto="viewinvoice.php?id=5108";
//$goto="viewinvoice.php?id=5108";
$goto = "clientarea.php";
$this->_redirect($whmcsurl."?email=$email&timestamp=$timestamp&hash=$hash&goto=$goto");
} else {
@ -85,7 +87,8 @@ class BillingController extends Zend_Controller_Action {
foreach ($postfields AS $k=>$v) $query_string .= "$k=".urlencode($v)."&";
$result = $this->makeRequest($url, $query_string);
Logging::info($result);
$form = new Application_Form_BillingClient();
$this->view->form = $form;
} else {
$this->view->form = $form;
}

View File

@ -8,7 +8,6 @@ class Application_Form_BillingClient extends Zend_Form
/*$this->setDecorators(array(
array('ViewScript', array('viewScript' => 'form/billing-purchase.phtml'))));*/
$client = BillingController::getClientDetails();
Logging::info($client);
$notEmptyValidator = Application_Form_Helper_ValidationTypes::overrideNotEmptyValidator();
$emailValidator = Application_Form_Helper_ValidationTypes::overrideEmailAddressValidator();