Improve source code to do it resilient.
Improve source code to do it resilient.

  + scrub Bearer token without care of token format
  + Use dig instead safety navigation operator (&.) to improve
    readability
  + Fail early if there is no Bearer token present
  + Use CGI::parse to do it more resilient

Ref waysct/evergiving#6379

waysact/active_merchant,waysact/active_merchant