SimpleOffline plug-in financial transactions
The SimpleOffline plug-in performs several financial transactions (payment actions). Plug-in writers who are modeling plug-ins after the SimpleOffline plug-in could model the financial transactions in a similar way.
Financial transaction | Description |
---|---|
checkPaymentInstruction | The plug-in uses the SimpleOfflinePlugin.xml file to check that all
of the required parameters for the specified payment instruction are present. In addition to checking for the presence of required parameters, checkPaymentInstruction can also check the length of the parameter value. The minimum and maximum length for a given parameter can be set. |
validatePaymentInstruction | This action is not supported by the SimpleOffline plug-in. The exception PluginFunctionNotSupportedException will be thrown for this transaction. |
approve | If the payment method is configured to keep a pending state, the plug-in
sets the transaction in PENDING state and returns successfully. Otherwise,
it returns successfully with response code 0 and reason code 0. The approval request will be processed offline manually. The Payments menu in the HCL Commerce Accelerator can be used to change the "approving" payment status to APPROVED or FAILED. The pending transaction state will be set to SUCCESS or FAILED. |
approveAndDeposit | If the payment method is configured to keep a pending state, the plug-in
sets the transaction in PENDING state and returns successfully. Otherwise,
it returns successfully with response code 0 and reason code 0. The approval request will be processed offline manually. The Payments menu in the HCL Commerce Accelerator can be used to change the "approving" payment status to APPROVED or FAILED. The pending transaction state will be set to SUCCESS or FAILED. |
deposit | If the payment method is configured to keep a pending state, the plug-in
sets the transaction in PENDING state and returns successfully. Otherwise,
it returns successfully with response code 0 and reason code 0. If a pending method keeps pending status, the SimpleOffline plug-in receives the deposit request and sets the state of the deposit to DEPOSITING, which is stored in the database. The deposit transaction will be executed offline to transfer the allocated funds for the payment either partially or completely from the buyer to the seller. The Payments menu in the HCL Commerce Acceleratorcan be used to decrease the payment depositing amount if the deposit transaction state is SUCCESS or FAILED, or increase the deposited amount if the transaction state is SUCCESS. Note: There is no Deposited state. The pending transaction
state is set to SUCCESS or FAILED. |
credit | If the payment method is configured to keep a pending state, the plug-in
sets the transaction in PENDING state and returns successfully. Otherwise,
it returns successfully with response code 0 and reason code 0. If a payment method keeps pending status, the SimpleOffline plug-in receives the credit request and sets the state of the credit to CREDITING. The credit transaction will be executed offline to transfer funds from the buyer to the seller. A credit can have a state of CREDITED. The Payments menu in the HCL Commerce Accelerator can be used to change the CREDITING credit status to CREDITED or FAILED. The pending transaction state will be set to SUCCESS or FAILED. The credit can be a dependent credit or independent credit transaction. For more information about dependent and independent credits, see the Payment plug-in specification. |
reverseApproval | If the payment method is configured to keep a pending state, the plug-in
sets the transaction in PENDING state and returns successfully. Otherwise,
it returns successfully with response code 0 and reason code 0. If a payment method keeps pending status, the SimpleOffline plug-in receives the reverseApproval request and sets the status of the reverse payment to PENDING, which is stored in the database. The reverseApproval transaction will be executed offline to cancel the allocation of funds on a payment already approved. The Payments menu in the HCL Commerce Accelerator can be used to decrease the reversing approved amount, or to decrease the approved amount if the transaction is successful. Internally the reverseApproval transaction state changes to SUCCESS or FAILED. If the reverseApproval transaction is SUCCESS and the approvedAmount is changed to zero (fully reversed), the payment status will be changed to CANCELED. If a pending transaction is reversed (a reverseApproval transaction takes place for a payment with a pending approve transaction), the SimpleOffline plug-in returns successfully without setting the pending status, even if the payment method is configured to keep pending status. |
reverseDeposit | If the payment method is configured to keep a pending state, the plug-in
sets the transaction in PENDING state and returns successfully. Otherwise,
it returns successfully with response code 0 and reason code 0. If a payment method keeps pending status, the SimpleOffline plug-in receives the reverseDeposit request and sets the status of the reverseDeposit to PENDING, which is stored in the database. The reverseDeposit transaction will be executed offline to cancel the transfer of funds for a deposit transaction. The Payments menu in the HCL Commerce Accelerator can be used to decrease the reversing deposited amount, or to decrease the deposited amount if the transaction is successful. Internally the reverseDeposit transaction state changes to SUCCESS or FAILED. If a pending transaction is reversed (a reverseDeposit transaction takes place for a payment with a pending deposit transaction), the SimpleOffline plug-in returns successfully without setting the pending status, even if the payment method is configured to keep pending status. There is no status change in the reverseDeposit transaction. |
reverseCredit | If the payment method is configured to keep a pending state, the plug-in
sets the transaction in PENDING state and returns successfully. Otherwise,
it returns successfully with response code 0 and reason code 0. If a payment method keeps pending status, the SimpleOffline plug-in receives the reverseCredit request and sets the status of the reverseCredit to PENDING, which is stored in the database. The reverseCredit transaction will be executed offline to cancel the transfer of funds from a seller to a buyer for the credit transaction. The Payments menu in the HCL Commerce Accelerator can be used to decrease the reversing credit amount, or to decrease the credited amount if the transaction is successful. Internally the reverseCredit transaction state changes to SUCCESS or FAILED. An internal Credit status change occurs with this transaction. If the reverseCredit transaction is SUCCESS and the creditedAmount is decreased to zero (fully reversed), the Credit status changes to CANCELED. If a pending transaction is reversed (a reverseCredit transaction takes place for a credit with a pending credit transaction), the SimpleOffline plug-in returns successfully without setting the pending status, even if the payment method is configured to keep pending status. The credit can be a dependent credit or independent credit transaction. |