Skip to content

Commit

Permalink
Merge pull request #65 from payplug/release-3.5.3
Browse files Browse the repository at this point in the history
Release 3.5.3
  • Loading branch information
lacan1 authored Dec 24, 2021
2 parents 5b8036b + b589299 commit fa2533b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
15 changes: 10 additions & 5 deletions lib/Payplug/Authentication.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<?php
namespace Payplug;

use Exception;

/**
* The Authentication DAO simplifies the access to most useful customer methods
**/
Expand Down Expand Up @@ -102,18 +104,21 @@ public static function getPermissionsByLogin($email, $password)
*
* @param Payplug $payplug the client configuration
*
* @return null|array the publishable keys
* @return array|false
*
* @throws Exception\ConfigurationNotSetException
* @throws Exception
*/
public static function getPublishableKeys(Payplug $payplug = null)
{
if ($payplug === null) {
$payplug = Payplug::getDefaultConfiguration();
}
$httpClient = new Core\HttpClient($payplug);
$response = $httpClient->post(Core\APIRoutes::getRoute(Core\APIRoutes::PUBLISHABLE_KEYS));

return $response;
try {
$response = $httpClient->post(Core\APIRoutes::getRoute(Core\APIRoutes::PUBLISHABLE_KEYS));
return $response;
} catch (Exception $e) {
return false;
}
}
}
2 changes: 1 addition & 1 deletion lib/Payplug/Core/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Config
/**
* The library version
*/
const LIBRARY_VERSION = '3.5.2';
const LIBRARY_VERSION = '3.5.3';

/**
* PHP minimal version required by this library
Expand Down

0 comments on commit fa2533b

Please sign in to comment.