51 Commits
Author SHA1 Message Date
ndeet 457455edf0 Backward compatibilty fix. v19.0.1.1 2026-08-12 22:15:19 +02:00
ndeet c3d32a04ce Merge pull request #19 from SatoDri/19.0-fix-security-and-ipn
Fix amount tampering, broken IPN URL and invoice status handling (19.0)
2026-08-12 22:11:31 +02:00
Sato DRI 2a470afc5d Merge pull request #2 from ndeet/satodri-19-fixes
Make sure changes from 18.0 are also here:
2026-08-12 09:52:27 +02:00
ndeet cab44f0847 Make sure changes from 18.0 are also here:
* Strict invoice and order identity binding.
* IPN lookup by stored invoice ID instead of untrusted order ID.
* Invoice ID stored as provider_reference and checked for reuse.
* Transaction row locking prevents concurrent duplicate checkouts.
* Existing invoices are reused; expired ones are replaced safely.
* Late notifications for replaced invoices are ignored.
* Reduced sensitive webhook logging and restricted IPN to POST.
2026-08-07 20:22:15 +02:00
SatoDri 303bfce067 Build the BTCPay invoice server-side and validate the settled amount
Security: the checkout controller built the BTCPay invoice from the POSTed
redirect-form data (price, currency, orderId), and _extract_amount_data
returned None to opt out of amount validation, so the settled amount was
never checked against the transaction. A buyer could therefore submit an
arbitrary price and confirm an order after paying far less. The invoice is
now built server-side from the transaction, the redirect form only carries
the reference, and _extract_amount_data returns the amount and currency
settled on BTCPay (read back from the invoice in the IPN) so the framework
validates them against the transaction before it is set done.

Other fixes in the notification path:
- Fix the IPN notification URL: it was concatenated without a leading
  slash (base_url + "payment/btcpay/ipn"), producing an unreachable host
  so notifications never arrived. It is now built with urls.url_join.
- Handle the "expired" invoice status (cancel the transaction) instead of
  leaving it pending forever, and set an error on unknown statuses.
2026-07-20 00:06:39 +02:00
SatoDri 023e4060c5 Remove dead payment.provider create() override
The override guarded on self.code, which is empty on the model-level
recordset passed to create(), so the branch never ran. The private key is
generated during pairing (in the onchange) instead, so the override is
dead code; removing it also keeps copying a provider from regenerating
(and thus invalidating) an already paired key.
2026-07-20 00:06:39 +02:00
SatoDri 9f3f702c9f Declare ecdsa as the module Python dependency
The bundled BTCPay client (models/libs) imports ecdsa, while the manifest
and requirements only listed btcpay-python, which is not used (the client
is vendored). Installations that did not already have ecdsa available
failed the external-dependency check. Declare ecdsa instead and bump the
module version.
2026-07-20 00:06:39 +02:00
ndeet 94eab634ca Update Readme. 2026-03-30 16:45:20 +02:00
ndeet 225d4c33c5 Odoo 19 compatibilty (#16)
* Odoo 19 compatibilty.

* Update docs.
v19.0.1.0
2026-03-30 16:36:20 +02:00
ndeet b935000fda Odoo 18.0 compatibility. v18.0.1.0 2025-01-27 14:50:53 +01:00
ndeet dec467e55b Add troubleshooting to readme. 2024-10-17 13:39:19 +02:00
ndeet a6b435d7e2 Marketplace: make banner work, updating description. v17.0.2.0 2024-08-12 16:35:47 +02:00
ndeet 706860e35f Rename the module for publish on odoo marketplace. (#12)
* Rename the module for publish on odoo marketplace.

* More renaming needed.
2024-08-12 15:33:59 +02:00
ndeet 25b06ab911 Preparing module for app store submission. 2024-08-12 13:30:34 +02:00
ndeet 7994834151 Bumping version. v17.0.1.1 2024-07-31 14:21:48 +02:00
ndeet 6042284704 Make sure email is passed, also if used in PoS context. 2024-07-31 14:19:23 +02:00
ndeet 848b1f5e30 Updating teaser image also on primary README 2024-07-17 16:55:25 +02:00
ndeet d3f8e2a60c Updating teaser image. 2024-07-17 16:51:55 +02:00
ndeet 43920ce700 Replace relative links with full github url. 2024-07-16 15:00:55 +02:00
ndeet 7cb3ee2400 Link to Odoo 16 documentation. 2024-07-16 14:50:30 +02:00
ndeet 8cb6afd918 Fix image for btcpayserver docs embedding. 2024-07-09 11:52:14 +02:00
ndeet 86cf5af6fa Adding general readme linking to both versions installation instructions. 2024-07-09 11:11:50 +02:00
ndeet 0742b68e48 Update docs to latest changes.
(cherry picked from commit 9e2475f415)
v17.0.1.0
2024-07-09 10:26:33 +02:00
ndeet 0aa893767d Merge pull request #10 from ndeet/redirect
Simplify setup by removing confirmationURL parameter
2024-07-08 16:38:46 +02:00
ndeet 6a22f82a73 Remove customizable return url and redirect the user to order confirmation / payment status page as it would be expected. 2024-07-08 16:37:32 +02:00
ndeet 17cb4f7814 Fix IPN processing to cover additional invoice states. 2024-07-08 11:12:29 +02:00
ndeet c469a3b4c1 Fix typo. 2024-07-08 09:18:47 +02:00
ndeet cfbee77a5b Porting module to work with Odoo 17.0 (#9) 2024-07-08 09:10:22 +02:00
ndeet 27670dae99 Improvements (#6)
* Add external dependencies to manifest to avoid error on module activation; add requirements.txt.
* Readme 
* Fix errors, restructure settings form, update installation steps, streamline overall.
* Change version
2024-07-03 14:49:50 +02:00
vandekul 7930e3eb30 BTCPay Library Included 2023-11-13 14:40:43 +01:00
vandekul a37990667a Image modify 2023-09-19 14:40:53 +02:00
vandekul 411b83fb06 Modify Image for documentation 2023-09-19 14:37:35 +02:00
vandekul 73d2feabbe Modify url and delete notifyMailer field 2023-09-19 14:20:00 +02:00
vandekul feb4aa72b7 License and Readme 2023-09-19 12:10:37 +02:00
vandekul fa5d459fa2 Bug in duplicate providers 2023-09-18 12:04:39 +02:00
vandekul 7810629596 New version 16.0 2023-09-15 14:42:14 +02:00
vandekul ac2194498a Merge branch '9.0' of github.com:zynthian/addons-vandekul into 9.0 2023-07-26 18:13:22 +02:00
jofemodo 2e832d5b18 Add alternate icons for the payment acquirer. 2022-04-02 20:32:24 +02:00
jofemodo bad3ea017b + Improve BTCPay IPN controller handler for avoiding uneeded API call to BTCPay.
+ Add some logging/error messages.
2022-04-02 20:31:06 +02:00
susanna 80ce33f40d Error IPN 2021-11-05 13:05:56 +01:00
susanna 0c251a6790 Modify IPN error 2021-11-05 11:57:07 +01:00
jofemodo 25aecac922 Fix recently added Bitcoin icon. 2020-09-15 14:22:43 +02:00
jofemodo b2820f1cb2 Add Bitcoin icon for using on the payment button. 2020-09-15 13:57:06 +02:00
vandekul 01d2a36d37 Exception control in return status 2020-09-11 12:31:35 +02:00
vandekul 363c4169dc Bug solved in xml files structure 2020-09-10 23:52:16 +02:00
vandekul e980bad67e Merge branch '9.0' of github.com:vandekul/addons-vandekul into 9.0 2020-04-11 01:05:56 +02:00
vandekul 0aa10bf49c Validate provide BTCPay for new fields controll 2020-04-11 01:04:08 +02:00
Susanna ef6f02da2a Update README.md 2020-04-11 00:10:27 +02:00
Susanna 8844df3cb6 Update README.md 2020-04-11 00:08:24 +02:00
vandekul 73f0c9996f Price modify 2020-04-10 23:27:12 +02:00