You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[ECP-10044][Bug]: Full order amount has not been authorized #3352
After update to v 11 it is not possible to capture or create invoices in magneto
Steps to reproduce
update from v 10 to 11.
Try to create invoice for and order:
Full order amount has not been authorized
The invoice can't be saved at this time. Please try again later.
If we downgrade to v 10 it works fine.
Actual behavior
Full order amount has not been authorized The invoice can't be saved at this time. Please try again later.
Thanks for reporting this issue.
We tried to reproduce the error on our end using the provided steps, but we were unable to do so.
To help us investigate further, could you provide more concrete steps to reproduce the issue? Additionally, is this happening persistently for every invoice you try to capture, or is it intermittent?
It would also be very helpful if you could share a bit more information, such as the specific payment method used, sanitized logs, and your plugin configuration.
You can also reach out to our tech support team at [email protected] for further investigation.
@shubhamk67
I think you need to enable partial payments.
I could be this from version 11 that makes the problems.
[ECP-9923] Make invoicing and order status consistent on partial payments by @shubhamk67 in #3311
I dont know if we see the effect of order from v 10 and then update to v11
Thanks for providing extra details. I've done an extended testing with the following test cases.
Partial payments with single currency configuration
Partial payments with multiple currency configuration (paying both with base and store currencies)
Processing payments with base charged currency on multi-currency store
Unfortunately, we are still unable to reproduce the issue. I have the following recommendations for further debugging on your side.
isFullAmountAuthorized() method is responsible for checking the authorized amounts. There is a change on v11 and now the plugin calculates the total authorized amount based on payment_authorization_amount field of sales_order table. This amount is updated while processing AUTHORIZATION webhook here. Please compare the amounts.
Could you please verify that the order state is adyen_authorized after processing all authorization webhooks of partial payments? Same method (isFullAmountAuthorized()) is used while setting the order as pre-payment-authorizedhere.
Once you get more information, we would be happy to help you out.
This looks like the float comparison in isFullAmountAuthorized(). It fails only for some amounts, which would explain why it doesn't reproduce with every test order.
Each partial AUTHORISATION is added to payment_authorization_amount (AuthorisationWebhookHandler.php#L100): the part already stored comes back from sales_order as a decimal string, the new part is a float, and the sum is compared with the grand total using === (AdyenOrderPayment.php#L185-L192). For a 29.99 order paid with a 25.00 gift card and 4.99 by card, "25.0000" + 4.99 is 29.990000000000002, so the last AUTHORISATION only adds a history comment, the order is not invoiced, and a manual capture then stops in CaptureDataBuilder with "Full order amount has not been authorized" (CaptureDataBuilder.php#L79-L90). 10.00 + 20.00 works, 10.10 + 20.20 doesn't; for a gift card plus card, roughly 10–15% of order totals fail in a quick check.
A test in AuthorisationWebhookHandlerTest, with the real isFullAmountAuthorized() and originalAmount(), fails on current main for the first two cases:
Test
publicstaticfunctionpartialPaymentsCoveringTheOrderProvider(): array
{
return [
// order total, amount already authorised (as loaded from sales_order), last partial payment in minor units'gift card 25.00 + card 4.99' => ['29.9900', '25.0000', 499],
'gift card 10.10 + card 20.20' => ['30.3000', '10.1000', 2020],
'gift card 10.00 + card 20.00' => ['30.0000', '10.0000', 2000],
];
}
/** * The last AUTHORISATION of a partial (split) payment completes the order amount, so the order must leave the * "partially authorised" branch, whatever the amounts are. * * @throws ReflectionExceptionAlias */
#[DataProvider('partialPaymentsCoveringTheOrderProvider')]
publicfunctiontestLastPartialAuthorisationCompletesTheOrderAmount(
string$grandTotal,
string$authorizedSoFar,
int$lastPaymentMinorUnits
): void {
$order = $this->createMockWithMethods(
Order::class,
['getGrandTotal', 'getPaymentAuthorizationAmount', 'setPaymentAuthorizationAmount', 'getPayment',
'getStoreId', 'getQuoteId'],
['getAdyenChargedCurrency']
);
$authorized = $authorizedSoFar;
$order->method('getAdyenChargedCurrency')->willReturn(ChargedCurrency::DISPLAY);
$order->method('getGrandTotal')->willReturn($grandTotal);
$order->method('getPaymentAuthorizationAmount')->willReturnCallback(function () use (&$authorized) {
return$authorized;
});
$order->method('setPaymentAuthorizationAmount')->willReturnCallback(
function ($amount) use (&$authorized, $order) {
$authorized = $amount;
return$order;
}
);
$order->method('getPayment')->willReturn($this->createMock(Order\Payment::class));
$order->method('getQuoteId')->willReturn('123');
$notification = $this->createConfiguredMock(Notification::class, [
'getPspreference' => 'ABCD1234GHJK5678',
'getMerchantReference' => 'TestMerchant',
'getPaymentMethod' => 'scheme',
'isSuccessful' => true,
'getAmountValue' => $lastPaymentMinorUnits,
'getAmountCurrency' => 'EUR'
]);
// Real isFullAmountAuthorized() and real originalAmount(); only their collaborators are doubled.$adyenOrderPayment = $this->createPartialMock(
AdyenOrderPayment::class,
['createAdyenOrderPayment', 'isAllAutoCaptured']
);
$adyenOrderPayment->method('isAllAutoCaptured')->willReturn(true);
$adyenHelper = $this->createPartialMock(Data::class, []);
$orderHelper = $this->createMock(OrderHelper::class);
$orderHelper->expects($this->never())->method('addWebhookStatusHistoryComment');
$orderHelper->expects($this->once())->method('setPrePaymentAuthorized')->willReturn($order);
$orderHelper->method('finalizeOrder')->willReturn($order);
$cartRepository = $this->createMock(CartRepositoryInterface::class);
$cartRepository->method('get')->willReturn($this->quoteMock);
$handler = $this->createAuthorisationWebhookHandler(
$adyenOrderPayment,
$orderHelper,
null,
null,
null,
null,
null,
$this->createConfiguredMock(PaymentMethods::class, ['isAutoCapture' => true]),
$cartRepository,
null,
null,
$adyenHelper
);
$method = $this->getPrivateMethod(AuthorisationWebhookHandler::class, 'handleSuccessfulAuthorisation');
$method->invokeArgs($handler, [$order, $notification]);
}
Comparing at the column's precision makes it pass, and the rest of the class and AdyenOrderPaymentTest still pass:
One more thing that would also fit "works again after downgrading to v10": only v11's AUTHORISATION handler writes payment_authorization_amount, and there is no data patch for it, so an order authorised under v10 and captured after the upgrade has it empty and fails the same check.
I can open a PR with the test and the fix if that helps.
changed the title [-][Bug]: Full order amount has not been authorized[/-][+][ECP-10044][Bug]: Full order amount has not been authorized[/+]on Oct 15, 2026
Activity
shubhamk67 commentedon Sep 8, 2026
Hi @dronerdk,
Thanks for reporting this issue.
We tried to reproduce the error on our end using the provided steps, but we were unable to do so.
To help us investigate further, could you provide more concrete steps to reproduce the issue? Additionally, is this happening persistently for every invoice you try to capture, or is it intermittent?
It would also be very helpful if you could share a bit more information, such as the specific payment method used, sanitized logs, and your plugin configuration.
You can also reach out to our tech support team at [email protected] for further investigation.
Best regards,
Shubham
dronerdk commentedon Sep 17, 2026
@shubhamk67
I think you need to enable partial payments.
I could be this from version 11 that makes the problems.
[ECP-9923] Make invoicing and order status consistent on partial payments by @shubhamk67 in #3311
I dont know if we see the effect of order from v 10 and then update to v11
candemiralp commentedon Sep 17, 2026
Hello @dronerdk,
Thanks for providing extra details. I've done an extended testing with the following test cases.
basecharged currency on multi-currency storeUnfortunately, we are still unable to reproduce the issue. I have the following recommendations for further debugging on your side.
payment_authorization_amountfield ofsales_ordertable. This amount is updated while processing AUTHORIZATION webhook here. Please compare the amounts.adyen_authorizedafter processing all authorization webhooks of partial payments? Same method (isFullAmountAuthorized()) is used while setting the order aspre-payment-authorizedhere.Once you get more information, we would be happy to help you out.
Best Regards,
Can
terminalstate commentedon Oct 13, 2026
This looks like the float comparison in
isFullAmountAuthorized(). It fails only for some amounts, which would explain why it doesn't reproduce with every test order.Each partial AUTHORISATION is added to
payment_authorization_amount(AuthorisationWebhookHandler.php#L100): the part already stored comes back fromsales_orderas a decimal string, the new part is a float, and the sum is compared with the grand total using===(AdyenOrderPayment.php#L185-L192). For a 29.99 order paid with a 25.00 gift card and 4.99 by card,"25.0000" + 4.99is29.990000000000002, so the last AUTHORISATION only adds a history comment, the order is not invoiced, and a manual capture then stops inCaptureDataBuilderwith "Full order amount has not been authorized" (CaptureDataBuilder.php#L79-L90). 10.00 + 20.00 works, 10.10 + 20.20 doesn't; for a gift card plus card, roughly 10–15% of order totals fail in a quick check.A test in
AuthorisationWebhookHandlerTest, with the realisFullAmountAuthorized()andoriginalAmount(), fails on current main for the first two cases:Test
Comparing at the column's precision makes it pass, and the rest of the class and
AdyenOrderPaymentTeststill pass:One more thing that would also fit "works again after downgrading to v10": only v11's AUTHORISATION handler writes
payment_authorization_amount, and there is no data patch for it, so an order authorised under v10 and captured after the upgrade has it empty and fails the same check.I can open a PR with the test and the fix if that helps.
dronerdk commentedon Oct 14, 2026
@terminalstate Thanks for investigating this. This matches exactly what we’re seeing.
The issue only occurs on some orders after upgrading from v10 to v11, while downgrading to v10 immediately resolves it again.
The float comparison explanation would also explain why we haven’t been able to reproduce it consistently across all test orders.
A PR with the test and fix would definitely be helpful. Thanks!
[-][Bug]: Full order amount has not been authorized[/-][+][ECP-10044][Bug]: Full order amount has not been authorized[/+]candemiralp commentedon Oct 15, 2026
Hello @terminalstate,
Thank you for the investigation and providing a potential solution to this. I've create a ticket and put this on our backlog.
Best Regards,
Can