Skip to content

Commit

Permalink
refactored ApiConfig class
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasKiederle committed Apr 5, 2019
1 parent 6b14ea8 commit 6d09e71
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions vendor-fixes/PhpPaymentApi/Constants/ApiConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,21 @@ class ApiConfig
* Techdivision Changes start here........
*/

private $testUrl = 'https://psp-mock.test/ngw/post';

const TEST_URL = 'https://psp-mock.test/ngw/post';

/**
* @return string
*/
public function getTestUrl()
{
$config = include (__DIR__ . '/../../../../../../app/etc/config.php');
$config = include(__DIR__ . '/../../../../../../app/etc/config.php');

$sApiUrl = $config['system']['default']['techdivision_heidelpay_mockable']['psp_mock_url'] . '/ngw/post';
$customTestApiUrl = $config['system']['default']['techdivision_heidelpay_mockable']['psp_mock_url'] . '/ngw/post';

if($sApiUrl != null){
return $sApiUrl;
if ($customTestApiUrl !== null) {
return $customTestApiUrl;
} else {
return $this->testUrl;
return $this::TEST_URL;
}
}

Expand Down

0 comments on commit 6d09e71

Please sign in to comment.