IStudentAccountTransactionService - Post Account Transaction Payment
The GetServiceInstance<> activity can be used to invoke the IStudentAccountTransactionService method. One of the operations that can be executed using the IStudentAccountTransactionService method is the PostAccountTransactionPayment operation. The response will indicate whether a student payment was received.
Workflow Example
-
In Workflow Composer, create the following Variables. Be sure to use the indicated variable types and defaults.
-
Drag the GetServiceInstance activity into the workflow, click , and select Browse for Type.
Select IStudentAccountTransactionService and click OK.
-
In the Result field of the GetServiceInstance property window, specify the variable of type IStudentAccountTransactionService created above.
-
Drag Assign activities into the workflow for the following functions of the postRequest operation.
Assignments for Student Payment Transactions Assign Activity Notes To Value postRequest.StudentId studentId Variable created in your workflow or hard-coded value (see Notes)
postRequest.TransactionAmount depositEntity.Amount postRequest.TransactionDate depositEntity.DepositReceivedDate postRequest.PaymentType Specify a Payment Type code (enclosed in quotation marks). The system-defined codes in Anthology Student are: - "C" for Cash
- "E" for EFT
- "H" for Check
- "N" for Non-Cash
- "R" for Credit Card
postRequest.PaymentMode PaymentMode.Normal postRequest.StudentEnrollmentPeriodId currEnroll.Id Insert a LookupCurrentEnrollmentPeriod (V2) activity above the Assign statement for postRequest.StudentEnrollmentPeriodId to retrieve the current enrollment period associated with the studentId.
If Cash Drawer Sessions are used, three additional assignments are required: CashDrawerId CashDrawerSessionId CashierId When the GetServiceInstance activity is inserted into the workflow, you can use Intellisense on the variables in the Assign statements to see the available options. Type the request followed by a period to trigger Intellisense. Use the down arrow key to scroll through the available values and press Enter to select a value. The tooltip shows the variables and valid data types.
Once the main method has been selected, Intellisense can then be used to see how to call (typically with a request and returning a response) the variable. Note the tooltip.
-
Drag an Assign activity into the workflow to assign the response to the account transaction request.
-
In the "To" field specify: postResponse (This is a variable created in above.)
-
In the "Value" field specify: AcctSvc.PostAccountTransactionPayment(PostRequest) (Where "postRequest" is a variable created above.)
-
-
To capture the result of the service response, insert WriteLine, LogLine, or any other activities as appropriate for your workflow.
For example, you can use a LogLine activity with the following properties to capture the response after the call to the Student Account Transaction Service.
-
Level: Error
-
Text: Newtonsoft.Json.JsonConvert.SerializeObject(postResponse,Newtonsoft.Json.Formatting.Indented)
-