Skip to content

HQInterview/PHP-Round1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 

Repository files navigation

PHP Round #1

This document contains description and requirements for Round #1 of interview for PHP developer position.

Goal

  1. Verify applicant's ability to work with 3rd party libraries. Verify that applicant is able to write clean and testable code.
  2. Check how clean code the applicant is able to create.

Requirements

  1. 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.

  1. 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.

  1. Save order data + response from payment gateway to database table.

  2. Create a public repository on Github and push the solution there. Send us the link to the repository.

Specification

  • 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 :)

Quality requirements

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •