diff --git a/CHANGELOG.md b/CHANGELOG.md index efbf652..c34731c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [3.5.9] - 2026-05-04 +### Added +- Allow setting the terminal using `checkoutSession`. + ## [3.5.8] - 2026-02-23 ### Added - Add support for `checkoutSession` API method. diff --git a/src/AbstractApi.php b/src/AbstractApi.php index e415c70..3a3a239 100644 --- a/src/AbstractApi.php +++ b/src/AbstractApi.php @@ -55,7 +55,7 @@ abstract class AbstractApi /** * PHP API version */ - const PHP_API_VERSION = '3.5.8'; + const PHP_API_VERSION = '3.5.9'; /** * Event dispatcher diff --git a/src/Api/Payments/CheckoutSession.php b/src/Api/Payments/CheckoutSession.php index 36dbc7b..ac0edc4 100644 --- a/src/Api/Payments/CheckoutSession.php +++ b/src/Api/Payments/CheckoutSession.php @@ -29,6 +29,7 @@ use Altapay\Exceptions\ResponseMessageException; use Altapay\Serializer\ResponseSerializer; use Altapay\Response\CheckoutSessionResponse; +use Altapay\Traits\TerminalTrait; use GuzzleHttp\Exception\ClientException as GuzzleHttpClientException; use GuzzleHttp\Exception\GuzzleException; use GuzzleHttp\Psr7\Request; @@ -37,6 +38,7 @@ class CheckoutSession extends AbstractApi { + use TerminalTrait; /** * Set the list of terminals available for the user * @@ -131,7 +133,7 @@ public function setConfig(array $config) protected function configureOptions(OptionsResolver $resolver) { $resolver->setRequired(['terminals']); - $resolver->setDefined(['session_id', 'shop_orderid', 'amount', 'currency', 'config']); + $resolver->setDefined(['session_id', 'shop_orderid', 'amount', 'currency', 'config', 'terminal']); $resolver->addAllowedTypes('terminals', 'array'); $resolver->addAllowedTypes('session_id', 'string'); $resolver->addAllowedTypes('shop_orderid', 'string');