Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/AbstractApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion src/Api/Payments/CheckoutSession.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -37,6 +38,7 @@

class CheckoutSession extends AbstractApi
{
use TerminalTrait;
/**
* Set the list of terminals available for the user
*
Expand Down Expand Up @@ -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']);
Comment thread
emicha marked this conversation as resolved.
Outdated
$resolver->addAllowedTypes('terminals', 'array');
$resolver->addAllowedTypes('session_id', 'string');
$resolver->addAllowedTypes('shop_orderid', 'string');
Expand Down
Loading