Errors when WHMCS Integration is Axtivated

As soon as the plugin is activated, my front-end gives a whote screen with the following errors:

Notice: Trying to get property of non-object in /home/moonwork/public_html/wp-content/plugins/whmcs-wordpress-integration/includes/class-whmcs-wordpress-integration.php on line 1027

Notice: Undefined index: pagename in /home/moonwork/public_html/wp-content/plugins/whmcs-wordpress-integration/includes/class-whmcs-wordpress-integration.php on line 1027

Notice: Undefined index: whmcsportal in /home/moonwork/public_html/wp-content/plugins/whmcs-wordpress-integration/includes/class-whmcs-wordpress-integration.php on line 1039

Notice: Undefined index: whmcsportal in /home/moonwork/public_html/wp-content/plugins/whmcs-wordpress-integration/includes/class-whmcs-wordpress-integration.php on line 1040

Fatal error: Cannot use object of type WP_Error as array in /home/moonwork/public_html/wp-content/plugins/whmcs-wordpress-integration/includes/class-whmcs-wordpress-integration.php on line 675