public interface PaymentsInterface
extends java.io.Serializable
This interface defines payment processing logic at a middle level (between business logic and payment protocol).
EDP is the business layer for payment. It is responsible to drive payment actions from payment policies.
Modifier and Type | Field and Description |
---|---|
static java.lang.String | COPYRIGHT
The IBM copyright notice field.
|
Modifier and Type | Method and Description |
---|---|
Result | approve(PaymentContext paymentContext, java.lang.String paymentId, java.math.BigDecimal amount)
This method executes an approve transaction against a particular Payment container.
|
Result | approveAndDeposit(PaymentContext paymentContext, java.lang.String paymentId, java.math.BigDecimal amount)
This method executes an approveAndDeposit (sale) transaction against a particular Payment container.
|
Result | checkPaymentInstruction(PaymentContext paymentContext, PaymentInstruction paymentInstruction)
This method initiates a checkPaymentInstruction against the Plugin processing the specified Payment Instruction.
|
void | closePaymentInstruction(PaymentContext paymentContext, java.lang.String paymentInstructionId)
This method will mark the PaymentInstruction as STATE_CLOSED.
|
com.ibm.commerce.payments.plugincontroller.Batch | createBatch(PaymentContext paymentContext, java.lang.String merchConfId, java.util.Collection financialTransactionIds, java.util.Map extendedData)
This method creates batch for the given batch value object.
|
Credit | createDependentCredit(PaymentContext paymentContext, java.lang.String paymentId, java.math.BigDecimal amount)
This method will create a dependent Credit Object associated to the specified PaymentInstruction which is associated to the Payment.
|
Credit | createIndependentCredit(PaymentContext paymentContext, java.lang.String paymentInstructionId, java.math.BigDecimal amount)
PPC will create a Credit Object associated to the specified PaymentInstruction.
|
Payment | createPayment(PaymentContext paymentContext, java.lang.String paymentInstructionId, java.math.BigDecimal amount)
PPC will create a Payment Object associated to the specified PaymentInstruction.
|
PaymentInstruction | createPaymentInstruction(PaymentContext paymentContext, PaymentInstruction paymentInstruction)
This api will create a Payment Instruction and store the information in PPC.
|
Result | credit(PaymentContext paymentContext, java.lang.String creditId, java.math.BigDecimal amount)
This api will initiate a credit transaction against the specified Credit.
|
void | deletePaymentInstruction(PaymentContext paymentContext, java.lang.String paymentInstructionId)
This api will mark the PaymentInstruction and all of its associated Payments/Credits.
|
Result | deposit(PaymentContext paymentContext, java.lang.String paymentId, java.math.BigDecimal amount)
This api executes a deposit transaction against a particular Payment container .
|
Result | editCredit(PaymentContext paymentContext, Credit creditLocal, java.math.BigDecimal processAmount, java.lang.String reasonCode, java.lang.String responseCode, java.lang.String referenceNumber, ExtendedData extendedData)
This api will edit the credit.
|
Result | editPayment(PaymentContext paymentContext, Payment payment, java.math.BigDecimal processAmount, java.lang.String reasonCode, java.lang.String responseCode, java.lang.String referenceNumber, ExtendedData extendedData)
This method is used to update the pending payment and it's pending transaction attribute paymentVO includes status.
|
Result | editPaymentInstruction(PaymentContext paymentContext, PaymentInstruction paymentInstruction)
This api will update the extendedData, amount or any other attribute contained in the value object on the specified PaymentInstruction.
|
java.lang.String | getAuthenticationURL(PaymentContext paymentContext, java.lang.String paymentInstructionId)
This method gets the popup URL or form of punch-out payment.
|
com.ibm.commerce.payments.plugincontroller.Batch | getBatch(PaymentContext paymentContext, java.lang.String batchId)
This method gets the batch from the back end by calling the plugin's getBatch() API.
|
Credit | getCredit(PaymentContext paymentContext, java.lang.String creditId)
This method obtains a specific Credit container value object.
|
java.lang.String | getMessage(PaymentContext paymentContext, java.lang.String paymentSystemName, java.lang.String store, java.lang.String messageKey)
This method obtains a translated message for a specified error key (for example, a reason code).
|
Payment | getPayment(PaymentContext paymentContext, java.lang.String paymentId)
This method obtains a specific Payment container value object.
|
PaymentInstruction | getPaymentInstruction(PaymentContext paymentContext, java.lang.String paymentInstructionId, java.lang.Boolean maskSensitiveData)
This method obtains a specific PaymentInstruction container value object.
|
java.math.BigDecimal | getRemainingValueOnPaymentInstruction(PaymentContext paymentContext, PaymentInstruction paymentInstruction)
This method obtains the available amount in an account.
|
void | initAuthenticationSession(PaymentContext paymentContext, java.lang.String paymentInstructionId)
This method initializes punch-out payment session.
|
java.lang.String | preprocessProviderResponseData(PaymentContext paymentContext, java.lang.String paymentSystemName, java.util.Map callbackParameters)
This method preprocess punch-out payment transaction data from payment service provider side.
|
java.util.Map | processProviderResponse(PaymentContext paymentContext, java.lang.String paymentInstructionId, java.util.Map callbackParameters)
This method gets the result of punch-out payment transaction in payment service provider side.
|
Result | reverseApproval(PaymentContext paymentContext, java.lang.String paymentId, java.math.BigDecimal amount)
This api will initiate a reverseApproval transaction against the specified Payment.
|
Result | reverseCredit(PaymentContext paymentContext, java.lang.String creditId, java.math.BigDecimal amount)
This api will initiate a reverseCredit transaction against the specified Credit.
|
Result | reverseDeposit(PaymentContext paymentContext, java.lang.String paymentId, java.math.BigDecimal amount)
This api will initiate a reverseDeposit transaction against the specified Payment.
|
com.ibm.commerce.payments.plugincontroller.Batch | settleBatch(PaymentContext paymentContext, java.lang.String batchId, boolean forceClose)
This method is used to send batch request to the back end.
|
Result | validatePaymentInstruction(PaymentContext paymentContext, PaymentInstruction paymentInstruction)
This api will initiate a validate transaction against the specified PaymentInstruction.
|
static final java.lang.String COPYRIGHT
Credit getCredit(PaymentContext paymentContext, java.lang.String creditId) throws InputException, BackendException, InternalException, ConfigException, java.rmi.RemoteException
This method obtains a specific Credit container value object.
Related PaymentInstruction is also retrieved. However, other container objects associated with the PaymentInstruction are not retrieved.
PPC will look for the credit using the creditId. PPC will return the credit value object and its associated PaymentInstruction in it. If credit doesn't exist (or it has already been marked for deletion), null will be returned.
If the plug-in supports real-time queries, PPC will delegate the request to the plug-in and once the response is returned, PPC will synchronize the Credit details in the database.
Users of this method: EDP, PPC Admin UI.
java.lang.String getMessage(PaymentContext paymentContext, java.lang.String paymentSystemName, java.lang.String store, java.lang.String messageKey) throws InputException, BackendException, InternalException, ConfigException, java.rmi.RemoteException
This method obtains a translated message for a specified error key (for example, a reason code).
PPC will delegate the getMessage request to the target plug-in.Users of this method: EDP, PPC Admin UI.
Payment getPayment(PaymentContext paymentContext, java.lang.String paymentId) throws InputException, BackendException, InternalException, ConfigException, java.rmi.RemoteException
This method obtains a specific Payment container value object.
Related PaymentInstruction is also retrieved. However, other container objects associated with the PaymentInstruction are not retrieved.
PPC will look for the payment using the paymentId. PPC will return the payment value object and its associated PaymentInstruction in it. If payment doesn't exist (or it has already been marked for deletion), null will be returned.
If the plug-in supports real-time queries, PPC will delegate the request to the plug-in and once the response is returned, PPC will synchronize the Payment details in the database.
Users of this method: EDP, PPC Admin UI.
PaymentInstruction getPaymentInstruction(PaymentContext paymentContext, java.lang.String paymentInstructionId, java.lang.Boolean maskSensitiveData) throws InputException, BackendException, InternalException, ConfigException, java.rmi.RemoteException
This method obtains a specific PaymentInstruction container value object.
Associated data is also retrieved: Payments, Credits, and ExtendedData.
Users of this method: EDP, PPC Admin UI.
java.math.BigDecimal getRemainingValueOnPaymentInstruction(PaymentContext paymentContext, PaymentInstruction paymentInstruction) throws InputException, BackendException, InternalException, ConfigException, java.rmi.RemoteException
This method obtains the available amount in an account.
There are some sorts of payment methods, like stored value cards and credit lines, where there is a tangible limit amount. Payment back-end systems may provide a registry of what still can be charged against a particular account. For example, a credit card with real-time validation of its remaining limit.
EDP may leverage this method in the future. For example, a gift certificate is to be fully consumed before a credit card is used for an order. However, the customer doesn't know how much is available in the gift certificate.
This method only makes to be invoked when the target plug-in supports real-time queries.
Users of this method: none. This feature is not used yet.
Result approve(PaymentContext paymentContext, java.lang.String paymentId, java.math.BigDecimal amount) throws InputException, BackendException, InternalException, ConfigException, java.rmi.RemoteException
This method executes an approve transaction against a particular Payment container.
PPC makes sure that:
The PPC will:
On successful transaction response, PPC will:
On transaction declined response, PPC will:
On PluginTimeOutException, PPC will:
PPC validation PaymentInstruction state validation STATE_VALID is required Payment state validation STATE_NEW PPC will allow the action to take place STATE_APPROVING PPC will allow the action to take place as a retry Payment amount validation requested amount <= Payment.amount if this is a retry transaction, requested amount == Payment.approvingAmount
Users of this method: EDP.
Result approveAndDeposit(PaymentContext paymentContext, java.lang.String paymentId, java.math.BigDecimal amount) throws InputException, BackendException, InternalException, ConfigException, java.rmi.RemoteException
This method executes an approveAndDeposit (sale) transaction against a particular Payment container.
PPC makes sure that:
The PPC will:
On successful transaction response, PPC will:
On transaction declined response, PPC will:
On PluginTimeOutException, PPC will:
PPC validation PaymentInstruction state validation STATE_VALID is required Payment state validation STATE_NEW PPC will allow the action to take place STATE_APPROVING PPC will allow the action to take place as a retry Payment amount validation requested amount <= Payment.amount if this is a retry transaction check for requested amount == Payment.approvingAmount and requested amount == Payment.depositingAmount
Users of this method: EDP.
Result checkPaymentInstruction(PaymentContext paymentContext, PaymentInstruction paymentInstruction) throws InputException, BackendException, InternalException, ConfigException, java.rmi.RemoteException
This method initiates a checkPaymentInstruction against the Plugin processing the specified Payment Instruction. This method is provided to allow EDP to verify the parameters on a PaymentInstruction before creating a PaymentInstruction.
However, this method can be invoked against existing and non-existing Payment Instructions from the PPC perspective. If a Payment Instruction exists, PPC will mark it VALID or INVALID accordingly. If the Payment Instruction doesn't exist yet, PPC will only mark the value object.
Users of this method: EDP.
void closePaymentInstruction(PaymentContext paymentContext, java.lang.String paymentInstructionId) throws InputException, BackendException, InternalException, ConfigException, java.rmi.RemoteException
This method will mark the PaymentInstruction as STATE_CLOSED. PPC allows any pending operation under this PaymentInstruction to finish, but it does not allow any new operations to be created.
Users of this method: EDP.
Credit createDependentCredit(PaymentContext paymentContext, java.lang.String paymentId, java.math.BigDecimal amount) throws InputException, BackendException, InternalException, ConfigException, java.rmi.RemoteException
This method will create a dependent Credit Object associated to the specified PaymentInstruction which is associated to the Payment. This new Credit can later be use to execute Credit Actions against the appropriate Payment Plugin.
PaymentInstruction State validation STATE_NEW PPC will not allow the action to take place InvalidPaymentInstructionException STATE_VALID PPC will allow the action to take place STATE_INVALID PPC will not allow the action to take place InvalidPaymentInstructionException STATE_CLOSED PPC will not allow the action to take place and throw InvalidPaymentInstructionException Payment State validation STATE_NEW PPC will not allow the action to take place InvalidPaymentException STATE_APPROVING PPC will not allow the action to take place InvalidPaymentException STATE_APPROVED PPC will allow the action to take place STATE_EXPIRED PPC will allow the action to take place STATE_CANCELED PPC will not allow the action to take place and throw InvalidPaymentException STATE_FAILED PPC will not allow the action to take place and throw InvalidPaymentException
Users of this method: none. This feature is not used yet.
Credit createIndependentCredit(PaymentContext paymentContext, java.lang.String paymentInstructionId, java.math.BigDecimal amount) throws InputException, BackendException, InternalException, ConfigException, java.rmi.RemoteException
PPC will create a Credit Object associated to the specified PaymentInstruction. This new Credit can later be use to execute Credit Actions against the appropriate Payment Plugin.
PaymentInstruction State validation STATE_NEW PPC will not allow the action to take place InvalidPaymentInstructionException STATE_VALID PPC will allow the action to take place STATE_INVALID PPC will not allow the action to take place InvalidPaymentInstructionException STATE_CLOSED PPC will not allow the action to take place and throw InvalidPaymentInstructionException
Users of this method: EDP.
Payment createPayment(PaymentContext paymentContext, java.lang.String paymentInstructionId, java.math.BigDecimal amount) throws InputException, BackendException, InternalException, ConfigException, java.rmi.RemoteException
PPC will create a Payment Object associated to the specified PaymentInstruction. This new Payment can later be use to execute Payment Actions against the appropriate Payment Plugin. This payment can be use to execute one or more deposit.
PaymentInstruction State validation STATE_NEW PPC will not allow the action to take place InvalidPaymentInstructionException STATE_VALID PPC will allow the action to take place STATE_INVALID PPC will not allow the action to take place InvalidPaymentInstructionException STATE_CLOSED PPC will not allow the action to take place and throw InvalidPaymentInstructionException
Users of this method: EDP.
PaymentInstruction createPaymentInstruction(PaymentContext paymentContext, PaymentInstruction paymentInstruction) throws InputException, BackendException, InternalException, ConfigException, java.rmi.RemoteException
This api will create a Payment Instruction and store the information in PPC. PPC will call the checkPaymentInstruction() method on the specified plugin by the paymentSystemName field. The plugin will validate the information received on the PaymentInstruction and will inform PPC if the PaymentInstruction data is good or bad.
Users of this method: EDP.
storeId represent the store to which the paymentInstruction belongs. paymentSystemName represents the payment system that will process the request and any subsequent request extendedData contains most of the payment method information. The supported types are Integer, Long, BigDecimal, String, Binary (StringBuffer), Boolean. amount the maximum amount that this Payment Instruction will be good for. PPC will allow Payments to be created up to this amount. currency currency use for the amount and all amount on any payment action.
Result credit(PaymentContext paymentContext, java.lang.String creditId, java.math.BigDecimal amount) throws InputException, BackendException, InternalException, ConfigException, java.rmi.RemoteException
This api will initiate a credit transaction against the specified Credit. It will find the plugin that was associated to this paymentInstruction and execute the credit API against that plugin. The Credit objects in PPC will be changed into the STATE_CREDITING state. The state will be change to STATE_CREDITED on a successful response from the plugin. PPC will check that the requested credit amount will be within the amount in the Payment or PaymentInstruction. PPC will validate the Objects and the requested amount, set the PaymentInstruction.creditingAmount and Payment.creditingAmount(dependent credit) equal to the requested amount. On a PluginTimeOut exception, the Payment or PaymentInstruction will stay with its crediting amount. And the payment Transaction will stay in STATE_PENDING state with a reason Code of PPC_CREDIT_TIMEOUT. On successful response from the plugin, PPC will update the PaymentInstruction.creditedAmount or Payment.creditedAmount (dependent credit) to include the requested amount. Payment.creditingAmount or PaymentInstruction.creditingAmount will be decreased by the requested amount.
PPC Object validation Independent credit validation PaymentInstruction state validation STATE_NEW PPC will not allow the action to take place InvalidPaymentInstructionException STATE_VALID PPC will allow the action to take place STATE_INVALID PPC will not allow the action to take place and throw InvalidPaymentInstructionException STATE_CLOSED PPC will not allow the action to take place and throw InvalidPaymentInstructionException amount validation amount <= PaymentInstruction.amount - PaymentInstruction.creditingAmount - PaymentInstruction.creditedAmount if this is a retry credit transaction amount <= PaymentInstruction.creditingAmount Credit state validation STATE_NEW PPC will allow the action to take place STATE_CREDITING PPC will allow the action to take place, this is a retry credit transaction STATE_CREDITED PPC will not allow the action to take place and throw InvalidCreditException STATE_FAILED PPC will not allow the action to take place and throw InvalidCreditException STATE_CANCELED PPC will not allow the action to take place and throw InvalidCreditException amount validation amount <= Credit.expectedAmount if this is a retry credit transactiion amount == Credit.creditingAmount dependent credit validation PaymentInstruction state validation STATE_NEW PPC will not allow the action to take place InvalidPaymentInstructionException STATE_VALID PPC will allow the action to take place STATE_INVALID PPC will not allow the action to take place and throw InvalidPaymentInstructionException STATE_CLOSED PPC will not allow the action to take place and throw InvalidPaymentInstructionException amount validation amount <= PaymentInstruction.depositedAmount - PaymentInstruction.reversingDepositedAmount - PaymentInstruction.creditingAmount - PaymentInstruction.creditedAmount if this is a retry credit transaction amount <= PaymentInstruction.creditingAmount Payment dependant credit validation state validation STATE_NEW PPC will not allow the action to take place and throw InvalidPaymentException. STATE_APPROVING PPC will not allow the action to take place and throw InvalidPaymentException. STATE_APPROVED PPC will allow the action to take place. STATE_FAILED PPC will not allow the action to take place and throw InvalidPaymentException. STATE_EXPIRED PPC will allow the action to take place. STATE_CANCELED PPC will not allow the action to take place and throw InvalidPaymentException. amount validation amount <= Payment.depositedAmount - Payment.reversingDepositedAmount - Payment.creditingAmount - Payment.creditedAmount if this is a retry credit transaction amount <= Payment.creditingAmount Credit state validation STATE_NEW PPC will allow the action to take place STATE_CREDITING PPC will allow the action to take place, this is a retry credit transaction STATE_CREDITED PPC will not allow the action to take place and throw InvalidCreditException STATE_FAILED PPC will not allow the action to take place and throw InvalidCreditException STATE_CANCELED PPC will not allow the action to take place and throw InvalidCreditException amount validation amount <= Credit.expectedAmount if this is a retry credit transactiion amount == Credit.creditingAmount
Users of this method: EDP.
void deletePaymentInstruction(PaymentContext paymentContext, java.lang.String paymentInstructionId) throws InputException, BackendException, InternalException, ConfigException, java.rmi.RemoteException
This api will mark the PaymentInstruction and all of its associated Payments/Credits. The Payment Instruction will not be deleted from the database. It will be mark as deleted. PPC will check that no one tries to use this PI on any operation since it has been deleted. PPC will mark the PaymentInstruction as delete once the pending transaction associated to the PaymentInstruction has been completed. PPC will check that the PaymentInstruction has been marked STATE_CLOSED before executing the deletion.
Users of this method: none. This feature is not used yet.
Result deposit(PaymentContext paymentContext, java.lang.String paymentId, java.math.BigDecimal amount) throws InputException, BackendException, InternalException, ConfigException, java.rmi.RemoteException
This api executes a deposit transaction against a particular Payment container .
PPC makes sure that:
The PPC will:
On successful transaction response, PPC will:
On transaction declined response, PPC will:
On PluginTimeOutException, PPC will:
PPC validation PaymentInstruction state validation STATE_VALID is required Payment state validation STATE_APPROVED PPC will allow the action to take place Payment amount validation requested amount <= Payment.approvedAmount - Payment.depositedAmount if this is a retry transaction, check for requested amount == Payment.depositingAmount
Users of this method: EDP.
Result editCredit(PaymentContext paymentContext, Credit creditLocal, java.math.BigDecimal processAmount, java.lang.String reasonCode, java.lang.String responseCode, java.lang.String referenceNumber, ExtendedData extendedData) throws InputException, BackendException, InternalException, ConfigException, java.rmi.RemoteException
This api will edit the credit.
Result editPayment(PaymentContext paymentContext, Payment payment, java.math.BigDecimal processAmount, java.lang.String reasonCode, java.lang.String responseCode, java.lang.String referenceNumber, ExtendedData extendedData) throws InputException, BackendException, InternalException, ConfigException, java.rmi.RemoteException
This method is used to update the pending payment and it's pending transaction attribute paymentVO includes status. This is a flag to decide whether fix pending payment or make it fail or keep this payment at current status.
processAmount reasonCode responseCode referenceNumber extendedData is use to update the pending transaction
Users of this method: PPC Admin UI.
Result editPaymentInstruction(PaymentContext paymentContext, PaymentInstruction paymentInstruction) throws InputException, BackendException, InternalException, ConfigException, java.rmi.RemoteException
This api will update the extendedData, amount or any other attribute contained in the value object on the specified PaymentInstruction. PPC will call the plugins checkPaymentInstruction method to validate the extendedData if any changes are detected on it. PPC will analyze the value object and determine which fields from the paymentInstruction value object needs to be updated for the specified PaymentInstruction.
PPC Object validation PaymentInstruction state validation STATE_NEW PPC will allow the action to take place STATE_VALID PPC will allow the action to take place STATE_INVALID PPC will allow the action to take place STATE_CLOSED PPC will not allow the action to happen and throw InvalidPaymentInstructionException
Users of this method: EDP, PPC Admin UI.
Required parameters on PaymentInstruction value object during editPaymentInstruction id unique identifier for the paymentInstruction within PPC Optional parameters on PaymentInstruction value object during editPaymentInstruction amount in case that the amount used on this PaymentInstruction needs to be updated. currency in case that the currency has to be changed. PPC will allow this change as long as no Payment/Credit object is created for this PaymentInstruction extendedData if any information related to the specified Payment Instruction has changed. PPC will not allow this information to be updated if there is a payment that has been approved using this information.
Result reverseApproval(PaymentContext paymentContext, java.lang.String paymentId, java.math.BigDecimal amount) throws InputException, BackendException, InternalException, ConfigException, java.rmi.RemoteException
This api will initiate a reverseApproval transaction against the specified Payment. It will find the plugin that was associated to this payment and execute the reverseApproval API against that plugin. The ReverseApproval transaction object created within PPC will be initially created in the STATE_PENDING state. The state will be change to STATE_SUCCESS on a successful response from the plugin. PPC will check that the requested reverse amount will be within the approvedAmount in the specified Payment. PPC will validate the Objects and requested amount and set the Payment.reversingApprovalAmount and PaymentInstruction.reversingApprovalAmount to include the requested amount . On a PluginTimeOutException the Payment and PaymentInstruction will stay with its reversingAmount. The payment Transaction will stay in STATE_PENDING state with a reason Code of PPC_REVERSE_APPROVAL_TIMEOUT. On successful response from the plugin PPC will update the Payment.approvedAmount and PaymentInstruction.approvedAmount, it will decrease them by the requestedAmount . PPC will decrease the Payment.reversingApprovalAmount or PaymentInstruction.reversingApprovalAmount by the requested amount.
PPC Object validation PaymentInstruction state validation STATE_NEW PPC will not allow the action to take place InvalidPaymentInstructionException STATE_VALID PPC will allow the action to take place STATE_INVALID PPC will not allow the action to take place and throw InvalidPaymentInstructionException STATE_CLOSED PPC will not allow the action to take place and throw InvalidPaymentInstructionException amount validation amount <= PaymentInstruction.approvedAmount - PaymentInstruction.reversingApprovedAmount if this is a retry reverse approval transaction amount <= PaymentInstruction.reversingApprovedAmount Payment state validation STATE_NEW PPC will not allow the action to take place and throw InvalidPaymentException. STATE_APPROVING PPC will not allow the action to take place and throw InvalidPaymentException. STATE_APPROVED PPC will allow the action to take place. STATE_FAILED PPC will not allow the action to take place and throw InvalidPaymentException. STATE_EXPIRED PPC will not allow the action to take place and throw InvalidPaymentException. STATE_CANCELED PPC will not allow the action to take place and throw InvalidPaymentException. amount validation Payment.depositingAmount == 0 && Payment.DepositedAmount == 0 && amount <= Payment.approvedAmount if this is a retry reverse approval transaction amount == Payment.reversingApprovedAmount
Users of this method: EDP.
Result reverseCredit(PaymentContext paymentContext, java.lang.String creditId, java.math.BigDecimal amount) throws InputException, BackendException, InternalException, ConfigException, java.rmi.RemoteException
This api will initiate a reverseCredit transaction against the specified Credit. It will find the plugin that was associated to this credit and execute the reverseCredit API against that plugin. The ReverseCredit transaction created within PPC will be initially created in the STATE_PENDING state. The state will be change to STATE_SUCCESS on a successful response from the plugin. PPC will check that the requested reverse amount will be within the creditedAmount in the Paymentinstruction or Payment objects. PPC will validate the Objects and requested amount and set the PaymentInstruction.reversingCreditAmount include the requested amount . On a PluginTimeOutException, the PaymentInstruction will stay with its reversingCreditAmount, the payment Transaction will stay in STATE_PENDING with a reason Code of PPC_REVERSE_CREDIT_TIMEOUT. On successful response from the plugin PPC will update the PaymentInstruction.creditedAmount, decreasing it by the requestedAmount.
PPC Object validation Independent credit validation PaymentInstruction state validation STATE_NEW PPC will not allow the action to take place InvalidPaymentInstructionException STATE_VALID PPC will allow the action to take place STATE_INVALID PPC will not allow the action to take place and throw InvalidPaymentInstructionException STATE_CLOSED PPC will not allow the action to take place and throw InvalidPaymentInstructionException amount validation amount <= PaymentInstruction.creditedAmount - PaymentInstruction.reversingCreditedAmount if this is a retry reverse credit transaction amount <= PaymentInstruction.reversingCreditedAmount Credit state validation STATE_NEW PPC will not allow the action to take place and throw InvalidCreditException STATE_CREDITING PPC will allow the action to take place, this is a retry credit transaction STATE_CREDITED PPC will allow the action to take place STATE_FAILED PPC will not allow the action to take place and throw InvalidCreditException STATE_CANCELED PPC will not allow the action to take place and throw InvalidCreditException amount validation amount <= Credit.creditedAmount if this is a retry credit transactiion amount == Credit.reversingCreditedAmount dependent credit validation PaymentInstruction state validation STATE_NEW PPC will not allow the action to take place InvalidPaymentInstructionException STATE_VALID PPC will allow the action to take place STATE_INVALID PPC will not allow the action to take place and throw InvalidPaymentInstructionException STATE_CLOSED PPC will not allow the action to take place and throw InvalidPaymentInstructionException amount validation amount <= PaymentInstruction.creditedAmount - PaymentInstruction.reversingCreditedAmount if this is a retry reverse credit transaction amount <= PaymentInstruction.reversingCreditedAmount Payment dependant credit validation state validation STATE_NEW PPC will not allow the action to take place and throw InvalidPaymentException. STATE_APPROVING PPC will not allow the action to take place and throw InvalidPaymentException. STATE_APPROVED PPC will allow the action to take place. STATE_FAILED PPC will not allow the action to take place and throw InvalidPaymentException. STATE_EXPIRED PPC will allow the action to take place. STATE_CANCELED PPC will not allow the action to take place and throw InvalidPaymentException. amount validation amount <= Payment.creditedAmount - Payment.reversingCreditedAmount if this is a retry credit transaction amount <= Payment.reversingCreditedAmount Credit state validation STATE_NEW PPC will not allow the action to take place and throw InvalidCreditException STATE_CREDITING PPC will allow the action to take place, this is a retry credit transaction STATE_CREDITED PPC will allow the action to take place STATE_FAILED PPC will not allow the action to take place and throw InvalidCreditException STATE_CANCELED PPC will not allow the action to take place and throw InvalidCreditException amount validation amount <= Credit.creditedAmount if this is a retry credit transactiion amount == Credit.reversingCreditedAmount
Users of this method: EDP.
Result reverseDeposit(PaymentContext paymentContext, java.lang.String paymentId, java.math.BigDecimal amount) throws InputException, BackendException, InternalException, ConfigException, java.rmi.RemoteException
This api will initiate a reverseDeposit transaction against the specified Payment. It will find the plugin that was associated to this payment and execute the reverseDeposit API against that plugin. The ReverseDeposit financial transaction created within PPC will be initially created in the STATE_PENDING state. The state will be change to STATE_SUCCESS on a successful response from the plugin. PPC will check that the requested reverse amount will be within the depositedAmount in the Payment. PPC will validate the Objects and requested amount and set the Payment.reversingDepositedAmount include the requested amount . On a PluginTimeOutException the Payment will stay with its reversingDepositedAmount, the reverseApproval transaction will stay in STATE_PENDING state with a reason Code of PPC_REVERSE_DEPOSIT_TIMEOUT. On successful response from the plugin, PPC will update the Payment.depositedAmount, decreasing it by the requestedAmount.
PPC Object validation PaymentInstruction state validation STATE_NEW PPC will not allow the action to take place InvalidPaymentInstructionException STATE_VALID PPC will allow the action to take place STATE_INVALID PPC will not allow the action to take place and throw InvalidPaymentInstructionException STATE_CLOSED PPC will not allow the action to take place and throw InvalidPaymentInstructionException amount validation amount <= PaymentInstruction.depositedAmount - PaymentInstruction.reversingDepositedAmount if this is a retry reverse approval transaction amount <= PaymentInstruction.reversingDepositedAmount Payment state validation Payment state validation STATE_NEW PPC will not allow the action to take place and throw InvalidPaymentException. STATE_APPROVING PPC will not allow the action to take place and throw InvalidPaymentException. STATE_APPROVED PPC will allow the action to take place. STATE_FAILED PPC will not allow the action to take place and throw InvalidPaymentException. STATE_EXPIRED PPC will not allow the action to take place and throw InvalidPaymentException. STATE_CANCELED PPC will not allow the action to take place and throw InvalidPaymentException. amount validation amount <= Payment.depositedAmount if this is a retry reverse approval transaction amount == Payment.reversingDepositedAmount
Users of this method: EDP.
Result validatePaymentInstruction(PaymentContext paymentContext, PaymentInstruction paymentInstruction) throws InputException, BackendException, InternalException, ConfigException, java.rmi.RemoteException
This api will initiate a validate transaction against the specified PaymentInstruction. PPC will find the plugin that was associated to this payment and execute the validate API against that plugin. This validate method can be used for existing and non existing Payment Instruction. If this method is called for an existing PaymentInstruction PPC will mark the PI valid or invalid depending on the Plugin response. If the PaymentInstruction was not previously created, PPC will just mark the ValueObject as valid or invalid depending on the Plugin response.
If the plugin does not support validatePaymentInstruction API, PPC will call plugin's checkPaymentInstruction API instead.
Users of this method: none. This feature is not used yet.
com.ibm.commerce.payments.plugincontroller.Batch getBatch(PaymentContext paymentContext, java.lang.String batchId) throws EDPException, java.rmi.RemoteException
com.ibm.commerce.payments.plugincontroller.Batch settleBatch(PaymentContext paymentContext, java.lang.String batchId, boolean forceClose) throws EDPException, java.rmi.RemoteException
com.ibm.commerce.payments.plugincontroller.Batch createBatch(PaymentContext paymentContext, java.lang.String merchConfId, java.util.Collection financialTransactionIds, java.util.Map extendedData) throws EDPException, java.rmi.RemoteException
void initAuthenticationSession(PaymentContext paymentContext, java.lang.String paymentInstructionId) throws EDPException, java.rmi.RemoteException
java.lang.String getAuthenticationURL(PaymentContext paymentContext, java.lang.String paymentInstructionId) throws EDPException, java.rmi.RemoteException
java.lang.String preprocessProviderResponseData(PaymentContext paymentContext, java.lang.String paymentSystemName, java.util.Map callbackParameters) throws EDPException, java.rmi.RemoteException
java.util.Map processProviderResponse(PaymentContext paymentContext, java.lang.String paymentInstructionId, java.util.Map callbackParameters) throws EDPException, java.rmi.RemoteException