Class api\controllers\SiteController

Inheritanceapi\controllers\SiteController » yii\rest\Controller

Public Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$enableCsrfValidation api\controllers\SiteController

Property Details

$enableCsrfValidation public property
public $enableCsrfValidation false

Method Details

actionAddtocart() public method

Add to cart api

public array actionAddtocart ( $merchantId, $token, $productId, $quantity, $amount )
$merchantId integer
$token string
$productId integer
$quantity integer
$amount float
return array

Result | status (success or error) | message

actionCartOrder() public method

Cart order api

public array actionCartOrder ( $orderId, $token, $cartId )
$orderId integer
$token string
$cartId integer
return array

Result | status (success or error) | message

actionExchange() public method

public void actionExchange ( $merchantId, $userId )
$merchantId integer
$userId integer
actionGetDoc() public method

Function to show documentaion this will show normal html output inside custom iframe

public void actionGetDoc ( $value )
$value
actionGetError() public method

public void actionGetError ( $value )
$value
actionIndex() public method

public void actionIndex ( )
actionIsEligable() public method

public void actionIsEligable ( )
actionPageview() public method

Action for updating points according to page view on client sites

public void actionPageview ( )
actionUpdateMerchantOffer() public method

Update nerchantoffer api

public array actionUpdateMerchantOffer ( $token, $percentOff, $points )
$token string
$percentOff integer
$points integer
return array

Result | status (success or error) | message

allowedDomains() public static method

public static void allowedDomains ( )
beforeAction() public method

public mixed beforeAction ( $action )
$action
return mixed

$token is required param for every call, in case $token not exist in api call, it will give error message $token must be string $token is get from localStroge of client browser $token will store in client browser when user login at any client site

behaviors() public method

public void behaviors ( )