Skip to content

Commit

Permalink
Merge pull request #37 from Adyen/develop
Browse files Browse the repository at this point in the history
Merge from 'develop'
  • Loading branch information
rikterbeek authored Oct 23, 2017
2 parents 22df6a5 + a0a6ab3 commit d923d38
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 14 deletions.
24 changes: 16 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
sudo: false
dist: trusty
language: php
php:
- 5.3
- 5.4
- 5.5
- 5.6
- 7.0
- 7.1
- nightly
matrix:
allow_failures:
- php: nightly
include:
- php: 7.1
- php: 7.2
- php: 7.1
- php: 7.0
- php: 5.6
- php: 5.6
- php: 5.5
- php: 5.4
- dist: precise
php: 5.3
before_script:
- composer install
20 changes: 16 additions & 4 deletions src/Adyen/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@

class Client
{
const LIB_VERSION = "1.3.0";
const LIB_VERSION = "1.4.0";
const USER_AGENT_SUFFIX = "adyen-php-api-library/";
const ENDPOINT_TEST = "https://pal-test.adyen.com";
const ENDPOINT_LIVE = "https://pal-live.adyen.com";
const ENPOINT_TEST_DIRECTORY_LOOKUP = "https://test.adyen.com/hpp/directory.shtml";
const ENPOINT_LIVE_DIRECTORY_LOOKUP = "https://live.adyen.com/hpp/directory.shtml";
const API_VERSION = "v25";
const ENPOINT_TEST_DIRECTORY_LOOKUP = "https://test.adyen.com/hpp/directory/v2.shtml";
const ENPOINT_LIVE_DIRECTORY_LOOKUP = "https://live.adyen.com/hpp/directory/v2.shtml";
const API_VERSION = "v30";
const API_RECURRING_VERSION = "v25";

/**
* @var Adyen_Config $config
Expand Down Expand Up @@ -153,6 +154,17 @@ public function getApiVersion()
return self::API_VERSION;
}

/**
* Get the version of the Recurring API endpoint
*
* @return string
*/
public function getApiRecurringVersion()
{
return self::API_RECURRING_VERSION;
}


/**
* @param HttpClient\ClientInterface $httpClient
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Adyen/Service/ResourceModel/Recurring/Disable.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class Disable extends \Adyen\Service\AbstractResource

public function __construct($service)
{
$endpoint = $service->getClient()->getConfig()->get('endpoint') . '/pal/servlet/Recurring/' . $service->getClient()->getApiVersion() . '/disable';
$endpoint = $service->getClient()->getConfig()->get('endpoint') . '/pal/servlet/Recurring/' . $service->getClient()->getApiRecurringVersion() . '/disable';
parent::__construct($service, $endpoint, $this->_requiredFields);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class ListRecurringDetails extends \Adyen\Service\AbstractResource

public function __construct($service)
{
$endpoint = $service->getClient()->getConfig()->get('endpoint') . '/pal/servlet/Recurring/' . $service->getClient()->getApiVersion() . '/listRecurringDetails';
$endpoint = $service->getClient()->getConfig()->get('endpoint') . '/pal/servlet/Recurring/' . $service->getClient()->getApiRecurringVersion() . '/listRecurringDetails';
parent::__construct($service, $endpoint, $this->_requiredFields);
}

Expand Down

0 comments on commit d923d38

Please sign in to comment.