ProcessRefund
The ProcessRefund
-CUWO is responsible for processing a previously authorized refund. This type of CUWO will only be used, when an AuthorizeRefund
-CUWO successfully authorized a refund and the user did not cancel it.
If the CUWO fails, it is unclear whether the refund was processd or not. Thus, the enfore platform will execute the CancelRefund
-CUWO to try to release the authorization/revert the process.
Workflow parameters
The ProcessRefund
-CUWO will receive a ProcessRefundWorkflowParameters
structure as input.
The structure is defined as:
/**
* The parameter/input structure for a "process refund" workflow.
*/
class ProcessRefundWorkflowParameters extends WorkflowParameters {
readonly "@type" : string = "n4.cuwo.workflows.refunds.processrefund.ProcessRefundWorkflowParameters";
/**
* The ID of the refund that is to be processd.
*/
public refundProcessID : string;
/**
* The reference of the refund to process as provided
* by the AuthorizeRefund workflow.
*/
public refundReference? : string;
/**
* The processing data of the refund to process as
* provided by the AuthorizeRefund workflow.
*/
public refundProcessingData? : string;
}
Success result
On success, the ProcessRefund
-CUWO is expected to pass a ProcessRefundWorkflowResult
structure to terminateSuccess
.
The structure is defined as:
/**
* The result/output structure for a successful "process refund" workflow.
*/
class ProcessRefundWorkflowResult extends WorkflowResult {
readonly "@type" : string = "n4.cuwo.workflows.refunds.processrefund.ProcessRefundWorkflowResult";
/**
* Optional update for the processing data of the refund.
*
* When provided, replaces the previously stored refund processing
* data. When not provided, a previously stored refund processing
* data stays unchanged.
*/
public refundProcessingData? : string;
/**
* Additional information to be stored with/printed on the refund
* receipt document.
*/
public customReceiptDocumentInformation? : DataList<CustomDocumentInformation>
}
Failure result
On failure, the ProcessRefund
-CUWO is expected to pass a ProcessRefundWorkflowFailure
structure to terminateFailure
.
The structure is defined as:
/**
* The result/output structure for a failed "process refund" workflow.
*/
class ProcessRefundWorkflowFailure extends WorkflowFailure {
readonly "@type" : string = "n4.cuwo.workflows.refunds.processrefund.ProcessRefundWorkflowFailure";
/**
* The reason for the failure.
*/
public failureReason : ProcessRefundWorkflowFailureReason;
/**
* A failure code specific to the CUWO.
*
* The enfore platform simply stores that code and displays it to the user but does
* not understand it or base any processing on it.
*
* This enables storing a short error identifier from an external system in a way
* that allows it to be shown in the enforePOS UI.
*/
public failureCode? : string;
/**
* Optional update for the processing data of the refund.
*
* When provided, replaces the previously stored refund processing
* data. When not provided, a previously stored refund processing
* data stays unchanged.
*/
public refundProcessingData? : string;
}
Cancelation result
The ProcessRefund
workflow does not support cancelation.