Commit Graph

54 Commits

Author SHA1 Message Date
Lucas Bickel 625f92fe44 Vendorize ZF1, fix PHPUnit and configure travis
This a a rather large commit due to the nature of the stuff it is touching. To get PHPUnit up and running again I had to update some deps and I did so by vendorizing them. The vendorizing of zf1 makes sense since distros are already considering to drop it from their repos.

* [x] install vendorized zf1 with composer
* [x] load composer autoloader before zf1
* [x] Implement headAction for all Zend_Rest_Controller based controllers
* [x] switch to yml dataset to get around string only limitations of xml sets (also removed warning in readme)
* [x] use year 2044 as hardcoded date for tests since it is in the future and has the same days like previously used 2016
* [x] make tests easier to run when accessing phpunit directly
* [x] clean up test helper to always use airtime.conf
* [x] switch test dbname to libretime_test
* [x] test db username password switched to libretime/libretime
* [x] install phpunit with composer in a clear version (make tests easier to reproduce on other platforms)
* [x] remove local libs from airtime repo (most of airtime_mvc/library was not needed of in vendor already)
* [x] configure composer autoloading and use it (also removed requires that are not needed anymore)
* [x] add LibreTime prefix for FileNotFoundException (phing had a similar class and these are all pre-namespace style)
* [x] add .travis.yml file
* [x] make etc and logdir configurable with LIBRETIME_CONF_DIR and LIBRETIME_LOG_DIR env (so travis can change it)
* [x] slight cleanup in config for travis not to fail
* [x] add cloud_storage.conf for during test runs
* [x] rewrite mvc testing docs and move them to docs/ folder
* [x] don't use `static::class` in a class that does not have a parent class, use `__CLASS__` instead.
* [x] don't use `<ClassName>::class`, since we already know what class we want `"<ClassName>"` ist just fine.
* [x] fix "can't use method in write context" errors on 5.4 (also helps the optimizer)
* [x] add build status badge on main README.md

Fixes https://github.com/LibreTime/libretime/issues/4

The PHP parts of https://github.com/LibreTime/libretime/pull/10 get obsoleted by this change and it will need rebasing.

This also contains https://github.com/LibreTime/libretime/pull/8, the late static binding compat code was broken for no reason and until CentOS drops php 5.4 there is no reason I'm aware of not to support it. I inlined #8 since the test would be failing on php 5.4 without the change.

If you want to run tests you need to run `composer install` in the root directory and then `cd airtime_mvc/tests && ../../vendor/bin/phpunit`. For the tests to run the user `libretime` needs to be allowed to create the `libretime_test` database. See `docs/TESTING.md` for more info on getting set up.
2017-02-27 17:59:01 +01:00
Albert Santoni 685134d8bb Better trial suspension notice 2015-11-05 12:45:09 -05:00
Albert Santoni f79ca8650f Unpaid invoice usability hint and invoice page style fix - SAAS-1134 2015-10-20 15:44:24 -04:00
Albert Santoni 8b33acacd3 Merge branch 'saas-sessionoptimizations' into saas-3.x-sessionoptimizations
Conflicts:
	airtime_mvc/application/Bootstrap.php
	airtime_mvc/application/configs/constants.php
	airtime_mvc/application/controllers/LoginController.php
	airtime_mvc/application/controllers/UserController.php
	airtime_mvc/public/js/airtime/preferences/preferences.js
2015-09-29 18:58:55 -04:00
Albert Santoni 8b6833180d Refactored double Set-Cookie prevention code, and session reopening code 2015-09-25 12:03:10 -04:00
Albert Santoni c03e9cbe9a SAAS-1085: Optimization - Don't start sessions unless we actually need them. 2015-09-25 10:41:51 -04:00
Albert Santoni a17001a90a Merge branch 'saas' into saas-dev
Conflicts:
	airtime_mvc/application/views/scripts/billing/upgrade.phtml
	airtime_mvc/public/css/billing.css
2015-09-02 10:47:37 -04:00
drigato fa340c3e30 SAAS-976: September 1st: Undo the billing page changes for the August promotion 2015-08-31 13:37:20 -04:00
Albert Santoni 700c3c4005 Merge branch 'saas-dev' into saas-showbuilder 2015-08-25 13:27:40 -04:00
drigato 38d9963a8d SAAS-1024: Merge layout.phtml and page-sub-menu.phtml 2015-08-21 09:25:01 -04:00
drigato 3aee9a49bc SAAS-1019: Re-work Navigation Menu 2015-08-17 12:46:32 -04:00
drigato 8a52178765 Fix for billing downgrade with no new invoice created 2015-07-31 13:42:47 -04:00
drigato 5530142174 Un-doing last 2 committs about invoices 2015-07-31 12:01:26 -04:00
drigato aab4b634bf Show form on billing page if no invoice was generated after downgrade 2015-07-31 11:56:00 -04:00
drigato 278ca264eb Fix for bringing customer to view invoice that doesn't exist after downgrade 2015-07-31 11:48:20 -04:00
drigato b2fbb27801 SAAS-973: Airtime Billing page - Add support for August promotion plans
Made WHMCS Airtime group id a constant
Check for CSRF token on promo eligibilty ajax check
2015-07-30 13:27:32 -04:00
drigato d9e2ba0ed3 SAAS-973: Airtime Billing page - Add support for August promotion plans
Un-hardcode product ids
2015-07-30 09:39:50 -04:00
drigato 4ed87de183 SAAS-973: Airtime Billing page - Add support for August promotion plans
Backend side pretty much done
2015-07-29 22:24:17 -04:00
drigato 4d9fb27554 SAAS-973: Airtime Billing page - Add support for August promotion plans
created promo-eligibility-check endpoint
2015-07-29 08:10:05 -04:00
Albert Santoni dbba5a7427 Decouple Billing and S3 cloud storage stuff from Zend 2015-01-26 13:10:10 -05:00
Albert Santoni 183fa7b3a3 Bind CURL calls to WHMCS to ipv4 adapter because WHMCS IP whitelist
doesn't support IPv6

* Fixes WHMCS login for all airtime.pro users
2014-12-01 16:10:03 -05:00
Albert Santoni 1bb17c5614 Blacklist free products from upgrade page 2014-09-23 16:01:28 -04:00
Albert Santoni 52b8f3af87 Show plan updated confirmation on invoices page 2014-07-09 14:06:51 -04:00
Albert Santoni 0ab1eaa08c Fix account upgrade invoicing issue
* Don't generate upgrade orders if the plan and the billing cycle didn't
  change. WHMCS freaks out otherwise.
* Clean up some deadcode in BillingUpgradeDowngrade.php
* Squash an error in the invoice view if there's no invoices
2014-07-09 13:49:25 -04:00
Albert Santoni 20f55314b4 Logging to debug account upgrade, possibly broken by WHMCS update 2014-07-09 12:56:53 -04:00
Albert Santoni 3c05e14e4d Fix error when upgrading account 2014-07-09 12:51:12 -04:00
Albert Santoni 9c14cfd47c Merge branch 'cc-5709-airtime-analyzer-buy-now-saas' into saas 2014-07-03 12:27:01 -04:00
drigato ac930607ad Redirect index action to upgrade action 2014-07-03 11:08:54 -04:00
Albert Santoni 758423a7f7 Billing page fix for customers with multiple stations 2014-07-02 14:47:10 -04:00
Albert Santoni 3357c1f032 Select current plan and show that correctly 2014-06-27 15:50:05 -04:00
Albert Santoni 2504a34818 Fallback to letting VAT validate if the VIES service is down 2014-06-26 19:13:40 -04:00
Albert Santoni 5745288113 Redirect Edit User screen for super admins 2014-06-26 18:58:03 -04:00
Albert Santoni fe0485e66b Invoice view bugfix 2014-06-26 18:04:37 -04:00
Albert Santoni d785d92953 VAT fixes 2014-06-26 17:44:53 -04:00
Albert Santoni 18c828defd Finished up VAT validation for Plans page 2014-06-26 17:31:34 -04:00
Albert Santoni fce6116d60 Made the invoices view nice! 2014-06-25 20:01:14 -04:00
Albert Santoni d92e5197e1 Design and overhaul of Account Plans screen
* Basically working now except for VAT calculation
* Includes pricing grid, basic total calculation
* Revamped layout
* Implemented getting the service ID in BillingController.php
2014-06-25 18:58:54 -04:00
drigato 6f1727d8f3 Merge branch 'cc-5709-airtime-analyzer-buy-now' of github.com:sourcefabric/Airtime into cc-5709-airtime-analyzer-buy-now
Conflicts:
	airtime_mvc/application/controllers/BillingController.php
2014-06-24 16:26:06 -04:00
drigato bfb5631105 Removed hardcoded client ids.
Added a function that calculates vat and adds it to an invoice
2014-06-24 16:23:23 -04:00
Albert Santoni 8c20592423 Start of form customization for billing 2014-06-24 15:52:43 -04:00
drigato 5d69ba5f91 Custom fields were not saving 2014-06-24 12:51:02 -04:00
drigato 73724bdd04 Custom fields were not saving 2014-06-24 12:46:11 -04:00
drigato 806525e28c Fetch service id from whmcs api for upgrades 2014-06-23 17:04:23 -04:00
drigato f6a4a9d0d0 Removed invalid client id - for testing purposes 2014-06-20 16:54:05 -04:00
drigato 1e1dc1dd03 Validation
Refactoring
2014-06-20 16:31:26 -04:00
drigato 01bf2883e5 Save client info on upgrade 2014-06-20 15:00:28 -04:00
drigato 40f2796972 Created an invoice view
Some refactoring
Some validation
2014-06-19 16:55:01 -04:00
drigato 540b9167a1 Invoice action 2014-06-19 07:10:30 -04:00
drigato b12d88ddf7 Fix a whoopsies 2014-06-18 11:03:26 -04:00
drigato 70a7410b1a Remove key 2014-06-18 10:42:50 -04:00