https://github.com/HQInterview/PHP-Round1
- PHP 5.3+
- curl, openssl and mysql PHP extensions
- Composer for installing the Rest API SDK.
- Mysql 5.x server
- Copy the payment-gateway folder to your htdocs folder.
- Run 'composer update' from the root directory.
- Create a new database called payment_gateway and update connection parameters in app/bootstrap.php file.
- Create the necessary tables as give in install/db.sql or simply run the install/create_tables.php file
- Optionally, update app/bootstrap.php with your own paypal client id, paypal client secret, braintree merchant id, braintree public key and braintree private key.
- You are ready. Bring up http:https://localhost/payment-gateway on your favorite browser.
Credit card number: 4417119669820331
Credit card expiration: 11/2019
Credit card CCV: 021
Credit card number: 4500600000000061
Credit card expiration: 11/2019
Credit card CCV: 021
You can run the test suite by PHPUnit:
phpunit test/ValidationTest.php
phpunit test/PaymentTest.php
Nguyen Ngoc Linh
Email: [email protected]