public function addLoyaltyPoints($user_id, $transaction_value, $platform = null, $service = null, $expires_in_days = null, $transaction_id = null, $meta = null, $tag = null, $frozen = false){
        $url = $this->authenticationService->getServerEndPoint() . Endpoints::VERSION . Endpoints::BASE_LOYALTY . Endpoints::LOYALTY_CALCULATE;

        $params = array(
            "customer_id" => $user_id, "transaction" => $transaction_value,
            'transaction_id'=> $transaction_id ? $transaction_id : sha1('loyalty_' . $user_id . '_' . time()),
            'hold' => $frozen ? 1 : 0, 'meta' => $meta, 'tag' => $tag, "expiry" => $expires_in_days,
            "platform" => $platform, "service" => $service
        );

        $result = $this->authenticationService->getTransport()->fetch($url, $params,'PUT', array(), 0);

        return $result['code'] == APIResponse::RESPONSE_SUCCESS;
    }
public function addLoyaltyPoints($user_id, $transaction_value, $platform = null, $service = null, $expires_in_days = null, $transaction_id = null, $meta = null, $tag = null, $frozen = false){
        $url = $this->authenticationService->getServerEndPoint() . Endpoints::VERSION . Endpoints::BASE_LOYALTY . Endpoints::LOYALTY_CALCULATE;

        $params = array(
            "customer_id" => $user_id, "transaction" => $transaction_value,
            'transaction_id'=> $transaction_id ? $transaction_id : sha1('loyalty_' . $user_id . '_' . time()),
            'hold' => $frozen ? 1 : 0, 'meta' => $meta, 'tag' => $tag, "expiry" => $expires_in_days,
            "platform" => $platform, "service" => $service
        );

        $result = $this->authenticationService->getTransport()->fetch($url, $params,'PUT', array(), 0);

        return $result['code'] == APIResponse::RESPONSE_SUCCESS;
    }
public function addLoyaltyPoints ( $ user_id , $ transaction_value , $ platform = null , $ service = null , $ expires_in_days = null , $ transaction_id = null , $ meta = null , $ tag = null , $ frozen = false ) { $ url = $ this -> authenticationService -> getServerEndPoint ( ) . Endpoints :: VERSION . Endpoints :: BASE_LOYALTY . Endpoints :: LOYALTY_CALCULATE ; $ params = array ( "customer_id" => $ user_id , "transaction" => $ transaction_value , 'transaction_id' => $ transaction_id ? $ transaction_id : sha1 ( 'loyalty_' . $ user_id . '_' . time ( ) ) , 'hold' => $ frozen ? 1 : 0 , 'meta' => $ meta , 'tag' => $ tag , "expiry" => $ expires_in_days , "platform" => $ platform , "service" => $ service ) ; $ result = $ this -> authenticationService -> getTransport ( ) -> fetch ( $ url , $ params , 'PUT' , array ( ) , 0 ) ; return $ result [ 'code' ] == APIResponse :: RESPONSE_SUCCESS ; }
Add loyalty points to users wallet
@param $user_id
@param $transaction_value
@param null $platform
@param null $service
@param null $expires_in_days
@param null $transaction_id
@param null $meta
@param null $tag
@param bool $frozen
@return bool
@throws \CodeMojo\Client\Http\InvalidArgumentException
@throws \CodeMojo\OAuth2\Exception
Add loyalty points to users wallet