src/Gateways/ComproPago/ComproPagoGateway.php
/**
     * Respond with an array of responses or a single response.
     *
     * @param array $response
     *
     * @return array|\Shoperti\PayMe\Contracts\ResponseInterface
     */
Respond with an array of responses or a single response.
@param array $response


Respond with an array of responses or a single response . @param array $response
protected function respond($response)
    {
        if (!isset($response[0])) {
            $success = !(array_key_exists('type', $response) && $response['type'] == 'error')
                && !(array_key_exists('status', $response) && $response['status'] == 'error');
            return $this->mapResponse($success, $response);
        }
        $responses = [];
        foreach ($response as $responds) {
            $success = !(array_key_exists('type', $response) && $response['type'] == 'error')
                && !(array_key_exists('status', $response) && $response['status'] == 'error');
            $responses[] = $this->mapResponse($success, $responds);
        }
        return $responses;
    }
protected function respond ( $ response ) { if ( ! isset ( $ response [ 0 ] ) ) { $ success = ! ( array_key_exists ( 'type' , $ response ) && $ response [ 'type' ] == 'error' ) && ! ( array_key_exists ( 'status' , $ response ) && $ response [ 'status' ] == 'error' ) ; return $ this -> mapResponse ( $ success , $ response ) ; } $ responses = [ ] ; foreach ( $ response as $ responds ) { $ success = ! ( array_key_exists ( 'type' , $ response ) && $ response [ 'type' ] == 'error' ) && ! ( array_key_exists ( 'status' , $ response ) && $ response [ 'status' ] == 'error' ) ; $ responses [ ] = $ this -> mapResponse ( $ success , $ responds ) ; } return $ responses ; }
Respond with an array of responses or a single response.
Respond with an array of responses or a single response .