Adempiere 3.5.2a

org.compiere.model
Class PaymentProcessor

java.lang.Object
  extended by org.compiere.model.PaymentProcessor
Direct Known Subclasses:
PP_Authorize, PP_Optimal, PP_PayFlowPro, PP_PayPal

public abstract class PaymentProcessor
extends Object

Payment Processor Abstract Class

Version:
$Id: PaymentProcessor.java,v 1.3 2006/07/30 00:51:02 jjanke Exp $
Author:
Jorg Janke

Field Summary
static char AMP
          Ampersand
static String ENCODING
          Encoding (ISO-8859-1 - UTF-8)
static char EQ
          Equals
protected  CLogger log
          Logger
protected  MPayment p_mp
           
protected  MPaymentProcessor p_mpp
           
 
Constructor Summary
PaymentProcessor()
          Public Constructor
 
Method Summary
protected  String connectPost(String urlString, String parameter)
          Connect via Post
static PaymentProcessor create(MPaymentProcessor mpp, MPayment mp)
          Factory
protected  String createPair(String name, BigDecimal value, int maxLength)
          Check for delimiter fields &= and add length of not encoded
protected  String createPair(String name, int value, int maxLength)
          Check for delimiter fields &= and add length of not encoded
protected  String createPair(String name, String value, int maxLength)
          Check for delimiter fields &= and add length of not encoded
protected  Properties getConnectPostProperties(String urlString, String parameter)
          Get Connect Post Properties
 int getTimeout()
          Get Timeout
 boolean isEncoded()
          Is Encoded
abstract  boolean isProcessedOK()
          Payment is procesed successfully
abstract  boolean processCC()
          Process CreditCard (no date check)
 void setEncoded(boolean doEncode)
          Set Encoded
 void setTimeout(int newTimeout)
          Set Timeout
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected CLogger log
Logger


ENCODING

public static final String ENCODING
Encoding (ISO-8859-1 - UTF-8)

See Also:
Constant Field Values

AMP

public static final char AMP
Ampersand

See Also:
Constant Field Values

EQ

public static final char EQ
Equals

See Also:
Constant Field Values

p_mpp

protected MPaymentProcessor p_mpp

p_mp

protected MPayment p_mp
Constructor Detail

PaymentProcessor

public PaymentProcessor()
Public Constructor

Method Detail

create

public static PaymentProcessor create(MPaymentProcessor mpp,
                                      MPayment mp)
Factory

Parameters:
mpp - payment processor model
mp - payment model
Returns:
initialized PaymentProcessor or null

processCC

public abstract boolean processCC()
                           throws IllegalArgumentException
Process CreditCard (no date check)

Returns:
true if processed successfully
Throws:
IllegalArgumentException

isProcessedOK

public abstract boolean isProcessedOK()
Payment is procesed successfully

Returns:
true if OK

setTimeout

public void setTimeout(int newTimeout)
Set Timeout

Parameters:
newTimeout - timeout

getTimeout

public int getTimeout()
Get Timeout

Returns:
timeout

createPair

protected String createPair(String name,
                            BigDecimal value,
                            int maxLength)
Check for delimiter fields &= and add length of not encoded

Parameters:
name - name
value - value
maxLength - maximum length
Returns:
name[5]=value or name=value

createPair

protected String createPair(String name,
                            int value,
                            int maxLength)
Check for delimiter fields &= and add length of not encoded

Parameters:
name - name
value - value
maxLength - maximum length
Returns:
name[5]=value or name=value

createPair

protected String createPair(String name,
                            String value,
                            int maxLength)
Check for delimiter fields &= and add length of not encoded

Parameters:
name - name
value - value
maxLength - maximum length
Returns:
name[5]=value or name=value

setEncoded

public void setEncoded(boolean doEncode)
Set Encoded

Parameters:
doEncode - true if encode

isEncoded

public boolean isEncoded()
Is Encoded

Returns:
true if encoded

getConnectPostProperties

protected Properties getConnectPostProperties(String urlString,
                                              String parameter)
Get Connect Post Properties

Parameters:
urlString - POST url string
parameter - parameter
Returns:
result as properties

connectPost

protected String connectPost(String urlString,
                             String parameter)
Connect via Post

Parameters:
urlString - url destination (assuming https)
parameter - parameter
Returns:
response or null if failure

Adempiere 3.5.2a

Adempiere® is a registered trademark of ADempiere Business Inc. ©2004-2008 HumanFlash.com All rights reserved.