Home
BSc_Project_Final_Report_v1.1
Contents
1. Now comes the part where a workaround was created for To store PayPal specific information on a payment an extra table is created that has a reference to a record in the Payments table Again we create a class representing this table called PaypalPayments as can be seen in Code sample 5 3 The corresponding table is rp_paypal_ payments with primary key payment_id A single row from this table is represented by the PaypalPaymentclass Although the table has a foreign key to the rp_payments table the fields of this table are not accessible in the PaypalPaymentclass This is because the PaypalPayments class will only fetch the columns from the table it is representing The same applies to the Payments class and therefor it is not possible to create a class that contains both fields using standard Zend_Db classes class PaypalPayments extends Zend_Db_Table_Abstract protected _name rp_paypal_payments table name protected primary payment_id primary key in the table protected _rowClass PaypalPayment class of the rows returned EIE r r la artis Aan In inr a haar Va rar For this example redundant functions have been omitted Code sample 5 3 The PaypalPayments class The way this was solved is by creating a class PaymentConnector which extends Zend Db Table Row Abstract and thus represents a table row By making PaypalPayment extend this class it inherits the Zend Db Table Row Abstract properties and functions Ther
2. 2 1 1 Zend_Db Zend_Dbis a library that contains all components needed for communication with the database 5 It starts of with the Zend Db Adapter component This component provides the connection to the database One of the big advantages of using this adapter class is the type of database can easily be replaced by another 6 The current system is already set up for communicating with a MySQL database Classes of importance in this project are the Zend_Db_Table and Zend_Db_Table_Row classes Those classes provide a way to communicate with data from the database The Zend_Db_Table class represents a table allowing easy retrieval of data from the table For the data retrieval either queries can be written or a query can be build using the Zend_Db_Select object The data retrieved by the Zend_Db_Table class is returned in the form of a Zend_Db_Table_Row object Using this object it is easy to edit the data and write the changes to the database by calling a simple save function 7 8 9 In this project the abstract versions of those classes are used to implement more specific getters and setters and additional functions More details on how the Zend_Db classes were used in the design can be found in section 4 1 Implementation details can be found in section 5 1 2 1 2 Zend_Layout Zend_Layout provides a way to create template files in which you define a page layout and its placeholders Using this allows a programmer to only set up the
3. Beside general set up functionalities implemented in the TestCase class it implements the setUpBeforeClass function which PHPUnit automatically calls before starting test runs on a new class file In this function the test database is cleared and two users that are used in the tests are added to the user database as canbe seen in Code sample D 3 2 This ensures the test database is clean when starting tests in a certain test class class TestCase extends Zend_Test_PHPUnit_ControllerTestCase public static function setUpBeforeClass db Zend_Registry get db alas Astahner clear database Ifa tl aa add two users Code sample D 3 2 The TestCase class providing a clean environment In a test class itself the environment needs to be kept clean between every test function An example of the setUp and tearDown functions of the PaymentTestclass can be found in Code 117 sample D 3 3 The setUpfunction is called before every test function starts the tearDown is called after each test function ends This allows the programmer to make sure the environment is clean before each test run class PaymentTest extends TestCase private payments null private payment null private users null private user null public function setUp set up objects this gt payments new Payments this gt payment this gt payments gt createRow this gt users new Users this gt user this gt users
4. eRentPayment Visited on August 1 2011 lt https www erentpayment com renters aspx gt 101 19 Four Payment Options to offer your Renters eRentPayment Visited on August 1 2011 lt https www erentpayment com managers aspx gt 20 ACH processing ACH Payments Visited on August 1 2011 lt http www ach payments com ach processing htm gt 21 Payments PayYourRent Visited on August 1 2011 lt http www payyourrent com index php option cCom_content amp view article amp id 34 amp Itemid 48 gt 22 FAQ PayYourRent Visited on August 1 2011 lt http www payyourrent com index php option com_content amp view article amp id 40 amp ltemid 83 gt 23 API Integration Summary PayPal X Visited on July 29 2011 lt https cms paypal com us cgi bin cmd _render content amp content_ID developer howto_api_overview gt 24 PayPal Sandbox PayPal X Visited on July 29 2011 lt https cms paypal com us cgi bin cmd _render content amp content_ID developer howto_testing_sandbox gt 25 PayPal SDKs and Downloads PayPal X Visited on August 1 2011 lt https www x com community ppx sdks gt 26 Adaptive Payments APP PayPal X Visited on August 1 2011 lt https www x com community ppx adaptive_payments gt 27 Getting started PayPal X Visited on August 1 2011 lt https cms paypal com us cgi bin cmd _render content amp content_ID developer e_
5. Delft University of Technology Faculty EEMCS Bachelors Project Group IN3405 Dirk Guijt 1308084 Lars Tijhuis 1308335 Thesis Committee Chairman Prof Drs Dr L J M Rothkrantz B Sc Coordinator Drs P R van Nieuwenhuizen Company Supervisors R Nguyen S Kanajan 77 78 Table of Contents Table O Contents rater ter ee 79 1 Introduction a 81 TA ROOM rene EN en 81 2 Project DESCriptON Eee o E aae EREE EEEN 83 RO 83 2 2 CUTE SS Mia iia 83 2 2 1 Users and advertisements ans 83 2 2 2 Searching AVES NOS A AA A 84 2 2 3 Application and Lease agreement nennen enenneenenseenenseeeenseeeeneneenenseenensen 84 2 3 Expansion Peer to Peer payment 84 29 1 FUASONANEN OPE PU UU ie 84 24 O 908 2 ire ere Lina ete erdee eed 86 3 Software Development Methods nnen enne eee eeenenenenenneerneeenserenenenenenennnenensene 87 3 1 Feature Driven Development sn vearrenaaeavensearsnedensererdacr verderen seeden aa aaa lem 89 3 2 The Model View Controller pattern nnen eneen enenen enne enerennenenenenenenneenserennenenenenn 89 4 Used Technologies and Tools a ee a a aaa a akaa 91 Al Apache MSOLLA PHP Se ae ee ea 91 4 2 HTML CSS JavaScript Query AJAX eenen serene ennvenneneneeeenenennvennnvenneenseenn 91 4 3 Zend TAM OWOMK u a 91 A es cute ete ee caren tee Weed cena ue eee eee al 91 A BCIPSE ete beekdalen 92 2 6 SOON e etten 92 AUTA ETUA E o ESE PEE N MP 92 2 8 BIOWSENS sr na 92 BD PSS SAND ec 93 5 1 Onlin
6. gt createRow public function tearDown clear objects if this gt payment null this gt payment gt delete if this gt user null this gt user gt delete unset this gt payments unset this gt payment unset this gt users unset this gt user Code sample D 3 3 The setUp and tearDown classes provided to clean up your environment Sample code showing how Zends provided functions can be used to dispatch a page and check the content of the resulting page can be found in Code sample D 3 4 Here the POST variables are set that are used when creating a recurring payment After dispatching the summary page the recurring payment should be set up with the information given in the POST variables Also the controller and action used are checked in every test public function testSummaryActionRecurringWeekly startDate this gt dateCurrent endDate this gt dateTenWeeks set the POST variables for the next request this gt request gt setMethod POST gt setPost array pay_receiver_id gt 484 pay_amount gt 100 00 pay_description gt PHPUnit test payment pay_recurring gt pay_recurring rpay_frequency gt PaymentFrequency WEEKLY rpay_date_start gt startDate gt format m d Y rpay_date_end gt endDate gt format m d Y 118 make the request this gt dispatch pay summary assert the information is shown th
7. nen 124 Appendix G DigtALOSCHMENS in Ardea 125 Gl SOU COOS rra venae dente aeg 125 2 Extended design GOCUMOEMNS ener ties 125 Ga pApDOCUM ENS steel 125 E 125 69 70 Appendix A List of figures Figure 1 1 Figure 2 1 Figure 2 2 Figure 2 3 Figure 2 4 Figure 4 1 Figure 4 2 Figure 4 3 Figure 4 4 Figure 4 5 Figure 4 6 Figure 4 7 Figure 4 8 Figure 4 9 The time schedule for the development of the payment system The abstract structure for a Chained Payment 14 The flow for executing a payment through PayPal 14 Executing a pre approved payment 14 The IPN flow Inheritance and the database mapping problem and solution The basic model of the payment objects The basic model of the payment objects using Zend Framework The payment system model The relational model of the payment system The milestone 1 class diagram without functions and properties A simple page flow diagram of making a payment Simple view of the payment system in the MVC pattern The milestone 2 class diagram without functions and properties Figure 4 10 Connection between a lease agreement and a payment Figure 4 11 The overview page Figure 4 12 The recurring payment summary page Figure 6 1 Figure 6 2 A screenshot of a test suite run Cyclomatic complexity versus code coverage 22 71 72 Appendix B List of code samples Code sample 5 1 The Payments class Code sample 5 2 The Paymentclass Code sample 5 3 The Paypa
8. project Roomplug was still trying to refine its business model and they watched the competition closely This caused the requirements and milestones to change over time The features that did not make it into this project can still be implemented in the future if wanted This will be discussed in section 7 2 Although the design work is created for the payment system lessons are learned from the design structure Using Zend Framework and the MVC pattern required some workarounds to prevent implementation problems or to prevent the whole model to become too complex Future development on the Roomplug system or any other Zend Framework MVC system can benefit from this knowledge The elaborate PHPUnit test classes that have been written after each milestone have been of great value during the development of new milestones and changes that had to be made in older ones It adds up to the maintainability and expandability of the system as a whole 60 From the beginning of the project Roomplug thought of the payment system as a critical tool for the Roomplug website The system is now live on the beta site and it has to prove its value Roomplug believes the future of paying rent will be by means of an online platform By utilizing the Paypal API and their adaptive payment system our software development ninjas Dirk 8 Lars have masterfully crafted the art for us to generate income at a 1 fee for each rental transaction through this innovative
9. true receiverList receiver payRequest gt receiverList receiverList Create service wrapper object ap new AdaptivePayments invoke business method on service wrapper passing in appropriate request params response ap gt Pay payRequest token response gt payKey return JSON object return RESULT SUCCESS TOKEN token Code sample 5 6 Setting up a Pay request 44 5 2 2 Preapproval request The Preapproval request is somewhat similar to the Pay request described in section 5 2 1 As Code sample 5 7 shows no receiver is specified The Preapproval request pre approves Roomplug to charge the PayPal account a number of times within a period transferring a specified amount Roomplug is identified by its personal applicationld The amount number of payments and the period are set with the startingDate endingDate maxNumberOfPayments maxTotalAmountOfAllPayments and maxAmountPerPayment properties The AdaptivePayments object invokes the actual Preapproval method returning the response which contains the preapprovalKey This preapprovalKey can once authorized be used to make payments using the Pay request without user interaction For this to work an extra property preapprovalKey needs to be set in the PayRequest object create the request preapprovalRequest new PreapprovalRequest set request params preapprovalRequest gt startingDate recurringPayment gt
10. used to improve the code 6 1 Test plan This section presents the test plan In the project a test suite is created right after the first milestone and extended during the development of new features During the project it became good habit to run the test suite after each new feature or change thus before each commit 6 1 1 Automated testing The automated testing is done using PHPUnit The target was to get a 100 line coverage for the Controllers and Model classes written The View classes are indirectly tested by using operations from the Controllers and asserting some pages show for example a newly created payment However focusing on the coverage of View classes is obsolete since in the end the result shown will be determined by the parameters set in the controller 100 line coverage can be easily achieved by writing tests Care must be taken not only to get the coverage but to also validate the output generated by the system when writing them Not doing this may result in a useless test suite The reason line coverage is set as the minimum and not for example branch coverage is the feature driven development approach Since changes in existing functions will most likely occur when implementing new features a branch coverage requirement would involve analyzing the different branches again and changing the corresponding tests Too much time would be spent on this process as opposed to checking the line coverage after changes and
11. New Yor City NY Start Date 10 01 2011 Fully furnished Inbox End date 09 31 2012 2bed 2bath apartment Favorites Occurences 12 196 Views Personal Total Amount 1 200 00 Settings Pay Now By using PayPal you agree to PayPal s Acceptable Use Policy If you have any questions you can contact us by sending an E vs E re email to info roomplug com or by calling 858 356 2955 4 340 Lakeland FL Room for rent er 260 Views Feature Fake 5 Figure D 1 10 The summary page showing the recurring payment details As seen in Figure D 1 11 this screen looks very different from the custom payment because the user does not actually execute a payment The user pre approves Roomplug to automatically execute the payments for them in the future Lars Tijhuis s Test Store Your preapproved payment summary Choose a way to pay Details Log in to your PayPal account PayPal Name Lars Tijhuis s Test Store Start date Nov 1 2011 End date Oct 31 2012 Email address sender_1312933115_per gr Password Problem with login Don t have a PayPal account VISA ES Fa Its easy to create one Cancel preapproval and return to Lars Tijhuis s Test Store Figure D 1 11 The PayPal screen for the pre approval of a recurring payment 110 Once the user finishes the pre approval process in the PayPal system they will be taken back to the Roomplug system The user will see the success page telling them that the pre approval was succ
12. The report will not go into this subject elaborately since it is focusing on the technical side but it puts the project in a somewhat different context Going abroad for this project brings some extra concerns such as harder time limitations and thus more careful planning References 1 About Roomplug Roomplug Visited on July 27 2011 lt http www roomplug com about gt 2 Credit Report Credit Score Credit Check TransUnion com TransUnion Visited on Sept 30 2011 lt http www transunion com gt 122 Appendix F Software Improvement Group feedback F 1 Initial feedback De code van het systeem scoort 4 sterren op ons onderhoudbaarheidsmodel wat betekent dat de code bovengemiddeld onderhoudbaar is De score wordt naar beneden gehaald door de Unit Interfacing en de Unit Size Voor Unit Interfacing wordt er gekeken naar het percentage code in units met een bovengemiddeld aantal parameters Doorgaans duidt een bovengemiddeld aantal parameters op een gebrek aan abstractie Daarnaast leidt een groot aantal parameters nogal eens tot verwarring in het aanroepen van de methode en in de meeste gevallen ook tot langere en complexere methoden Voorbeelden van methodes met een bovengemiddeld aantal parameters in dit systeem zijn bijvoorbeeld de methodes recurringinputHasErrors en createRecurringPayments in PaymentController Vanuit de beschrijving van de parameters valt af te leiden dat alle parameters samen een Recu
13. They can also see their outgoing open payments their active or inactive outgoing recurring payments and the active incoming recurring payments The users can also click on the description of the payment to see the payment details Users can delete an outgoing payment if the execution of that payment has not started yet Outgoing recurring payments can be de activated when active or deleted if not active 6 The online rent payment system should be designed to support multiple payment methods PayPal is the method that is first to be adopted by the online payment system The payment system is designed in such a way that other payment methods could be added easily A guide on how to do this can be found in Appendix D Currently both custom payments as recurring payments can be paid or pre approved using PayPal as a payment method Users can set up their PayPal account data in their Roomplug profile They are ready to receive payments through PayPal as soon as they did this All together this project has brought a fully functional prototype of an online rent payment system to the Roomplug website This came with elaborate documentation and manuals to maintain and expand the payment system in the future Documentation includes model design documents class diagrams and flow diagrams Manuals include the user manual the maintenance manual and the test manual FDD proved to be the right methodology for this project in solving the problem During the
14. a Roomplug account with a PayPal account linked to it in order to receive payments 6 Auser should be able to set up a recurring payment to another user 7 A user has to have a Roomplug account in order to set up a recurring payment 8 A user should be able to choose from at least four different payment frequencies while setting up a recurring payment weekly biweekly first day of the month and last day of the month 9 A user should be able to view all of his incoming and outgoing payments 10 A user should be able to view the details of a payment 11 A user should be able to delete open payments and open payments only 12 A user should at least be able to use PayPal as a payment method 19 3 3 Quality requirements 13 The payment system may never mark a payment as paid if no actual transaction occurred 14 The payment system may never allow a payment to be paid again if it is marked as paid already 15 The payment system needs to store key information on a transaction so that a payment can be verified manually That way a payment canbe verified if the system of the payment provider e g PayPal fails to report a successfully processed payment to the Roomplug system 16 The payment system must be designed in sucha way that new payment methods can be added easily in the future 17 The payment system should be fully integrated within the current Roomplug system so the user experiences being on the same web
15. a payment will not be verified at all f a user complains about a situation like this Roomplug can log into PayPal with their business account and manually checkthe payment using the PayPal token as a unique identifier The payments always go through the PayPal application of Roomplug soit is possible to check the users claim When the user is right Roomplug can request a new IPN call in the PayPal system or manually update the data in the database 114 It can also happen that an IPN call did get through but PayPal does not verify it This can be the result of someone faking a call or a failure on PayPals side The Roomplug system logs every call and every step of the IPN listener Roomplug can use this log in the database to check what went wrong and take actions accordingly D 2 Maintenance manual Adding a new paymentmethod Two different parts can be identified that need changes when adding a new payment system the model and the use of the adapter to execute payments The PaymentConnectorand the other connector classes are created to make expanding the model with a new payment method easier The only thing that needs to be done is extending the connector classes with classes containing specific information for that payment method Very little work needs to be done in the existing classes For example you want to add a new system called MakeMeRich MakeMeRich provides an API with which you can send identification and payment i
16. amount to receive of both the primary and secondary receiver The flow of a payment as illustrated in Figure 2 2 goes like this 1 First the Pay request is constructed setting the details of the payment to be done This request is then send to PayPal 2 PayPal processes the request and returns a token unique to the requested payment The user is redirected to the PayPal systems where they login and process the payment 4 After completion or cancellation the user is redirected back to the URL provided in the pay request oo 15 Legend Web Flow gt API Call Pay Key Q Pay request A PayPal Pay 2 Pay key O API Server Send money mmm 3 HTTP redirect O ein 5 4 HTTP redirect to return URL hd ee Continue 5 Your site Figure 2 2 The flow for executing a payment through PayPal 14 More details on implementation of the pay request can be found in section 5 2 1 2 2 2 Pre Approved Payments The pre approval process is similar to the Pay flow described in section 2 2 1 There are some substantial differences in setting up the request though Instead of defining a receiver all you provide is information about the amount of money The period the number of occurrences within this period the amount per payment and the total amount are properties that need to be set for a pre approval Basically the user gives Roomplug permission to charge the user s PayPal account for the defined amount Af
17. application while managing his her payments This also means that it is implemented in Zend Framework using the MVC pattern 3 4 Platform requirements 18 The payment system should run on a CentOS 5 4 linux environment with kernel version 2 6 18 028stab070 14 The environment should run the Apache 2 2 19 web server with PHP 5 2 17 and MySQL 5 0 92 3 5 Process requirements 19 The payment system should be developed using the feature driven development method 20 The delivery date for the payment system will be October 10 2011 3 6 Features and milestones Following the FDD method features are defined for each of the requirements Those features will be sorted on priority defining a set of core features and additional features Also milestones are defined creating a milestone by milestone path for implementation Note that the quality platform and process requirements are not grouped into specific features as they need to be taken into account during the whole development process The outcome of this grouping and prioritizing is shown in the following sections 3 6 1 Milestone 1 Basic payments core This milestone partly covers requirements 1 2 9 10 11 and 12 and includes the following features 20 Manage payments Goal View history create new and delete existing payments Features View payments overview Shows open payments and the payment history View payment details Shows the specific details of a payme
18. configuration The payment system only requires the Userclass to be present and the system needs to adopt the new sites security methods 3 Roomplug users should be able to receive payments from everyone even if the paying person does not have a Roomplug account Guest payments have been implemented requiring only the receiving user to have a Roomplug account Paying users can go to the guest payment page and create a payment to a Roomplug user there Once they create an account all the payments that the user has made as a guest will show on his her history page provided they entered the email address of their new Roomplug account on every payment 4 Roomplug users should be able to setup recurring payments to pay their rent automatically Users can set up recurring payments and schedule them to occur during a certain period Next to that they can choose four different frequencies of payment weekly biweekly every first day 59 of the month and every last day of the month The Roomplug server runs a cronjob twice a day The second run functions as a backup if the first run fails for some reason This minimizes the chance that the recurring payments will fail to produce a payment when needed 5 Roomplug users should be able to manage their payments This managing could include for example an overview of the payment history The Roomplug users can see all the incoming and outgoing payments executed in the past on the overview page
19. cursor will change into a pointer once a user hovers over the text This signals the user that the text is clickable 38 3 Hub Inbox Logout Hi Test BETA Home Browse Find Blog Screen Romii 2 Ze Hub H Plug Posted fi 450 sun City CA Fully furnished Bedroom with Private Bath in Sun Last Login On Wed Sep 28 11 7 20a City Recurring Payment summary 1257 Views Receiver User Test j A Amount 100 00 Description Here is my rent for this month Frequency Every first day of the month Stari Date 10 01 2011 i 900 New Yor City NY gt Fully furnished Inbox End date 09 31 2012 nie ira Favorites Occurences 12 196 Views Personal Total Amount 1 200 00 Settings PayNow By using PayPal you agree to PayPal s Acceptable Use Policy y Ifyou have any questions you can contact us by sending an visa Ee re wel email to info roomplug com or by calling 858 356 2955 340 Lakeland FL Room for rent er 260 Views Feature e a on Figure 4 12 The recurring payment summary page The summary page is somewhat simpler in comparison to the overview page It is the second page that users see when they choose to authorize a transaction This could be paying a payment or pre approving a recurring payment Figure 4 12 shows the overview page which is shown when the user wants to approve a recurring payment It shows all the relevant information of the recurring payment itself so that
20. eeen E te een de 3 PrefACB usina atan 5 Table of Contents naren rieten dean de 7 ANCONS ados 9 A O 9 1 2 Problem di a 9 1 3 Development methodology aa 10 VA SOUS A ee neigt 11 o een 12 POC HMOIOGIOS ze redden edele 18 2 Zen Framework a a 13 pz M Vo ND A 13 PAO Zend A O ae 13 A A A ee ee 14 21 A EVv llation a o tkn eben ar 14 22 PayPal AP st a ee ee sine 15 2e Adaptive Raymenis ir ee 15 2 2 2 Pre Approved RAY MS een 16 2 2 3 Verify ACCOUNT stalUS ee 17 2 2 4 Instant Payment Notification nr ara en 17 28 ag A 18 A eee 19 3 1 Requirements development neon oeneenennenennnenennsenenseenensenenenseenenseenenseenenseenensen 19 3 2 Funcional requireme mS sita 19 33 Q u lity TE QUISTES tai a 20 3 4 Platform requirements 20 A e 20 3 6 Features and milestones u u nen 20 3 6 1 Milestone 1 Basic payments COr annen en enneenenneeeenseeeenseenensenenenseenensen 20 3 6 2 Milestone 2 Recurring payments additional nnen eneen enneenenne enen 21 3 6 3 Milestone 3 Make the payment system an independent tool enne 22 4 DON ii vereen eaten enen eeen A es 25 4 1 Gl6baldes an zr sneren abe bele dd 25 4 1 1 Zend Framework and ModallINd neren darren en 25 4 t2 The9l0balmadel e ld ds 26 4 2 Mlest ne Mii 29 42 1 MOdel ne 29 4 2 2 Controller and MOW reeet reta 30 42 MV Sn leenen ens ae eee dean ea lade ed 32 A5 MISSIOHE Sranan nnee tete 33 431 Ghangesinmihe model ne ee 33 4 3 2 C
21. example of setting up the getVerifiedStatus request can be seen in Code sample 5 8 45 create the request VstatusRequest new GetVerifiedStatusRequest VstatusRequest gt emailAddress email VstatusRequest gt matchCriteria NAME VstatusRequest gt firstName firstname VstatusRequest gt lastName lastname aa new AdaptiveAccounts response aa gt GetVerifiedStatus VstatusRe quest if strtoupper aa gt isSuccess FAILURE strtoupper response gt accountStatus UNVERIFIED account doesn t exist return false else account should be verified if strtoupper response gt accountStatus VERIFIED return true y else this should never happen return false Code sample 5 8 Setting up a getVerifiedStatus request 5 3 Software Improvement Group feedback In this section the feedback on maintainability provided by the Software Improvement Group SIG will be discussed The original feedback can be found in Appendix F 1 Since this feedback is written in Dutch some recommendations are translated and commented on The code was sent for review while finishing the second milestone and scored 4 out of 5 stars on maintainability The unit interface and size were marked as the weak spots To improve on this the following feedback was given Unit interfacing Use less parameters for functions A high number of parameters indicates lack of abstraction and makes it hard to
22. five advertisements for free but they can also pay for their advertisements to be an feature ad The ad will draw more attention to it because it is show in the featured ad listings on the right site of the website except for the main page its show in the centre there 83 2 2 2 Searching advertisements As seen in the example the current system already has the functionality of adding advertisements The two different kinds of advertisements vary in their properties but can both be found using the same search engine as seen in Figure 2 The search engine has several filter options and several advanced searching options Michael needs a room for rent in Boca Raton FL 33432 8 0 Hi my name is Michael Richards and I m new to Roomplug 5 months ago 38 Views 0 Comment 0 Plug Boca Raton FL Spacious 4 BR House to Share in Downtown Leesburg Dog OK ti 700 AVAILABLE IMMEDIATELY I m seeking a neat quiet professional O roommate with secure employment and a pleasant personality to 5 months ago share my home It s a sp Leesburg VA 123 Views 0 Comment 0 Plug Figure 2 Two different kinds of advertisements can be found with the same search engine 2 2 3 Application and Lease agreement After a user has found a suitable advertisement he can apply for it leaving behind personal information for review The owner of the advertisement can then accept or reject the application After accepting a lease agreement can be created wit
23. for the month August First EE Oa Oe DET Figure D 1 1 The overview page 100 00 Pay Delete 25 00 100 00 1 Last fi 525 Newport News VA WANT responsible working roommate for HOUSE Newport News AIRPORT 4 mi Oy 147 Views F 340 Lakeland FL Room for rent 260 Views 450 Sun City CA En Fully furnished Bedroom with Private Bath in Sun City 1257 Views 2 700 Leesburg VA Spacious 4 BR House to Share in Downtown Leesburg Dog OK 142 Views fi 900 New Yor City NY EZ Fully furnished 103 The user can enter the payment data on this page in the form under the header Custom Payment The user selects the Roomplug user that receives the payment by typing part of its name or the full email address of the user to send money to This is illustrated in Figure D 1 2 3 Hub Inbox Logout Hi Test Home Browse Find Blog Screen f mmli a Hub Plug H Posted 525 Newport News VA WANT responsible a ORN working roommate for On Wed Sep 28 11 7 20am Last Login On 11 HOUSE Newport Custom Payment News AIRPORT 4 mi Oy 5 147 Views Receiver Test User 1 Amount Test User Description 340 Lakeland FL Room for rent K Inbox gt Favorites Test User Se Personal Settings if that PayPal 5 Test User E Notes 2e More Open Payments C 450 Sun City CA O Pe Fully furnished Bedroo
24. m d this gt assertQueryContentContains div toggleDivO table tr td endDate gt format m d this gt assertQueryContentContains div toggleDivO table tr td 10 this gt assertQueryContentContains div toggleDivO table tr td 100 00 assert the right actions were taken this gt assertController payment this gt assertAction summary this gt assertModule main this gt assertResponseCode 200 Code sample 6 4 A test using Zend Framework specific assertions 6 3 Results In this chapter the various benefits and pains that were encountered while testing are discussed The examples show bugs caught because of automated testing code analysis results and how those results were used to improve code are discussed and room there is for improvement is discussed 6 3 1 Pros vs Cons Having a big test suite has both its advantages and its disadvantages For example the time put into creating the tests is relatively high compared to the time spent on creating the system itself This is a trade off made resulting in bugs being more likely or less likely to slip into the code Another disadvantage of having a big test suite is the time it takes to run In Figure 6 1 a screen dump of a single run can be seen It took 3 37 minutes to run This time is way too long 54 to run the test suite between each change madeto the code Therefore test were only run after some manual testing and before eac
25. need ra gt Ke lo payi you sra day 100 00 Pay Delete History re gt K Here is my rent for the month September 100 00 PE dem EE Here s the manev vai naid tn the nlumher 25 NN Advanced 700 Leesburg VA Spacious 4 BR House to Share in Downtown Leesburg Dog OK 142 Views 4 900 New Yor City NY Fully furnished L E 2bed 2bath apartment 196 Views 450 Sun City CA Fully furnished Bedroom with Private Bath in Sun City 1257 Views L 340 Lakeland FL Room for rent 260 Views 8 3 525 Newport News VA 111 Figure D 1 13 The overview page showing the approved and active recurring payment Manage payments The overview page is the main entry page to the payment system and is shown in Figure D 1 14 This page is the starting point for all user actions including managing their payments At first there is the custom payment header The contents of this header has already been discussed in the section about creating a payment This section will discuss all the managing actions of the other elements on this page Hub Inbox Logout Hi Test A Home Browse Find Blog Screen Hub Plug Posted Payments 450 suncity cA Fully furnished Bedroom with Private Bath in Sun Last Login On Wed Sep 28 11 7 20am gt gt City Custom Payment a 1257 Views Receiver N x A Amount 0 00 Description 340 Lakeland F
26. of the PayPal SDK library To make sure the right endpoints are used change those too These files contain comments on the changes needed Also for identification purposes the applicationld should be changed to APP 80W284485P519543T in the following files application models PaypalAdapter php search for applicationld library paypal Config paypal_sdk_clientproperties php The reason these changes have to be made is the sandbox contains two test accounts that are used in the tests while communicating with PayPal Currently the test account used is registered by Lars To change this an account should be made on http developer paypal com to retrieve your own API username password and signature which can be changed in library paypal Config paypal_sdk_clientproperties php The test accounts have the following information sender 1312933115 per gmail com First name Test Last name User P w 12345678 receiv 1312932837 per gmail com First name Test Last name User P w 12345678 Note Specific changes done to go from sandbox to live are found in those commits https github com roomplug roomplug commit 3b140412b63476deac3834c92a3eb0fae6373e30 https github com roomplug roomplug commit 8fe7c06079c36d7aab65e2de286c 784b36fe6d9c9 https github com roomplug roomplug commit b964d6b8bf26ee1c0e91 e80026adedf6feb8d217 120 Appendix E Roomplug This appendix will give insight in the environment in which this project is e
27. or adding a method to the Payment class a corresponding method using this method needs to be added to the PaymentConnector class or a similar class and connector Even with this weakness the chosen solution remains the better one More details on the model design can be found in section 4 1 In order to keep the execution of payments generic an abstract class PaymentAdapter is created containing functions commonly used in the payment process More specifically those functions are executePayments setUpRecurringPayment and paymentsAreValid The PaypalAdapter class implements those functions to e executePayments Retrieve a token for the given payment from PayPal e setUpRecurringPayment Retrieve a pre approval token for the recurring payment from PayPal e paymentsAreValid Checks PayPal specific constraints for a payment In the current flow the executePayments and setUpRecurringPayment functions are used in AJAX calls from the summary page Adding a new payment method would involve creating those calls as well This is built this way because a different payment method can involve a whole different process What if for example the other method does not work with tokens and redirecting it to an external website at all A general approach is not possible in this case and therefore those AJAX calls refer to an action in the PayPalController holding PayPal specific actions For a new payment method a new controller should be created with a
28. or e check RentPayments com also offers functionality to integrate payments and property with the accounting and property management software used by the landlords and renters This makes it possible for new users to start using RentPayment com without any problems 17 NES 12 00 PM 4 0 E FETT mobile Figure 5 The RentPayment com iPhone app 93 5 1 2 eRentPayment com eRentPayment com is another big online rent payment system The offer single and recurring transctions which can be don either through the website or by phone It s possible for renters to authorize the payments to the landlords without using the website They only need to fill out a form which authorizes a recurring payment Instead of worrying about payment methods themselves eRentPayment com uses the Automated Clearing House ACH network ACH is a large financial transaction network in the USA taking care of debit and credit checking and processing transactions by various means including payment by credit card 18 19 20 94 eRentPayment 06212010 Status j Pende man w tn Booey vat m Renter Joe Ore Manag Select Month Year me 2010 Checking Y Check Run Report Receiving Account nedang Accounts must Checking 245 Transaction Fee Option fire AL Manager pays 100 of Transaction Fee efteniParmees Notes Messages to current Renters Figure 6 The eRentPayment com man
29. process We are concurrently in the works wth Paypal to be invited into their Business Pilot program in which the transaction fee on their part will be reduced down from 2 9 0 30 on every transaction to 0 50 With this new fee structure and partnership in place the overall transaction cost is dramatically reduced and hence drive Roomplug business model to help our customers to socially rent and collect payment on our site We commend the efforts of Dirk Guijt and Lars Tijhuis both our Dutch engineers for building this platform which will greatly impact the landscape and future of renting online Roomplug is truly grateful and thank them for their energies knowedge workmanship and collaboration in providing us an innovative service to the rental marketspace We hope to be the premier leader in this domain for many users to Socially Rent and Live Happily Under One Roof Rodney Nguyen Founder amp CEO of Roomplug 7 2 Recommendations This section will discuss some recommendations and future work on the Roomplug system 7 2 1 Features Unfortunately this project could not cover all features that had been thought of Roomplug made some choices to prioritize features Some of them did make it into a milestone but some did not Payment requests payment suggestions and pre filled payments are three of the features that were in the original requirements but were moved out of this project because other features supported the busine
30. receiver relative to the percentage of the total amount each receives The receiverList property expects an array with Receiver objects This is also a class provided by the PayPal SDK Each Receiveris identified by its email The amount to receive and whether the receiver is the primary receiver is specified for each Receiver When users make a payment they will only see the primary receiver as the user they send money to The AdaptivePayments object invokes the actual Pay method The response can result in either a failure or success If the response was a success a payKey is returned that can be used to redirect the user to the PayPal systems finishing the payment This is done using AJAX calls and thus this token is returned in JSON format to make it easier to access payRequest new PayRequest primary receivers users pay fee payRequest gt feesPayer PRIMARYRECEIVER payRequest gt memo payments 0 gt getDescription create Paypal API objects out of the collected receivers receiverList array add roomplug as secondary receiver as of v0 1 2 receiver new Receiver receiver gt email ROOMPLUG_PAYPAL_EMAIL receiver gt amount ROOMPLUG_FEE 100 0 receiver gt primary false receiverList receiver and the other foreach receivers as email gt amount receiver new Receiver receiver gt email email receiver gt amount amount 100 0 receiver gt primary
31. that check for true false paths in the work flows of the payment process This has to be done manually now 58 2 conclusion This chapter will revisit the problem defined in chapter 1 It uses chapters 2 through 6 to draw conclusions on how and if the problem has been solved and what the added value of the system is to Roomplug After that recommendations and future work will be discussed 7 1 Results This project was about the problem formulated in this question How can the current payment process between renters and landlords be improved by using the tools and services of the Roomplug website This problem is solved by creating a way for users to pay their rent online using the Roomplug website The solution meets all the requirements stated in the problem definition 1 Roomplug wants a prototype of a rent payment system which allows renters and landlords to pay each other online The prototype of the online payment system is completed and is currently active on the live beta site of Roomplug Renters now have the possibility to pay their landlord through the Roomplug website 2 The payment system should be designed and build to be a stand alone system using data from other components of the Roomplug website The payment system is like the rest of the Roomplug website created using the MVC pattern in Zend Framework All components of the payment system could be transferred and used in another system using this same
32. to search for a user and select it Features Find user by name When looking for a user by name update the search results on every key stroke using AJAX This gives a dynamic experience making it easier to find the right receiver The information shown should respect the users privacy settings Find user by email Again when searching by email update the search results on every key stroke Since the user can prefer to keep their email address private only show search results if the email address looked for is identical to the email address in the database Guest payments Goal Since the payment system is a profitable tool for Roomplug it is important to make it as easy as possible to use it A user not having an actual account should not stop it from making a payment Features Make a payment as a guest When going to the payment page while not logged in show extra fields for the users first and last name and their email address They can choose to fill in this information or login with their existing account The rest of the process should be the same as the normal payment process 22 Set up your PayPal account Goal Features In former milestones the email users registered with on Roomplug was used to send the money to on PayPal This could lead to trying to send money to non existing PayPal accounts The goal of this feature is to provide users with a form to set up their PayPal account on Roomplug Validate acco
33. use the function Also the functions are normally longer then average and hard to test Unit size Use smaller methods Splitting up long methods into smaller pieces makes them more readable testable and therefor maintainable In the next sections examples are given on both feedback points and how this was improved After that the feedback given on our improvements are discussed 46 5 3 1 Examples Unit interfacing SIG gave some examples of functions with a high amount of parameters in the code Those functions and its usage can be found in Code sample 5 9 private function createRecurringPayment hash amount description frequency startDate endDate redundant E private function recurringInputHasErrors landlord tenant hash amount description frequency startDate endDate redundant create a recurring payment old style this gt createRecurringPayment this gt getRequest gt getParam lease_hash this gt getRequest gt getParam pay_amount this gt getRequest gt getParam pay_description this gt getRequest gt getParam rpay_frequency this gt getRequest gt getParam rpay_date_start this gt getRequest gt getParam rpay_date_end T Code sample 5 9 Example of functions that contain to much parameters The suggestion made for improvement was to put the variables in a RecurringPayment object prior to calling the function This turned out no
34. 0 S JIU sda s MO JYJOM pue suonoe sdejs suonoe SOUOISOIIW JO 1817 jusudojansp S nyeg ay UO MAIAIOAO Jeaj9 e sn sanib siy juewealmbal ay apIAIp dnouy dno sua s s wa s s juaw ed ubisap juewnoop ubisag juaw ed y jo sjuauwaje ay jo japou Jeajo e 19H OL eu Jo u Isep eqo b ajes1o regoj ajes1o sjuawa4mba SJ9 U9J sweu eip ay Ul paiinads se vonde ue ajajduoo 0 1 p10 UI op ay pue spJo pue au y 0q MO DYJOM SWeIBeIP MOIPJOM 0 spaau Jasn e sdajs Jeym Appoexe MOUS SMOLJYIOM 9SIY JO SWeIBeIP MOI OM 842319 ares ua s s si OP 0 jqe eq pinoys suasn yey suonoe juaw ed jua suluo ay 10 sjuawalnbal 151 sjuawaImbay y JO MAIAIBAO JEA D e SAI p noys sjuawea mbal eyy sjuawalnba Jo S11 e 97910 a e819 SajqeenIjed moys uonoy 87 88 3 Software Development Methods In this chapter the development methods and patterns will be discussed that will be applied during the project For the software building process the Feature Driven Development methodology is applied The main pattern used in the project is the Model View Controller pattern 3 1 Feature Driven Development Feature Driven Development FDD is the most suitable method for the task at hand This is because the required system can be easily split up in various different features The basic features would be to make a payment to another user on the website To integrate this in the whole Roomplug system features will be added to i
35. 1 16 Once the data that has been entered is verified the user is all set to receive payments f Hub Inbox Logout Hi Tester Home Browse Find Blog Screen rt BETA foomplug Hub H Plug H Posted Payments 3 700 Leesburg VA Spacious 4 BR House to Share in Downtown Last Login On Mon Aug 22 p mon fc d Leesburg Dog OK My Personal Info amp 142 Views My Location 1 My Password u 900 New Yor City NY Inbox Fully furnished Av PavPal Accoun 2bed 2bath apartment Favorites My PayPal Account 196 Views p Personal Settings To be able to receive money through Roomplug please provide your First name Last name and Email address as you provided them in your PayPal account We need this information 2 to verify your PayPal account q First name Last name 450 Sun City CA Fully furnished Bedroom with Private Bath in Sun City 1257 Views 525 Newport News VA WANT responsible working roommate for HOUSE Newport News AIRPORT 4 mi Oy Figure D 1 16 The profile page showing the PayPal account info form Email Verify Account My Credit Cards kl My Images ke Feature IPN and paymenttroubleshooting It might happen that a payment is executed in the PayPal system but the IPN calls did not get through to the Roomplug system PayPal will try to resend the IPN call for four days in intervals that increase in size Although it is unlikely it might be possible that
36. 5 171 189 207 226 246 267 311 335 359 384 410 20 PN co aroB Roan 24 32 41 61 73 100 114 130 147 165 184 204 225 247 270 294 319 345 372 400 429 460 491 15 100 117 134 153 217 241 266 292 319 348 378 409 441 475 509 545 583 10 10 16 23 32 43 55 83 117 136 157 179 203 282 312 342 375 409 444 481 519 558 600 642 686 Figure 6 2 Cyclomatic complexity versus code coverage 22 6 4 Future test automation Although an extensive test suite was created during the development of the payment system it does not stop expanding For each feature to be added in the future new tests related to this new feature have to be added Also changes in the current code that modify the output on a N 11 26 37 49 5338 1 135 182 208 235 265 329 363 399 437 477 518 561 652 750 802 NES BR ano 110 132 156 182 210 240 272 342 380 420 462 552 702 756 812 870 930 57 page may involve changing the assertions done in the existing test cases Basically changing or extending the current payment system implies changing the test suite as well Automated test work that was not done in this project is GUI testing Tools like Selenium IDE 23 could be used to create a test suite involving actual user actions to be executed and again asserting the pages show what they should show This could help in creating tests
37. 69 WD introduction This chapter will describe what problem is solved in this project how that problem is solved and in what time span this is done Chapter 7 will revisit this chapter to draw conclusions on the results of this project 1 1 Roomplug Roomplug is a startup company founded in 2010 with the mission of making online property management accessible and easy for everyone 1 The online rental market already had property marketplaces background and credit check services and rent payment systems available Roomplug is unique because it puts all these tools and services together into one system From finding a room roommate to signing the lease agreement and paying the rent Everything is there it s a one stop shop for renting Currently the Roomplug system provides the following functionality 1 Users can create advertisements for the rooms they have for rent or to indicate that they are looking for a room 2 Users can search trough the advertisements 3 Users can apply to an advertisement after which the owner of the advertisement can accept or decline an application or ask them for a background report 4 Users can use the TransUnion 2 background check service to provide the landlords with a background report about themselves 5 Users can set up a lease agreement with another user This lease agreement can be digitally signed 1 2 Problem definition The project is part of the one stop shop for renting that Roompl
38. A Feature ra a Here s the money you paid to the plumber 25 00 Fi gt Here is my rent for the month August 100 00 First H Last Fully furnished Bedroom with Private Bath in Sun City 1257 Views 8 340 Lakeland FL Room for rent a 260 Views Figure D 1 7 The overview page showing the processed payment 107 Making a guestpayment Making a guest payment works pretty much the same as making a custom payment The only difference is that a user is not logged in and it has to fill in an extra form to initiate the payment This form includes the first name last name and email address of the guest shown in Figure D 1 8 The guest payment form can be found here http www roomplug com pay guest Register Login Welcome Guest f Login Login Home Browse Find Blog Screen DOMPIUO zz Fully furnished 2bed 2bath apartment EN ERE NET REEN H 196 Views AAA Firstname 1 Lastname Or Login 1 Email 1 t 1 ede 4 a 525 Newport News VA Receiver x WANT responsible Amount 0 00 working roommate for HOUSE Newport Description News AIRPORT 4 mi Oy 147 Views Pay dea Notes Roomplug charges a 1 fee for every transaction On top of that PayPal charges a fee By default the receiving party pays for the fee More information on PayPal fees can be found here amp 340 Lakeland FL Room for rent 260 Views Feature Figure D 1 8 The guest payment
39. Connector class or a similar class and connector This is a weak point of the approach chosen but this should only occur when a fundamental change is made to a Payment Cronjob The Roomplug system must take care of executing payments for the recurring payments in the system The recurring payment script that does this can be found in the CronjobController It runs twice a day using a cronjob which is configured on the webserver It runs twice for redundancy reasons the second run will backup the first one in case something goes wrong The cronjob is currently set to run at 11 55 AM and 11 55 PM and it executes the following command curl http www roomplug com cronjob recurringpayment secret_password secret password The secret password in this command should be replaced with the actual password which is set in the init function of the CronjobController The password is set to prevent random people from starting the recurring payment script by navigating to the address It does not hurt if only one user does this but the server will be overloaded if hundreds of users do The script is constructed as a webpage and therefore accessible to the public because its the easiest way to bootstrap Zend Framework and load all the models D 3 Test manual How it is structured Almost every source file in the payment system has a mirroredtest file in the test suite The ones that do not are tested by using related classes Such an example
40. Final Report Rent Payment Made Simple Developing software in an entrepreneurial environment Delft i U D e ft University of Technology Version 1 1 November 28 2011 Delft University of Technology Faculty EEMCS Bachelors Project Group IN3405 Dirk Guijt 1308084 Lars Tijhuis 1308335 Thesis Committee Chairman Prof Drs Dr L J M Rothkrantz B Sc Coordinator Drs P R van Nieuwenhuizen Company Supervisors R Nguyen S Kanajan Summary Roomplug was founded to make renting simple It provides all the tools needed to go from having an empty property to getting the lease agreement signed Roomplug also wants to solve the problems on rent payment That is what this project is all about creating an online rent payment system Since Roomplug is a startup company it is expected that the requirements will change as the business model and needs of Roomplug change over time The Feature Driven Development FDD methodology was chosen to create a development track suitable for this changing set of requirements In the FDD track the features are split up and grouped in milestones Every next milestone can be changed to support the new needs of Roomplug Before work on the first milestone starts a global high level design is created to make sure that all milestones work towards the same goal The design details of each milestone are then created as soon as work on that milestone starts This prevents unnecessary design work on feat
41. L Inbox Zz Room for rent Favorites O Setup a recurring payment 260 Views Personal Pay Settings Roomplug charges a 1 fee for every transaction On top of that PayPal E Notes charges a fee By default the receiving party pays for the fee More information on PayPal fees can be found here Recurring Payments a 525 Newport News VA dice AOS ae WANT responsible inactive Every week 20 00 working roommate for Activate Delete from 10 01 2011 until 12 31 2011 i HOUSE Newport News AIRPORT 4 mi id Every first day of the month 147 Views ra K Active from 10 01 2011 until 09 30 2012 9100 00 _ 8 900 New Yor City NY ela Fully furnished Here is some money still need hed EEE 196 Views E K to pay to you some day 100 00 Pay Delete History 700 Leesburg VA E gt Here is my rent for the month September 100 00 Spacious 4 BR House to Share in Downtown Leesburg Dog OK a Here s the money you paid to the plumber 25 00 142 Views ra gt K Here is my rent for the month August 100 00 i First 1 Last Feature MARE 112 About Contact FAQ Jobs Privacy Terms 2010 11 Roomplug LLC Os Figure D 1 14 The overview page showing all kinds of payments The first header after Custom Payments is called Recurring Payments This header will only show if there actually are active incoming or an outgoing recurring payment If the recurring payment is not activated the user gets
42. The user will then be taken into the PayPal payment system to execute the actual payment as seen in Figure D 1 5 105 f Hub Inbox Logout Hi Test BETA Home Browse Find Bl Screen FT OOMpIUN Hub H Plug H Posted PayPal 900 New Yor mn Br Last Login On Wed Sep 28 11 7 20am rin apartment i Log in to your PayPal account to complete fot this purchase Receiver Aoun toon Description l New to PayPal 5525 Newport A ANT reap are Inbox Favorites Sign up and buy in a few easy steps ee ee Personal P News AIRPORT 4 mi Oy Settings Payment in progress 1447 Views Feature A A A 340 Lakeland FL Room for rent 1260 Views 2 rE Figure D 1 5 The PayPal overlay After the user finishes the payment in the PayPal system the user will see the success message and a link back to the overview page illustrated in Figure D 1 6 3 Hub Inbox Logout Hi Test Home Browse Find Blog Screen Y roomolud Hub Plug Posted Payments f 525 Newport News VA WANT responsible working roommate for Last Login On Wed Sep 28 11 7 20am HOUSE Newport Payment summary nnd mi Oy PA eN iia gigs is 147 Views Receiver User Test s Amount 100 00 Description Here is my rent for the month September By using PayPal you agree to PayPal s Acceptable Use Policy Ifyou have any questions you ca
43. a MySQL server Only little configuration tweaks are necessary to replicate the live environment of the Roomplug website 4 2 HTML CSS JavaScript Query AJAX Since the portal of Roomplug is a website HTML and CSS is used to display the actual pages To give users an interactive experience there are a lot of JavaScript applications which enables the developer to make changes to the HTML and CSS client side Query is a JavaScript library offering a lot out of the box JavaScript features making it easier to use JavaScript Also AJAX calls can be made using Query This allows the website to get new data from the server or even make changes to the data without a post back 5 6 4 3 Zend framework The Roomplug code is built upon the Zend framework This framework takes care of the more detailed part of programming sothe programmer can focus on the bigger picture The framework comes with a lot of standard reusable functionalities and it takes care of the communication with the database The programmer only has to focus on what needs to be done instead of thinking of how it s done On top of this the Zend framework also supports the MVC design structure 7 4 4 PHPUnit Unit testing is done with PHPUnit which is incorporated in the Zend framework It makes unit testing available to PHP developers in an easy to set up way The tests will be written to test every feature before proceeding to the next feature 8 91 4 5 Eclips
44. adding tests for the new lines to cover or adding assertions in the existing tests This and the fact that the code coverage report does not analyze branch coverage gives having line coverage a good balance between time spent and results achieved More information on how the PHP Unit test suite is set up can be read in section 6 2 6 1 2 Regression testing Some functionalities are hard to test using PHP Unit For example the IPN listener that awaits a call from PayPal to verify a payment was processed is hard to test using PHPUnit PayPal provides a tool that enables a developer to send IPN messages to a specified address This way it is possible to test the IPN listener manually 51 Also the PayPal payment progress which involves mostly JavaScript code can not be tested using PHPUnit and therefore needs to be tested manually 6 2 PHPUnit Almost every source file in the payment system has a mirroredtest file in the test suite The ones that do not are tested by using related classes Such an example is the Payments class which aligns with the Paymentclass This mirroring of files can be seen in the file structure of the Roomplug source files The phpunit xml file defines what file is used to bootstrap the Zend Application where the test suite can be found and what source files should or should not be analyzed on code coverage An example of the contents can be found in Code sample 6 1 lt phpunit bootstrap application bo
45. ager interface 5 1 3 Pay YourRent com PayYourRent com offers an elaborate manager for both landlords and renters Renters can only pay the rent through the website with one time payments or they can set up automatic recurring payments The manager also supports reporting maintenance issues to the landlords and landlords can post announcements to renters It s also possible to take care of property insurance through the website Like eRentPayment com PayYourRent com supports credit cards and e checks which are processed by the ACH network 20 21 22 y Pay YourRent ren HOME PAYMENTS Expoar PAYMENTS TENANTS PROPERTIES ADD MAINTENANCE APPLICATIONS ANNOUNCEMENTS EXPORT IME PAYMENTS ROOMMATES MAINTENANCE RECENT PAYMENTS TOTAL DUE STATUS 1 06 emo on avan 18 2011 1025 00 NOT PAID AA PayYourRent PayYourRent 1000 00 prio on apri 16 20 1000 00 prio on nan 15 2001 ANNOUNCEMENTS Setup Auto Pay Manager Announcement Fre alarm testing Figure 7 The eRentPayment com manager interface 5 2 PayPal Roomplug uses PayPal as it s main provider for financial transactions It s already in use for the payed services of the website like the featured ads PayPal will also be the main provider used for the rent payment system although the system will be designed so that other payment providers are easily added 95 5 2 1 PayPal API PayPal has an extensive API and it
46. aginating in the payments_list partial This partial can thus be used to display payments and allows the programmer to setsome options as can be seen in Code sample 5 15 assign payments variable to show the history in its list this gt enablePaginator true this gt payments this gt history this gt showActions false print this gt render partials payment payments_list php Code sample 5 15 Using the payments_list partial 5 3 3 Feedback on improvements At the time of writing this feedback did not get back to us yet 5 4 Maintainability Much attention was paid to the maintainability of the code Zend Framework creates an environment that helps to achieve this With its MVC structure code can be easily separated The challenge faced with maintainability in this project is that it needs to be easy to add another payment method without changing too much of the existing code Two different parts need to 49 be taken into account when achieving this the model and the use of the adapter to execute payments The PaymentConnector and the other connector classes are introduced in the model to make it easier to expand it with a new payment method The only thing that needs to be done is extending the connector classes with classes containing specific information to that payment method Very little work needs to be done in the existing classes A weak point on maintainability in this approach is that when changing
47. al_first_name and paypal last name These three properties are checked with the PayPal system and if they get verified the user is all set to receive payments through the payment system using the PayPal payment method 4 6 User Interface In general one of the goals in UI design is to keep it simple The user interface UI for the payment system should align with this goal Users should not have to go through many screens before their payment finally gets executed and the pages themselves should not be too complex Roomplug spent a lot of time on researching and designing its website Ul The payment systems Ul is built to support this same style The Roomplug founders gave some recommendations and improvements on what it should look like and how it should work They based their recommendations on their knowledge about existing systems in the market That is why no user input was involved in this project User experience tests might be done in the future to validate the Ul design 35 The user payment flow in Figure 4 7 shows the simplicity of the flow of the Ul A user only gets to see three different Roomplug screens on the website to make a payment The first screen is the payment overview where a payment can be created The second screen is the payment summary showing the payment summary and the different payment methods that can be selected to pay Finally there are the success and error screens depending on the outcome of the paym
48. als the user that the text is clickable 3 Hub Inbox Logout Hi Test A 100 ra Home Browse Find Blog Screen Hub Plug Posted payments 525 Newport News VA WANT responsible working roommate for HOUSE Newport Advanced Last Login On Wed Sep 28 11 7 20a Payment details News AIRPORT 4 mi Oy 5 147 Views 0 Payment from User Test aed Payment receiver User Test Amount 100 00 4 450 Sun City CA Description Here is my rent for the month September Fully furnished BR with Private Bath in Sun City Status Paid 1257 Views Pay Date September 01 2011 12 00 AM Inbox Favorites Type Custom Personal Settings Y 900 New Yor City NY Fully furnished 2bed 2bath apartment 196 Views Back to overview Feature Ci A MIE Figure D 1 15 The details page of a recurring payment 113 The details page is fairly simple since it only shows the recurring payment details as illustrated in Figure D 1 15 The page will also show buttons to do actions like pay or delete on this payment if those actions are possible Setup account In order to receive payments Roomplug users have to set up their PayPal account in their Roomplug profile From the hub the users can click the personal link under their profile picture Then they have to click on the My PayPal Account header This will reveal the PayPal account verification form as shown in Figure D
49. also provides sandbox possibilities for testing purposes 23 24 This makes it easy to develop and test the payment functionality on the Roomplug systems Also a SDK is provided which makes it easier to use the available API operations 25 An overview of the basic Adaptive API 26 operations are shown in Figure 8 API Operations Related to Payments API Operation Description Pay Transfers funds from a sender s PayPal account to one or more receivers PayPal accounts up to 6 receivers PaymentDetails Obtains information about a payment created with the Pay API operation ExecutePayment Executes a payment GetPaymentOptions Obtain the settings specified with the SetPaymentOptions API operation SetPaymentOptions Sets payment options API Operations Related to Preapprovals API Operation Description Preapproval Sets up preapprovals which is an approval to make future payments on the sender s behalf PreapprovalDetails Obtains information about a preapproval CancelPreapproval Cancels a preapproval Other API Operations API Operation Description Refund Refunds all or part of a payment ConvertCurrency Obtains the current foreign exchange FX rate for a specific amount and currency GetFundingPlans Determines the funding sources that are available for a specified payment GetShippingAddresses Obtains the selected shipping address Figure 8 An overview of the API operations 27 96 5 2 2 Chained Payments PayPal provides so calle
50. ata from the database Unfortunately the Zend_Db library also has its limitations which influences the construction of the global model Especially mapping multiple database tables on one class is an issue It can be done using a reference map which is implemented in one table class and references to the properties of the other table s While this is not a problem when having only two classes a single class extending another class for example it becomes an issue if there are multiple classes that need to reference a single table The reference map then has to be implemented in all classes This problem and the solution are illustrated in Figure 4 1 25 Zend_DB Zend_DB Figure 4 1 Inheritance and the database mapping problem and solution The figure shows four situations Situation 1 shows the model as it is designed There are classes B and C which are extending class A All three classes have their own database table storing the information of the objects of that type It would be easy to implement this model and let class A extend the Zend_Db_ Table class of the Zend_Db library like shown in situation 2 Unfortunately Zend Framework does not support this Letting all the subclasses have a reference map to the super class is a possible solution for this problem The design for this solution is shown in situation 3 Although that solution works the reference map has to be implemented in every subclass both B and C This
51. atus NOT_VERIFIED gt PaymentStatus OPEN gt Code sample 5 12 Constants used in the JavaScript file Include the JavaScript for tl 1e p ayment process lt script type text javascript en si paymentld gt gt lt script gt Code sample 5 13 Importing the dynamic JavaScript file In the files contianing both HTML and PHP the PHP is used for different representations of the page only A minimum amount of logic is done in the HTML pages but for some files an exception was made An example is the partial file payments_list php This view is designed to show a list of payments and uses in multiple scenarios Since the list should allow paginating some logic is included in this view as seen in Code sample 5 14 Also if there are no payments to show a message should show rather than presenting an empty table This is the kind of logic 48 that is widely seen in view files when coding in PHP presentation logic rather than business logic 19 20 if this gt enablePaginator set up paginator and current page items HTML code if count this gt payments 0 foreach this gt payments as item print a message rather then showingan empty table print a representation of the payment if this gt showActions display payment specific action buttons 3 HTML code if this gt enablePaginator show the paginator controls Code sample 5 14 Enabling p
52. aypalController The PaymentController takes care of all the action requests and logic needed to interact with the model The PaypalController takes care of all the PayPal specific requests and logic For the PaymentController an understanding of the page flow of the user through the payment system is needed to model the controller and views Such a flow would show the actions a user can take while creating and paying a payment A simple flow of a user making a payment can be found in Figure 4 7 30 Payments y payment overview Back to Create custom Pay an open payments payment payment ee Select pay Continue with paypal PayPal overlay for transaction i Cancel Transaction succesfull Transaction failed Error overview Y Succes overview Figure 4 7 A simple page flow diagram of making a payment Figure 4 7 shows that the PaymentController at least needs an overview page and a summary page More pages seem to be needed if the flow diagram is extended with more detailed information about page navigation a synchronous calls AJAX and background processes This extended flow diagram can be found in Appendix G 2 The extended diagram shows that there should also be a page for checking the status of the payment The PaypalController needs to have a success and error action and there should be an action to retrieve the PayPal payment token Finally some standard functionality act
53. bles Final report November e Present the work at DUT e Deliverables Presentation Since the various phases overlap each other a graphical overview is given in Figure 10 99 18 jul Week 1 Preparation and trip to USA Preliminary report Final report Create requirements list Create workflow diagrams Create global design Group actions steps into features Define core and additional features Design core features Implement core features Test core features Design additional features Implement additional features Test additional features SIG Code Review SIG Code Feedback SIG Processing Feedback SIG Second Code Review 8 aug 15 aug 22 aug 29 aug 5 sep 12 sep 19 sep 26 sep 3 okt 4 5 6 7 8 9 10 11 12 E Figure 10 A graphical view on the timetable 100 References 1 About Roomplug Roomplug Visited on July 27 2011 lt http www roomplug com about gt 2 Feature Driven Development FDD and Agile Modeling Ambler S W Visited on July 29 2011 lt http www agilemodeling com essays fdd htm gt 3 Lethbridge T C and Lagani re R Object Oriented Software Engineering second edition McGraw Hill Education UK 2005 pp 355 357 4 XAMPP Apache Friends Visited on July 29 2011 lt http www apachefriends org en xampp html gt 5 Query The Query Project Visited on August 1 2011 lt http query com gt 6 Query AJAX The jQuery Project Visite
54. clean when starting tests in a certain test class 52 class TestCase extends Zend_Test_PHPUnit_ControllerTestCase public static function setUpBeforeClass db Zend_Registry get db clear database add two users Code sample 6 2 The TestCase class providing a clean environment In a test class itself the environment needs to be kept clean between every test function An example of the setUp and tearDown functions of the PaymentTestclass can be found in Code sample 6 3 The setUp function is called before every test function starts the tearDown is called after each test function ends This allows the programmer to make sure the environment is clean before each test run class PaymentTest extends TestCase private payments null private payment null private users null private user null public function setUp set up objects this gt payments new Payments this gt payment this gt payments gt createRow this gt users new Users this gt user this gt users gt createRow public function tearDown clear objects if this gt payment null this gt payment gt delete if this gt user null this gt user gt delete unset this gt payments unset this gt payment unset this gt users unset this gt user Code sample 6 3 The setUp and tearDown classes provided to clean up your environment Sample code showing how Zends prov
55. ctions specific to this new payment method It is a different story for the paymentsAreValidtunction No matter what payment method is used it can be implemented to return results for a specific payment method in the corresponding adapter created There is one change that needs to be done when adding a second payment method though Currently the PayPal specific checks are done right after the general input checks and on error returned with them When adding a second payment method this is not the wanted behaviour PayPal may restrict a certain condition but a second payment method may not If the second payment method would allow the payment to be made and PayPal does not the wanted behaviour is to show the summary page and disable the option to pay with PayPal with the reason why it is disabled Users can then still choose to use the second option The place to do the checks can remain the same the way the response is handled should change 50 resti ng In this project a lot of effort was put in the test suite This was of great help while extending the system after the core features were build It also turned out to be extremely useful while refactoring the code In this chapter the test plan is presented and the results from testing The test plan includes what tools we used for testing and what parts had to be tested manually The results show some examples of bugs that would not have been found manually and how the test reports were
56. d chained payments which allows Roomplug to take a cut of the payed amount and forwarding the remainder to the receiver This is shown in Figure 9 Chained Payment a Tenant Roomplug Landlord 1 00 499 Figure 9 Chained payment using PayPal Note that PayPal fees are not included In order to use these advanced features of PayPal the application must meet the following requirements 5 A premier or business PayPal account is needed 6 Permissions to the Adaptive API need to be given in the account settings 7 The implementation needs to be verified guidelines given on 28 29 30 97 98 6 Timetable The following overview gives a written description on the plan Weeks 1 3 13 Get to know the development environment Zend framework Query amp AJAX PHPUnit Github 14 Research existing Peer to Peer payment systems 15 Review PayPal APIs 16 Deliverables Preliminary report Weeks 4 5 18 Make overall design high level object model and feature list 19 Group features in sets 20 Determine the order of implementation using the MoSCoW model 21 Determine actual milestones and deadlines for each Weeks 6 8 19 Make feature level design and implementation for core features 20 Write tests for core features 21 Deliverables Code for review by SIG Weeks 9 12 22 Make feature level design and implementation for extending features 23 Write tests for extending features 21 Delivera
57. d on August 1 2011 lt http api jquery com jQuery ajax gt 7 Programmer s Reference Guide Zend technologies Ltd Visited on July 29 2011 lt http framework zend com manual en learning quickstart intro html gt 8 Unit Testing with the Zend Framework with Zend_Test and PHPUnit Zend technologies Ltd Visited on July 29 2011 lt http www zendcasts com unit testing with the zend framework with zend_test and phpunit 2009 06 gt 9 Eclipse The Eclipse Foundation Visited on August 1 2011 lt http www eclipse org gt 10 PHPeclipse PHPeclipse Visited on August 1 2011 lt http www phpeclipse com gt 11 EGit The Eclipse Foundation Visited on August 1 2011 lt http eclipse org egit gt 12 SeleniumHQ Selenium Visited on August 1 2011 lt http seleniumhq org gt 13 Selenium Remote Control Selenium Visited on August 1 2011 lt http seleniumhq org projects remote control gt 14 About GIT GIT Visited on August 1 2011 lt http git scm com about gt 15 About GitHub GitHub Inc Visited on August 1 2011 lt https github com about gt 16 Browser Statistics w3schools Visited on August 1 2011 lt http www w3schools com browsers browsers_stats asp gt 17 RentPayment products YapStone Inc Visited on August 1 2011 lt http www rentpayment com products index html gt 18 Online Rent Payment
58. de sample 5 5 The PaypalPayment class extending PaymentConnector 5 2 PayPal API PayPal provides an SDK for communication with its API Instead of writing the request in Name Value Pair format yourself this SDK lets you set up a request using objects instead 14 This not only makes it easier to develop but also makes it more maintainable as it is easier to read In the payment system three kinds of PayPal API operations are used From the Adaptive Payments API the Pay and Preapproval operations are used From the Adaptive Accounts API the GetVerifiedStatus operation is used In the next sections examples are given on how these operations canbe invoked using the SDK Mind that in the code samples shown code has been left out to highlight the more important properties 5 2 1 Pay request Code sample 5 6 gives an overview of properties to set to make a Pay request Properties worth notifying are the feesPayer and the receiverList The feesPayer property determines what party pays the PayPal fee This property can be set to PRIMARYRECEIVER SECONDARYONLY and EACHRECEIVER Note that no matter what option is chosen the total amount of fees stays 43 the same With SECONDARYONLY the fees are split among the secondary receivers In this case this is Roomplug Roomplug made the choice that the receiving user should pays the fee thus the property is set to PRIMARYRECEIVER EACHRECEIVER would split the fees among both the primary and secondary
59. ding of these technologies is needed to do any work on the project Chapter 3 discusses the requirements of the project and it shows how the problem is divided into features and milestones Chapter 4 shows how the design of the project was constructed Chapter 5 will give some implementation details and it shows how the comments ofthe Software Improvement Group were used to improve the code Chapter 6 discusses the testing of the payment systems classes Chapter 7 will finally draw conclusion on the result of the project and give recommendations on future work 12 Technologies This chapter will give insight in the technologies that are used in this project This chapter discusses parts of Zend Framework the PayPal API and PHPUnit 2 1 Zend Framework The system is built using Zend Framework This is a popular PHP framework that allows the programmer to use a lot of components like a database access layer a template engine and much more One of its bigger advantage is the modular MVC design to make code more reusable and easier to maintain 4 It was an obvious choice to use Zend Framework since the current system is built in it and it would be tedious to deviate from this Zend Db Zend Layout and the MVC structure were used extensively while building the payment system Those parts will be discussed into more detail in the next sections Also an evaluation is written in section 2 1 4 about how the Zend Framework contributed to the project
60. dvised to pack those two dates into one class see also section 5 3 Therefore the Period class was created There are more changes in the already existing classes Therefore a detailed class diagram showing the functions and constants in the classes can be found in Appendix G 2 33 4 3 2 Changes in the controllers and views The controllers and views are also updated with new actions and pages to support the recurring payments The class diagram showing the new controller model can be found in Appendix G 2 The addition of the CronjobController is the biggest change in the diagram Once a user has pre approved a set of payments the Roomplug systems have to take care of executing them on the dates specified by the user A cronjob or crontab is a UNIX command that is scheduled to run periodically 18 The command specified on the Roomplug server executes the recurringpaymentAction script which creates and executes the in RecurringPayments objects specified payments This command runs twice every day The second run functions as a backup if the first run fails for some reason This minimizes the chance that the recurring payments will fail to produce a payment when needed The CronjobController is created to contain all the actions for the scripts that are specified in cronjobs 4 4 Milestone 3 The goals for milestone 3 changed over time In the end it came down to decoupling the payment system and the lease agreement system a
61. e Eclipse is an open source community which focuses on building an open development platform 9 There are numerous plugins for Eclipse including plugins that enables developers to easily code in PHP PHPeclipse 10 Also a plugin is available EGit 11 that integrates the GitHub version control commands into the GUI making it easier to communicate with the GitHub repository 4 6 Selenium Selenium is a suite of tools that provides a way to automate UI testing acros different browsers 12 Using the IDE which is a Firefox plugin user actions can be recorded and assertions can be added which can then be played back on different browsers using Selenium Remote Control 13 This way a test suite can be easily created and used on multiple browsers Also after generating the tests they can be exported to PHPUnit so they can be tweaked further For this project Ul testing will be done manually at first sincethe overhead of creating the test suite is to big The need for a test suite will be reviewed later on in the project 4 7 Github Git is a free and open source version control system and GitHub is a web based cloud hosting service for it Git and GitHub boost collaboration in distributed collaborative software development Roomplug has its repository hosted here 14 15 4 8 Browsers The Roomplug website will be visited by people using different browsers The source code should follow the web standard guidelines to ensure tha
62. e rent payment systems nnen enne ennneennevennenenenenneennerennenenneneneneneennerennenenenenn 93 5 1 1 Rem AY VON GOE ant A E R 93 5 1 2 eRentPaym amp nt GOM necer ri 94 9 1 3 Pay YOU REN COM ers lll 95 og A a 95 De Wel UB AN a Le ee 96 522 Chamed Payments ienaa nenten 97 6 Timetable nne e de eed dic bee Rae eee dak tee eed oe a er ee ee 99 A A tN ene Eier 101 79 80 1 Introduction This project is commissioned by Roomplug LLC Roomplug was in need of software development ninja s to help out on the rent payment system of their full service rental website This is the preliminary report on the online rent payment system 1 1 Roomplug Roomplug is a start up company founded in 2010 and based in San Clemente California USA The company started with the mission of making online property management accessible to everyone As landlords both Rodney Nguyen founder and Sri Kanajan co founder had a hard time managing their properties and their renters using existing services They then decided to create Roomplug 1 The online rental market already has property marketplaces background and credit check services and rent payment systems available Roomplug is unique because it puts all these services together into one system From finding a room roommate to signing the lease agreement to paying the rent Everything is there 81 82 2 Project Description A part of the whole renting process is paying the rent The common way
63. efore the PaypalPayments class can use the PaypalPayment class to represent one of its rows To make the Payment properties accesible in this class an instance of a Payment object is referenced within the PaymentConnector The reason we do this in the connector and not in the PaypalPayment itself is because we do not want to do this for every payment method that might be added in the future In Code sample 5 4 you can see this reference to this Paymentinstance and how the functions of this Paymentinstance are accessed Code sample 5 5 shows how the PaypalPaymentclass extends the PaymentConnector giving it access to the Payment functions and containing only functions for the specific payment method 42 class PaymentConnector extends Zend_Db_Table_Row_Abstract private payment null the payment object where this connects to For this example redundant functions have been omitted jan Gets the description of the payment return string el public function getDescription if this gt invariant return this gt payment gt getDescription else return null qa Sets the description ofthe payment param string description public function setDescription description if this gt invariant this gt payment gt setDescription description Code sample 5 4 The PaymentConnector class class PaypalPayment extends PaymentConnector contains PaypalPayment specific functions only Co
64. egrate all the tools with each other During the project it became clear that a structure in which all the tools are stand alone systems optionally using each others data is better Luckily the payment systems design already supported this new business structure The marketplace that Roomplug provides does not have such a design One of the big problems is that the system lacks a property object holding information on the property that is rented All that information is now stored in an advertisement object Once there is a lease agreement the landlord can delete the advertisement and all information on the property is lost It is recommended to separate the property and the advertisement into two separate objects since the property information can then be used in other parts of the website like the lease agreement system or when searching for the receiving user of a payment The lease agreement itself is stored as plain text so changing the lease agreement template will not affect it This does present another problem The other parts of the Roomplug website including the payment system cannot easily use the information from the lease agreement since the relevant information is not stored in separate database fields There is just one field holding the complete text Although storing the lease agreement as a whole is good practice it is recommended to store the relevant information of the lease agreement in separate fields as well s
65. end framework more in Chapter 5 2 provides an easy way to set up the MVC pattern and to keep the structure organized Since this project has a web architecture the MVC pattern is used somewhat differently as opposed to regular programming languages The different responsibilities are now 7 The View Generates the HTML to display the page 8 The Controller Acts on POST transmissions changing the Model and sets variables for display in the view 9 The Model Manages the information in the database An overview of the MVC pattern in a web architecture is shown in Figure 4 89 Receives Actor Viewed b A os y View ee Events Creates and updates Controller Figure 4 The MVC pattern in a web architecture Note there is no notifaction for changes from the Model to the View Note the updates send from Controller to the View These can be interpreted as the AJAX calls made from the client to the Controller after which the Controller can send back information forcing the View to be updated 90 4 Used Technologies and Tools In this chapter technologies and tools are shortly discussed that will be used in this project 4 1 Apache MySQL 8 PHP The Roomplug code is written in the PHP script language and the data is stored in a MySQL database The XAMPP package is used in order to develop and run the Roomplug website locally 4 It contains the Apache web server with the PHP 5 2 17 extension on it and it also contains
66. ent Of course the payment pages of the payment method comes in between the last two screens but it is not possible to influence that page flow The UI design of the pages themselves is kept simple as well The user manual in Appendix D 1 will walk through all the screens described in the page flow to show the payment system works This section will only discuss the overview page and the summary page itself to illustrate what the two most important pages look like These pages are shown in Figure 4 11 and Figure 4 12 respectively 36 Home Browse Find Blog Screen Hub Inbox Logout Hi Test Pr oompiiji Last Login On Wed Sep 28 11 7 20am Custom Payment a Receiver Nar i x Amount 0 00 Description Inbox 2 Favorites O Set up a recurring payment Personal Pay Settings Roomplug charges a 1 fee for every transaction On top of that PayPal Notes charges a fee By default the receiving party pays for the fee More information on PayPal fees can be found here Recurring Payments _ E Inactive Every week 20 00 Activate Delete from 10 01 2011 until 12 31 2011 i Every first day of the month E gt K Active from 10 01 2011 until 09 30 2012 9100 00 Open Payments Here is some money still need to pay to you some day 100 00 Pay Delete History B E er E Here is my rent for the month September 100 00 E a Ke Here s the money you paid to the plumber 25 00 E gt K Here is my ren
67. eports PHPunit includes the PHP_CodeCoverage library generating a code coverage report and statistics report about complexity of the code analyzed after each test run Using these reports the code and tests were enhanced as to make complexity lower and code coverage higher 56 The index used for a functions complexity is the Change Risk Analysis and Predictions CRAP index This index represents the cyclomatic complexity versus the code coverage of the function This cyclomatic complexity indicates the number of different paths a program can take through a function The C R A P Change Risk Analysis and Predictions index is designed to analyze and predict the amount of effort pain and time required to maintain an existing body of code 21 A lower CRAP score means it is less complex and well covered by tests Determining what a good CRAP score is is up to the programmer to decide Often a threshold of 30 is suggested but while developing the payment system it became clear a threshold of 10 was also a reachable target In Figure 6 2 the CRAP score is shown in a table with cyclomatic complexity versus code coverage Since 100 code coverage is achieved on all functions a maximum score of 10 implies having a function with a cyclomatic complexity of 10 The specific function having a CRAP index of 10 is the prepare View function in the PaymentController This function involves a switch statement taking different actions on t
68. essful as illustrated in Figure D 1 12 FE ompli Home Browse Find Blog Screen f Hub Inbox Logout Hi Test Q Advanced Hub Plug Posted Last Login On Wed Sep 28 11 7 20am Recurring Payment successfully set up Click here to go back to the payment overview Inbox Favorites Personal Settings Feature E e E GM 450 Sun City CA Fully furnished Bedroom with Private Bath in Sun City 1257 Views 8 900 New Yor City NY Fully furnished 2bed 2bath apartment 196 Views 340 Lakeland FL Room for rent Ed 260 Views Figure D 1 12 The success page of the pre approval of a recurring payment After navigating back to the overview page the user will see the recurring payment being active This can be seen in Figure D 1 13 Home Browse Find Blog Screen f Hub Inbox Logout Hi Test A nomili Hub Plug Posted Last Login On Wed Sep 28 11 7 20am Custom Payment a Receiver 1 x Amount 0 00 Description Inbox Favorites CO Set up a recurring payment Personal Pay Settings Roomplug charges a 1 fee for every transaction On top of that PayPal Notes charges a fee By default the receiving party pays for the fee More information on PayPal fees can be found here Recurring Payments Every first day of the month d Active from 11 01 2011 until 10 31 2012 100 00 Open Payments a Here is some money still
69. estone is all about specifying the properties and functions The result of this can be found in the class diagram of the first milestone which can be found in Appendix G 2 A simplified version of this diagram is shown in Figure 4 6 29 PaymentAdapter PaypalAdapter Figure 4 6 The milestone 1 class diagram without functions and properties The class diagram shows the classes Payments PaypalPayments and IPNLog These classes extend the Zend_Db_Table_Abstract class since they represent tables in the database see section 2 1 1 The PNLog class is created to log all incoming IPN calls and actions of the IPN listener This information is for logging purposes only The table rows are represented by the Payment PaymentConnector PaypalPaymentand IPNLogEntry classes The connector does not represent a table row but acts like it does because its subclasses represent table rows The purpose of the connector is explained in section 4 1 1 The last two classes in the diagram PaymentAdapter and PaypalAdapter deal with communication to the PayPal API A new payment method could easily be added by extending the PaymentAdapter and implement the functions for that specific payment method More information on the PayPal API and the implementation of the PaypalAdapter can be found in sections 2 2 and 5 2 respectively 4 2 2 Controllerand View In this milestone two controllers are created for the payment system PaymentController and P
70. extra work has to be done every time a new sub class is added It is even worse when there are changes in superclass A In this case all the subclasses have to update their reference maps The solution is to have a connector between the superclass and its subclasses In this example the connector can hold the reference map to A Having just a reference map presents new implementation problems because the class now has the fields of both tables but does not have the functions of both classes Section 5 1 will present a solution to this implementation problem using the model design of situation 4 4 1 2 The global model As stated before the model is relatively simple There are just payments and recurring payments These classes both need to support at least PayPal as a payment method but there could be more methods in the future Hence the subclasses The Paymentclass and RecurringPayment class will have some properties in common For example they both got have paying and a receiving user So a BasePaymentis created holding that information Including all of this the basic model will look like Figure 4 2 26 Figure 4 2 The basic model of the payment objects The model has to be changed to take Zend Framework implementation problems discussed in section 4 1 1 into account The classes cannot just be mapped on the database using the structure of Figure 4 2 We have to introduce connectors for every super class After adding these
71. g to make payments through their PayPal account Features Activate a recurring payment A created recurring payment needs to be activated This canbe done by setting up a pre approval on PayPal allowing Roomplug to charge a fixed price from the users account in a given period 21 Create and execute an occurrence of a recurring payment Goal The Roomplug system must create occurrences of the recurring payments when needed and execute them Features create and execute occurrences On a timely bases the Roomplug system must check if an occurrence of the active recurring payments is needed This should be done without any user interaction since the recurring payments are pre approved 3 6 3 Milestone 3 Make the payment system an independent tool Although not stated in the requirements above the original requirements stated the system should allow users with a lease agreement on Roomplug to be able to make payments to each other In the process of creating the online payment tool the importance of this tool to Roomplug became more clear Thus the original requirements were changed to allow all users to make payments to each other This was accomplished in milestone 3 covering and complementing requirements 2 3 4 and 5 The features that were implemented in milestone 3 are Selecting the receiver Goal Instead of selecting the receiver from a dropdown containing the users you have a lease agreement with the user should now be able
72. getPeriod gt getStartDate gt format Y m d preapprovalRequest gt endingDate recurringPayment gt getPeriod gt getEndDate gt format Y m d preapprovalRequest gt maxNumberOfPayments recurringPayment gt getNumberOfPayments preapprovalRequest gt maxTotalAmountOfAllPayments recurringPayment gt getTotalAmount 100 0 preapprovalRequest gt maxAmountPerPayment recurringPayment gt getAmount 100 0 preapprovalRequest gt memo recurringPayment gt getDescription ap new AdaptivePayments response ap gt Preapproval preapprovalRequest Check response and return JSON omitted in this example token response gt preapprovalKey return JSON object return RESULT SUCCESS TOKEN token Code sample 5 7 Setting up a Preapproval request 5 2 3 getVerifiedStatus request This request is somewhat different from the Pay and Preapproval requests To begin with it uses the Adaptive Accounts API instead of the Adaptive Payments API The getVerifiedStatus request is used to verify a users PayPal account This is done when they set up their PayPal accounton Roomplug to enable users to send money to them through the Roomplug systems A PayPal account is now identified using the users first and last name and their email address The response of the getVerifiedStatus request contains information on whether it is a verified account or an unverified account on success An
73. h commit 00 tests bash 80x14 we Figure 6 1 A screenshot of a test suite run 6 3 1 1 Finding bugs Although running the complete test suite took quite some time various bugs were found because of it A good example of a bug that would be hard to find by manually testing but was found from writing tests is shown in Code sample 6 5 Here one of the possible statuses of a Paymentwas forgotten and could therefore not be set into the status property xx Checks for a valid value for the status field paramstring status return bool a private function checkStatus sta tus switch status case approved case not approved case deleted case waiting for return true default return false Code sample 6 5 An example of introducing an error by forgetting a minor thing Also a wrongly formatted JSON object was found because of testing In Code sample 6 6 the creation of the JSON object can be found using wrong parenthesis 55 format JSON object before JSon ae RESULT FAILURE ERROR forma ISON ob ject after JSon RESULT FAILURE TERROR return JSON object right format rum RESULT SUCCESS TOKEN token y Code sample 6 6 An example on how an error was found in a JSON format 6 3 1 2 Refactoring Refactoring code is another example of when having an extensive test suite is an advantage The code sample shown in Code
74. h various options The final lease agreement is generated using the selected options and can be digitally signed by both parties 2 3 Expansion Peer to Peer payment 2 3 1 Functionality This is the point where the new feature comes into play The property owner defined the following information in the lease agreement e Rent e Rent due on what interval is the rent payed e Deposit for the rent e Late fee s if any o Flat fee a constant amount o Per day fee the late fee is increased by this amount each day Number of days after payment date from which a payment is considered late e Return checks penalty The form is shown in Figure 3 84 Payment Details Rent Rent Due Deposit 350 lst of the month n 300 Do you want to charge late fees of days after Rent Due is considered late 5 Late Fee Options Late Fee Amounts Flat Fee 25 Flat Fee _ Per Day Fee 5 Per Day 2 Flat Fee Per Day Fee M Do you want to charge a penalty for return checks 50 Figure 3 Payment details for a lease agreement The landlord can create invoices for a user and keep track of there status Roomplug connects the invoices and payments to the correct users This should all be done with the click of a button using the information from the lease agreement It s should also be possible to make custom invoices On the other hand it s also possible that a user has payed for something that should have been paid by the la
75. hanges in the controllers and views nnn unnnnennenenen enne ennerennenenenenneenneeeene rennen 34 4 NISSTONE Berten dele 34 4 5 The existing Roomplug SYSTEM arne nennen beenderen 35 4 5 USEFINIEHaCE ru ee elle ehe 35 9 Implementation sus eta een een ern onhaalbare 41 5 1 Design workaround Zend Framework ooooocconnccconnccconcccconccconancnnnnocononoconnne rc nnne renacer 41 9 2 PAyRal O 43 5 2 1 Pay feglest u unse 43 922 PfeappFovalteqlest u ae 45 5 2 3 getVerifiedStatus request nnen eenen enneennenenneeenenenneenserennerenseeeneneneenne renden 45 5 3 Software Improvement Group feedback nanne venne enne nennenenenenne enne rennerennenenenenn 46 5 3 1 Examples Unit interfacindg 0 un ee Le LE 47 5 3 2 Examples UNItSiZe rans a daa 48 5 3 3 Feedback on improvementsn ane ee lead 49 3 4 VAlhtanaBiliiY en seis ee ee 49 BEMESSUNG re ea a a Eee 51 6 1 TEST PIAN anne 51 6 1 1 Atomateatesting ann ei ee 51 GVA Megressiontesiing me ennen ter nie 51 82 PRA ea era een 52 BSH RESU ee a nd 54 6 9 Pros vs CONS atada ehe 54 6 3 21 PRICING OS ent eine 55 63 12 A ee ne 56 6 3 1 3 Dependency on PayPal nk ee een 56 6 3 2 Coverage and complexity reports nternet ean ener atiia 56 6 4 Future test aUulomallon na 57 A Sara energie 59 TRES are a ee o aaa 59 7 2 Recommendations un 61 A O A a otra A ant 61 7 22 RUUS WOK sense non 62 A naar Rene 65 Betiniti ns and Abbreviallons er re euere 67 ABDENGICES un ee Deren
76. he action requested 3 a OD ND UB Na vowmau BWN a T T Te 13 o me lt To il el d OPwWNRS GREREES m a a lt T T Tx IPF 3 e JO BENSRSSRESEESN BBESLES 24 25 26 27 28 29 30 w o GEGEE Boo sanas 35 SRS amp amp S BAAREN 23 24 25 26 27 28 29 30 GENERE E voya na wn Hr 8 RB865 585 RSG 6 288 vVoJouawn mb FSSYRERSBRESGENKEEBKRE B o na u wn r 8 10 24 25 26 27 28 29 31 32 33 Code Coverage in as amp 37 75 WAN UF WN sa RERS SES SSSESYRBRESEREEB RE So sos una 23 25 26 28 30 31 33 35 37 38 40 42 44 37 40 42 44 47 49 52 54 65 BREE BR omauwne BRS 27 29 32 34 37 40 43 46 49 52 55 58 62 65 69 BS6anueaneS 14 16 16 19 19 21 25 24 27 29 32 35 39 42 46 49 61 53 66 ZA 61 76 65 82 69 88 74 93 Ja 99 83 106 88 112 SaN amp SSRRB B oarwmed BESRNRERKRov awe amp BARS 13 16 19 23 26 30 34 39 43 43 53 59 64 70 76 83 89 96 103 111 118 126 134 143 52 BEBxuun 18 ES 88 97 106 116 127 137 148 160 172 184 197 211 224 35 nw 12 16 26 31 37 52 3188 107 118 130 142 155 168 182 197 212 227 243 260 277 30 1 3 6 9 14 18 24 30 37 44 53 61 zi 81 92 104 116 129 143 157 172 188 204 222 239 258 277 297 317 339 5E gee 21 35 43 52 62 73 97 110 124 139 15
77. howto_api_APGettingStarted gt 28 Adaptive Apps 101 PayPal X Visited on August 1 2011 lt https Awww x com community ppx apps 101 gt 29 Building Apps Using Adaptive APIs PayPal X Visited on August 1 2011 lt https Awww x com community ppx apps 101 building apps gt 30 What You Need to Get Your Adaptive APIs App Live PayPal X Visited on August 1 2011 lt https www x com community ppx apps 101 go live gt 102 Appendix D Manuals This appendix contains manuals for both developers administrators and regular users D 1 User manual Making a custom payment A Roomplug user must to navigate to its hub and click the Payments tab to start making a payment The user will then see the payment overview page show in Figure D 1 1 Y ompli Hub Posted Last Login On Wed Sep 28 11 7 20am Inbox Favorites Personal Settings Feature Custom Payment Receiver Amount Home Browse Find Blog Screen 3 Hub Inbox Logout Hi Test Q Advanced Description Set up a recurring payment Pay Roomplug charges a 1 fee for every transaction On top of that PayPal Notes charges a fee By default the receiving party pays for the fee More information on PayPal fees can be found here Open Payments moh History Kiek RE Here is some money still need to pay to you some day Here s the money you paid to the plumber Here is my rent
78. ided functions can be used to dispatch a page and check the content of the resulting page can be found in Code sample 6 4 Here the POST variables are set that are used when creating a recurring payment After dispatching the summary page the recurring payment should be set up with the information given in the POST variables Also the controller and action used are checked in every test 53 public function testSummaryActionRecurringWeekly startDate this gt dateCurrent endDate this gt dateTenWeeks set the POST variables for the next request this gt request gt setMethod POST gt setPost array pay_receiver_id gt 484 pay_amount gt 100 00 pay_description gt PHPUnit test payment pay_recurring gt pay_recurring rpay_frequency gt PaymentFrequency WEEKLY rpay_date_start gt startDate gt format m d Y rpay_date_end gt endDate gt format m d Y D make the request this gt dispatch pay summary assert the information is shown this gt assertQueryContentContains div toggleDivO table tr td User Test this gt assertQueryContentContains div toggleDivO table tr td 100 00 this gt assertQueryContentContains div toggleDivO table trtd PHPUnit test payment this gt assertQueryContentContains div toggleDivO table tr td Every week this gt assertQueryContentContains div toggleDivO table tr td startDate gt format
79. ifying a users PayPal account is done with the Adaptive Accounts API and confirming the processing of payments is done using a service called Instant Payment Notification Usage of those APIs require approval from PayPal The payment process was therefore analyzed twice by PayPal and both times it got approved 14 PayPal also provides SDKs for various programming languages including PHP This allows the programmer to use objects to set up and make calls to the API rather then formatting the call itself This SDK is also used in this project 2 2 1 Adaptive Payments The Adaptive Payment API can be used for various types of payment set ups Since Roomplug wants to take a small fee when two users send money to each other the Chained Payments option is the most suitable solution This solution allows us to define a primary receiver and multiple secondary receivers This way Roomplug can take their fee from the amount payed while the paying user only sees the primary receiver being the other user as the receiver The primary receiver will be notified about receiving the money and will then automatically send the fee to Roomplug This structure is shown in Figure 2 1 Your application am an PayPal L A o gt ann e API Server gt Pay ww Sending Roomplug user alla fee Receiving user Figure 2 1 The abstract structure for a Chained Payment 14 Using the SDK a payment can be made by providing the email and
80. igned Roomplug is constantly working on improving these tools and services by getting to the users Rodney and Sri talk to renters about their experience in both becoming and being a tenant They also visit landlords to ask them about their experience with renting out and managing their property To complete the vision of having a one stop shop for renting Roomplug also has to work on new features These include a property manager and an online rent payment system This report and the project it is describing is about the payment system E 2 Payment System The rent payment system is an important part of the Roomplug business since it will take away a lot of the pains of paying rent It is common for American tenants to pay the rent by check The landlords have to cash in all these checks at the bank each month It would therefore save the landlords a lot of time if the tenants were able to pay the rent online The tenants on their turn will save time and effort by setting up a recurring payment which automatically pays their rent each period weekly biweekly or monthly They do not have to worry about paying rent in time or about sending a check to the landlord 121 An online rent payment system would also help landlords and tenants in managing their rental income and expenses The system provides a way to pay rent but also gives the landlord the possibility to reimburse the tenant for some expenses like paying the plumber Having an on
81. ing to change the way a paying user selects the receiving user Again the model remained the same In the payment system only the actions and the permissions to execute an action had to change in the PaymentController and some views had to be created to let the guest users enter their personal information The user object in the existing Roomplug system is also changed to support a guest user Once the guest decides to create an account with the same email address provided while creating the guest payments the user will have an overview of all the payments executed as a guest The changes led to the class diagram of milestone 3 which can be found in Appendix G 2 4 5 The existing Roomplug system While developing all the milestones some features required changes in the already existing Roomplug system Although it did not require big changes some models needed additional properties or functions The properties added to the Userclass is worth mentioning A users email address is what separates one PayPal account from another So in order to pay to a user in the Roomplug system the email address has to be sent to PayPal The name is sent with it for verification reasons Since the name and email address of a user in the Roomplug system can differ from the name and email address that a user entered in his her PayPal account specific properties are required for this data That is why three properties are added to the user object paypal email payp
82. ionality in the software Abbreviation for graphical user interface See also UI Abbreviation for HyperText Markup Language The language used to provide the structure for a web page Abbreviation for instant payment notification A service provided by PayPal to notify external systems of transactions executed in that systems corresponding PayPal application A client based script language used in website development Abbreviation for JavaScript object notation Data formatting convention can be used to transfer data between different script or programming languages Set of features A milestone is also a point in a development track marking the completion of a set of features Abbreviation for model view controller MVC is an architectural pattern used in software engineering 67 Partial Payments incoming payment outgoing payment open payment custom payment recurring payment pre approved payment PayPal SIG SDK Test suite UI Users 68 user Roomplug user guest user A reusable piece of code normally used on multiple places A payment that a user received A payment that a user paid A payment that was created but not yet executed A single payment of which the details are defined by the user A payment scheduled to automatically execute with a given frequency in a defined period A payment that a user gave permission for prior to its execution No
83. ions are added This includes a page to view the details of a payment a page for deleting a payment and a JavaScript page to hold the JavaScript functions Saving the newly created payments is handled on the summary page The PaypalController also handles requests for the in section 2 2 4 discussed IPN listener The final class diagram for the controllers in this milestone can be found in Appendix G 2 31 4 2 3 MVC Figure 4 8 shows a simple representation of how all the classes and pages have their position in the MVC pattern The model classes are a representation of the reality holding all the information provided by the users and the systems of the payment methods e g PayPal It also takes care of storing this information The actions in the controller classes manipulate the models data These actions are on their turn activated by external parties like users or the PayPal IPN systems In the case of the payment system every action has its own page in the view part of the MVC pattern This page canbe an HTML JavaScript or JSON file If needed other view scriptin other systems canbe added to execute a certain action NA E ee en E en overview HTML summary HTML success HTML PaypalController token JSON 1 1 I 1 I I I A PaymentController i I L I 1 I I I 1 I I 1 I I I I Figure 4 8 Simple view of the payment system in the MVC pattern 32 4 3 Milestone 2 The functionality to crea
84. is gt assertQueryContentContains div toggleDivO table trtd User Test this gt assertQueryContentContains div toggleDivO table tr td 100 00 this gt assertQueryContentContains div toggleDivO table trtd PHPUnit test payment this gt assertQueryContentContains div toggleDivO table tr td Every week this gt assertQueryContentContains div toggleDivO table tr td startDate gt format m d this gt assertQueryContentContains div toggleDivO table tr td endDate gt format m d this gt assertQueryContentContains div toggleDivO table tr td 10 this gt assertQueryContentContains div toggleDivO table tr td 100 00 assert the right actions were taken this gt assertController payment this gt assertAction summary this gt assertModule main this gt assertResponseCode 200 Code sample D 3 4 A test using Zend Framework specific assertions Set up and Running tests To run the tests PHPUnit should be installed together with PHP_CodeCoverage Various guides on how to do this are available PHP Unit official website http www phpunit de manual 3 0 en installation html Once this is properly installed the database needs to be set up This database should be configured to have the name roomplug_test A stripped version of the database can be found in the sql folder on Github under the name roomplug test sql Import this file into the database and yo
85. is the Payments class which aligns with the Paymentclass This mirroring of files can be seen in the file structure of the test suite 116 The phpunit xml file defines what file is used to bootstrap the Zend Application where the test suite can be found and what source files should or should not be analyzed on code coverage An example of the contents can be found in Code sample D 3 1 lt phpunit bootstrap application bootstrap php gt lt testsuite name Unit Tests gt lt directory gt application lt directory gt lt testsuite gt lt filter gt lt whitelist gt lt file gt l lt file gt lt whitelist gt lt filter gt lt logging gt lt log type coverage html target log report charset UTF 8 yui true hightlight true lowupperbound 50 highlowerbound 80 gt lt logging gt lt phpunit gt Code sample D 3 1 An example of the phpunit xml file The referenced bootstrap file is somewhat different from the systems bootstrap file It defines the environment to be the testing environment which allows a different database to be used than the development environment Also the front dispatcher will not be used as dispatching pages is done manually in tests The TestCase class is created extending Zend_Test_PHPUnit_ControllerTestCase This gives access to Zend specific assertions and functions to make requests Each other test class extends the TestCaseclass giving it the same functionalities
86. ith Private Bath in Sun City 1257 Views 525 Newport News VA WANT responsible working roommate for HOUSE Newport News AIRPORT 4 mi Oy 147 Views 8 5900 New Yor City NY Fully furnished Ga 2bed 2bath apartment 196 Views 340 Lakeland FL Room for rent 260 Views Figure D 1 3 The Custom Payment form with all data filled in The summary page shown in Figure D 1 4 displays the payment details The user can check the data prior to picking the payment method In this case only PayPal is available The user has to click the PayPal Pay Now button to continue with the payment BETA Home Browse Find Blog Screen FE nomli Hub H Plug Posted Last Login On Wed Sep 28 11 7 20am Payment summary Receiver User Test Amount 100 00 Description Here is my rent for the month September By using PayPal you agree to PayPal s Acceptable Use Policy Inbox Pay Now If you have any questions you can contact us by sending an Favorites ee email to info roomplug com or by calling 858 356 2955 Personal Settings Feature E E a A Figure D 1 4 The summary page 3 Hub Inbox Logout Hi Test Q Advanced 8 900 New Yor City NY Fully furnished 2bed 2bath apartment 196 Views 525 Newport News VA WANT responsible working roommate for HOUSE Newport News AIRPORT 4 mi Oy 147 Views El 4 340 Lakeland FL Room for rent 260 Views
87. lPayments class Code sample 5 4 The PaymentConnector class Code sample 5 5 The PaypalPaymentclass extending PaymentConnector Code sample 5 6 Setting up a Pay request Code sample 5 7 Setting up a Preapproval request Code sample 5 8 Setting up a getVerifiedStatus request Code sample 5 9 Example of functions that contain to much parameters Code sample 5 10 Example on how the functions are improved Code sample 5 11 The newly created Period class Code sample 5 12 Constants used in the JavaScript file Code sample 5 13 Importing the dynamic JavaScript file Code sample 5 14 Enabling paginating in the payments_list partial Code sample 5 15 Using the payments_ list partial Code sample 6 1 An example of the phpunit xm file Code sample 6 2 The TestCase class providing a clean environment Code sample 6 3 The setUp and tearDown classes provided to clean up your environment Code sample 6 4 A test using Zend Framework specific assertions Code sample 6 5 An example of introducing an error by forgetting a minor thing Code sample 6 6 An example on how an error was found in a JSON format Code sample 6 7 The refactored version of checkStatus 73 74 Appendix C Preliminary Report Before work on design and implementation started a preliminary report was created This report can be found in this appendix 75 76 Preliminary Report Online Rent Payment System a TU Delft isyo FE roomoluo Version 0 3 August 1 2011
88. lands The project spanned 12 weeks starting at July 18 2011 and ending on October 10 2011 The first two orienting weeks were carried out in Delft The Netherlands after which project execution moved to San Clemente This report will give insight in how the project s development track was carried out while being abroad in an entrepreneurial environment We would like to thank the following people for their contribution and support throughout the project e Rodney Nguyen Roomplug for being our direct supervisor during development of the payment system for helping us get to know the Roomplug systems and for showing us various parts of the American culture e Sri Kanajan Roomplug for being our supervisor for providing us with a place to call home and for taking us to various places to meet up with the American people e Leon Rothkrantz DUT for being our supervising professor in The Netherlands and for the support throughout the project e Peter van Nieuwenhuizen DUT for coordinating the bachelors project and helping us to get everything set up on the DUT side of the project e Jan de Vries DUT for helping us arranging everything to do this project in the United States and for helping us out applying for the grants e Eric Bouwers SIG for providing us with useful feedback on the maintainability of our code Dirk Guijt and Lars Tijhuis San Clemente California USA October 2011 Table of contents SUMMA eren eneen
89. layout once and then define the contents for each page in different files 10 13 The current system does not utilize this tool However since the payment system uses the same general layout and the target is to make it more maintainable the layout is stripped from the original source files and placed in a layout file Placeholders are added and therefore the payment system view files only need to take care of the content 2 1 3 MVC structure The MVC structure is one of the biggest advantages of Zend Framework It allows the programmer to easily separate presentation business logic and data access 11 The directories and file structure are organized in such a way as to keep the three parts separate The basic flow in the MVC structure goes as follows The Zend_Controller_Front intercepts an incoming request and calls the corresponding action in the specific Zend_Controller that implemented the action This controller then retrieves the needed data from the model using the Zend_Db classes described in section 2 1 1 The data to be presented is set in the parameters of a Zend View object which contains the logic to display this data The Zend View scripts typically contain HTML with placeholders in it for the variable data to display 12 13 2 1 4 Evaluation The use of the Zend Framework had some advantages but also meant some work had to be done that could have been achieved using other tools The MVC structure provided by the Zend F
90. levant Once the IPN call reaches Roomplug the listener wants to confirm that the message was sent by PayPal Therefore it makes a call back to PayPal notifying the PayPal system that it wants to verify the message PayPal will respond if the call was valid or not If it is valid the Roomplug IPN listener can be sure that the message came from PayPal and it can continue with updating the Roomplug systems with the new information 2 3 PHPUnit PHP Unit is the unit testing solution for PHP Its goals are to make tests easy to write read and execute lt offers mechanisms such as the setUp and tearDown functions to make tests run independent from the current state of the system 15 PHPUnit also integrates the PHP_CodeCoveragelibrary giving both feedback on the coverage of your code and its complexity 16 Zend Framework allows the programmer to extend the set of assertions with specific Zend Framework assertions by using the Zend_Test_PHPUnit component Assertions to check certain information shown on the web page assertQuery and the controller and action used assertController and assertAction are a good example of those 17 Although much effort was put into setting up PHPUnit to work with the current system in the end it helped a lot in finding bugs fixing them and to maintain the system while developing new features More on the specific usage of PHPUnit can be found in section 6 2 18 Ehrequirements In this chapter the
91. line payment system will give a clear view on the financial transactions being made between the landlord and the tenant E 3 Startup Company Working in a startup environment makes things different then doing a project at a big established company To begin with Roomplug operates from a home office so work is only two steps away from your bed The big differences lie in the way longer term projects are being handled While big corporate businesses have solid strategies worked out for the next few years startup companies are struggling with their business plan as a whole As Roomplug is getting closer to the market and as they talk to more and more future investors things change around The business model and the priority of feature requirements change constantly This makes it harder for a software engineer to plan out a two month development track building a payment system for instance The used development methodology and the design choices should take these possible changes into account E 4 USA The bachelors project is not only about applying software development skills It also gives the opportunity to work abroad and experience different cultures The preliminary and orienting part of this project took place in The Netherlands but the development of the payment system itself is completely done in San Clemente California USA Getting to know the American and especially the Californian way of living and working is part of this project
92. m E E Delete Private Bath in Sun ap 257 views History a A ra E Here s the money you paid to the plumber 25 00 ft 700 Leesburg VA Spacious 4 BR House to a K Here is my rent for the month August 100 00 Share in Downtown Leesburg Dog OK 142 Views First 1 Last i Feature 3 900 New Yor City NY a a er ne meme Fully furnished Figure D 1 2 Selecting the receiving user 104 After a receiving user is selected the amount and description of the payment can be entered as illustrated in Figure D 1 3 After all this is done the user clicks the Pay button This will take the user to the summary page FE ompli Last Login On Wed Sep 28 11 7 20am Custom Payment 8 Receiver Test User Y Amount 100 00 Description Here is my rent for the month September Inbox Favorites _ Set up a recurring payment Personal Pay Settings Roomplug charges a 1 fee for every transaction On top of that PayPal Notes charges a fee By default the receiving party pays for the fee More information on PayPal fees can be found here Open Payments 8 Here is some money still need Ei K to pay to you some day 100 00 Pay Delete History e E Ke Here s the money you paid to the plumber 25 00 Fr Here is mv rent for the month Auaust 100 00 Home Browse Find Blog Screen 3 Hub Inbox Logout Hi Test Advanced 450 Sun City CA Fully furnished Bedroom w
93. m dd yyyy Pay Roomplug charges a 1 fee for every transaction On top of that PayPal charges a fee By default the receiving party pays for the fee More information on PayPal fees can be found here 100 00 Pay Delete en SNN an 525 Newport News VA WANT responsible working roommate for HOUSE Newport News AIRPORT 4 mi Oy 147 Views 900 New Yor City NY Fully furnished 2bed 2bath apartment 196 Views 700 Leesburg VA Spacious 4 BR House to Share in Downtown Leesburg Dog OK 142 Views 450 Sun City CA Fully furnished Bedroom with Private Bath in Sun City 1257 Views Figure D 1 9 The overview page showing the recurring payment fields of the Custom Payment form 109 The summary page looks somewhat like the summary page of the custom payment The only difference is that some extra details regarding the recurring payment will be shown as can be seen in Figure D 1 10 Just below the details the user can choose their payment method This will take them into the PayPal system 3 Hub Inbox Logout Hi Test Home Browse Find Blog Screen Pa Hub H Plug H Posted Payments A saso Sun City CA Fully furnished Bedroom Private Bath in Sun Last Login On Wed Sep 28 11 7 20 Recurring Payment summary 127 Views Receiver User Test Amount 100 00 Description Here is my rent for this month e fi Frequency Every first day of the month 900
94. mprove the user experience by using existing data FDD is an Agile form of developing 2 First an overall design is made with a high level object model and notes as result After this general overview a features list is made stating what features should be implemented Those features can be grouped in related sets and subject areas During this project each set of features is considered a milestone working from milestone to milestone starting with the most fundamental ones For each feature set a more detailed design is made prior to implementation Also a set of test will be written to test the features This can either be done after implementation or parallel After all features are implemented the project is completed Failure to finish all features will leave the system uncompleted but it will still be able to work This also illustrates the importance for the order in which features are implemented A good way to prioritize them would be using the MoSCoW model determining what features Must be implemented Should be implemented Could be implemented and Would be implemented 3 2 The Model View Controller pattern The Model View Controller MVC pattern is an architectural pattern used to seperate the functional part the model of the code from the views and its controllers 3 This way it is easy to use written code in other parts of the system or even change the whole view without changing the code behind the interface The Z
95. n contact us by sending an DA e DR Inbox email to info roomplug com or by calling 858 356 2955 ej rae 2bath apartment Favorites 196 Views Personal P t ful Settings ayment successful Feature A 450 Sun City ca en l ish Mah MEL NA IA it pe Banin Sun Figure D 1 6 The success page Click here to go back to the payment overview 106 The overview page now shows the newly paid payment in the payment history shown in Figure DAL 3 Hub Inbox Logout Last Login On Wed Sep 28 11 7 20am Inbox Favorites Personal Settings Hi Test A BETA Home Browse Find Blog Screen Hub H Plug H Posted Payments f 525 Newport News va WANT responsible working roommate for HOUSE Newport Custom Payment News AIRPORT 4 mi Oy ounce iE ineen 147 Views Receiver iis Amount 0 00 Description 3 900 New Yor City NY Zi Fully furnished LJ Set up a recurring payment 2bed 2bath apartment 196 Views Pay Roomplug charges a 1 fee for every transaction On top ofthat PayPal Notes charges a fee By default the receiving party pays for the fee More 4 information on PayPal fees can be found here Open Payments y 700 Leesburg VA pr ve a Spacious 4 BR House to ere is some money still need Share in Downtown E ad K to pay to you some day 100 00 Maya Bee Leesburg Dog OK 142 Views History a z E gt K Here is my rent for the month September 100 00 it sasos Sun City C
96. nd to make guest payments possible In milestone 1 and 2 the users selected the receiving user based on the lease agreement they have Over time the Roomplug business model changed and it became clear that users without a lease agreement on the Roomplug website should also be able to use the payment system So the connection between the lease agreement system and the payment system was dropped like shown in Figure 4 10 User Tenant User Paying User Landlord User Receiving Figure 4 10 Connection between a lease agreement and a payment The original model of a payment already saved a reference to the receiving and paying user objects itself instead of just referring to a lease agreement This made the whole change a lot easier since the model would remain untouched Only the logic in the PaymentController and some of the views had to be changed in order to select any user from the Roomplug database This also made the implementation of the guest payments a lot easier In the same brainstorm session to update the Roomplug business model it also became clear that tenants have a barrier for using the Roomplug rent payment system because they have to create a profile 34 before being able to make a payment to their landlord Roomplug decided that it should also be possible to pay to a Roomplug user without having a profile Building the guest payment system was not that big of a change The payment system already was go
97. ndlord The renter can create a custom invoice for the landlord and keep track of it The eventual payment is done through PayPal which has an extensive API later more on that For every transaction a pre defined fee will be payed to Roomplug For now PayPal is the only payment method available on Roomplug but there might be more payment methods added in the future so the payment system should be designed taking this in account 85 2 4 Project goals The project goals are shown in Table 1 The given format makes it reviewable by checking if the goals are met in the deliverables 86 ynse ay Huimaa 104 ISI UONOY SIgeL 1 yea q 1Usaop Juswdojsnap SOSSB D ISO eanjn pue Ayedosd syrom eanjee eu aans Buren eines y ISO ounjedy IJse ounyeay sgll apo ubisap aunjea ey Jo UOIJezUoWw ordi BunyJom e Buipying einyee ay juawajdu juawajdu eanjee juewngop ubisag ureuonoun ay uo ubisap Jeajo e Bureaus e 10 sjrejep ey ubisag einjee ubisag lainjeay Aland 10 pajeada aq Im sdajs Buimojjoj ay yeu 19pow MMODSOP ey Buisn yey jo do uo y nq eq 0 BuioB jo do uo Hing eq ueo sanea seinjeg soanjee euonippe SI Jeym pue 8109 ay aq 0 BuIOB si jeym auljep 0 paau yeym pue pjeuonouny ajos euonippe pue JO 151 pue sanjea 8 109 jo 1817 M einyee 9109 e se pauljap aq ueo neuonoun awos ere S9uO sa uu Jeym aunjeg 81009 aujeg sa n ea o ul se n ea OJUI S U
98. ney digitally Roomplug chose to only include PayPal as a payment method for now Setting up the connection to the PayPal APIs and processing the transactions being executed in the PayPal systems is part of this project 1 3 Development methodology Working in an entrepreneurial environment makes things different compared to doing a project at a big established company While big corporate businesses have solid strategies worked out for the next few years startup companies are struggling with their business plan as a whole As Roomplug is getting closer to the market and as they talk to more and more future investors things change around The business model and the priority of feature requirements change constantly This makes it harder for a software engineer to plan out a 2 month development track as is the case in this project The used development methodology and the design choices should take these possible changes into account Because Roomplug is a startup company the Feature Driven Development FDD is the most suitable method for the task at hand Following the FDD method the required system is split up into various different features This makes it possible to switch feature priority around later on in the development track as the requirements and feature necessity changes FDD is an Agile form of developing 3 First out of the requirements a feature list is made stating what features should be implemented to comply the requireme
99. nformation without referring the user to their website For this you need 2 properties called foo and bar that are unique for a payment In order to achieve this the following actions need to be taken 1 Add a database table containing a foreign key to a payment in the rp_payments table 2 Create the corresponding class MakemerichPayments extending Zend_Db_Table_Abstract Implement retrieval methods in this class specific to this payment type Also ensure that the properties name primary and _rowClass are set An example can be found in the PaypalPayments class 3 Extend the PaymentConnectorwith a new class called MakemerichPayment containing getters and setters for the foo and bar properties Those can be similair to the getters and setters in PaypalPayment Now your objects are ready In order to keep the execution of payments generic an abstract class PaymentAdapter is created For the MakeMeRich method we add a new adapter called MakemerichAdapter extending the PaymentAdapter In this adapter implement the functions executePayments setUpRecurringPaymentand paymentsAre Valid The actions in those functions taken are specific to the API and flow of the MakeMeRich system For example with PayPal those functions do the following e executePayments Retrieve a token for the given payment from PayPal e setUpRecurringPayment Retrieve a pre approval token for the recurring payment from PayPal e paymentsAreValid Check
100. nt Create custom payments Create a custom payment by choosing a receiver the amount and giving a description Remove custom payment Remove a custom payment this is only possible when the actual payment has not been completed yet Pay a payment Goal Allow users to pay created payments through PayPal The system should be designed in such a way that other payment methods can be easily added Features Pay an open payment Do the actual paying of a open payment This process involves communication with PayPal and going through their work flow 3 6 2 Milestone 2 Recurring payments additional This milestone covers requirements 6 7 and 8 but also involves extension of the functionality made for requirements 9 10 11 and 12 as those actions should also be available for these kind of payments The following features need to be implemented Set up a recurring payment Goal Users should be able to set up recurring payments This way the execution of payments can be automated which is common with rent payment Features Create a recurring payment Set up a recurring payment by choosing a receiver the amount and giving a description Next to that define the frequency for the payments to occur and the start and end date for them to occur Activate a recurring payment Goal A user needs to authorize Roomplug to make payments on their behalf After setting up a recurring payment it needs to be activated by approving Roomplu
101. nt Those features can be grouped in related sets and subject areas During this project each set of features is considered a milestone working from milestone to milestone starting with the most fundamental ones After the features and milestones are defined an overall design is made with a high level object model and notes as result For each feature set a more detailed design is made prior to implementation Also a set of tests will be written to test the features This can either be done after implementation or parallel to the implementation process 10 After all features are implemented the project is completed Failure to finish all features will leave the system uncompleted but it will still be able to work This also illustrates the importance for the order in which features are implemented since there is only limited time in this project 1 4 Schedule The FDD methodology ensures that the final product will still work even if a certain feature isn t implemented However this project is aiming to finish most of the features in the given time Since the project is being executed on location in the United States there is little margin in the time constraints To work as efficient as possible and get as much work done as possible a carefully scheduled development track is required The schedule that is created can be found in Figure 1 1 A textual description of the schedule is provided bellow the schedule preparation and trip
102. nterfacing flink is gestegen de meegestuurde documentatie laat ook zien dat hier goed mee omgegaan is Wat betreft de templates zien we dat de Javascript uit de templates is verwijderd maar dat er nu meer langere en deels gedupliceerde templates zijn Hierdoor zijn de scores voor Unit Size Unit Complexiteit en Duplicatie gedaald Omdat deze dalingen het pos itieve effect van de Unit Interfacing opheft komt het totaal uit op een lichte daling van de score voor onderhoudbaarheid Uit deze observaties en de meegeleverde documentatie kunnen we concluderen dat de aanbevelingen van de vorige evaluatie zijn meegenomen in het ontwikkeltraject Daarnaast scoort het systeem absoluut gezien bovengemiddeld en laat de meegeleverde documentatie zien dat de studenten serieus om zijn gegaan met de aanbevelingen 124 Appendix G Digital documents This appendix includes all documents that are too large to be delivered on paper in size or in numbers The documents can be found on the DVD attached to this report G 1 Source code The source code of all code written during this project is can be found in the Appendix G1 folder on the DVD G 2 Extended design documents Most of the design diagrams can be found in chapter 4 Some of them were originally more extended then the diagrams that are shown The extended versions were too big to paste in the report itself That is why simple versions were created and the extended versions are added here as ap
103. o other parts of the website can use it The payment systems Ul design is based on the Roomplug founders experience and knowledge of other online payment systems It would however be recommended to do some user experience tests with real life users to test how the Ul works out for them and maybe improve the Ul based on their experiences with it Improvements are also to be made in the implementation of the Ul in Zend Framework Right now all the Roomplug views have the whole HTML and CSS implementation of the Ul design in them Allmost all of this code is copied over and over again in the views All these views have to be updated if there is some big Ul change The payment system solved this problem by using the Zend Layout library discussed in section 2 1 2 It is recommended to use this functionality throughout the whole website This will improve the Ul maintainability dramatically The last recommendation involves test code Although the payment system got elaborate test classes all other parts of the website have none at all It is recommended to create tests for each feature in order to make future development throughout the Roomplug website easier and 62 safer Having testcode was critical in the development of the payment system Also there are no automated GUI tests in the current test suite This could be done in the future as well 63 64 References 1 About Roomplug Roomplug Visited on July 27 2011 lt http ww
104. omitted but those typically are functions to retrieve certain payments from the table The shown lines define the name of the table in the database its primary key and the class used to represent a single row from the table class Payments extends Zend_Db_Table_Abstract protected _ name rp_payments table name protected _ primary payment_id primary key in the table protected rowClass Payment class of the rows returned ERr ala parara F For this example redundant ful Code sample 5 1 The Payments class The _rowClass variable is a reference to the Paymentclass shown in Code sample 5 2 This class extends Zend Db Table Row Abstract giving direct access to the fields in the table row Again most functions are omitted in this sample but the getDescription and setDescription are left in to give an example on how the properties are retrieved and set from the table row class Payment extends Zend_Db_Table_Row_Abstract For this example redundant functions have been omitted pe Gets the description ofthe payment return string public function getDescription return stripslashes this gt __get pay_description 41 per Sets the description ofthe payment param string description public function setDescription description if is_string description this gt __set pay_description description Code sample 5 2 The Payment class
105. otstrap php gt lt testsuite name Unit Tests gt lt directory gt application lt directory gt lt testsuite gt lt filter gt lt whitelist gt lt file gt lt file gt lt whitelist gt lt filter gt lt logging gt lt log type coverage html target log report charset UTF 8 yui true hightlight true low upperbound 50 highlowerbound 80 gt lt logging gt lt phpunit gt Code sample 6 1 An example of the phpunit xml file The bootstrap file referenced is somewhat different from the system s bootstrap file It defines the environment to be the testing environment which allows a different database to be used than the development environment Also Zend_Controller_Front will not be used to dispatch pages as dispatching pages is done manually in tests To utilize Zends libraries a TesiCase class is created and extends Zend Test PHPUnit ControllerTestCase This gives access to Zend specific assertions and methods to make requests Each other test class extends the TestCase class giving it the same functionalities Beside general set up functionalities implemented in the TestCase class it also implements the setUpBeforeClass function which PHPUnit automatically calls before starting test runs on a new class file In this function the test database is cleared and two users that are used in the tests are added to the user database as canbe seen in Code sample 6 2 This ensures the environment is
106. page After filling in all the data in this form the user will be taken to the summary page From here on everything works the same as in the creation of a custom payment 108 Setup a recurring payment To set up a recurring payment the user has to have a Roomplug account and log in into the system After navigating to the Payments tab on the users hub the user can start entering the payment data in the same way as they would do while creating a custom payment To make the payment recurring the user has to check the Set up a recurring payment checkbox Once checked extra options regarding the frequency of payments to occur and the period wherein they occur are shown This can be seen in Figure D 1 9 The user has to fill in the extra options and click Pay This will take the user to the summary page A rooms Hub Plug Posted Last Login On Wed Sep 28 Receiver Amount Description Inbox Favorites Personal Pay every Settings Date of first payment End date Notes 11 7 20am BETA Custom Payment Open Payments Here is some money still need to pay to you some day History rs Here ie mu rent far the manth Sentemhar Home Browse Find Blog Screen Hub Inbox Logout Hi Test Advanced aj Test User Y 100 00 Here is my rent for this month M set up a recurring payment lst of the month 10 01 2011 mm dd yyyy 09 30 2012 m
107. pendices They are added digitally because they will not fit on one page and splitting them up defeats the purpose of having one diagram These diagrams can be found in the Appendix G2 folder on the DVD e Model class diagram Milestone 1 Model class diagram Milestone 2 Model class diagram Milestone 3 Controller class diagram Milestone 1 Controller class diagram Milestone 2 Controller class diagram Milestone 3 PayPal payment page flow extended G 3 phpDocuments All code produced is extensively documented A guide is generated describing the classes and functions based on this documentation To generate this guide phpDocumentor is used a tool to generate those kind of reports 1 The phoDocuments can be found in the Appendix G3 folder on the CD References 1 phpDocumentor The complete documentation solution for PHP phpDocumentor Visited on October 8 2011 lt http www phpdoc org gt 125
108. process followed to formalize the requirements and the outcome of this process the requirements are presented Next to that the features to meeta requirement are defined and those features are grouped into feature sets Those sets represent a milestone resulting in a prioritized list of features to implement 3 1 Requirements development Prior to the development of the requirements extensive research on the rental market and the available online tools was done The main focus of this research was on the payment process and the information that is required by those systems The user base was represented by Roomplug itself The founders already had experience using rental tools since they are landlords themselves After the research functionality specifications for the payment system were developed These specifications were discussed with Roomplug and then transformed into requirements In the end the requirements were prioritized and divided into development milestones 3 2 Functional requirements 1 A user should be able to make custom payments to another user 2 A user should be able to pay to a Roomplug account both as a guest or as a logged in user 3 A user should be able to see all of the payments made as a guest once a Roomplug account is created if the user uses the same email address as provided in the guest payment system 4 Auser should be able to link their PayPal accountto their Roomplug account 5 A user must have
109. provided in the PayPal account of the user The request simply returns whether the account was verified or not More on implementation on this request can be found in section 5 2 3 2 2 4 Instant Payment Notification For the Roomplug systems to know what is going on at the PayPal side of each transaction PayPal provides the Instant Payment Notification IPN service For each transaction running through the Roomplug application on PayPal a notification message is sent to the Roomplug IPN listener This listener then updates the Roomplug sy stems with the new information The IPN listener is just a web page running on the Roomplug website on an open URL which is accessible from the web To ensure that the system is not subjected to abuse by sending fake calls the IPN calls need to go through a handshake process shown in Figure 2 4 1 A transaction does not necessarily mean that money is being transferred 17 1 IPN Call 1 i h 1 Roomplug i 1 Roomplug DB trans action PayPal Systems lt 2 Confirm A u date gt ee 1 Payee Systems i IPN Listener p NT A E 1 H 1 I 3 Verify me Nooo t Figure 2 4 The IPN flow As soon as a transaction is completed in the PayPal systems they will send Roomplug an IPN call This call contains information about the transaction itself For Roomplug only the payment pre approval and pre approval cancellation transactions are re
110. ramework is very powerful It provides an easy solution by keeping the different parts of the MVC structure in separate files This part of the Zend Framework alone makes it worth using it A weaker point is the Zend_Db library Although the classes provide an easy connection with the database and its tables numerous tools are available mapping database tables to objects with easy to use functions Those tools take away the need to write the different getters and setters for each of the properties in a table Although Zend Framework allows you to use tools like these on top of the framework they were not used in this project since this would imply changing the use of the database throughout the whole existing system Zend_Layout makes the use of templates easy it does what it should do Of course there are several other template engines with more extensive features but there was no need for any more advanced features in this project As mentioned before the MVC structure provided by the Zend Framework alone makes it worth using it For new projects additional tools replacing some of the features might be taken into consideration 14 2 2 PayPal API PayPal provides developers with extensive APIs to access their services The services used in this project are those to make payments set up pre approvals verify a users PayPal account and confirming processed payments The first two can be accessed using the Adaptive Payments API Ver
111. riod period amp errors lundant Code sample 5 11 The newly created Period class A different problem encountered with respect to unit interfacing was the growing amount of actions that had to be added to the PaymentController Basically for every page or AJAX call there is an action in the controller In an effort to reduce the amount of functions the decision was made to add a second controller the PaypalController to handle PayPal specific actions Not only did this reduce the amount of public functions in the PaymentController it also made a separation between general payment pages and the PayPal pages 5 3 2 Examples Unit size The main remark made about the unit size is that there were files containing a mix of PHP HTML and JavaScript code A good example of this is the summary view page which is a HTML page containing some JavaScript functions The JavaScript code was taken out and put it in a separate file It still needed to be dynamical because of some constants used in it see Code sample 5 12 If it was stored in a JavaScript file these constants had to be passed as arguments of the function This would lead to a large number of arguments Code sample 5 13 shows how the JavaScript is now included into the summary file if OBRSTATOS lt PaymentStatus PAID gt di edun dant else if obj STATUS lt PaymentStatus WAITING gt obj STATUS obj STATUS dar redundant PaymentSt
112. rmally an occurrence of a recurring payment PayPal is an e commerce business allowing payments and money transfers to be made through the Internet Abbreviation for Software Improvement Group A consultancy firm that provides assessments of risks related to software systems Abbreviation for software development kit A set of development tools that allows for the creation of applications for a certain software package A set of tests with the goal to testa certain system Abbreviation for user interface The front end of a system gives users the possibility to interact with it A person using the system May or may not have registered with the Roomplug system A person that has registered with the Roomplug system A person using the payment system without having an account on Roomplug Appendices Appendix AY EIST Of NQUECS sica tere neten ken netten 71 Appendix B List of code samples cua ida 73 Appendix C Preliminary Report dende ede ave 75 Appendix B MANS tanda tito 103 Dil User Manaus id 103 D 2 Maintenance Mandalas a a 115 LES Test MANUAL eere etende ai aceasta dee 116 A we sen eene 121 E T PROOMPIUG EEn 121 EZ Payment SVS nue tenten eeen annen eet 121 Evo Stant p Company a a 122 Ee Piste ner een nee nee 122 References iii id weiden Cue eene 122 Appendix F Software Improvement Group feedback nnen neen enen enneeeneeeenenenenenn 123 Ns e A A dte 123 F 2 Feedback on improvements
113. rning quickstart intro html gt 12 Zend View Zend Technologies Ltd Visited on October 4 2011 lt http framework zend com manual en zend view introduction html gt 13 Zend Controller Zend Technologies Ltd Visited on October 4 2011 lt http framework zend com manual en zend controller quickstart html gt 14 Adaptive Payments Developer Guide PayPal Inc Document Number 10097 en_US 20110427 Visited on August 8 2011 lt https cms paypal com cms_content US en_US files developer PP_AdaptivePayments pdf gt 15 PHPUnit manual Bergmann S Visited on October 3 2011 lt http www phpunit de manual 3 6 en phpunit book pdf gt 65 16 PHP _CodeCoverage Bergmann S Visited on October 3 2011 lt https github com sebastianbergmann php code coverage gt 17 Zend Test PHPUnit Zend Technologies Ltd Visited on October 3 2011 lt http framework zend com manual en zend test phpunit html gt 18 Crontab The IEEE and The Open Group Visited on October 1 2011 lt http pubs opengroup org onlinepubs 969991 9799 utilities crontab html gt 19 Template engines Lozier B Visited on October 8 2011 lt http www massassi com php articles template_engines gt 20 All about Smarty New Digital Group Inc Visited on October 8 2011 lt http www smarty net about_smarty gt 21 Pardon My French But This Code Is C R A P 2 Savoia A Vi
114. rring payment is not active the user gets the option to activate it or to delete it The meaning of the pictures with the arrow in between them will be discussed in the end of this section since all the headers have this Then there is the Open Payments header This shows all payments that have not been paid yet The user gets the option to pay or delete such a payment If the user decides to pay it they will be taken to the summary page to select their payment method Last but not least there is the History header This will show all the incoming or outgoing payments that have been processed Only the last ten payments will be shown since the number of payments under this header grows over time The user can use the page controls at the bottom to view older payments And then there is some elements that all headers have in common Each payment row shows the user images of the two users that participated in the transaction In between them is either a red or a green arrow This shows the direction of the money flow and thus what user is the paying user and which user is the receiving user Red arrows are always pointing to the right and they indicate that the payment is an outgoing transaction Green arrows always point to the left and they indicate an incoming transaction All the describing text on the payments is clickable Clicking on it will take the user to the details page The text itself will become underlined and the mouse
115. rringPayment vormen Om de interface van deze methode duidelijker te maken zou hier wellicht een object van het type RecurringPayment aan meegegeven kunnen worden Verder zijn er meerdere methoden die een startDate en een endDate meekrijgen Het grouperen van deze parameters in een Period object zou ervoor kunnen zorgen dat het duidelijker wordt wat de relatie tussen deze twee variabelen is Voor Unit Size wordt er gekeken naar het percentage code dat zich bevind in methodes welke bovengemiddeld lang zijn Het opsplitsen van dit soort methodes in kleinere stukken zorgt ervoor dat elk onderdeel makkelijker te begrijpen te testen en daardoor te onderhouden wordt In dit systeem valt op dat er enkele templates zijn waarin PHP code HTML code en Javascript code door elkaar heen is geschreven Het is aan te raden om te kijken of dit van elkaar gescheiden kan worden om het zo voor toekomstige ontwikkelaars duidelijk te maken waar welke logica is ge mplementeerd Over het algemeen scoort de code bovengemiddeld hopelijk lukt het om dit niveau te behouden zodra het systeem verder groeit De aanwezigheid van test code lijkt er in ieder geval op te duiden dat het aanpassen van de huidige code zonder al te veel moeite kan plaatsvinden 123 F 2 Feedback on improvements In de tweede upload zien we dat de omvang van het systeem is toegenomen maar dat de score voor onderhoudbaarheid licht is gedaald Uit de metingen blijkt dat de score voor Unit I
116. s PayPal specific constraints for a payment In the PayPal flow the executePayments and setUpRecurringPayment functions are used in AJAX calls from the summary page Adding a new payment method would involve creating similar calls A new controller should be created with actions specific to this new payment method 115 For the paymentsAreValidfunction there is one change that needs to be done when adding a the MakeMeRich payment method Currently the PayPal specific checks are done right after the general input checks and on error returned with them When adding the MakeMeRich payment method this is not the wanted behaviour PayPal may restrict a certain condition but MakeMeRich may not If MakeMeRich would allow the payment to be made and PayPal does not the wanted behaviour is to show the summary page and disable the option to pay with PayPal with the reason why it is disabled Users can then still choose to use MakeMeRich The place to do the checks can remain the same the way the response is handled should change When the new payment method supports recurring payments the recurring payment cronjob needs to be updated as well The recurringpaymentActionis set up to create occurrences of recurring payments when needed functionality to do this for the new payment method must be added Note Pay attention that when changing or adding a method to the Paymentclass a corresponding method using this method needs to be added to the Payment
117. sample 6 5 was refactored in a later stadium to use constants instead of strings This refactoring involved replacing all the string instances with the constant How this was done for the checkStatus function can be seen in Code sample 6 7 This change makes it easy to change the underlying data representation for example replace the strings by integers in the database By changing the data representation the test suite will show the places where the original statuses used were missed per Checks for a valid value for the status field paramstring status return bool el private function checkStatus status switch status case RecurringPaymentStatus APPROVED case RecurringPaymentStatus NOT_APPROVED case RecurringPaymentStatus DELETED case RecurringPaymentStatus WAITING return true default return false Code sample 6 7 The refactored version of checkStatus 6 3 1 3 Dependency on PayPal One of the problems encountered with the current test suite is its dependency on the PayPal systems Certain tests require a connection to the PayPal systems For example to initiate a payment a token is retrieved from the PayPal systems to use when redirecting to the PayPal payment flow If the Internet connection drops or when PayPal has down time the tests will fail There is no real fix for this it s up to the programmer to identify if the problem lies in the PayPal system or not 6 3 2 Coverage and complexity r
118. sited on October 3 2011 lt http www artima com weblogs viewpost jsp thread 210575 gt 22 PHP bekommt frischen CRAP Dusch V Visited on October 3 2011 lt http www phphatesme com blog softwaretechnik php bekommt frischen crap gt 23 Selenium HQ Selenium Visited on October 3 2011 lt http seleniumhq org gt 66 Definitions and Abbreviations AJAX API Bootstrap file C R A P Cronjob or crontab CSS FDD Feature GUI HTML IPN JavaScript JSON Milestone MVC Abbreviation for a synchronous JavaScript and XML AJAX calls are generally used to load data dynamically on a website without refreshing the page Abbreviation for application programming interface The API of a system lets developers communicate to that system in a controlled fashion The file that is used to initiate the Zend Application with the right configuration Abbreviation for change risk analysis and predictions The CRAP score is a benchmark to measure code complexity versus code coverage by tests A cronjob or crontab is a scheduled server task which executes a defined command Abbreviation for cascading style sheet CSS is a markup language to describe the presentation semantics of a document Abbreviation for feature driven development FDD is an agile software development methodology using features and milestones to do incremental implementation A distinct funct
119. ss model better The request payment feature should give renters or landlords the possibility to request a payment from one another For example if the tenant paid for the plumber he or she can request a reimbursement of the costs from the landlord The landlord can then follow up or deny that request with the click of a button This can be an important feature when Roomplug implements more and more tools for landlords to manage their property Payment suggestions use the information in the lease agreement to make suggestions about payments that should be paid or requested if requests are implemented This can help reminding the renters to pay their rent on time if they did not set up a recurring payment for it This feature needs to have the information of the lease agreement to work It will only be useful to implement this if the lease agreement system is being actively used 61 Pre filled payments let users create a payment without entering any data Instead the information from their lease agreement is used They do not have to enter the data themselves Like the payment suggestions this feature only works once there actually is a lease agreement in the Roomplug system 7 2 2 Future work Although the Roomplug system came a long way during this project and before there is still a lot of room for improvement This does not only include adding the features mentioned above Before work on the payment system started Roomplug wanted to int
120. t all browsers will display the website as correct as possible Unfortunately every browser will have it s own way of rendering certain parts of a website Therefore it s important that the website is tested on different browsers These test should a least include the latest few versions of popular browsers like Google Chrome Mozilla Firefox and Microsoft Internet Explorer These browsers are being used by more than 90 of the internet users at the moment 16 92 5 Research 5 1 Online rent payment systems Roomplug has already done research on competing sites with similar functionality or parts of it Like stated before there are already some online rent payment systems available Looking into those existing systems gives an idea of what should be included in the system Unfortunately none of the online payment systems websites provide a usable demo but the websites do give a general overview over all the functionality 5 1 1 RentPayment com RentPayment com is the largest online rent payment company in the USA They re part of a larger group of online payment systems and have received large amounts of funding This results in a system with lots of possibilities to make payments rentpayment com website phone text messaging fax and email There s even an iPhone app The website and iPhone app offer the possibility to set up auto payments so there s no need to worry about paying in time The payments can be done by debit credit card
121. t for the month August 100 00 First 1 Last Feature A ERE About Contact FAQ Jobs Privacy Terms 2010 11 Roomplug LLC Os Figure 4 11 The overview page 8 450 Sun City CA y Fully furnished Bedroom with Private Bath in Sun City A 1257 Views 340 Lakeland FL Room for rent A 260 Views 525 Newport News VA WANT responsible working roommate for HOUSE Newport News AIRPORT 4 mi Oy 147 Views 900 New Yor City NY Fully furnished ee 2bed 2bath apartment 196 Views ft 700 Leesburg VA Spacious 4 BR House to Share in Downtown Leesburg Dog OK 142 Views o M o li The overview page is the main entry page to the payment system From top to bottom the first part of the payment system can be found under the Custom Payment header Users can directly create a new custom payment using the form The only thing they have to do is selecting a user insert an amount and a description and they will be taken to the summary page to select a payment method The users can check the Set up a recurring payment check box if 37 they want to create a recurring payment Once they click it more options will show Again more information on how this works can be found in Appendix D 1 The next header on the page is called Recurring Payments This header will only show if there actually are active incoming or any outgoing recurring payments If the recu
122. t to work since those functions are created to process user input by doing formatting and checks on whether the input is valid This needs to be done prior to setting the input values in a RecurringPaymentobject since the setters will not set invalid values The way this is solved is by using the POST variable from the form submit as the parameter In the parameter name this is made more clear by calling it userInput Not only makes this more sense in the way the function now looks like it also makes the use of the function easier as not all the single values have to be fetched as can be seen in Code sample 5 10 private function createRecurringPayment userInput redundant 7 private function recurringInputHasErrors inputFormatted redundant create a recurring payment new style this gt createRecurringPayment this gt getRe quest gt getParams Code sample 5 10 Example on how the functions are improved Another suggestion made was to combine the startDateand endDate variables in a Period class This would make the relationship between the two variables clear and save an extra parameter in functions using both dates Code sample 5 11 shows how the Period class is now used and it shows an example of a function having less parameters now because of it 47 result period new Period startDate endDate private function checkDates startDate endDate amp errors aunaant private ee checkPe
123. te recurring payments is added in milestone 2 Users do not have to worry about paying rent on time whether rent should be payed weekly biweekly on the first day of the month or the last day of the month 4 3 1 Changes in the model The model now has to support the creation of the recurring payments The recurring payment data is stored in RecurringPayment objects Section 4 1 2 showed that the recurring payment model is constructed in the same way as the Payment model itself These objects are added to the model which is shown in Figure 4 9 The yellow colored objects are added in milestone 2 Zend_Db_Table_Abstract A Zend_Db_Table_Row_Abstract i PaymentContstants 1 temarios s ee A PaypalPayment PaymentAdapter Figure 4 9 The milestone 2 class diagram without functions and properties PaypalAdapter In this milestone constants and functions that are used throughout the payment system and the existing parts of the Roomplug system are put in common classes This results in seven classes containing the constants which are packed into one file called PaymentContants php These classes are shown on the right side of Figure 4 9 There is also a RoomplugCommon class containing the functions that are used often A recurring payment is only active in a certain period of time Therefore the RecurringPayment class has a start date and an end date The Software Improvement Group a
124. ter retrieving confirmation of the pre approval the token can be used to make payments that follow the information set in the request This payment process goes like the process illustrated in Figure 2 3 As can be seen in this figure no user action is required The Pay request is set up in the same way as a regular payment except for that an extra property the pre approval key is now also set More details on implementation of pre approval requests can be found in section 5 2 2 16 Legend gt API Call O Pay Key 1 Pay request PayPal API Server Pay 2 Pay key O Figure 2 3 Executing a pre approved payment 14 2 2 3 Verify account status A user needs to have a PayPal accountin order to receive payments Once they have a PayPal account all the information needed is the email address they registered with on PayPal to send them the money Since a user might have registered on Roomplug using a different email address users can provide their PayPal information through a separate form on Roomplug Both when providing this information and when initiating a payment the system needs to make sure the receiving account is available on PayPal Therefor the Adaptive Account API is used Using this API the status of an account can be verified The GetVerifiedAccount request requires the programmer to provide the email address and the first and last name of the account to verify The first and last name have to match the ones
125. the model will look like Figure 4 3 BaseConnector D gt N 1 I 1 I PaymentConnector RecurringPaymentGonnector IN ZN Figure 4 3 The basic model of the payment objects using Zend Framework 27 The model shown in Figure 4 3 looks a lot more complex than the one shown in Figure 4 2 This complexity makes implementation testing and maintaining the system a lot harder To prevent future implementation and maintenance problems simplifying the model will be necessary This requires a more closer look at the model properties and inheritance since the inheritance problem solved by the connectors adds most of the complexity Since itis unknown what properties and functions are necessary in order to make payments using other payment systems than PayPal the model on the Paymentand RecurringPayment subclasses remain untouched Then there is the BasePaymentclass Having knowledge about the properties that the Payment and RecurringPayment classes share is needed in order to evaluate the necessity of this superclass In order to build a better global design more detailed information on these objects is needed It turns out that there are four properties shared between these classes They will both have a paying user a receiving user the amount that needs to be payed and a description Because it is only four properties the decisionis made to leave out the BasePaymentclass and have these properties modelled in both classes This
126. the option to activate it or to delete it The meaning of the pictures with the arrow in between them will be discussed in the end of this section since all the headers have this Then there is the Open Payments header This shows all open payments that have not been paid yet The user gets the option to pay or delete the payment If the user decides to pay it they will be taken to the summary page to select their payment method Last but not least there is the History header This will show all the incoming or outgoing payments that have been paid Only the last ten payments will be shown since the number of payments under this header grows over time The user can use the page controls to view older payments And then there are some elements that all headers have in common Each payment row shows the user images that participated in the transaction In between them is either a red or a green arrow which shows the direction of the money flow and thus what user is the paying user and what user is the receiving user Red arrows are always pointing to the right and they indicate that the payment is an outgoing transaction Green arrows always point to the left and they indicate an incoming transaction All the describing text on the payments is clickable Clicking on it will take the user to the details page The text itself will become underlined and the mouse cursor will change into a pointer once a user hovers over the text This sign
127. the user can checkif all the data is correct The summary page of a custom payment would only show the receiver the amount and the description Then the user has to select the desired payment method Buttons for this will show under the recurring payment details Since PayPal is the only method that is supported for now only that button will show Clicking it would take the user to the PayPal system screens Once the user worked their way through them the Roomplug payment system will show the error or the success page depending on the outcome of the transaction 39 40 3 implementation In this chapter samples of code worth notifying such as our workaround for Zend Framework database classes and the use of the PayPal API are presented Next to that the feedback from the Software Improvement Group SIG and the improvements we made because of them are discussed 5 1 Design workaround Zend Framework As discussed in section 4 1 1 a workaround had to be used in the model when using the Zend Db classes The reference map solution described there is substituted in the solution with a reference to the object itself In this section examples on how this is actually done are shown It starts of with the rp_payments table As shown in Code sample 5 1 a class is added Payments representing this table and extending the Zend_Db_Table_Abstract class which allows easier access to the actual database In this code sample functions are
128. to USA preliminary report final report create requirements list create workflow diagrams create global design group actions steps into features define core and additional features design core features implement core features test core features design additional features implement additional features test additional features SIG Code Review SIG Code Feedback SIG Processing Feedback SIG Second Code Review Figure 1 1 The time schedule for the development of the payment system Weeks 1 3 e Get to know the development environment e Research existing peer to peer payment systems e Review PayPal APIs e Deliverables Preliminary report Weeks 4 5 e Make overall design high level object model and feature list e Group features in sets e Determine the order of implementation e Determine actual milestones and deadlines for them Weeks 6 8 e Make feature level design and implementation for core features e Write tests for core features e Deliverables Code for review by the Software Improvement Group 11 Weeks 8 12 e Make feature level design and implementation for extending features e Write tests for the extending features e Deliverables Final report 1 5 Report structure This report is structured in the same way as the development track for this project is structured Chapter 2 gives insight into the technologies that are used to solve the problem A basic understan
129. to do this can be harsh involving private bank account numbers and bank transfers That s why Roomplug wants to have a peer to peer transaction system in which payments are done through the site While realising this system state of the art web technologies will be used such as Query and AJAX to give the users an interactive experience 2 1 Goal The goal of the peer to peer payment feature is to make payments as insightful as possible to users and to enable renters and landlords to perform transactions seamlessly through the Roomplug website without having to share private banking details between the renter or the landlord To accomplish this goal payments such as deposits rent and late payment fees have to be extracted from the contract between the renter and landlord This way the landlord doesn t have to keep track of what payments he should receive and the renter has a clear overview on what to pay 2 2 Current system 2 2 1 Users and advertisements The current system is set up for two kinds of users People who are looking for a room renters and people who have a room for rent landlords A user can also be both since a user has access to all functionalities For example a user can add an advertisement stating he is looking for a room but can also add an advertisement he has a room for rent see Figure 1 Choose Your Ad ti Have Rental 8 Need Housing Figure 1 A user can have two different roles Users can create
130. u are all set To run the tests go to the tests directory using your command line and enter phpunit d memory limit 512M The extra parameter ensures the tests do not run out of memory while executing Somehow PHPUnit is not really efficient with memory usage The code coverage report can be found in HTML format in the tests log report folder Dependency on PayPal systems One of the problems encountered with the current test suite is its dependency on the PayPal systems Certain tests require a connection to the PayPal systems For example to initiate a payment a token is retrieved from the PayPal systems to use when redirecting to the PayPal payment flow If the internet connection drops or when PayPal has down time the tests will fail There is no real fix for this it s up to the programmer to identify if the problem lies in the PayPal system or not Settings for PayPal communications 119 The current master branch contains links to the live endpoint of PayPal To test those should be changed to the sandbox endpoint This is still the case in the PaymentSystem branch Files to be checked are ibrary paypal Config paypal_sdk_clientproperties php endpoint application modules main view scripts payment summary php form action application modules main view scripts payment summaryjs php redirect url Note The file application models Paypal php contains some defenitions that interfere with the definitions in the config file
131. ug wants to create The goal is to make rent payment easy by creating an online payment tool accessible to everyone The central question for the one stop shop is How can Roomplug take away the pains in the current rental business by providing an online solution for it The goals of this project is to contribute to this central question The specific problem that needs to be solved by this project is How can the current payment process between renters and landlords be improved by using the tools and services of the Roomplug website The answer to this problem should meet the following high level requirements 1 Roomplug wants a prototype of a rent payment system which allows renters and landlords to pay each other online 2 The payment system should be designed and build to be a stand alone system using data from other components of the Roomplug website 3 Roomplug users should be able to receive payments from everyone even if the paying person does not have a Roomplug account 4 Roomplug users should be able to set up recurring payments to pay their rent automatically 5 Roomplug users should be able to manage their payments This managing could include for example an overview of the payment history 6 The online rent payment system should be designed to support multiple payment methods PayPal is the method that is first to be adopted by the online payment system Although there are many solutions to transfer mo
132. unt To set up your PayPal account on Roomplug fill in the first and last name and email address used on PayPal Using the PayPal API this information can be verified and saved when it is valid 23 24 BYdesign This chapter will discuss both the global design of the payment system and the design by milestone This gives insight in how every feature was designed while still keeping the bigger picture in mind Because this project follows the FDD methodology a global design is needed to prevent design and implementation problems in the incremental development of features The more detailed design issues will be solved when arriving at a certain milestone because these might change over time Especially in a startup environment 4 1 Global design The model of the payment system will be implemented in Zend Framework Using this framework presents a design problem This problem and the influence on model design in general will be explained first and then the design of the payment system itself is discussed 4 1 1 Zend Framework and modelling The information in the objects of the model have to be stored in a database Zend provides the Zend Db library which makes it easy to map the PHP model classes on database tables The developer does not have to worry about connecting to a database and querying although the developer is still able to do this if needed The Zend_Db library takes care of inserting updating deleting and retrieving d
133. ures that will never be implemented Implementation starts after the milestones design is ready The Roomplug back end system and thus the payment system is written in PHP using Zend Framework and its MVC pattern It uses a MySQL database to store all the data Testing the code after the implementation of a milestone is a big part of the project Many test classes are written to ensure the correct functioning of the payment system PHPUnit generates extensive coverage reports after each test run All this is very use full to ensure that code from earlier milestones still works after making changes and additions to implement the next milestone The finished prototype of the payment system lets users create single custom payments and set up recurring payments using PayPal as a payment method Although an account is needed to receive payments paying your rent can also be done as a guest without an account The system is designed in such a way that other payment systems could easily be added in the future The payment system is currently running live on the Roomplug beta site It is ready to be used by the rental market Preface This report is the final report concluding the development of an online rent payment system for Roomplug LLC located in San Clemente California USA This project was executed for course IN3405 Bachelorproject a part of the bachelors curriculum of Computer Science at Delft University of Technology DUT in The Nether
134. w roomplug com about gt 2 Credit Report Credit Score Credit Check TransUnion com TransUnion Visited on Sept 30 2011 lt http www transunion com gt 3 Feature Driven Development FDD and Agile Modeling Ambler S W Visited on July 29 2011 lt http www agilemodeling com essays fdd htm gt 4 Zend Framework components Zend Technologies Ltd Visited on October 4 2011 lt http framework zend com manual components gt 5 Zend Db Zend Technologies Ltd Visited on October 4 2011 lt http framework zend com manual en zend db html gt 6 Zend Db Adapter Zend Technologies Ltd Visited on October 4 2011 lt http framework zend com manual en zend db adapter html gt 7 Zend Db Table Zend Technologies Ltd Visited on October 4 2011 lt http framework zend com manual en zend db table htm gt 8 Zend Db Select Zend Technologies Ltd Visited on October 4 2011 lt http framework zend com manual en zend db select htm gt 9 Zend Db Table Row Zend Technologies Ltd Visited on October 4 2011 lt http framework zend com manual en zend db table row htm gt 10 Zend Layout Zend Technologies Ltd Visited on October 4 2011 lt http framework zend com manual en zend layout introduction html gt 11 Zend Framework and MVC introduction Zend Technologies Ltd Visited on October 4 2011 lt http framework zend com manual en lea
135. will benefit the whole development track by simplifying the model Now there is one problem left There is no link between a recurring payment and the payments that are occurrences of that recurring payment To solve this a RecurringPaymentLink table and class is introduced to hold information on payments that are occurrences of a recurring payment The final model is now complete and is shown in Figure 4 4 and the relationship between the object is shown in Figure 4 5 AN IN i i t i i PaymentConnector RecurringPaymentConnector A A Figure 4 4 The payment system model 28 PaypalRecurringPayment PaypalPayment Figure 4 5 The relational model of the payment system 4 2 Milestone 1 The first milestone is about the creation of custom payments Users must be able to manage their payments and they must be able to pay them trough PayPal The latter requires communication with PayPal thus an adapter is created to communicate with PayPal using its SDK This will be done in this milestone as well This section will first discuss the model component of the MVC pattern The payment systems view script only produce HTML JavaScript and JSON text which map directly on the controllers actions Therefore the controllers and the views are modelled as a whole Every page in the views part of MVC corresponds to an action in the controller part 4 2 1 Model Since the global model is already available the modelling in this mil
136. xecuted and it will help to understand some choices that have been made during the project E 1 Roomplug Roomplug is a startup company founded in 2010 and is based in San Clemente California USA As landlords both Rodney Nguyen founder and Sri Kanajan co founder had a hard time managing their properties and their renters using existing services They then decided to create Roomplug a company with the mission of making online property management accessible and easy for everyone 1 The online rental market already had property marketplaces background and credit check services and rent payment systems available when Roomplug was founded Roomplug is unique because it puts all these tools and services together into one system From finding a room or roommate to signing the lease agreement and paying the rent Everything is there Currently the Roomplug system provides the following functionality 1 Users can create advertisements for the rooms they have for rent or to indicate that they are looking for a room 2 Users can search trough the advertisements 3 Users can apply to an advertisement after which the owner of the advertisement can accept or decline an application or ask them for a background report 4 Users can use the TransUnion 2 background check service to provide the landlords with a background report about themselves 5 Users can set up a lease agreement with another user This lease agreement can be digitally s
Download Pdf Manuals
Related Search
BSc_Project_Final_Report_v1.1
Related Contents
Braun 5443 User's Manual TP 11: Conservation de l`énergie Sony VGN-Z590NJB Marketing Specifications 14 Proxies - beim O`Reilly Verlag - A.J.Pinto servicenavigator...ncolnelectric.eu User Manual Puerto Boyacá, Diciembre 22 de 2005 Running Finale 2011 Copyright © All rights reserved.
Failed to retrieve file