Installing Magento Commerce B2B Modules when Composer doesn't use the correct PHP version

Today while working on a new Magento 2.2.6 Commerce (Enterprise) install, I began the process of installing the Magento B2B Extension Package. Following the instructions, I began the process:

[~/public_html]# composer require magento/extension-b2b

Parse error: syntax error, unexpected '[', expecting ')' in /home/m2test/public_html/vendor/magento/magento-composer-installer/src/MagentoHackathon/Composer/Magento/Plugin.php on line 190

The error indicated a php version issue. Since I use to do all our hosting, I figured I should start there. As it turns out, I have versions 5.2 - 7.2 available at my beck and call ( So, the simple fix was to call the complete path to the binary of the version I wanted to use as well as the complete path to the composer binary as follows:

[~/public_html]# /usr/local/bin/php-70 /usr/local/bin/composer require magento/extension-b2b

Shout out to Florin at StackOverflow for the answer that ultimately lead me to the fix: