handleManualPayment method
void
handleManualPayment(
- AppModel app,
- BuildContext theContext,
- AssignmentModel? theAssignmentModel,
- String paymentReference,
- String paymentName,
- bool success,
Implementation
void handleManualPayment(
AppModel app,
BuildContext theContext,
AssignmentModel? theAssignmentModel,
String paymentReference,
String paymentName,
bool success) {
if (success) {
// now store in results status.reference;
finishTask(
app,
theContext,
theAssignmentModel!,
ExecutionResults(ExecutionStatus.success, results: [
AssignmentResultModel(
documentID: newRandomKey(),
key: payTaskFieldPaymentType,
value: 'Manual Payment'),
AssignmentResultModel(
documentID: newRandomKey(),
key: payTaskFieldPaymentReference,
value: paymentReference),
AssignmentResultModel(
documentID: newRandomKey(),
key: payTaskFieldName,
value: paymentName)
]),
null);
} else {
finishTask(app, theContext, theAssignmentModel!,
ExecutionResults(ExecutionStatus.delay), null);
}
}