diff --git a/api/application/composer.json b/api/application/composer.json index 5590ac69..c92ae815 100644 --- a/api/application/composer.json +++ b/api/application/composer.json @@ -24,7 +24,8 @@ "php-curl-class/php-curl-class": "^8.5", "guzzlehttp/guzzle": "^6.3", "twilio/sdk": "^6.10", - "phpoffice/phpspreadsheet": "^1.15" + "phpoffice/phpspreadsheet": "^1.15", + "johnathanmiller/secure-env-php": "^2.0" }, "suggest": { diff --git a/api/application/composer.lock b/api/application/composer.lock index 8b6649f6..847520e8 100644 --- a/api/application/composer.lock +++ b/api/application/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "60bb51fa13af4981c1289371d8244b89", + "content-hash": "70890214c6c375f6c009bf71a7b172e7", "packages": [ { "name": "amphp/amp", @@ -439,6 +439,284 @@ ], "time": "2018-12-04T20:46:45+00:00" }, + { + "name": "johnathanmiller/secure-env-php", + "version": "v2.0.1", + "source": { + "type": "git", + "url": "https://github.com/johnathanmiller/secure-env-php.git", + "reference": "59d09ca7093476e6f02a2be9d0d21dbdd384b1c5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/johnathanmiller/secure-env-php/zipball/59d09ca7093476e6f02a2be9d0d21dbdd384b1c5", + "reference": "59d09ca7093476e6f02a2be9d0d21dbdd384b1c5", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.5" + }, + "bin": [ + "bin/encrypt-env" + ], + "type": "library", + "autoload": { + "psr-4": { + "SecureEnvPHP\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Johnathan Miller", + "email": "hello@johnathanmiller.com", + "homepage": "https://johnathanmiller.com" + } + ], + "description": "Encrypt environment files for production use.", + "keywords": [ + "dotenv", + "encryption", + "env", + "environment", + "environment-variables", + "environment-vars", + "secure-env" + ], + "time": "2019-01-07T06:56:58+00:00" + }, + { + "name": "maennchen/zipstream-php", + "version": "2.1.0", + "source": { + "type": "git", + "url": "https://github.com/maennchen/ZipStream-PHP.git", + "reference": "c4c5803cc1f93df3d2448478ef79394a5981cc58" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/maennchen/ZipStream-PHP/zipball/c4c5803cc1f93df3d2448478ef79394a5981cc58", + "reference": "c4c5803cc1f93df3d2448478ef79394a5981cc58", + "shasum": "" + }, + "require": { + "myclabs/php-enum": "^1.5", + "php": ">= 7.1", + "psr/http-message": "^1.0", + "symfony/polyfill-mbstring": "^1.0" + }, + "require-dev": { + "ext-zip": "*", + "guzzlehttp/guzzle": ">= 6.3", + "mikey179/vfsstream": "^1.6", + "phpunit/phpunit": ">= 7.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "ZipStream\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paul Duncan", + "email": "pabs@pablotron.org" + }, + { + "name": "Jonatan Männchen", + "email": "jonatan@maennchen.ch" + }, + { + "name": "Jesse Donat", + "email": "donatj@gmail.com" + }, + { + "name": "András Kolesár", + "email": "kolesar@kolesar.hu" + } + ], + "description": "ZipStream is a library for dynamically streaming dynamic zip files from PHP without writing to the disk at all on the server.", + "keywords": [ + "stream", + "zip" + ], + "time": "2020-05-30T13:11:16+00:00" + }, + { + "name": "markbaker/complex", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/MarkBaker/PHPComplex.git", + "reference": "9999f1432fae467bc93c53f357105b4c31bb994c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/MarkBaker/PHPComplex/zipball/9999f1432fae467bc93c53f357105b4c31bb994c", + "reference": "9999f1432fae467bc93c53f357105b4c31bb994c", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", + "phpcompatibility/php-compatibility": "^9.0", + "phpdocumentor/phpdocumentor": "2.*", + "phploc/phploc": "^4.0", + "phpmd/phpmd": "2.*", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.3", + "sebastian/phpcpd": "^4.0", + "squizlabs/php_codesniffer": "^3.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "Complex\\": "classes/src/" + }, + "files": [ + "classes/src/functions/abs.php", + "classes/src/functions/acos.php", + "classes/src/functions/acosh.php", + "classes/src/functions/acot.php", + "classes/src/functions/acoth.php", + "classes/src/functions/acsc.php", + "classes/src/functions/acsch.php", + "classes/src/functions/argument.php", + "classes/src/functions/asec.php", + "classes/src/functions/asech.php", + "classes/src/functions/asin.php", + "classes/src/functions/asinh.php", + "classes/src/functions/atan.php", + "classes/src/functions/atanh.php", + "classes/src/functions/conjugate.php", + "classes/src/functions/cos.php", + "classes/src/functions/cosh.php", + "classes/src/functions/cot.php", + "classes/src/functions/coth.php", + "classes/src/functions/csc.php", + "classes/src/functions/csch.php", + "classes/src/functions/exp.php", + "classes/src/functions/inverse.php", + "classes/src/functions/ln.php", + "classes/src/functions/log2.php", + "classes/src/functions/log10.php", + "classes/src/functions/negative.php", + "classes/src/functions/pow.php", + "classes/src/functions/rho.php", + "classes/src/functions/sec.php", + "classes/src/functions/sech.php", + "classes/src/functions/sin.php", + "classes/src/functions/sinh.php", + "classes/src/functions/sqrt.php", + "classes/src/functions/tan.php", + "classes/src/functions/tanh.php", + "classes/src/functions/theta.php", + "classes/src/operations/add.php", + "classes/src/operations/subtract.php", + "classes/src/operations/multiply.php", + "classes/src/operations/divideby.php", + "classes/src/operations/divideinto.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mark Baker", + "email": "mark@lange.demon.co.uk" + } + ], + "description": "PHP Class for working with complex numbers", + "homepage": "https://github.com/MarkBaker/PHPComplex", + "keywords": [ + "complex", + "mathematics" + ], + "time": "2020-08-26T10:42:07+00:00" + }, + { + "name": "markbaker/matrix", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/MarkBaker/PHPMatrix.git", + "reference": "9567d9c4c519fbe40de01dbd1e4469dbbb66f46a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/MarkBaker/PHPMatrix/zipball/9567d9c4c519fbe40de01dbd1e4469dbbb66f46a", + "reference": "9567d9c4c519fbe40de01dbd1e4469dbbb66f46a", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", + "phpcompatibility/php-compatibility": "^9.0", + "phpdocumentor/phpdocumentor": "2.*", + "phploc/phploc": "^4.0", + "phpmd/phpmd": "2.*", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.3", + "sebastian/phpcpd": "^4.0", + "squizlabs/php_codesniffer": "^3.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "Matrix\\": "classes/src/" + }, + "files": [ + "classes/src/functions/adjoint.php", + "classes/src/functions/antidiagonal.php", + "classes/src/functions/cofactors.php", + "classes/src/functions/determinant.php", + "classes/src/functions/diagonal.php", + "classes/src/functions/identity.php", + "classes/src/functions/inverse.php", + "classes/src/functions/minors.php", + "classes/src/functions/trace.php", + "classes/src/functions/transpose.php", + "classes/src/operations/add.php", + "classes/src/operations/directsum.php", + "classes/src/operations/subtract.php", + "classes/src/operations/multiply.php", + "classes/src/operations/divideby.php", + "classes/src/operations/divideinto.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mark Baker", + "email": "mark@demon-angel.eu" + } + ], + "description": "PHP Class for working with matrices", + "homepage": "https://github.com/MarkBaker/PHPMatrix", + "keywords": [ + "mathematics", + "matrix", + "vector" + ], + "time": "2020-08-28T17:11:00+00:00" + }, { "name": "monolog/monolog", "version": "1.24.0", @@ -572,6 +850,52 @@ ], "time": "2016-12-03T22:08:25+00:00" }, + { + "name": "myclabs/php-enum", + "version": "1.7.6", + "source": { + "type": "git", + "url": "https://github.com/myclabs/php-enum.git", + "reference": "5f36467c7a87e20fbdc51e524fd8f9d1de80187c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/php-enum/zipball/5f36467c7a87e20fbdc51e524fd8f9d1de80187c", + "reference": "5f36467c7a87e20fbdc51e524fd8f9d1de80187c", + "shasum": "" + }, + "require": { + "ext-json": "*", + "php": ">=7.1" + }, + "require-dev": { + "phpunit/phpunit": "^7", + "squizlabs/php_codesniffer": "1.*", + "vimeo/psalm": "^3.8" + }, + "type": "library", + "autoload": { + "psr-4": { + "MyCLabs\\Enum\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP Enum contributors", + "homepage": "https://github.com/myclabs/php-enum/graphs/contributors" + } + ], + "description": "PHP Enum implementation", + "homepage": "http://github.com/myclabs/php-enum", + "keywords": [ + "enum" + ], + "time": "2020-02-14T08:15:52+00:00" + }, { "name": "phenx/php-font-lib", "version": "0.5.1", @@ -782,6 +1106,203 @@ "description": "PHPMailer is a full-featured email creation and transfer class for PHP", "time": "2019-02-01T15:04:28+00:00" }, + { + "name": "phpoffice/phpspreadsheet", + "version": "1.15.0", + "source": { + "type": "git", + "url": "https://github.com/PHPOffice/PhpSpreadsheet.git", + "reference": "a8e8068b31b8119e1daa5b1eb5715a3a8ea8305f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/a8e8068b31b8119e1daa5b1eb5715a3a8ea8305f", + "reference": "a8e8068b31b8119e1daa5b1eb5715a3a8ea8305f", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "ext-dom": "*", + "ext-fileinfo": "*", + "ext-gd": "*", + "ext-iconv": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-simplexml": "*", + "ext-xml": "*", + "ext-xmlreader": "*", + "ext-xmlwriter": "*", + "ext-zip": "*", + "ext-zlib": "*", + "maennchen/zipstream-php": "^2.1", + "markbaker/complex": "^1.5|^2.0", + "markbaker/matrix": "^1.2|^2.0", + "php": "^7.2|^8.0", + "psr/http-client": "^1.0", + "psr/http-factory": "^1.0", + "psr/simple-cache": "^1.0" + }, + "require-dev": { + "dompdf/dompdf": "^0.8.5", + "friendsofphp/php-cs-fixer": "^2.16", + "jpgraph/jpgraph": "^4.0", + "mpdf/mpdf": "^8.0", + "phpcompatibility/php-compatibility": "^9.3", + "phpunit/phpunit": "^8.5|^9.3", + "squizlabs/php_codesniffer": "^3.5", + "tecnickcom/tcpdf": "^6.3" + }, + "suggest": { + "dompdf/dompdf": "Option for rendering PDF with PDF Writer (doesn't yet support PHP8)", + "jpgraph/jpgraph": "Option for rendering charts, or including charts with PDF or HTML Writers", + "mpdf/mpdf": "Option for rendering PDF with PDF Writer", + "tecnickcom/tcpdf": "Option for rendering PDF with PDF Writer (doesn't yet support PHP8)" + }, + "type": "library", + "autoload": { + "psr-4": { + "PhpOffice\\PhpSpreadsheet\\": "src/PhpSpreadsheet" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Maarten Balliauw", + "homepage": "https://blog.maartenballiauw.be" + }, + { + "name": "Mark Baker", + "homepage": "https://markbakeruk.net" + }, + { + "name": "Franck Lefevre", + "homepage": "https://rootslabs.net" + }, + { + "name": "Erik Tilt" + }, + { + "name": "Adrien Crivelli" + } + ], + "description": "PHPSpreadsheet - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine", + "homepage": "https://github.com/PHPOffice/PhpSpreadsheet", + "keywords": [ + "OpenXML", + "excel", + "gnumeric", + "ods", + "php", + "spreadsheet", + "xls", + "xlsx" + ], + "time": "2020-10-11T13:20:59+00:00" + }, + { + "name": "psr/http-client", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-client.git", + "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-client/zipball/2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", + "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", + "shasum": "" + }, + "require": { + "php": "^7.0 || ^8.0", + "psr/http-message": "^1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Client\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP clients", + "homepage": "https://github.com/php-fig/http-client", + "keywords": [ + "http", + "http-client", + "psr", + "psr-18" + ], + "time": "2020-06-29T06:28:15+00:00" + }, + { + "name": "psr/http-factory", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-factory.git", + "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/12ac7fcd07e5b077433f5f2bee95b3a771bf61be", + "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be", + "shasum": "" + }, + "require": { + "php": ">=7.0.0", + "psr/http-message": "^1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interfaces for PSR-7 HTTP message factories", + "keywords": [ + "factory", + "http", + "message", + "psr", + "psr-17", + "psr-7", + "request", + "response" + ], + "time": "2019-04-30T12:38:16+00:00" + }, { "name": "psr/http-message", "version": "1.0.1", @@ -879,6 +1400,54 @@ ], "time": "2018-11-20T15:27:04+00:00" }, + { + "name": "psr/simple-cache", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/simple-cache.git", + "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", + "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\SimpleCache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interfaces for simple caching", + "keywords": [ + "cache", + "caching", + "psr", + "psr-16", + "simple-cache" + ], + "time": "2017-10-23T01:57:42+00:00" + }, { "name": "ralouphie/getallheaders", "version": "2.0.5", @@ -1013,6 +1582,69 @@ ], "time": "2019-01-11T08:49:57+00:00" }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.20.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "39d483bdf39be819deabf04ec872eb0b2410b531" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/39d483bdf39be819deabf04ec872eb0b2410b531", + "reference": "39d483bdf39be819deabf04ec872eb0b2410b531", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.20-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "time": "2020-10-23T14:02:19+00:00" + }, { "name": "symfony/process", "version": "v4.3.2", @@ -1168,6 +1800,56 @@ "text recognition" ], "time": "2019-01-30T19:47:33+00:00" + }, + { + "name": "twilio/sdk", + "version": "6.12.0", + "source": { + "type": "git", + "url": "https://github.com/twilio/twilio-php.git", + "reference": "8649f40db24f074a66e3f762b11079be31cfdb8b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/twilio/twilio-php/zipball/8649f40db24f074a66e3f762b11079be31cfdb8b", + "reference": "8649f40db24f074a66e3f762b11079be31cfdb8b", + "shasum": "" + }, + "require": { + "php": ">=7.1.0" + }, + "require-dev": { + "guzzlehttp/guzzle": "^6.3 || ^7.0", + "phpunit/phpunit": ">=4.5", + "theseer/phpdox": "^0.12.0" + }, + "suggest": { + "guzzlehttp/guzzle": "An HTTP client to execute the API requests" + }, + "type": "library", + "autoload": { + "psr-4": { + "Twilio\\": "src/Twilio/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Twilio API Team", + "email": "api@twilio.com" + } + ], + "description": "A PHP wrapper for Twilio's API", + "homepage": "http://github.com/twilio/twilio-php", + "keywords": [ + "api", + "sms", + "twilio" + ], + "time": "2020-11-05T21:49:26+00:00" } ], "packages-dev": [], diff --git a/api/application/config/constants.php b/api/application/config/constants.php index 68d50726..5fac79b5 100644 --- a/api/application/config/constants.php +++ b/api/application/config/constants.php @@ -107,8 +107,8 @@ defined('DETAILED_SCORE_CARD_IMAGE_LOCATION') OR define('DETAILED_SCORE_CARD_IMA defined('LENDER_BUCKET_NAME_PREFIX') OR define('LENDER_BUCKET_NAME_PREFIX','test-lender'); defined('PHANTOMJSSCRIPT_LOCATION') OR define('PHANTOMJSSCRIPT_LOCATION','phantomjs_dev'); defined('LOGTOBOT') OR define('LOGTOBOT',0); -defined('GOOGLE_STATIC_MAP_API_KEY') OR define('GOOGLE_STATIC_MAP_API_KEY','AIzaSyA3lYDYxwtn5vLSl45SOKbtK7G6cEyXGr0'); -defined('FIREBASE_PUSH_NOTIFICATION_SERVER_API_KEY') OR define('FIREBASE_PUSH_NOTIFICATION_SERVER_API_KEY','AAAA0yTIWHY:APA91bGuBHAEn1NcX95Uudm847Ez2AIbqqmi5698trFPx0cIs0OTXWUNu7c5DKDJlbxPBILytBGC5cEHqEy08AQZGu_rpCE4hyvoHyCDkOjuwhA3DFNMQDpMU6XxDDJXCI1zjhHRuEQr'); +defined('GOOGLE_STATIC_MAP_API_KEY') OR define('GOOGLE_STATIC_MAP_API_KEY',getenv('GOOGLE_STATIC_MAP_API_KEY')); + defined('FIREBASE_PUSH_NOTIFICATION_SERVER_API_KEY') OR define('FIREBASE_PUSH_NOTIFICATION_SERVER_API_KEY',getenv('FIREBASE_PUSH_NOTIFICATION_SERVER_API_KEY')); defined('OFFICER_TRACKING_URL') OR define('OFFICER_TRACKING_URL','https://demo.pdgenie.com/otnew/#/'); defined('CUSTOMER_IMG_URL') OR define('CUSTOMER_IMG_URL','https://demo.pdgenie.com/customer/#/pd-images/'); defined('SALESPD_CUSTOMER_IMG_URL') OR define('SALESPD_CUSTOMER_IMG_URL','https://demo.pdgenie.com/customer/#/salespd_images/'); @@ -121,8 +121,8 @@ else if(ENVIRONMENT == 'testing') defined('LENDER_BUCKET_NAME_PREFIX') OR define('LENDER_BUCKET_NAME_PREFIX','test-lender'); defined('PHANTOMJSSCRIPT_LOCATION') OR define('PHANTOMJSSCRIPT_LOCATION','phantomjs_test'); defined('LOGTOBOT') OR define('LOGTOBOT',0); - defined('GOOGLE_STATIC_MAP_API_KEY') OR define('GOOGLE_STATIC_MAP_API_KEY','AIzaSyA3lYDYxwtn5vLSl45SOKbtK7G6cEyXGr0'); - defined('FIREBASE_PUSH_NOTIFICATION_SERVER_API_KEY') OR define('FIREBASE_PUSH_NOTIFICATION_SERVER_API_KEY','AAAA0yTIWHY:APA91bGuBHAEn1NcX95Uudm847Ez2AIbqqmi5698trFPx0cIs0OTXWUNu7c5DKDJlbxPBILytBGC5cEHqEy08AQZGu_rpCE4hyvoHyCDkOjuwhA3DFNMQDpMU6XxDDJXCI1zjhHRuEQr'); + defined('GOOGLE_STATIC_MAP_API_KEY') OR define('GOOGLE_STATIC_MAP_API_KEY',getenv('GOOGLE_STATIC_MAP_API_KEY')); + defined('FIREBASE_PUSH_NOTIFICATION_SERVER_API_KEY') OR define('FIREBASE_PUSH_NOTIFICATION_SERVER_API_KEY',getenv('FIREBASE_PUSH_NOTIFICATION_SERVER_API_KEY')); defined('OFFICER_TRACKING_URL') OR define('OFFICER_TRACKING_URL','https://demo.pdgenie.com/otnew/#/'); defined('SALESPD_CUSTOMER_IMG_URL') OR define('SALESPD_CUSTOMER_IMG_URL','https://demo.pdgenie.com/customer/#/salespd_images/'); defined('CUSTOMER_IMG_URL') OR define('CUSTOMER_IMG_URL','https://demo.pdgenie.com/customer/#/pd-images/'); @@ -134,8 +134,8 @@ else if(ENVIRONMENT == 'production') defined('LENDER_BUCKET_NAME_PREFIX') OR define('LENDER_BUCKET_NAME_PREFIX','pdgenie-lender'); defined('PHANTOMJSSCRIPT_LOCATION') OR define('PHANTOMJSSCRIPT_LOCATION','phantomjs_prod'); defined('LOGTOBOT') OR define('LOGTOBOT',0); - defined('GOOGLE_STATIC_MAP_API_KEY') OR define('GOOGLE_STATIC_MAP_API_KEY','AIzaSyA3lYDYxwtn5vLSl45SOKbtK7G6cEyXGr0'); - defined('FIREBASE_PUSH_NOTIFICATION_SERVER_API_KEY') OR define('FIREBASE_PUSH_NOTIFICATION_SERVER_API_KEY','AAAA0yTIWHY:APA91bGuBHAEn1NcX95Uudm847Ez2AIbqqmi5698trFPx0cIs0OTXWUNu7c5DKDJlbxPBILytBGC5cEHqEy08AQZGu_rpCE4hyvoHyCDkOjuwhA3DFNMQDpMU6XxDDJXCI1zjhHRuEQr'); + defined('GOOGLE_STATIC_MAP_API_KEY') OR define('GOOGLE_STATIC_MAP_API_KEY',getenv('GOOGLE_STATIC_MAP_API_KEY')); + defined('FIREBASE_PUSH_NOTIFICATION_SERVER_API_KEY') OR define('FIREBASE_PUSH_NOTIFICATION_SERVER_API_KEY',getenv('FIREBASE_PUSH_NOTIFICATION_SERVER_API_KEY')); defined('OFFICER_TRACKING_URL') OR define('OFFICER_TRACKING_URL','https://pdgenie.com/track/#/'); defined('SALESPD_CUSTOMER_IMG_URL') OR define('SALESPD_CUSTOMER_IMG_URL','https://pdgenie.com/customer/#/salespd_images/'); defined('CUSTOMER_IMG_URL') OR define('CUSTOMER_IMG_URL','https://pdgenie.com/customer/#/pd-images/'); @@ -151,10 +151,10 @@ else if(ENVIRONMENT == 'production') // defined('TWILIO_API_KEY') OR define('TWILIO_API_KEY','SKfe779102ec62104c91e04b430152c612'); // defined('TWILIO_API_KEY_SECRET') OR define('TWILIO_API_KEY_SECRET','D3GxJVFSuapFazTxU3P966ArukRQPVjY'); -defined('TWLIO_SID') OR define('TWLIO_SID','ACda3a92ada4f3d3aa8b8c36b816191f59'); -defined('TWLIO_AUTH_TOKEN') OR define('TWLIO_AUTH_TOKEN','b0298b1d3bec5fc8e6811c8696f31212'); -defined('TWILIO_API_KEY') OR define('TWILIO_API_KEY','SK59ae1e0155be36aa19e9aad07f0597a6'); -defined('TWILIO_API_KEY_SECRET') OR define('TWILIO_API_KEY_SECRET','SjG8qZbfC0uRsx8QzvpECZ4yd483TpWC'); +defined('TWLIO_SID') OR define('TWLIO_SID',getenv('TWLIO_SID')); +defined('TWLIO_AUTH_TOKEN') OR define('TWLIO_AUTH_TOKEN',getenv('TWLIO_AUTH_TOKEN')); +defined('TWILIO_API_KEY') OR define('TWILIO_API_KEY',getenv('TWILIO_API_KEY')); +defined('TWILIO_API_KEY_SECRET') OR define('TWILIO_API_KEY_SECRET',getenv('TWILIO_API_KEY_SECRET')); /*************************END OF TWILO CONSTANTS************************************************************/ diff --git a/api/application/config/customconfig_one.php b/api/application/config/customconfig_one.php index dcde1acb..5ab00018 100644 --- a/api/application/config/customconfig_one.php +++ b/api/application/config/customconfig_one.php @@ -42,38 +42,38 @@ u9Nh1od1bdo7JpEe35BshS8W5BApiRsj2RIQu9V1nt0+Bo0xiqOKz7VLBZ2PBVsR NwIDAQAB -----END PUBLIC KEY-----'; -$config['sine_egde_pool_id'] = 'ap-south-1_GqN9ZKRne'; -$config['lender_pool_id'] = 'ap-south-1_4kkhgsYo0'; -$config['vendor_pool_id'] = 'ap-south-1_cBDvQB1ok'; +$config['sine_egde_pool_id'] = getenv('TEST.SINE_EGDE_POOL_ID'); +$config['lender_pool_id'] = getenv('TEST.LENDER_POOL_ID'); +$config['vendor_pool_id'] = getenv('TEST.VENDOR_POOL_ID'); /*Generated token will expire in 1 minute for sample code * Increase this value as per requirement for production * not in use SSA Projet. */ $config['token_timeout'] = 1; -$config['authorization_key'] = 'sparqvenba2018'; +$config['authorization_key'] = getenv('TEST.AUTHORIZATION_KEY'); -$config['s3_resource_key'] = 'AKIAR7TQUR2J6HFMHQ4P'; -$config['s3_resource_secret'] = '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'; +$config['s3_resource_key'] = getenv('TEST.S3_RESOURCE_KEY'); +$config['s3_resource_secret'] = getenv('TEST.S3_RESOURCE_SECRET'); -$config['cognito_resource_key'] = 'AKIAR7TQUR2JRYC4VCF5'; -$config['cognito_resource_secret'] = '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'; +$config['cognito_resource_key'] = getenv('TEST.COGNITO_RESOURCE_KEY'); +$config['cognito_resource_secret'] = getenv('TEST.COGNITO_RESOURCE_SECRET'); } else if(ENVIRONMENT == 'production') { -$config['sine_egde_pool_id'] = 'ap-south-1_MlTee1O5V'; -$config['lender_pool_id'] = 'ap-south-1_Kg227UJOD'; -$config['vendor_pool_id'] = 'ap-south-1_7Xvnpr2At'; +$config['sine_egde_pool_id'] = getenv('TEST.SINE_EGDE_POOL_ID'); +$config['lender_pool_id'] = getenv('TEST.LENDER_POOL_ID'); +$config['vendor_pool_id'] = getenv('TEST.VENDOR_POOL_ID'); $config['authorization_key'] = 'TnAwuc64pVpcB9xf'; -$config['s3_resource_key'] = 'AKIAR7TQUR2J6HFMHQ4P'; -$config['s3_resource_secret'] = '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'; +$config['s3_resource_key'] = 'AKIAR7TQUR2JQYXKFYXA'; +$config['s3_resource_secret'] = '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'; -$config['cognito_resource_key'] = 'AKIAR7TQUR2JRYC4VCF5'; -$config['cognito_resource_secret'] = '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'; +$config['cognito_resource_key'] = 'AKIAR7TQUR2JY5KQIR6M'; +$config['cognito_resource_secret'] = '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'; $config['jwt_public_key_sineedge'] = '-----BEGIN PUBLIC KEY----- MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAkWNk5E65V2zVEO+cH/fS @@ -110,8 +110,8 @@ cwIDAQAB // ************ SMSGUPSHUP Configurations ***********************// -$config['sms_api_user_id'] = '2000185290'; -$config['sms_api_pwd'] = 'wRfAwb&v'; +$config['sms_api_user_id'] = getenv('TEST.SMS_API_USER_ID'); +$config['sms_api_pwd'] = getenv('TEST.SMS_API_PWD'); $config['sms_gupshup_url'] = 'http://enterprise.smsgupshup.com/GatewayAPI/rest?method=SendMessage&send_to={{send_to_mobile_no}}&msg={{send_msg}}&msg_type=TEXT&userid={{sms_api_user_id}}&auth_scheme=plain&password={{sms_api_pwd}}=1.1&format=text'; @@ -123,4 +123,5 @@ $config['parent_forms'] = array(0,10,7,4,6,8,9,20);// 0 added for dummy + ?> \ No newline at end of file diff --git a/api/application/config/database.php b/api/application/config/database.php index 286d8f1a..5f5492c3 100644 --- a/api/application/config/database.php +++ b/api/application/config/database.php @@ -87,13 +87,13 @@ $query_builder = TRUE; $db['dev'] = array( 'dsn' => '', - 'hostname' => 'sineedge-prod.c5vaalihixyr.ap-south-1.rds.amazonaws.com', + 'hostname' => getenv('DEV.HOSTNAME'), //'hostname' => 'localhost', - 'username' => 'dbadmin', + 'username' => getenv('DEV.USERNAME'), //'username' => 'root', - 'password' => 'DBadmin12345', + 'password' => getenv('DEV.PASSWORD'), // 'password' => '', - 'database' => 'sineedgedemo', + 'database' => getenv('DEV.DATABASE'), 'dbdriver' => 'mysqli', 'dbprefix' => '', 'pconnect' => FALSE, @@ -108,18 +108,18 @@ $db['dev'] = array( 'stricton' => FALSE, 'failover' => array(), 'save_queries' => TRUE, - 'port' => '2344' + 'port' => getenv('DEV.PORT') ); $db['test'] = array( 'dsn' => '', - 'hostname' => 'sineedge-prod.c5vaalihixyr.ap-south-1.rds.amazonaws.com', + 'hostname' => getenv('TEST.HOSTNAME'), //'hostname' => 'localhost', - 'username' => 'dbadmin', + 'username' => getenv('TEST.USERNAME'), //'username' => 'root', - 'password' => 'DBadmin12345', + 'password' => getenv('TEST.PASSWORD'), // 'password' => '', - 'database' => 'sineedgedemo', + 'database' => getenv('TEST.DATABASE'), 'dbdriver' => 'mysqli', 'dbprefix' => '', 'pconnect' => FALSE, @@ -134,15 +134,18 @@ $db['test'] = array( 'stricton' => FALSE, 'failover' => array(), 'save_queries' => TRUE, - 'port' => '2344' + 'port' => getenv('TEST.PORT') ); $db['prod'] = array( 'dsn' => '', - 'hostname' => 'sineedge-prod.c5vaalihixyr.ap-south-1.rds.amazonaws.com', - 'username' => 'dbadmin', - 'password' => 'DBadmin12345', - 'database' => 'sineedgeprod', + 'hostname' => getenv('PROD.HOSTNAME'), + //'hostname' => 'localhost', + 'username' => getenv('PROD.USERNAME'), + //'username' => 'root', + 'password' => getenv('PROD.PASSWORD'), + // 'password' => '', + 'database' => getenv('PROD.DATABASE'), 'dbdriver' => 'mysqli', 'dbprefix' => '', 'pconnect' => FALSE, @@ -157,6 +160,6 @@ $db['prod'] = array( 'stricton' => FALSE, 'failover' => array(), 'save_queries' => TRUE, - 'port' => '2344' + 'port' => getenv('PROD.PORT') ); diff --git a/api/application/controllers/PD_Controller.php b/api/application/controllers/PD_Controller.php index 6ae8edeb..3c9ce9b8 100644 --- a/api/application/controllers/PD_Controller.php +++ b/api/application/controllers/PD_Controller.php @@ -6065,7 +6065,12 @@ public function getPDFormDetailsJSON_post() public function codeigniterViewTest_post() { -// $this->load->library('myspreadsheet'); + + // $host = getenv('DB_HOST'); +// echo $this->config->item('new_db_variable'); +// echo MY_CONSTANT; +// die(); +// // $this->load->library('myspreadsheet'); // //print_r($myspreadsheet);die(); // $spreadsheet = $this->myspreadsheet->getMySpreadSheet(); // // print_r($sheet);die(); @@ -6213,7 +6218,7 @@ public function getPDFormDetailsJSON_post() $data['pd_master_details'] = $this->PD_Model->getPDMasterDetails($pdid); $data['applicants_details'] = $this->PD_Model->getApplicantsDetails($pdid); - //print_r($data['pd_master_details']);die(); + print_r($data['pd_master_details']);die(); //$data['satellite_path'] = $this->external_path.'/pd_reports/'. $pdid .'/satellite.png'; // $data['pd_master_details'][0]['lender_short_name'] = 'CLIXH'; // $data['pd_master_details'][0]['product_abbr'] = 'HL'; @@ -9728,9 +9733,11 @@ public function getCompaniesListsFromGeneralFormRawJSON_post() foreach ($video_info as $key => $value) { $video_name = $value['composition_id'].'.mp4'; + if($value['is_uploaded']){$video_name = $value['composition_id'];} + $file_name = $video_name; if($value['s3_copied']) { - $final_key = 'pd'.$pd_master_details[0]['pd_id'].'/video/'.$value['composition_id'].'.mp4'; + $final_key = 'pd'.$pd_master_details[0]['pd_id'].'/video/'.$file_name; $singed_uri = $this->aws_s3->getSingleObjectInaBucketAsSignedURI($bucket_name,$final_key,'+7 days'); $result_data[] = array('video_name' => $video_name,'url' => $singed_uri,'status' => $value['twilo_status'],'room_id' => $value['room_id']); } diff --git a/api/application/libraries/key_enc.php b/api/application/libraries/key_enc.php new file mode 100644 index 00000000..f0839556 --- /dev/null +++ b/api/application/libraries/key_enc.php @@ -0,0 +1,44 @@ +getMessage(); + exit(1); + } + } + else + { + try + { + if(!file_exists($enc_env) || (!file_exists($enc_key))) + { + throw new Exception("Application Environment Variables Not Available..!"); + } + } + catch(Exception $e) + { + header('HTTP/1.1 503 Service Unavailable.', TRUE, 503); + echo $e->getMessage(); + exit(1); + } + } + +(new SecureEnvPHP())->parse($enc_env,$enc_key); +// echo getenv('GOOGLE_STATIC_MAP_API_KEY'); + +?> \ No newline at end of file diff --git a/api/index.php b/api/index.php index 1c72bbd9..b045a7a0 100644 --- a/api/index.php +++ b/api/index.php @@ -129,7 +129,7 @@ switch (ENVIRONMENT) case 'testing': error_reporting(-1); - ini_set('display_errors', 0); + ini_set('display_errors',0); break; case 'production': ini_set('display_errors', 0); @@ -149,6 +149,8 @@ switch (ENVIRONMENT) exit(1); // EXIT_ERROR } + + /* *--------------------------------------------------------------- * SYSTEM DIRECTORY NAME @@ -365,6 +367,8 @@ switch (ENVIRONMENT) define('VIEWPATH', $view_folder.DIRECTORY_SEPARATOR); + +require_once APPPATH.'libraries/key_enc.php';//die(); /* * -------------------------------------------------------------------- * LOAD THE BOOTSTRAP FILE