Compare commits

..

6 Commits

Author SHA1 Message Date
ndeet
4d161f87f1
Merge pull request #28 from ndeet/fix247
Fix getConfigWithoutCache() causing infinite re-generation of webhook secret
2025-03-21 21:34:56 +01:00
ndeet
a139593620
Merge pull request #27 from lightningcheckout/fix-order-state-settled-btc-payment
Order status to Processing instead of Completed
2025-03-20 23:43:37 +01:00
ndeet
edaad8e67c Fix instantiation of config collection, would return always null and cause infinite re-generation of webhook secret. 2025-03-20 21:58:10 +01:00
cryptoteun
aeaff44264 Changed order status once btc payment is settled to processing instead of completed. 2025-02-28 14:04:17 +01:00
ndeet
6512cfdc7e
Merge pull request #22 from ndeet/btcpay2-compat
BTCPay 2.0 support
2024-09-25 14:22:49 +02:00
ndeet
5952bfc0cd Bumping PHP library for BTCPay 2.0+ support. 2024-09-24 15:12:57 +02:00
3 changed files with 10 additions and 8 deletions

View File

@ -379,7 +379,8 @@ class BTCPayService
break;
case BTCPayServerInvoice::STATUS_SETTLED:
// 2) Payments are settled (marked or not)
$settledStatus = \Magento\Sales\Model\Order::STATE_COMPLETE;
$settledStatus = \Magento\Sales\Model\Order::STATE_PROCESSING;
if ($invoice->isOverpaid()) {
$order->addCommentToStatusHistory('Payment confirmed: overpaid.', $settledStatus, true);
@ -598,7 +599,7 @@ class BTCPayService
private function getConfigWithoutCache($path, $scope, $scopeId): ?string
{
$dataCollection = $this->configValueFactory->create()->getCollection();
$dataCollection = $this->configCollectionFactory->create();
$dataCollection->addFieldToFilter('path', ['like' => $path . '%']);
$dataCollection->addFieldToFilter('scope', ['like' => $scope . '%']);
$dataCollection->addFieldToFilter('scope_id', ['like' => $scopeId . '%']);

View File

@ -1,12 +1,13 @@
# BTCPay Server integration for Magento 2
## Requirements
- Magento 2.4.2 or later installation (tested on Community Edition 2.4.2)
- Magento < 2.4 should also work, but is untested.
- PHP 7.2 or greater. Tested with PHP 7.4.
- Your BTCPay Server must be setup with HTTPS or HTTP using TOR for security.
- BTCPay Server supported versions: >=1.3.0 (including >=2.0.0)
- Magento 2.4.2 or later installation (tested on Community Edition 2.4.6-p6)
- Magento < 2.4 should also work, but is untested
- PHP 8.0 or greater. Tested with PHP 8.2
- Your BTCPay Server must be setup with HTTPS or HTTP using TOR for security
- You need an API key for your user in BTCPay Server (new since module v2.0)
- Single-Store Mode is not supported.
- Single-Store Mode is not supported
## Features
- Allows you to pay with BTCPay Server in Magento 2 stores

View File

@ -20,7 +20,7 @@
"minimum-stability": "dev",
"require": {
"php": ">=7.3",
"btcpayserver\/btcpayserver-greenfield-php": "^2.2"
"btcpayserver\/btcpayserver-greenfield-php": "^2.7"
},
"autoload": {
"files": [