{"id":25519681,"url":"https://github.com/aligent/orocommerce-fees-bundle","last_synced_at":"2026-02-26T04:53:21.350Z","repository":{"id":40618069,"uuid":"479281829","full_name":"aligent/orocommerce-fees-bundle","owner":"aligent","description":"OroCommerce Bundle to charge Fees during Checkout","archived":false,"fork":false,"pushed_at":"2025-12-05T02:38:33.000Z","size":187,"stargazers_count":0,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-01-29T21:27:05.560Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aligent.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-04-08T07:04:28.000Z","updated_at":"2023-09-04T04:47:08.000Z","dependencies_parsed_at":"2025-05-21T10:14:26.552Z","dependency_job_id":"89c0453e-879e-4e99-8a8d-403e90811be7","html_url":"https://github.com/aligent/orocommerce-fees-bundle","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/aligent/orocommerce-fees-bundle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aligent%2Forocommerce-fees-bundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aligent%2Forocommerce-fees-bundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aligent%2Forocommerce-fees-bundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aligent%2Forocommerce-fees-bundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aligent","download_url":"https://codeload.github.com/aligent/orocommerce-fees-bundle/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aligent%2Forocommerce-fees-bundle/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29849063,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-25T22:37:40.667Z","status":"online","status_checked_at":"2026-02-26T02:00:06.774Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-19T17:29:21.550Z","updated_at":"2026-02-26T04:53:21.308Z","avatar_url":"https://github.com/aligent.png","language":"PHP","funding_links":["https://www.paypal.com/us/webapps/mpp/ua/useragreement-full"],"categories":[],"sub_categories":[],"readme":"Aligent OroCommerce Fees Bundle\n==============================\nThis Bundle adds the ability to dynamically inject 'fees' as new Line Items into the Checkout process.\n\nFor example, if a 'Handling Fee' is to be charged for orders under $100.\n\nThis Bundle takes advantage of OroCommerce's 'Freeform LineItem' feature,\nwhere a LineItem can be added to the Checkout without being linked to a Product.\n\nIt also supports Fees added as Subtotals against the entire Order.\n\nRequirements\n-------------------\n- OroCommerce 5.0\n\nImportant Notes/Caveats\n-------------------\n* This bundle currently only adds a Payment Processing Fee, any other Fees must be implemented manually\n  using the provided Abstract classes/interfaces.\n* The Line Item which is added to the cart is _not_ a real product.\n  We utilize the 'FreeForm Line Item' feature in Oro Checkouts.\n  This allows the price and description to be set by the fee itself,\n  and avoids any possible inventory/visibility issues.\n* The process for placing a new Order (**ShoppingList =\u003e Checkout =\u003e Order**)\n  is slightly different to the process for Re-Ordering an\n  existing Order (**Order =\u003e Checkout =\u003e Order**).\n  As a result, our `CreateCheckoutListener` is required to\n  manually persist/flush the Checkout so that the new line item is saved.\n\nInstallation and Usage\n-------------------\n**NOTE: Adjust instructions as needed for your local environment**\n\n### Installation\nInstall via Composer\n```shell\ncomposer require aligent/orocommerce-fees-bundle\n```\n\nOnce installed, run platform update to perform the installation:\n```shell\nphp bin/console oro:platform:update --env=prod\n```\n\n### Configuration\n1. Login to the Oro Admin\n2. Visit **System Configuration =\u003e Commerce =\u003e Aligent =\u003e Fees** (or the Website-specific equivalent)\n3. Set the **Default Product Tax Code**\n\n\u003cimg src=\"src/Aligent/FeesBundle/Resources/doc/img/tax-code-configuration.png\" alt=\"Tax Code Configuration\"\u003e\n\nNote: This Tax Code will apply to the Fee itself.\nOro does not apply taxes to FreeForm Line Items, this configuration is used by\nour `ContextHandler\\FreeFormAwareTaxOrderLineItemHandler` to apply the correct tax.\n\nDatabase Modifications\n-------------------\n* Adds a new `processing_fee` column to the `oro_order` database table (and extends the Oro `Order` entity)\n\nAll configuration is stored in System Configuration (`oro_config_value`).\n\n### Payment Processing Fees\nThis feature allows OroCommerce to charge an additional percentage for payments made via specific methods.\n\nThe percentage can be configured on a per-Method basis, eg:\n* 1.5% fee for VISA/MasterCard Credit Card Payments\n* 2.0% fee for AMEX Credit Card Payments\n\nAfter installation, visit the System Configuration (or Website Configuration to configure on a per-Website scope).\n\nEach Payment Method will be visible here. Set the Percentage to a value above `0` to charge a processing fee for that method:\n\n\u003cimg src=\"src/Aligent/FeesBundle/Resources/doc/img/processing-fees-configuration.png\" alt=\"Processing Fees Configuration\"\u003e\n\nIf the Customer chooses that method during the Checkout, a processing fee will be calculated and add to the Subtotals:\n\n\u003cimg src=\"src/Aligent/FeesBundle/Resources/doc/img/processing-fees-subtotal.png\" alt=\"Processing Fees Subtotal\"\u003e\n\n**NOTE: Processing Fees are not currently support by PayPal Express as they are not included in the Subtotal, which causes a payment validation error.**\n\nAdditionally, the [PayPal User Agreement](https://www.paypal.com/us/webapps/mpp/ua/useragreement-full) does not allow charging Payment Processing Fees (See [#13](https://github.com/aligent/orocommerce-fees-bundle/issues/13))\n\n\n### Adding and Registering new Custom Fees\n1. Create a new Bundle (or use an existing one as needed)\n1. Create a new class for the fee (eg `MyBundle\\Fee\\HandlingFeeProvider`).\n   This new class should extend `Aligent\\FeesBundle\\Fee\\AbstractLineItemFee`.\n1. Define a new service for the new fee, and add it to the fee registry:\n    ```yaml\n    services:\n        Acme\\MyBundle\\Fee\\HandlingFeeProvider:\n            parent: '@Aligent\\FeesBundle\\Fee\\Provider\\AbstractLineItemFeeProvider'\n            tags:\n                - { name: aligent_fees.fee_provider, priority: 0 }\n    ```\n\n1. Create a new Fee Provider Class and implement the applicable methods:\n\n    ```php\n    \u003c?php\n    namespace Acme\\MyBundle\\Fee\\Provider;\n    \n    use Aligent\\FeesBundle\\Fee\\AbstractLineItemFeeProvider;\n    use Oro\\Bundle\\CheckoutBundle\\Entity\\Checkout;\n    \n    class HandlingFeeProvider extends AbstractLineItemFeeProvider\n    {\n       const NAME = 'fees.handling_fee';\n       const TYPE = 'handling_fee';\n       const LABEL = 'acme.my_bundle.fees.handling_fee.label';\n       const SKU = 'HF001'; // Shouldn't be a real product\n       const AMOUNT = 10.00;\n    \n        /**\n         * Get Fee name\n         * @return string\n         */\n        public function getName(): string\n        {\n            return self::NAME;\n        }\n    \n        /**\n         * Return label key\n         * @return string\n         */\n        public function getLabel(): string\n        {\n            return $this-\u003etranslator-\u003etrans(self::LABEL);\n        }\n    \n        /**\n         * Return SKU of Fee\n         * @return null|string\n         */\n        public function getSKU(): ?string\n        {\n            return self::SKU;\n        }\n    \n        /**\n         * @param Checkout $checkout\n         * @return float|null\n         */\n        public function getAmount(Checkout $checkout): ?float\n        {\n            return self::AMOUNT;\n        }\n    \n        /**\n         * Is the fee Supported by this Entity?\n         * @param mixed $entity\n         * @return bool\n         */\n        public function isSupported($entity): bool\n        {\n            return ($entity instanceof Checkout);\n        }\n    }\n    ```\n\nNoteworthy Features\n-------------------\n*Where to look first if something goes wrong*\n\n* Method `EventListener\\CreateCheckoutListener::onStartCheckoutConditionCheck()` injects Fees into the current Checkout as new LineItems.\n* Method `Fee\\AbstractFee::getCheckoutLineItem()` builds and generates the Fee Freeform LineItem, including Price/Currency/SKU/Unit/etc.\n\nCore Overrides \u0026 Extensions\n-------------------\n* Class `ContextHandler\\FreeFormAwareTaxOrderLineItemHandler` decorates the core Oro `\\Oro\\Bundle\\TaxBundle\\OrderTax\\ContextHandler\\OrderLineItemHandler` class so that it can support Tax calculations for Freeform Line Items.\n\n\nRoadmap / Remaining Tasks\n-------------------\n- [x] OroCommerce 5.0 Support\n- [x] Implement Unit Tests\n- [x] Complete adding support for Fees added as Subtotals\n- [x] Add Native Support for Payment Processing Fees\n- [x] ~~Add support for PayPal Express Processing Fees~~ (See [#13](https://github.com/aligent/orocommerce-fees-bundle/issues/13))\n- [ ] Re-implement support for line item messaging\n- [ ] Convert Product Tax Code Configuration into Select field\n- [ ] More fine-grained control over Processing Fees (e.g. exclude certain Customer Groups from being charged fee)\n- [ ] (TBC) Add support for Expression Language\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faligent%2Forocommerce-fees-bundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faligent%2Forocommerce-fees-bundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faligent%2Forocommerce-fees-bundle/lists"}