diff --git a/publish.sh b/publish.sh index a78ae99..35e56b9 100755 --- a/publish.sh +++ b/publish.sh @@ -2,4 +2,6 @@ sass source/static/assets/sass/main.scss source/static/assets/css/main.css php bin/compile.php -rsync -rv --exclude=settings.php web webhost.netsyms.net:/var/www/certifiedfromhome.com/ +rsync -rv web webhost.netsyms.net:/var/www/test.certifiedfromhome.com/ + +#rsync -rv --exclude=settings.php web webhost.netsyms.net:/var/www/certifiedfromhome.com/ diff --git a/settings.json b/settings.json index fb2f461..796b299 100644 --- a/settings.json +++ b/settings.json @@ -2,7 +2,8 @@ "context": { "site_title": "Certified from Home", "site_root": "https://certifiedfromhome.com/", - "stripe_pk": "pk_live_51NEHz0LeSU0ahZ9MUVOnCSGAibY3M4UHqdRzdxFLMnlmbnMAVJzDz0psztY9AvwpTjRcpXkJT5ljBaY7z6v0w2TT00dA0Lnx2d", + "stripe_pk_live": "pk_live_51NEHz0LeSU0ahZ9MUVOnCSGAibY3M4UHqdRzdxFLMnlmbnMAVJzDz0psztY9AvwpTjRcpXkJT5ljBaY7z6v0w2TT00dA0Lnx2d", + "stripe_pk_test": "pk_test_51NEHz0LeSU0ahZ9MpX1WyzQWkJLvSntsj181vTRXLVqJqdZcQ7i7rLpNu7X6iinaIq1h8UOz4Ypkzh61RZ06CXIs00UhIjvV1M", "navigation": [ { "title": "Home", diff --git a/source/includes/footer.html b/source/includes/footer.html index 2f33b44..f8f84c6 100644 --- a/source/includes/footer.html +++ b/source/includes/footer.html @@ -3,8 +3,7 @@ diff --git a/source/includes/head.html b/source/includes/head.html index ee39d23..d8b0c92 100644 --- a/source/includes/head.html +++ b/source/includes/head.html @@ -3,9 +3,9 @@ {{#title}}{{title}} :: {{/title}}{{site_title}} - + - + diff --git a/source/includes/scripts.html b/source/includes/scripts.html index d65c224..c3fb38f 100644 --- a/source/includes/scripts.html +++ b/source/includes/scripts.html @@ -1,12 +1,7 @@ - - - - - - - - - \ No newline at end of file + + + + + + \ No newline at end of file diff --git a/source/pages/index.html b/source/pages/index.html index 613d28d..afd75bb 100644 --- a/source/pages/index.html +++ b/source/pages/index.html @@ -276,7 +276,7 @@
  • Send Another Letter
  • - Can't see the file and/or print it? Click here. + Can't see the file and/or print it? Click here. @@ -284,5 +284,10 @@ {{> footer}} {{> scripts}} + + + \ No newline at end of file diff --git a/source/static/assets/js/shipment.js b/source/static/assets/js/shipment.js index fd67fb3..0518631 100644 --- a/source/static/assets/js/shipment.js +++ b/source/static/assets/js/shipment.js @@ -117,7 +117,7 @@ function submitPayment() { "no10_envelope": document.getElementById('no10_envelope').checked ? "1" : "" }, dataType: "json", - timeout: 1000 * 30, + timeout: 1000 * 60, success: function (resp) { if (resp.status == "OK") { // load PDF to print diff --git a/source/static/composer.json b/source/static/composer.json index db80e04..36f05af 100644 --- a/source/static/composer.json +++ b/source/static/composer.json @@ -1,10 +1,10 @@ { "name": "netsyms/www", "require": { - "phpmailer/phpmailer": "^6.0", - "stripe/stripe-php": "^7.71", - "catfan/medoo": "^1.7", - "easypost/easypost-php": "^3.4" + "phpmailer/phpmailer": "^7.0", + "stripe/stripe-php": "^19", + "easypost/easypost-php": "^8", + "sentry/sdk": "^4.0" }, "authors": [ { diff --git a/source/static/composer.lock b/source/static/composer.lock index 66d78b8..3b1ba36 100644 --- a/source/static/composer.lock +++ b/source/static/composer.lock @@ -4,96 +4,41 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "7a941c6f682b3194cfb9e60d6455d254", + "content-hash": "a57a12215f807bb83b46418344581ba9", "packages": [ - { - "name": "catfan/medoo", - "version": "v1.7.10", - "source": { - "type": "git", - "url": "https://github.com/catfan/Medoo.git", - "reference": "2d675f73e23f63bbaeb9a8aa33318659a3d3c32f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/catfan/Medoo/zipball/2d675f73e23f63bbaeb9a8aa33318659a3d3c32f", - "reference": "2d675f73e23f63bbaeb9a8aa33318659a3d3c32f", - "shasum": "" - }, - "require": { - "ext-pdo": "*", - "php": ">=5.4" - }, - "suggest": { - "ext-pdo_dblib": "For MSSQL or Sybase database on Linux/UNIX platform", - "ext-pdo_mysql": "For MySQL or MariaDB database", - "ext-pdo_oci": "For Oracle database", - "ext-pdo_oci8": "For Oracle version 8 database", - "ext-pdo_pqsql": "For PostgreSQL database", - "ext-pdo_sqlite": "For SQLite database", - "ext-pdo_sqlsrv": "For MSSQL database on both Window/Liunx platform" - }, - "type": "framework", - "autoload": { - "psr-4": { - "Medoo\\": "/src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Angel Lai", - "email": "angel@catfan.me" - } - ], - "description": "The lightweight PHP database framework to accelerate development", - "homepage": "https://medoo.in", - "keywords": [ - "database", - "database library", - "lightweight", - "mariadb", - "mssql", - "mysql", - "oracle", - "php framework", - "postgresql", - "sql", - "sqlite" - ], - "time": "2020-02-11T08:20:42+00:00" - }, { "name": "easypost/easypost-php", - "version": "3.4.5", + "version": "8.7.0", "source": { "type": "git", "url": "https://github.com/EasyPost/easypost-php.git", - "reference": "c1aaa1baf82c8f5b330ec4da80d084da458765a5" + "reference": "dec39fe81582e8d6d24873612ab0b83f24906fe4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/EasyPost/easypost-php/zipball/c1aaa1baf82c8f5b330ec4da80d084da458765a5", - "reference": "c1aaa1baf82c8f5b330ec4da80d084da458765a5", + "url": "https://api.github.com/repos/EasyPost/easypost-php/zipball/dec39fe81582e8d6d24873612ab0b83f24906fe4", + "reference": "dec39fe81582e8d6d24873612ab0b83f24906fe4", "shasum": "" }, "require": { - "ext-curl": "*", "ext-json": "*", - "php": ">=5.3.0" + "guzzlehttp/guzzle": "^7.9", + "php": ">=8.1" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^2.16", - "overtrue/phplint": "^1.2", - "phpunit/phpunit": "^8" + "allejo/php-vcr-sanitizer": "^1.1", + "php-coveralls/php-coveralls": "^2.7", + "php-vcr/php-vcr": "^1.8.2", + "phpstan/phpstan": "^2.1", + "phpunit/phpunit": "^10", + "roave/security-advisories": "dev-latest", + "rregeer/phpunit-coverage-check": "^0.3.1", + "squizlabs/php_codesniffer": "^3.11" }, "type": "library", "autoload": { - "psr-0": { - "EasyPost": "lib/" + "psr-4": { + "EasyPost\\": "lib/EasyPost/" } }, "notification-url": "https://packagist.org/downloads/", @@ -114,43 +59,438 @@ "easypost", "shipping" ], - "time": "2020-05-07T20:37:59+00:00" + "support": { + "issues": "https://github.com/EasyPost/easypost-php/issues", + "source": "https://github.com/EasyPost/easypost-php/tree/v8.7.0" + }, + "time": "2026-02-25T20:34:43+00:00" }, { - "name": "phpmailer/phpmailer", - "version": "v6.0.7", + "name": "guzzlehttp/guzzle", + "version": "7.10.0", "source": { "type": "git", - "url": "https://github.com/PHPMailer/PHPMailer.git", - "reference": "0c41a36d4508d470e376498c1c0c527aa36a2d59" + "url": "https://github.com/guzzle/guzzle.git", + "reference": "b51ac707cfa420b7bfd4e4d5e510ba8008e822b4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/0c41a36d4508d470e376498c1c0c527aa36a2d59", - "reference": "0c41a36d4508d470e376498c1c0c527aa36a2d59", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/b51ac707cfa420b7bfd4e4d5e510ba8008e822b4", + "reference": "b51ac707cfa420b7bfd4e4d5e510ba8008e822b4", + "shasum": "" + }, + "require": { + "ext-json": "*", + "guzzlehttp/promises": "^2.3", + "guzzlehttp/psr7": "^2.8", + "php": "^7.2.5 || ^8.0", + "psr/http-client": "^1.0", + "symfony/deprecation-contracts": "^2.2 || ^3.0" + }, + "provide": { + "psr/http-client-implementation": "1.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "ext-curl": "*", + "guzzle/client-integration-tests": "3.0.2", + "php-http/message-factory": "^1.1", + "phpunit/phpunit": "^8.5.39 || ^9.6.20", + "psr/log": "^1.1 || ^2.0 || ^3.0" + }, + "suggest": { + "ext-curl": "Required for CURL handler support", + "ext-intl": "Required for Internationalized Domain Name (IDN) support", + "psr/log": "Required for using the Log middleware" + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + } + }, + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "GuzzleHttp\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Jeremy Lindblom", + "email": "jeremeamia@gmail.com", + "homepage": "https://github.com/jeremeamia" + }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://github.com/sagikazarmark" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + } + ], + "description": "Guzzle is a PHP HTTP client library", + "keywords": [ + "client", + "curl", + "framework", + "http", + "http client", + "psr-18", + "psr-7", + "rest", + "web service" + ], + "support": { + "issues": "https://github.com/guzzle/guzzle/issues", + "source": "https://github.com/guzzle/guzzle/tree/7.10.0" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/guzzle", + "type": "tidelift" + } + ], + "time": "2025-08-23T22:36:01+00:00" + }, + { + "name": "guzzlehttp/promises", + "version": "2.3.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/promises.git", + "reference": "481557b130ef3790cf82b713667b43030dc9c957" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/promises/zipball/481557b130ef3790cf82b713667b43030dc9c957", + "reference": "481557b130ef3790cf82b713667b43030dc9c957", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "phpunit/phpunit": "^8.5.44 || ^9.6.25" + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Promise\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + } + ], + "description": "Guzzle promises library", + "keywords": [ + "promise" + ], + "support": { + "issues": "https://github.com/guzzle/promises/issues", + "source": "https://github.com/guzzle/promises/tree/2.3.0" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/promises", + "type": "tidelift" + } + ], + "time": "2025-08-22T14:34:08+00:00" + }, + { + "name": "guzzlehttp/psr7", + "version": "2.9.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/psr7.git", + "reference": "7d0ed42f28e42d61352a7a79de682e5e67fec884" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/7d0ed42f28e42d61352a7a79de682e5e67fec884", + "reference": "7d0ed42f28e42d61352a7a79de682e5e67fec884", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0", + "psr/http-factory": "^1.0", + "psr/http-message": "^1.1 || ^2.0", + "ralouphie/getallheaders": "^3.0" + }, + "provide": { + "psr/http-factory-implementation": "1.0", + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "http-interop/http-factory-tests": "0.9.0", + "jshttp/mime-db": "1.54.0.1", + "phpunit/phpunit": "^8.5.44 || ^9.6.25" + }, + "suggest": { + "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Psr7\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://github.com/sagikazarmark" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://sagikazarmark.hu" + } + ], + "description": "PSR-7 message implementation that also provides common utility methods", + "keywords": [ + "http", + "message", + "psr-7", + "request", + "response", + "stream", + "uri", + "url" + ], + "support": { + "issues": "https://github.com/guzzle/psr7/issues", + "source": "https://github.com/guzzle/psr7/tree/2.9.0" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/psr7", + "type": "tidelift" + } + ], + "time": "2026-03-10T16:41:02+00:00" + }, + { + "name": "jean85/pretty-package-versions", + "version": "2.0.6", + "source": { + "type": "git", + "url": "https://github.com/Jean85/pretty-package-versions.git", + "reference": "f9fdd29ad8e6d024f52678b570e5593759b550b4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Jean85/pretty-package-versions/zipball/f9fdd29ad8e6d024f52678b570e5593759b550b4", + "reference": "f9fdd29ad8e6d024f52678b570e5593759b550b4", + "shasum": "" + }, + "require": { + "composer-runtime-api": "^2.0.0", + "php": "^7.1|^8.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^3.2", + "jean85/composer-provided-replaced-stub-package": "^1.0", + "phpstan/phpstan": "^1.4", + "phpunit/phpunit": "^7.5|^8.5|^9.4", + "vimeo/psalm": "^4.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Jean85\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Alessandro Lai", + "email": "alessandro.lai85@gmail.com" + } + ], + "description": "A library to get pretty versions strings of installed dependencies", + "keywords": [ + "composer", + "package", + "release", + "versions" + ], + "support": { + "issues": "https://github.com/Jean85/pretty-package-versions/issues", + "source": "https://github.com/Jean85/pretty-package-versions/tree/2.0.6" + }, + "time": "2024-03-08T09:58:59+00:00" + }, + { + "name": "phpmailer/phpmailer", + "version": "v7.0.2", + "source": { + "type": "git", + "url": "https://github.com/PHPMailer/PHPMailer.git", + "reference": "ebf1655bd5b99b3f97e1a3ec0a69e5f4cd7ea088" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/ebf1655bd5b99b3f97e1a3ec0a69e5f4cd7ea088", + "reference": "ebf1655bd5b99b3f97e1a3ec0a69e5f4cd7ea088", "shasum": "" }, "require": { "ext-ctype": "*", "ext-filter": "*", + "ext-hash": "*", "php": ">=5.5.0" }, "require-dev": { - "doctrine/annotations": "1.2.*", - "friendsofphp/php-cs-fixer": "^2.2", - "phpdocumentor/phpdocumentor": "2.*", - "phpunit/phpunit": "^4.8 || ^5.7", - "zendframework/zend-eventmanager": "3.0.*", - "zendframework/zend-i18n": "2.7.3", - "zendframework/zend-serializer": "2.7.*" + "dealerdirect/phpcodesniffer-composer-installer": "^1.0", + "doctrine/annotations": "^1.2.6 || ^1.13.3", + "php-parallel-lint/php-console-highlighter": "^1.0.0", + "php-parallel-lint/php-parallel-lint": "^1.3.2", + "phpcompatibility/php-compatibility": "^10.0.0@dev", + "squizlabs/php_codesniffer": "^3.13.5", + "yoast/phpunit-polyfills": "^1.0.4" }, "suggest": { - "ext-mbstring": "Needed to send email in multibyte encoding charset", + "decomplexity/SendOauth2": "Adapter for using XOAUTH2 authentication", + "directorytree/imapengine": "For uploading sent messages via IMAP, see gmail example", + "ext-imap": "Needed to support advanced email address parsing according to RFC822", + "ext-mbstring": "Needed to send email in multibyte encoding charset or decode encoded addresses", + "ext-openssl": "Needed for secure SMTP sending and DKIM signing", + "greew/oauth2-azure-provider": "Needed for Microsoft Azure XOAUTH2 authentication", "hayageek/oauth2-yahoo": "Needed for Yahoo XOAUTH2 authentication", "league/oauth2-google": "Needed for Google XOAUTH2 authentication", "psr/log": "For optional PSR-3 debug logging", - "stevenmaguire/oauth2-microsoft": "Needed for Microsoft XOAUTH2 authentication", - "symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)" + "symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)", + "thenetworg/oauth2-azure": "Needed for Microsoft XOAUTH2 authentication" }, "type": "library", "autoload": { @@ -160,17 +500,17 @@ }, "notification-url": "https://packagist.org/downloads/", "license": [ - "LGPL-2.1" + "LGPL-2.1-only" ], "authors": [ - { - "name": "Jim Jagielski", - "email": "jimjag@gmail.com" - }, { "name": "Marcus Bointon", "email": "phpmailer@synchromedia.co.uk" }, + { + "name": "Jim Jagielski", + "email": "jimjag@gmail.com" + }, { "name": "Andy Prevost", "email": "codeworxtech@users.sourceforge.net" @@ -180,20 +520,432 @@ } ], "description": "PHPMailer is a full-featured email creation and transfer class for PHP", - "time": "2019-02-01T15:04:28+00:00" + "support": { + "issues": "https://github.com/PHPMailer/PHPMailer/issues", + "source": "https://github.com/PHPMailer/PHPMailer/tree/v7.0.2" + }, + "funding": [ + { + "url": "https://github.com/Synchro", + "type": "github" + } + ], + "time": "2026-01-09T18:02:33+00:00" }, { - "name": "stripe/stripe-php", - "version": "v7.71.0", + "name": "psr/http-client", + "version": "1.0.3", "source": { "type": "git", - "url": "git@github.com:stripe/stripe-php.git", - "reference": "5ebe39d814411594b1ff9d79f0598a0de7faa30b" + "url": "https://github.com/php-fig/http-client.git", + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/stripe/stripe-php/zipball/5ebe39d814411594b1ff9d79f0598a0de7faa30b", - "reference": "5ebe39d814411594b1ff9d79f0598a0de7faa30b", + "url": "https://api.github.com/repos/php-fig/http-client/zipball/bb5906edc1c324c9a05aa0873d40117941e5fa90", + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90", + "shasum": "" + }, + "require": { + "php": "^7.0 || ^8.0", + "psr/http-message": "^1.0 || ^2.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": "https://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" + ], + "support": { + "source": "https://github.com/php-fig/http-client" + }, + "time": "2023-09-23T14:17:50+00:00" + }, + { + "name": "psr/http-factory", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-factory.git", + "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/2b4765fddfe3b508ac62f829e852b1501d3f6e8a", + "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a", + "shasum": "" + }, + "require": { + "php": ">=7.1", + "psr/http-message": "^1.0 || ^2.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": "https://www.php-fig.org/" + } + ], + "description": "PSR-17: Common interfaces for PSR-7 HTTP message factories", + "keywords": [ + "factory", + "http", + "message", + "psr", + "psr-17", + "psr-7", + "request", + "response" + ], + "support": { + "source": "https://github.com/php-fig/http-factory" + }, + "time": "2024-04-15T12:06:14+00:00" + }, + { + "name": "psr/http-message", + "version": "2.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "support": { + "source": "https://github.com/php-fig/http-message/tree/2.0" + }, + "time": "2023-04-04T09:54:51+00:00" + }, + { + "name": "psr/log", + "version": "3.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", + "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", + "shasum": "" + }, + "require": { + "php": ">=8.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "support": { + "source": "https://github.com/php-fig/log/tree/3.0.2" + }, + "time": "2024-09-11T13:17:53+00:00" + }, + { + "name": "ralouphie/getallheaders", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/ralouphie/getallheaders.git", + "reference": "120b605dfeb996808c31b6477290a714d356e822" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", + "reference": "120b605dfeb996808c31b6477290a714d356e822", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.1", + "phpunit/phpunit": "^5 || ^6.5" + }, + "type": "library", + "autoload": { + "files": [ + "src/getallheaders.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ralph Khattar", + "email": "ralph.khattar@gmail.com" + } + ], + "description": "A polyfill for getallheaders.", + "support": { + "issues": "https://github.com/ralouphie/getallheaders/issues", + "source": "https://github.com/ralouphie/getallheaders/tree/develop" + }, + "time": "2019-03-08T08:55:37+00:00" + }, + { + "name": "sentry/sdk", + "version": "4.0.0", + "source": { + "type": "git", + "url": "https://github.com/getsentry/sentry-php-sdk.git", + "reference": "fcbca864e8d1dc712f3ecfaa95ea89d024fb2e53" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/getsentry/sentry-php-sdk/zipball/fcbca864e8d1dc712f3ecfaa95ea89d024fb2e53", + "reference": "fcbca864e8d1dc712f3ecfaa95ea89d024fb2e53", + "shasum": "" + }, + "require": { + "sentry/sentry": "^4.0" + }, + "type": "metapackage", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Sentry", + "email": "accounts@sentry.io" + } + ], + "description": "This is a meta package of sentry/sentry. We recommend using sentry/sentry directly.", + "homepage": "http://sentry.io", + "keywords": [ + "crash-reporting", + "crash-reports", + "error-handler", + "error-monitoring", + "log", + "logging", + "sentry" + ], + "support": { + "issues": "https://github.com/getsentry/sentry-php-sdk/issues", + "source": "https://github.com/getsentry/sentry-php-sdk/tree/4.0.0" + }, + "funding": [ + { + "url": "https://sentry.io/", + "type": "custom" + }, + { + "url": "https://sentry.io/pricing/", + "type": "custom" + } + ], + "time": "2023-11-06T10:23:19+00:00" + }, + { + "name": "sentry/sentry", + "version": "4.23.0", + "source": { + "type": "git", + "url": "https://github.com/getsentry/sentry-php.git", + "reference": "121a674d5fffcdb8e414b75c1b76edba8e592b66" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/getsentry/sentry-php/zipball/121a674d5fffcdb8e414b75c1b76edba8e592b66", + "reference": "121a674d5fffcdb8e414b75c1b76edba8e592b66", + "shasum": "" + }, + "require": { + "ext-curl": "*", + "ext-json": "*", + "ext-mbstring": "*", + "guzzlehttp/psr7": "^1.8.4|^2.1.1", + "jean85/pretty-package-versions": "^1.5|^2.0.4", + "php": "^7.2|^8.0", + "psr/log": "^1.0|^2.0|^3.0", + "symfony/options-resolver": "^4.4.30|^5.0.11|^6.0|^7.0|^8.0" + }, + "conflict": { + "raven/raven": "*" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^3.4", + "guzzlehttp/promises": "^2.0.3", + "guzzlehttp/psr7": "^1.8.4|^2.1.1", + "monolog/monolog": "^1.6|^2.0|^3.0", + "nyholm/psr7": "^1.8", + "open-telemetry/api": "^1.0", + "open-telemetry/exporter-otlp": "^1.0", + "open-telemetry/sdk": "^1.0", + "phpbench/phpbench": "^1.0", + "phpstan/phpstan": "^1.3", + "phpunit/phpunit": "^8.5.52|^9.6.34", + "spiral/roadrunner-http": "^3.6", + "spiral/roadrunner-worker": "^3.6" + }, + "suggest": { + "monolog/monolog": "Allow sending log messages to Sentry by using the included Monolog handler." + }, + "type": "library", + "autoload": { + "files": [ + "src/functions.php" + ], + "psr-4": { + "Sentry\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Sentry", + "email": "accounts@sentry.io" + } + ], + "description": "PHP SDK for Sentry (http://sentry.io)", + "homepage": "http://sentry.io", + "keywords": [ + "crash-reporting", + "crash-reports", + "error-handler", + "error-monitoring", + "log", + "logging", + "profiling", + "sentry", + "tracing" + ], + "support": { + "issues": "https://github.com/getsentry/sentry-php/issues", + "source": "https://github.com/getsentry/sentry-php/tree/4.23.0" + }, + "funding": [ + { + "url": "https://sentry.io/", + "type": "custom" + }, + { + "url": "https://sentry.io/pricing/", + "type": "custom" + } + ], + "time": "2026-03-23T13:15:52+00:00" + }, + { + "name": "stripe/stripe-php", + "version": "v19.4.1", + "source": { + "type": "git", + "url": "https://github.com/stripe/stripe-php.git", + "reference": "095384404587d07de2ad1154c389c4051c5ed92f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/stripe/stripe-php/zipball/095384404587d07de2ad1154c389c4051c5ed92f", + "reference": "095384404587d07de2ad1154c389c4051c5ed92f", "shasum": "" }, "require": { @@ -203,11 +955,9 @@ "php": ">=5.6.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "2.17.1", - "php-coveralls/php-coveralls": "^2.1", - "phpunit/phpunit": "^5.7", - "squizlabs/php_codesniffer": "^3.3", - "symfony/process": "~3.4" + "friendsofphp/php-cs-fixer": "3.94.0", + "phpstan/phpstan": "^1.2", + "phpunit/phpunit": "^5.7 || ^9.0" }, "type": "library", "extra": { @@ -237,7 +987,149 @@ "payment processing", "stripe" ], - "time": "2021-02-05T21:29:10+00:00" + "support": { + "issues": "https://github.com/stripe/stripe-php/issues", + "source": "https://github.com/stripe/stripe-php/tree/v19.4.1" + }, + "time": "2026-03-06T22:53:13+00:00" + }, + { + "name": "symfony/deprecation-contracts", + "version": "v3.6.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/63afe740e99a13ba87ec199bb07bbdee937a5b62", + "reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, + "branch-alias": { + "dev-main": "3.6-dev" + } + }, + "autoload": { + "files": [ + "function.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": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.6.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-09-25T14:21:43+00:00" + }, + { + "name": "symfony/options-resolver", + "version": "v7.4.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/options-resolver.git", + "reference": "b38026df55197f9e39a44f3215788edf83187b80" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/b38026df55197f9e39a44f3215788edf83187b80", + "reference": "b38026df55197f9e39a44f3215788edf83187b80", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\OptionsResolver\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides an improved replacement for the array_replace PHP function", + "homepage": "https://symfony.com", + "keywords": [ + "config", + "configuration", + "options" + ], + "support": { + "source": "https://github.com/symfony/options-resolver/tree/v7.4.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2025-11-12T15:39:26+00:00" } ], "packages-dev": [], diff --git a/source/static/makeshipment.php b/source/static/makeshipment.php index 773a587..4cf910a 100644 --- a/source/static/makeshipment.php +++ b/source/static/makeshipment.php @@ -30,7 +30,7 @@ try { throw new Exception("Please enter your email address. We use it to send you a receipt with your tracking number and other info. You won't get any spam emails, we promise."); } - $shipmentinfo["from_address"] = \EasyPost\Address::create([ + $shipmentinfo["from_address"] = $easypostClient->address->create([ "verify" => array("delivery"), "name" => $_REQUEST["from_name"], "street1" => $_REQUEST["from_street"], @@ -42,7 +42,7 @@ try { "country" => "US" ]); - $shipmentinfo["to_address"] = \EasyPost\Address::create([ + $shipmentinfo["to_address"] = $easypostClient->address->create([ "verify" => array("delivery"), "name" => $_REQUEST["to_name"], "company" => $_REQUEST["to_company"], @@ -81,12 +81,12 @@ try { if (!empty($_REQUEST["no10_envelope"]) && $_REQUEST["no10_envelope"] == "no10_envelope") { throw new Exception("You can't use your own envelope with Priority Mail Flat Rate. Use a USPS-provided Flat Rate envelope instead."); } - $shipmentinfo["parcel"] = \EasyPost\Parcel::create([ + $shipmentinfo["parcel"] = $easypostClient->parcel->create([ "predefined_package" => "FlatRateEnvelope", "weight" => $weight ]); } else { - $shipmentinfo["parcel"] = \EasyPost\Parcel::create([ + $shipmentinfo["parcel"] = $easypostClient->parcel->create([ "predefined_package" => "Letter", "weight" => $weight ]); @@ -142,7 +142,7 @@ try { $shipmentinfo["options"]["label_date"] = $mailing_date; - $shipment = \EasyPost\Shipment::create($shipmentinfo); + $shipment = $easypostClient->shipment->create($shipmentinfo); $selectedrate = []; for ($i = 0; $i < count($shipment->rates); $i++) { diff --git a/source/static/papertemplate_no10_4x6_certified.png b/source/static/papertemplate_no10_4x6_certified.png index 6ddc5f1..ddc4d32 100644 Binary files a/source/static/papertemplate_no10_4x6_certified.png and b/source/static/papertemplate_no10_4x6_certified.png differ diff --git a/source/static/papertemplate_no10_4x6_certified.svg b/source/static/papertemplate_no10_4x6_certified.svg index 74c49fe..4560e0c 100644 --- a/source/static/papertemplate_no10_4x6_certified.svg +++ b/source/static/papertemplate_no10_4x6_certified.svg @@ -26,9 +26,9 @@ borderopacity="1.0" inkscape:pageopacity="1" inkscape:pageshadow="2" - inkscape:zoom="0.98994949" - inkscape:cx="448.00266" - inkscape:cy="112.63201" + inkscape:zoom="0.49497475" + inkscape:cx="333.35034" + inkscape:cy="359.61431" inkscape:document-units="in" inkscape:current-layer="layer2" showgrid="false" @@ -36,8 +36,8 @@ inkscape:measure-start="24,480" inkscape:measure-end="24,336" inkscape:window-width="1920" - inkscape:window-height="1015" - inkscape:window-x="1920" + inkscape:window-height="1008" + inkscape:window-x="0" inkscape:window-y="0" inkscape:window-maximized="1" showguides="false" @@ -79,8 +79,8 @@ sodipodi:role="line">USPS CERTIFIED MAIL™shipment->retrieve($_REQUEST["shipmentid"]); $price = 0; $cost = 0; + $selectedRate = null; foreach ($shipment->rates as $rate) { if ($rate->id == $_REQUEST["rateid"]) { + $selectedRate = $rate; $cost = $rate->rate; $retail_rate = $rate->retail_rate ?? ($rate->list_rate ?? $rate->rate); $price = $retail_rate + 1.00; @@ -27,7 +29,7 @@ try { } // make the payment intent but don't capture it yet, in case something goes wrong. - $intent = \Stripe\PaymentIntent::create([ + $intent = $stripeClient->paymentIntents->create([ 'amount' => $price * 100, 'currency' => 'usd', 'payment_method' => $_REQUEST["stripeid"], @@ -63,14 +65,13 @@ try { if (empty($shipment->postage_label)) { // Do this conditionally in case label got purchased but payment somehow failed, // allowing a retry of the payment. - $shipment->buy(['rate' => ['id' => $_REQUEST["rateid"]]]); + $shipment = $easypostClient->shipment->buy($shipment->id, $selectedRate); } $pdffile = date("Ymd") . "_" . hash("sha256", $shipment->id) . ".pdf"; try { - $stripe = new \Stripe\StripeClient($_SETTINGS["stripe_sk"]); - $stripe->paymentIntents->update($intent->id, [ + $stripeClient->paymentIntents->update($intent->id, [ "metadata" => [ "tracking_number" => "$shipment->tracking_code", "from_email" => (empty($shipment->from_address->email) ? "None" : $shipment->from_address->email . ""), @@ -101,7 +102,7 @@ try { $paperimage = imagecreatefrompng(__DIR__ . "/papertemplate_no10.png"); } $labelimage = imagerotate($labelimage, 270, 0); - imagecopyresampled($paperimage, $labelimage, 525, 19, 0, 0, 1200, 1800, 1200, 1800); + imagecopyresampled($paperimage, $labelimage, 525, 19, 0, 0, 1800, 1200, 1800, 1200); } else { if (!empty($shipment->options->certified_mail)) { // envelope with banner @@ -191,7 +192,7 @@ try { $mail->setReplyTo($emailsettings["replyto"]); } $mail->addTo($shipment->from_address->email); - $mail->setSubject("Your CertifiedFromHome Receipt"); + $mail->setSubject(($_SETTINGS["test"] ? "[TEST MODE] " : "") . "Your CertifiedFromHome Receipt"); $body = "Thanks for using CertifiedFromHome.com!\r\nYour card has been charged a total of $" . number_format($price, 2) . ".\r\n"; if (!empty($shipment->options->certified_mail)) { $body .= "You can track your letter with this tracking code: " . $shipment->tracking_code . "\r\n"; @@ -203,7 +204,7 @@ try { . "scroll down and click on \"Return Receipt Electronic\", and fill in the form. USPS will " . "email you a PDF proof of delivery with the recipient's signature and other info.\r\n\r\n"; } - $body .= "Here's a link to your purchased postage, just in case: https://certifiedfromhome.com/pdf/" . $pdffile + $body .= "Here's a link to your purchased postage, just in case: https://" . ($_SETTINGS["test"] ? "test." : "") . "certifiedfromhome.com/pdf/" . $pdffile . "\r\nPlease note that while you can print it more than once, mailing multiple copies is illegal.\r\n"; $body .= "If you need any help, just reply to this email. Thanks again!"; $mail->setBody($body); @@ -216,7 +217,7 @@ try { header("Content-Type: application/json"); exit(json_encode([ "status" => "OK", - "pdf" => "https://certifiedfromhome.com/pdf/" . $pdffile, + "pdf" => "https://" . ($_SETTINGS["test"] ? "test." : "") . "certifiedfromhome.com/pdf/" . $pdffile, "trackingcode" => $shipment->tracking_code ])); } else { diff --git a/source/static/required.php b/source/static/required.php index e23cc34..1f935e7 100644 --- a/source/static/required.php +++ b/source/static/required.php @@ -3,6 +3,11 @@ require_once __DIR__ . "/vendor/autoload.php"; require_once __DIR__ . "/settings.php"; +\Sentry\init([ + 'dsn' => 'https://b1e259ce7e714dfeb49568c31ce99080@bugs.netsyms.net/10', + 'environment' => ($_SETTINGS["test"] ? "test" : "production"), +]); + if ($_SETTINGS["debug"]) { error_reporting(E_ALL); ini_set('display_errors', 'On'); @@ -18,7 +23,8 @@ foreach ($libs as $lib) { require_once $lib; } -\EasyPost\EasyPost::setApiKey($_SETTINGS["easypost_key"]); +$easypostClient = new \EasyPost\EasyPostClient($_SETTINGS["easypost_key"]); +$stripeClient = new \Stripe\StripeClient($_SETTINGS["stripe_sk"]); \Stripe\Stripe::setApiKey($_SETTINGS["stripe_sk"]); -header("Access-Control-Allow-Origin: *"); \ No newline at end of file +header("Access-Control-Allow-Origin: *");