Ray below is a breakdown for reference when we speak on call..
RTMF Application and Consented Payment Process:
background to Right to Manage ( RTM )
We supply ‘Right to Mange’ services to Leasehold property owners.
Right to Manage is a legislation brought in by government in 2002 under the “common hold and leasehold reform act”
In simple terms its purpose is to take control of these properties away from the freeholder ( the owner of the land and the function to control the maintenance and upkeep of the building ) and give it to the leaseholders collectively under their newly formed Right to Manage company.
The reason for this is freeholders were manipulating their control and inflicting excessive service charges and poor upkeep to the properties along with underperforming management companies.
These properties are in blocks of flats / apartments which can be anything from converted houses containing 2 units, to large multi-block developments comprising of hundreds of units.
The legislation requires that at least 50% of the leaseholders in the block give consent to the process. The consenting leaseholders become members of the “Right to Manage” company
Our Services are offered in 5 options:
- Standard charge
- Negotiated fee
- Fixed fee per unit
- Remaining / Part payment
- Deposit payment
Our standard charge is as follows:
- single block: £500.00 + Vat
- Multi Block: £500.00 + Vat for the first block then £100.00 + Vat for each additional block thereafter.
Charge per flat: £75.00 + Vat.
Our Cost is divided amongst the amount of consenting leaseholders
A Development of 30 flats in one block:
- 1 Block = £500.00
- 30 Flats x £75.00 = £2,250.00
- Cost = £2,750.00
- Vat @ 20% = £550.00
- Total Cost = £3,300.00
20 Leaseholders in the block give consent to RTM
£3,300 / 20 = £165.00 each
A development of 90 flats in 3 Blocks:
- 3 blocks = £500.00 + £100.00 + £100.00 = £700.00
- 90 Flats x £75.00 = £6750.00
- Cost = £7,450.00
- Vat @ 20% = £1,490.00
- Total Cost = £8,940.00
64 Leaseholders in the Blocks give consent to RTM
£8,940.00 / 64 = 139.68 each
The Application form is accessed either by directly from our website where all inbound links to the application page will have a URL parameter ( productID ) containing the item_id (1) for the standard application. ( item type S ) These values relate to the ‘Products’ DB table ( See attachment )
All other application types will be created from our Admin which has a form that enters a new product to the Products table and generates an email to our primary contact that contains a link to the application page with the correct corresponding item_id value in the ProductID parameter.
The URL parameter is passed to a SESSION variable on the page
$_SESSION["product_id"] = "".$_GET['productID'] ."";
The Application Form is Inserted into 5 relational DB tables. One table in particular, which holds the Building Information, has two important values which are “total flats” and “total blocks” these are used in the eCart setup in the calculations based on our Standard Charge.
When the form is submitted the user is directed to the “Set up Account page”.
The page has a recordset that queries the ‘Products table’ based on the SESSION variable.
The User completes the Account setup form giving his name, email ( username ), property name and creates a password. the from also holds the item_id and the item_type in hidden form fields. On submission of the form the data is entered into the “Registered Applications” DB table. ( see attachment )
The form entry uses the “Double opt in Registration” and once the user verifies their email they can login to their account.
In their account they have access to a page where they need to enter in the list of all consenting leaseholders. ( The list status value starts as ‘Collation’ which is held in a table column shown above. )
These entries are submitted to a relational DB table ‘consented_leaseholders’ ( See attachment ) that use the acc_id as the foreign key.
The progress of this list is displayed below the entry form. Once the list exceeds 50% of Leaseholders in the block they can submit the complete list.
On Submission of the list various actions are triggered.
- The number of entries are sent as a value to the members column shown in the table above.
- The List Status is updated to ‘List Complete’
- An email loop sends each Leaseholder in the list which contains a link to their online consent form.
- The 'List Complete' value is used in a 'Show region utility' to hide the list entry form and progress and show the complete list where it shows whether they have consented or paid.
the links contained in the email each hold the correct parameters some of which have values unique to each leaseholder.
<a href="https://www.rtmf.org.uk/registered-applications/consent-form.php?accID=<?php echo $_SESSION['SecurityAssist_acc_id']; ?>&entryID=<?php echo $rsConsConsent->getColumnVal("entry_id"); ?>&productID=<?php echo $rsProduct->getColumnVal("product_id"); ?>&productType=<?php echo $rsProduct->getColumnVal("product_type"); ?>&status=<?php echo $rsConsConsent->getColumnVal("fee"); ?>">
When the Leaseholder clicks the link in the email they are directed to the Consent Form page.
The page uses the URL parameters to query the relevant DB tables so the correct bindings are available.
The page has numerous eCart objects. One for each different product type.
There is an ‘Add to Cart’ behaviour’ associated with each eCart object which uses the correct bindings to generate the correct price for each leaseholder.
each ‘Add to cart’ behaviour is triggered by its own Submit Button. These Buttons have a ‘Show region Utility’ using the ‘Product_type’ value to show the correct button thus using the correct eCart object in the payment process.
So when the user submits the consent form. The ‘Add to cart’ is triggered:
- they are redirected to the ‘View Cart page’
- Their record is updated in the ‘form_submnitted’ column to YES.
- An email behaviour sends an email to the user and a copy to Admin containing details of the consent form
The View Cart page displays the correct details for payment.
User Clicks button to make Payment
On completion of the payment process. A value of ‘Paid’ or ‘Cancelled’ is sent to the ‘Fee’ column in the correct DB table record.
I've attached stripe info in a zip file which included sample code