Skip to content

Commit 98010e6

Browse files
Merge pull request #17687 to #17685
2 parents f8e1b2b + e4ac4a0 commit 98010e6

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

app/code/Magento/Paypal/Model/AbstractConfig.php

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,15 +224,26 @@ protected function _prepareValue($key, $value)
224224
*/
225225
public function shouldUseUnilateralPayments()
226226
{
227-
return $this->getValue('business_account') && !$this->isWppApiAvailabe();
227+
return $this->getValue('business_account') && !$this->isWppApiAvailable();
228228
}
229229

230230
/**
231231
* Check whether WPP API credentials are available for this method
232232
*
233+
* @deprecated
233234
* @return bool
234235
*/
235236
public function isWppApiAvailabe()
237+
{
238+
return $this->isWppApiAvailable();
239+
}
240+
241+
/**
242+
* Check whether WPP API credentials are available for this method
243+
*
244+
* @return bool
245+
*/
246+
public function isWppApiAvailable()
236247
{
237248
return $this->getValue('api_username')
238249
&& $this->getValue('api_password')

app/code/Magento/Paypal/Model/Config.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -677,7 +677,7 @@ public function isMethodAvailable($methodCode = null)
677677
}
678678
break;
679679
case self::METHOD_BILLING_AGREEMENT:
680-
$result = $this->isWppApiAvailabe();
680+
$result = $this->isWppApiAvailable();
681681
break;
682682
}
683683
return $result;

app/code/Magento/Paypal/Test/Unit/Model/AbstractConfigTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,14 +189,14 @@ public function getValueDataProvider()
189189
*
190190
* @dataProvider isWppApiAvailabeDataProvider
191191
*/
192-
public function testIsWppApiAvailabe($returnMap, $expectedValue)
192+
public function testIsWppApiAvailable($returnMap, $expectedValue)
193193
{
194194
$this->config->setMethod('paypal_express');
195195
$this->scopeConfigMock->expects($this->any())
196196
->method('getValue')
197197
->willReturnMap($returnMap);
198198

199-
$this->assertEquals($expectedValue, $this->config->isWppApiAvailabe());
199+
$this->assertEquals($expectedValue, $this->config->isWppApiAvailable());
200200
}
201201

202202
/**

0 commit comments

Comments
 (0)