public function updatevalue(\SilverStripe\Control\HTTPRequest $request)
    {
        if ($request->getVar('Price') && FoxyStripeSetting::current_foxystripe_setting()->CartValidation) {
            $vars = $request->getVars();
            $signedPrice = FoxyCart_Helper::fc_hash_value($this->Code, 'price', $vars['Price'], 'name', false);
            $json = json_encode(['Price' => $signedPrice]);

            $this->response->setBody($json);
            $this->response->addHeader('Content-Type', 'application/json');

            return $this->response;
        }

        return 'false';
    }
public function updatevalue(\SilverStripe\Control\HTTPRequest $request)
    {
        if ($request->getVar('Price') && FoxyStripeSetting::current_foxystripe_setting()->CartValidation) {
            $vars = $request->getVars();
            $signedPrice = FoxyCart_Helper::fc_hash_value($this->Code, 'price', $vars['Price'], 'name', false);
            $json = json_encode(['Price' => $signedPrice]);

            $this->response->setBody($json);
            $this->response->addHeader('Content-Type', 'application/json');

            return $this->response;
        }

        return 'false';
    }
public function updatevalue ( \ SilverStripe \ Control \ HTTPRequest $ request ) { if ( $ request -> getVar ( 'Price' ) && FoxyStripeSetting :: current_foxystripe_setting ( ) -> CartValidation ) { $ vars = $ request -> getVars ( ) ; $ signedPrice = FoxyCart_Helper :: fc_hash_value ( $ this -> Code , 'price' , $ vars [ 'Price' ] , 'name' , false ) ; $ json = json_encode ( [ 'Price' => $ signedPrice ] ) ; $ this -> response -> setBody ( $ json ) ; $ this -> response -> addHeader ( 'Content-Type' , 'application/json' ) ; return $ this -> response ; } return 'false' ; }
create new encrypted price value based on user input.

@param $request

@return string|\SilverStripe\Control\HTTPResponse
create new encrypted price value based on user input .