Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion app/code/Magento/Paypal/Model/AbstractConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -224,15 +224,26 @@ protected function _prepareValue($key, $value)
*/
public function shouldUseUnilateralPayments()
{
return $this->getValue('business_account') && !$this->isWppApiAvailabe();
return $this->getValue('business_account') && !$this->isWppApiAvailable();
}

/**
* Check whether WPP API credentials are available for this method
*
* @deprecated
* @return bool
*/
public function isWppApiAvailabe()
{
return $this->isWppApiAvailable();
}

/**
* Check whether WPP API credentials are available for this method
*
* @return bool
*/
public function isWppApiAvailable()
{
return $this->getValue('api_username')
&& $this->getValue('api_password')
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Paypal/Model/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,7 @@ public function isMethodAvailable($methodCode = null)
}
break;
case self::METHOD_BILLING_AGREEMENT:
$result = $this->isWppApiAvailabe();
$result = $this->isWppApiAvailable();
break;
}
return $result;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,14 +189,14 @@ public function getValueDataProvider()
*
* @dataProvider isWppApiAvailabeDataProvider
*/
public function testIsWppApiAvailabe($returnMap, $expectedValue)
public function testIsWppApiAvailable($returnMap, $expectedValue)
{
$this->config->setMethod('paypal_express');
$this->scopeConfigMock->expects($this->any())
->method('getValue')
->willReturnMap($returnMap);

$this->assertEquals($expectedValue, $this->config->isWppApiAvailabe());
$this->assertEquals($expectedValue, $this->config->isWppApiAvailable());
}

/**
Expand Down