shippingBase
$_SESSION['ShippingBase']
you don't show the code for setting the session, but in you say is set using a lower case leading s, but in the calculation you use an upper case leading S. PHP is case sensitive, so if it is set using lower case, the session reference should use lower case also:
$_SESSION['shippingBase']