Laravel 5 installation error – Parse error: syntax error, unexpected ‘class’ (T_CLASS)

If you get

Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in I:\PP\public\index.php on line 50

error while installing Laravel 5, you are probably running on old PHP version – make sure to upgrade to 5.6.* and higher.

Crafting application...

Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T
_STRING) or variable (T_VARIABLE) or '{' or '$' in I:\PP\artisan on line 31
Script php artisan clear-compiled handling the post-install-cmd event returned w
ith an error

[RuntimeException]
Error Output:

run-script [--dev] [--no-dev] [-l|--list] [script] [args1] ... [argsN]

Application ready! Build something amazing.

Solution
Update to newer version of PHP.

Braintree Paypal – Please try a different payment method

If you got any of these errors
Oops, something went wrong. Please try a different payment method.
Error: This PayPal integration does not support this currency
Hups, něco se pokazilo. Zkuste prosím jiný způsob platby.

or any other localized version of this message, the issue is not with b>Merchand ID, as official documentation might hint.
It’s the issue with plugin itself.

Open this file wp-content/plugins/woocommerce-gateway-paypal-powered-by-braintree/includes/class-wc-gateway-braintree.php
On line 108, you need to comment out the wp_enqueue_script() and replace it with a different ( up-to-date url )

public function enqueue_gateway_assets() {

	if ( $this->is_available() ) {

		// braintree.js library
		wp_enqueue_script( 'braintree-js', 'https://js.braintreegateway.com/v2/braintree.js', array(), WC_Braintree::VERSION, true );

		parent::enqueue_gateway_assets();
	}
}

becomes

public function enqueue_gateway_assets() {

	if ( $this->is_available() ) {

		// braintree.js library
		// wp_enqueue_script( 'braintree-js', 'https://js.braintreegateway.com/v2/braintree.js', array(), WC_Braintree::VERSION, true );
		wp_enqueue_script( 'braintree-js', 'https://js.braintreegateway.com/js/braintree-2.32.1.min.js', array(), WC_Braintree::VERSION, true );
		parent::enqueue_gateway_assets();
	}
}

That’s it, works without adding additional Merchant ID. Simply but, the JS used in official plugin is outdated.

Display errors in PHP file

If you see just a blank page, chances are you have error in your PHP that you can’t see. Using these few lines you’ll be able to see the issue.

Display errors by adding code to PHP file

The easiest way to display errors in PHP file is by adding following 3 lines either at the beginning of file, or before the snippet you think is causing the issue.

ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);

Display errors by updating .htaccess file

Add following lines to .htaccess ( preferably before redirect settings, look for RewriteRule )

php_flag display_startup_errors on
php_flag display_errors on
php_value error_reporting 32767
php_flag html_errors on

32767 equals to E_ALL, see http://php.net/manual/en/errorfunc.constants.php

Also, make sure you have

display_errors = on

in your php.ini ( usually /etc/php5/apache2/php.ini, or C:/windows/php.ini )