public class TargetStatesService extends java.lang.Object
|Constructor and Description|
This method is the constructor for this class.
|Modifier and Type||Method and Description|
This method returns the target payment state after FinalizePayment.
This method returns the target payment state after PrimePayment.
This method returns the target payment state after ReservePayment.
This method gets the target payment state in current configuration for specified payment group name, payment rule, and business event phase.
public TargetStatesService(java.lang.String paymentGroupName, java.lang.String ruleName) throws RuleException
paymentGroupName- The current payment group name
ruleName- The payment rule name
InvalidDataException- In case of any invalid data error
RuleException- In case of any rule related error
public java.lang.String getFinalizeTargetState()
public java.lang.String getPrimeTargetState()
public java.lang.String getReserveTargetState()
public static java.lang.String getTargetState(java.lang.String paymentGrpId, java.lang.String paymentRule, int phase) throws RuleException, InternalException
Firstly it gets a PaymentRule object by payment group id and payment rule, then it gets the target payment state by phase.
If phase=1, which means currently it is in PrimePayment phase, then the target payment state after PrimePayment is returned.
If phase=2, which means currently it is in ReservePayment phase, then the target payment state after ReservePayment is returned.
If phase=3, which means currently it is in FinalizePayment phase, then the target payment state after FinalizePayment is returned.
paymentGrpId- The current payment group id
paymentRule- The current payment rule
phase- The current business event phase
RuleException- In case of any payment rule error
InternalException- In case of any internal error