protected function printExceptionToCLI(
        OffAmazonPaymentsService_Exception $ex,
        $stepName
    ) {
        print "Error caught executing step " . $stepName . PHP_EOL;
        print "Caught Exception: " . $ex->getMessage() . PHP_EOL;
        print "Response Status Code: " . $ex->getStatusCode() . PHP_EOL;
        print "Error Code: " . $ex->getErrorCode() . PHP_EOL;
        print "Error Type: " . $ex->getErrorType() . PHP_EOL;
        print "Request ID: " . $ex->getRequestId() . PHP_EOL;
        print "XML: " . $ex->getXML() . PHP_EOL;
        print "ResponseHeaderMetadata: " . $ex->getResponseHeaderMetadata() . PHP_EOL;
    }