Version 4.6.0
This commit is contained in:
1 parent
f79dcf067a
commit
517a5e1f70
2036 files changed
+110041
-26162
No files matched your search
@@ -37,6 +37,7 @@ class Api
|
||||
*/
|
||||
public function error( $code, $message )
|
||||
{
|
||||
\IPS\Output::i()->pageCaching = FALSE;
|
||||
\IPS\Output::i()->sendOutput( json_encode( array( 'errorCode' => $code, 'errorMessage' => $message ) ), 400, 'application/json' );
|
||||
}
|
||||
|
||||
@@ -180,6 +181,7 @@ class Api
|
||||
|
||||
\IPS\nexus\Customer::load( $key->member )->log( 'lkey', array( 'type' => 'activated', 'key' => $key->key, 'ps_id' => $key->purchase->id ), FALSE );
|
||||
|
||||
\IPS\Output::i()->pageCaching = FALSE;
|
||||
\IPS\Output::i()->sendOutput( json_encode( array( 'response' => 'OKAY', 'usage_id' => $k ) ), 200, 'application/json' );
|
||||
}
|
||||
|
||||
@@ -200,9 +202,9 @@ class Api
|
||||
{
|
||||
case 102:
|
||||
case 103:
|
||||
\IPS\Output::i()->sendOutput( json_encode( array( 'status' => 'INACTIVE' ) ), 200, 'application/json' );
|
||||
\IPS\Output::i()->sendOutput( json_encode( array( 'status' => 'INACTIVE' ) ), 200, 'application/json', \IPS\Output::getCacheHeaders( time(), 360 ) );
|
||||
case 104:
|
||||
\IPS\Output::i()->sendOutput( json_encode( array( 'status' => 'EXPIRED' ) ), 200, 'application/json' );
|
||||
\IPS\Output::i()->sendOutput( json_encode( array( 'status' => 'EXPIRED' ) ), 200, 'application/json', \IPS\Output::getCacheHeaders( time(), 360 ) );
|
||||
|
||||
default:
|
||||
throw $e;
|
||||
@@ -223,7 +225,7 @@ class Api
|
||||
$key->activate_data = $activateData;
|
||||
$key->save();
|
||||
|
||||
\IPS\Output::i()->sendOutput( json_encode( array( 'status' => 'ACTIVE', 'uses' => $key->uses, 'max_uses' => $key->max_uses ) ), 200, 'application/json' );
|
||||
\IPS\Output::i()->sendOutput( json_encode( array( 'status' => 'ACTIVE', 'uses' => $key->uses, 'max_uses' => $key->max_uses ) ), 200, 'application/json', \IPS\Output::getCacheHeaders( time(), 360 ) );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -268,7 +270,7 @@ class Api
|
||||
'customer_email' => \IPS\nexus\Customer::load( $key->member )->email,
|
||||
'uses' => $key->uses,
|
||||
'max_uses' => $key->max_uses
|
||||
) ), 200, 'application/json' );
|
||||
) ), 200, 'application/json', \IPS\Output::getCacheHeaders( time(), 360 ) );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -294,6 +296,7 @@ class Api
|
||||
$key->activate_data = $activateData;
|
||||
$key->save();
|
||||
|
||||
\IPS\Output::i()->pageCaching = FALSE;
|
||||
\IPS\Output::i()->sendOutput( json_encode( array( 'status' => 'OKAY' ) ), 200, 'application/json' );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user