com.mikeblanton.paypal.util
Class PayPalUtil

java.lang.Object
  |
  +--com.mikeblanton.paypal.util.PayPalUtil

public class PayPalUtil
extends java.lang.Object

The PayPalUtil class provides helper functions for processing transactions with PayPal.

Version:
$Revision: 1.8 $
Author:
Michael Blanton

Field Summary
static java.lang.String LINE_SEPARATOR
           
 
Constructor Summary
PayPalUtil()
           
 
Method Summary
static org.apache.commons.configuration.PropertiesConfiguration getConfiguration()
          Loads the configuration file if specified.
static PayPalIPNData validateIPNRequestByPost(java.util.Map _parameterMap)
          Validates an IPN by posting to back to PayPal for validation.
static PayPalPDTData validatePDTRequestByPost(java.util.Map _parameterMap, java.lang.String _at)
          Validates an IPN by posting to back to PayPal for validation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LINE_SEPARATOR

public static final java.lang.String LINE_SEPARATOR
Constructor Detail

PayPalUtil

public PayPalUtil()
Method Detail

getConfiguration

public static org.apache.commons.configuration.PropertiesConfiguration getConfiguration()
Loads the configuration file if specified. The environment variable paypaltools.config.file is expected to be the full path to the configuration file.
Returns:
Instance of the Properties file if it exists, null otherwise.

validateIPNRequestByPost

public static PayPalIPNData validateIPNRequestByPost(java.util.Map _parameterMap)
                                              throws org.apache.commons.httpclient.HttpException,
                                                     java.io.IOException,
                                                     PayPalException
Validates an IPN by posting to back to PayPal for validation.
Parameters:
_parameterMap - Map (Name/Value Pairs) of the HTTP Request Parameters.
Returns:
PayPalIPNData instance with the results of the validation.
Throws:
HttpException -  
java.io.IOException -  
PayPalException -  

validatePDTRequestByPost

public static PayPalPDTData validatePDTRequestByPost(java.util.Map _parameterMap,
                                                     java.lang.String _at)
                                              throws org.apache.commons.httpclient.HttpException,
                                                     java.io.IOException,
                                                     PayPalException
Validates an IPN by posting to back to PayPal for validation.
Parameters:
_parameterMap - Map (Name/Value Pairs) of the HTTP Request Parameters.
_at -  
Returns:
PayPalIPNData instance with the results of the validation.
Throws:
HttpException -  
java.io.IOException -  
PayPalException -