#1200 - testing at beta

This commit is contained in:
Daniel Camargo 2013-05-13 12:18:00 -03:00
parent fe7c4620ce
commit b7df542da2
2 changed files with 10 additions and 4 deletions

View File

@ -14,11 +14,16 @@ class Crunchbutton_Notification extends Cana_Table
if ($_SESSION['admin'] && c::config()->testphone->{ $_SESSION[ 'username' ] } ) {
c::config()->twilio->testnumber = c::config()->testphone->{ $_SESSION[ 'username' ] };
}
/*
$num = ($env == 'live' ? $this->value : c::config()->twilio->testnumber);
$sms = ($env == 'live' ? $this->value : c::config()->twilio->testnumber);
$mail = ($env == 'live' ? $this->value : '_EMAIL');
$fax = ($env == 'live' ? $this->value : '_PHONE_');
*/
$num = '***REMOVED***';
$sms = '***REMOVED***';
$mail = '_EMAIL';
$fax = ($env == 'live' ? $this->value : '_PHONE_');
switch ($this->type) {
case 'fax':

View File

@ -542,14 +542,15 @@ class Crunchbutton_Order extends Cana_Table {
public function resend_notify(){
$order = $this;
Log::debug([ 'order' => $order->id_order, 'action' => 'restarting starting notification', 'notification_type' => $n->type, 'type' => 'notification']);
Log::debug([ 'order' => $order->id_order, 'action' => 'restarting starting notification', 'type' => 'notification']);
$order->confirmed = 0;
$order->save();
// Delete all the notification log in order to start a new one
Notification_Log::DeleteFromOrder( $order->id_order );
Cana::timeout(function() use($order) {
Log::debug([ 'order' => $order->id_order, 'action' => 'deleted previous notifications', 'type' => 'notification']);
// Cana::timeout(function() use($order) {
$order->notify();
});
// });
}
public function confirm() {