This document contains description and requirements for Round #1 of interview for PHP developer position.
- Verify applicant's ability to work with 3rd party libraries. Verify that applicant is able to write clean and testable code.
- Check how clean code the applicant is able to create.
- Create a payment gateway library, that could handle payments with these 2 gateways:
Payment gateway library should be designed to easily add another additional payment gateways.
- Create a simple form for making payment. Form should have this fields:
- In order section:
- Price (amount)
- Currency (USD, EUR, THB, HKD, SGD, AUD)
- Customer Full name
- In payment section:
- Credit card holder name
- Credit card number
- Credit card expiration
- Credit card CCV
- Submit button
Show success or error message after payment.
Use appropriate form validations.
-
Save order data + response from payment gateway to database table.
-
Create a public repository on Github and push the solution there. Send us the link to the repository.
- Create your own sandbox accounts for Adyen and Braintree
- To make it easier, implement only single direct credit card payment, below are their documentations:
- After submitting the form, use a different gateway based on these rules:
- if credit card type is AMEX, then use Adyen.
- if currency is USD, EUR, or AUD, then use Adyen. Otherwise use Braintree.
- if currency is not USD and credit card is AMEX, return error message, that AMEX is possible to use only for USD
- Use any PHP framework you want or no framework at all, it's up to you.
- Don't bother with any graphics, just simple HTML, simple form, no CSS needed. Or just use Twitter Bootstrap.
- Use only Adyen, Braintree PHP libraries. You can use jQuery for form validations. Do not use any other 3rd party libraries.
- Cover code with unit test and integration test. Using mocks if there's any 3rd party request.
- The code needs to work after we clone it and try it (no bugs) and should process the payments.
- Brownie points if you can use docker so we don't have to configure anything on our side.
Tips: the specifications mentions above are important to our decision, please follow :)
Similarly as during any other code review in our team, we'll be checking the following:
- code quality
- usage of the configuration files
- usage of the unit tests
- naming convention