Skip to content

Commit

Permalink
Merge remote-tracking branch 'adyen/main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Tamara committed Jan 30, 2024
2 parents 1bcee2f + 669dd99 commit 16d03b9
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).

## [Unreleased](https://github.com/Adyen/adyen-php-plugin-core/compare/main...dev)


## [1.1.6 - 1.1.7](https://github.com/Adyen/adyen-php-plugin-core/compare/1.1.6...1.1.7) - 20204-01-30
- Add setCurrencies method to PaymentMethodResponse
- Update User-Agent header in CurlHttpClient

## [1.1.5 - 1.1.6](https://github.com/Adyen/adyen-php-plugin-core/compare/1.1.5...1.1.6) - 20204-01-22
- Set default value for default payment link expiration time.
- Fix amount comparisons - switch to comparing in minor units.
Expand Down
10 changes: 10 additions & 0 deletions src/BusinessLogic/Domain/Payment/Models/PaymentMethodResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,16 @@ public function getCurrencies(): array
return $this->currencies;
}

/**
* @param array $currencies
*
* @return void
*/
public function setCurrencies(array $currencies): void
{
$this->currencies = $currencies;
}

/**
* @return string
*/
Expand Down
5 changes: 3 additions & 2 deletions src/BusinessLogic/Domain/Payment/Services/PaymentService.php
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,8 @@ protected function getAllowedPaymentMethods(): array
* @return PaymentMethodResponse|null
*/
private function getCreditCardManagementMethodWithFilteredCurrencies(array $managementMethods
): ?PaymentMethodResponse {
): ?PaymentMethodResponse
{
$managementMethods = $this->getCreditCardManagementMethods($managementMethods);

if (empty($managementMethods)) {
Expand Down Expand Up @@ -474,7 +475,7 @@ private function getCreditCardManagementMethodWithFilteredCurrencies(array $mana
/**
* @param array $managementMethods
*
* @return array
* @return PaymentMethodResponse[]
*/
private function getCreditCardManagementMethods(array $managementMethods): array
{
Expand Down
4 changes: 2 additions & 2 deletions src/Infrastructure/Http/CurlHttpClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,8 @@ protected function setCommonOptionsForCurlSession()
$this->curlOptions[CURLOPT_SSL_VERIFYPEER] = static::SSL_STRICT_MODE;
$this->curlOptions[CURLOPT_SSL_VERIFYHOST] = static::SSL_STRICT_MODE;
// Set default user agent, because for some shops if user agent is missing, request will not work.
$this->curlOptions[CURLOPT_USERAGENT] =
'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36';
$this->curlOptions[CURLOPT_USERAGENT] = 'Adyen-Integration-Core-HTTPClient/1.0 Adyen-'
. $this->getConfigService()->getIntegrationName() . 'Module';
}

/**
Expand Down

0 comments on commit 16d03b9

Please sign in to comment.