Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PW-307 Use different version for Payment and Recurring service. Updat… #36

Merged
merged 4 commits into from
Oct 23, 2017
Merged
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
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
16 changes: 14 additions & 2 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/v2.shtml";
const ENPOINT_LIVE_DIRECTORY_LOOKUP = "https://live.adyen.com/hpp/directory/v2.shtml";
const API_VERSION = "v25";
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