src/ShopifyApp/Requests/AuthShop.php
public function withValidator(Validator $validator)
    {
        // Determine if the HMAC is correct
        $validator->after(function (Validator $validator) {
            if (!$this->request->has('code')) {
                // No code, continue
                return;
            }

            // Determine if the HMAC is correct
            $shop = ShopifyApp::shop($this->request->get('shop'));
            $authHandler = new AuthShopHandler($shop);

            if (!$authHandler->verifyRequest($this->request->all())) {
                $validator->errors()->add('signature', 'Not a valid signature.');
            }
        });
    }
public function withValidator(Validator $validator)
    {
        // Determine if the HMAC is correct
        $validator->after(function (Validator $validator) {
            if (!$this->request->has('code')) {
                // No code, continue
                return;
            }

            // Determine if the HMAC is correct
            $shop = ShopifyApp::shop($this->request->get('shop'));
            $authHandler = new AuthShopHandler($shop);

            if (!$authHandler->verifyRequest($this->request->all())) {
                $validator->errors()->add('signature', 'Not a valid signature.');
            }
        });
    }
public function withValidator ( Validator $ validator ) { // Determine if the HMAC is correct $ validator -> after ( function ( Validator $ validator ) { if ( ! $ this -> request -> has ( 'code' ) ) { // No code, continue return ; } // Determine if the HMAC is correct $ shop = ShopifyApp :: shop ( $ this -> request -> get ( 'shop' ) ) ; $ authHandler = new AuthShopHandler ( $ shop ) ; if ( ! $ authHandler -> verifyRequest ( $ this -> request -> all ( ) ) ) { $ validator -> errors ( ) -> add ( 'signature' , 'Not a valid signature.' ) ; } } ) ; }
Configure the validator instance.

@param \Illuminate\Validation\Validator $validator

@return void
Configure the validator instance .