Configuring Payments
The payment module in RIO Education consists of the following objects:
Payment Configuration (Custom Metadata Type).
Configuration
In the student community, an admin can enable the Payments component from the My Programs page. This component will show students their current Student Fees and Fee Lines, and allow the students to be redirected to a payments page.
In RIO Education Settings custom setting, admin needs to provide the full URL that will redirect students to the payment page. The URL can be Salesforce Visualforce Page, Lightning page or external payment site.
Please note that payment page is not part of the core RIO Education product. If an external payment site is used, integration may be required to send the information back to RIO Education.
When there is one or more payment records created for a Student Fee, the “Paid Amount” will be rolled up from amount registered in payment record.
As soon as the “Outstanding Amount” = $0.00, the “Fee Status” will be changed to Paid via an automated process.
The information and flow in the student community enrollment wizard “ Payment” page will be dependent on the configuration set. Below is a list of the fields and what they mean.
Name |
Description |
Label |
Name that matches the option of “Fee Type” field in Program Enrollment and Course Connection. |
Fee Type Option |
Name that matches the option of “Fee Type Option” field in Program Enrollment and Course Connection. |
Support Payment |
Determine whether the fee type requires payment. |
Support Upfront Payment |
Determine whether the “Upfront Payment” field in the wizard is enabled for input. |
Always Show |
Determine whether the fee type is always included in the Payment Type picklist. |
Non Tuition? |
Determine whether the payment option is available for non tuition fee line. |
Enabled |
Determine whether the fee type is available as an option in Payment Type picklist. |
Description |
Payment description. |
Payment Source |
Source of payment. |
Transaction Type |
Whether the payment is via online banking, credit card, etc. |
Payment tab in student community
When a student applies to enroll to a Program, he/she will identify the payment methods that they will use (depending on eligibility). There are 2 picklist fields:
Fee Type.
Fee Type Option.
Fee Type Option will be a dependent picklist.
In the payment page on the community, students can select the Payment Type. The "Payment Type" option will be displayed according to the "Fee Type" and "Fee Type Option" selected/approved during the application and the configuration in the metadata.
The "Outstanding" will display the amount that needs to be paid by student for a subject.
The "Upfront Payment" will be available for input by the student.
Once confirmed, a student can click on "Pay Now" icon. He/she will be redirected to a custom payment URL specified in the custom configuration. During the redirection, student fee record id will be supplied in the URL so that developers can get the necessary information. For example: https://www.wdcigroup.net/payment?paymentid=<sfrecordid>
Note: A placeholder of {!paymentId} should be used in the payment URL configuration, and the Student Fee’s Id will be used in its place.
Example: www.paymenow.com/makepayment/payId={!paymentId} would become www.paymenow.com/makepayment/payId=01l6A000002Ablsgh.
Late payment support
Note: Enhancements from v3.0 were made to support late payment.
Setup
Custom Setting
Some new fields will be added to the RIO Education Settings custom setting:
-
Late Payment Repeat Setting:
Accepts “Once”, “Days”, or “Months”.
Once - will only ever trigger once per overdue student fee. No compounding.
Days - will trigger every x days for overdue student fees.
Months - will trigger every x months for overdue student fees.
-
Late Payment Repeat Days/Months:
Number field for the number of days or months to wait before repeating.
Scheduled Class
A new schedulable apex class (called SFEE_LatePayment_SCHED) that can be scheduled from Setup > Apex Classes > Schedule Apex.
Here, they can set it to run every day, or once a month on a certain date.
This scheduled class will look for Student Fees that still have an outstanding amount, and where the Due Date is < Today. It will then set some fields on the Student Fee:
Late Processed Status = “Needs processing”.
Last Processed Date = today.
Custom work required
A custom process builder or trigger will need to be created. This will listen out for changes on the Student Fee object, for the Late Processed Status gets changed to “Needs processing”. That should then go off and calculate the late payment fee however it’s needed. When finished, it should also update the Late Processed Status to “Processed”. This will ensure that the scheduled class won’t trigger again until it needs to.
Objects
RIO Education Settings
Name |
Field Type |
Purpose |
Late Payment Repeat Setting |
Text (But we’ll only support the following):
|
Allows user to set how often to repeat the late payment logic. |
Late Payment Repeat Days/Months |
Number. |
Allows user to set how often to repeat the late payment logic (only used if settings = Months or settings = Days). |
Late Payment Batch Size |
Number. |
Limits the number of records per batch (Default 200). |
Student Fee
Name |
Field Type |
Purpose |
Late Processed Status |
Picklist:
|
Status on Student Fee will help trigger custom process builder/trigger for creating late payment fees. |
Last Processed Date |
Date. |
Date we last updated the Late Processed Status. |
Apex/Triggers
Name |
Changes |
(New) SFEE_LatePayment_SCHED |
A scheduled apex class, whose only purpose is to call SFEE_LatePayment_BATCH. |
(New) SFEE_LatePayment_BATCH |
Finds overdue student fees, checks if they need to start/recalculate late payment fees, and set the Late Processed Status to “Needs processing”. |
(New) SFEE_LatePayment_TEST |
Test class for both of the above. |