Skip to content

Commit 51913f3

Browse files
Fix partial credit memo issue (#697)
Co-authored-by: angeloou-meta <[email protected]>
1 parent 855518c commit 51913f3

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

app/code/Meta/BusinessExtension/Test/Unit/Block/Adminhtml/SetupTest.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
use Meta\BusinessExtension\Helper\FBEHelper;
1212
use Meta\BusinessExtension\Model\Api\CustomApiKey\ApiKeyService;
1313
use Meta\BusinessExtension\Model\System\Config as SystemConfig;
14+
use Meta\BusinessExtension\Api\AdobeCloudConfigInterface;
1415
use PHPUnit\Framework\MockObject\MockObject;
1516
use PHPUnit\Framework\TestCase;
1617

@@ -56,6 +57,11 @@ class SetupTest extends TestCase
5657
*/
5758
private $apiKeyService;
5859

60+
/**
61+
* @var MockObject
62+
*/
63+
private $adobeCloudConfigInterface;
64+
5965
public function testGetApiKey()
6066
{
6167
$apiKey = 'sample-api-key';
@@ -95,6 +101,10 @@ public function testGetApiKey()
95101
$this->apiKeyService->method('upsertApiKey')
96102
->willReturn($apiKey);
97103

104+
$this->adobeCloudConfigInterface = $this->getMockBuilder(AdobeCloudConfigInterface::class)
105+
->disableOriginalConstructor()
106+
->getMock();
107+
98108
$setup = new Setup(
99109
$this->context,
100110
$this->requestInterface,
@@ -104,6 +114,7 @@ public function testGetApiKey()
104114
$this->websiteCollectionFactory,
105115
$this->commerceExtensionHelper,
106116
$this->apiKeyService,
117+
$this->adobeCloudConfigInterface,
107118
[]
108119
);
109120

app/code/Meta/Sales/Model/PaymentMethod.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,13 @@ class PaymentMethod extends AbstractMethod
6262
*/
6363
protected $_canRefund = true;
6464

65+
/**
66+
* Allow refunds
67+
*
68+
* @var bool
69+
*/
70+
protected $_canRefundInvoicePartial = true;
71+
6572
/**
6673
* Allow voids
6774
*

0 commit comments

Comments
 (0)