Compare commits

...

4 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

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 . '%']);