Add retry counter meta to order to avoid duplicate invoice error on consequent tries

This commit is contained in:
dinamiko 2021-11-18 14:45:34 +01:00
parent 355bac28f9
commit c072e8550a
6 changed files with 26 additions and 40 deletions

View file

@ -25,6 +25,7 @@ class PurchaseUnitFactoryTest extends TestCase
$wcOrder = Mockery::mock(\WC_Order::class);
$wcOrder
->expects('get_order_number')->andReturn($wcOrderId);
$wcOrder->expects('get_meta')->andReturn('');
$amount = Mockery::mock(Amount::class);
$amountFactory = Mockery::mock(AmountFactory::class);
$amountFactory
@ -89,6 +90,7 @@ class PurchaseUnitFactoryTest extends TestCase
$wcOrder = Mockery::mock(\WC_Order::class);
$wcOrder
->expects('get_order_number')->andReturn(1);
$wcOrder->expects('get_meta')->andReturn('');
$amount = Mockery::mock(Amount::class);
$amountFactory = Mockery::mock(AmountFactory::class);
$amountFactory
@ -144,6 +146,7 @@ class PurchaseUnitFactoryTest extends TestCase
$wcOrder = Mockery::mock(\WC_Order::class);
$wcOrder
->expects('get_order_number')->andReturn(1);
$wcOrder->expects('get_meta')->andReturn('');
$amount = Mockery::mock(Amount::class);
$amountFactory = Mockery::mock(AmountFactory::class);
$amountFactory