How to Process Lending Tree Personal Loan Lead Request with PHP
For one of my sites, I had the opportunity to write an interface to process the Lending Tree Personal Loan request. Processing the Lending Tree Personal Loan request is pretty straightforward. For my site, we receive the request, parse the XML, store the lead values in the database, respond to the request with an ACK, make a decision as to whether or not to extend an offer, then prepare and send either an offer or no offer response.
We store the lead information in the database so if the lead reviews our offer and follows the link (we provided in our offer) to complete the application we can retrieve their information from our database and prepopulate our application form. This results in fewer steps required for the lead to complete the application process. The link we provide in our offer includes query string values to identify the lead so we can obtain the lead information from our database. For this example, the function fnPutLeadInfo() has been included in the source below as a placeholder.
The steps are: Get the post, parse the XML, update our database, send the ACK, make a decision, send either the offer or non-offer response.
The logic to make a decision has been omitted. For our example, the variable $offer has been set to false. You would need to add logic to make a decision whether or not to extend an offer to the lead.
For portability I’ve created separate functions for parsing the XML, building the ACK, updating the database, building the offer, building the non-offer, and sending the offer XML.