Messing around with AutoAuth for whmcs
Client form wasn't getting populated with new values after a save - fixed
This commit is contained in:
parent
1f4c8b755d
commit
dc583a6e41
|
@ -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×tamp=$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;
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue