All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.authorize.util.StringUtils Maven / Gradle / Ivy

Go to download

Authorize.Net SDK includes standard payments, recurring billing, and customer profiles.

There is a newer version: 3.0.0
Show newest version
package net.authorize.util;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

public class StringUtils {

	private static Logger logger = LogManager.getLogger(StringUtils.class);

	public static int parseInt(String intStringValue) {
		int amount = 0;
		
		if ( null != intStringValue && 0 < intStringValue.trim().length())
		try {
			amount = Integer.parseInt(intStringValue.trim());
		} catch (NumberFormatException nfe) {
			LogHelper.warn(logger, "Error parsing to int value: '%s'", intStringValue);
		}
		
		return amount;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy