src/Gateways/PaypalPlus/PaypalPlusGateway.php
/**
     * Configure the raw response before the mapping.
     *
     * @param array $response
     * @param array $request
     * @param array $options
     * @param int   $statusCode
     *
     * @return array
     */
Configure the raw response before the mapping.

@return array
Configure the raw response before the mapping . @return array
protected function respond($response, $request, $options, $statusCode)
    {
        if (array_key_exists('webhooks', $response)) {
            $results = [];
            foreach ($response['webhooks'] as $result) {
                $results[] = $this->mapResponse($result, $statusCode);
            }
            return $results;
        }
        if (in_array(Arr::get($response, 'body'), ['VERIFIED', 'INVALID'])) {
            $response = array_merge($request, $response);
        }
        elseif (array_key_exists('continue_url', $options)) {
            $response['continue_url'] = $options['continue_url'];
            $response['is_redirect'] = true;
        }
        return $this->mapResponse($response, $statusCode);
    }
protected function respond ( $ response , $ request , $ options , $ statusCode ) { if ( array_key_exists ( 'webhooks' , $ response ) ) { $ results = [ ] ; foreach ( $ response [ 'webhooks' ] as $ result ) { $ results [ ] = $ this -> mapResponse ( $ result , $ statusCode ) ; } return $ results ; } if ( in_array ( Arr :: get ( $ response , 'body' ) , [ 'VERIFIED' , 'INVALID' ] ) ) { $ response = array_merge ( $ request , $ response ) ; } elseif ( array_key_exists ( 'continue_url' , $ options ) ) { $ response [ 'continue_url' ] = $ options [ 'continue_url' ] ; $ response [ 'is_redirect' ] = true ; } return $ this -> mapResponse ( $ response , $ statusCode ) ; }
Configure the raw response before the mapping.
Configure the raw response before the mapping .
// IPN response // charge request