From payment proof to course access
Multilingual payment forms become fully linked registrations, and paid trainees get their course access without anyone remembering to grant it.
The problem
Trainees submit payment details through a form whose answers arrive in mixed languages, spellings and formats. Each submission had to be retyped into the database and linked by hand to the right course, payment method and countries. Then, once finance approved the payment, someone had to remember to move the trainee’s portal account to the role that unlocks the course, or a paid trainee stayed locked out.
How it works
- Read every spelling. Fields are read under their known English or Arabic names. Invisible and non-breaking characters are stripped, gender and currency values are standardised and amounts are parsed as numbers.
- Resolve the references. The payment method (active ones only), the course, the country of residence and the country of collection are looked up. Countries match on local name, English name or ISO code.
- All or nothing. If any required reference cannot be found, the run stops with an error that lists exactly what is missing, and nothing is written. Otherwise one registration is created with all its links and the payment slip attached, flagged for finance review.
- Open the course. After finance approves, a scheduled run finds approved registrations in the current intake that have not yet been given access and asks the portal, through a secured endpoint, for the post-payment role.
- Mark it done. If the portal confirms the change, or reports that the trainee already holds that role or a later one, the record is marked as done. Anything else is left for the next run.
The engineering that matters
Every value is escaped before it is placed in a database search formula, and the linked references are validated as a set, so a half-linked registration is never written.
On the access side, a single done flag is both the search filter and the final write, which makes every run safe to repeat. Accepting a later-stage role as success means a trainee who has already moved on is never moved backwards.
Have a process like this?
Tell us what it looks like today. We will say whether this approach would work for you.