Skip to content
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
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.7] - 2025-11-24
### Added
- Add option to use `transaction_info` for `captureReservation`, `refundCapturedReservation` and `updateOrder/{id}/reconciliationIdentifier`.

## [3.5.6] - 2025-10-27
### Added
- Add support for new customer organization fields: `organisation_name`, `organisation_entity_type`, and `organisation_vat_id` with proper validation.
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.6';
const PHP_API_VERSION = '3.5.7';

/**
* Event dispatcher
Expand Down
3 changes: 3 additions & 0 deletions src/Api/Others/UpdateReconciliationIdentifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,14 @@
use GuzzleHttp\Psr7\Request;
use Psr\Http\Message\ResponseInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Altapay\Traits\TransactionInfoTrait;

/**
* Used to update merchant reconciliation identifier for a given payment transaction.
*/
class UpdateReconciliationIdentifier extends AbstractApi
{
use TransactionInfoTrait;

/** @var string */
private $paymentId;
Expand Down Expand Up @@ -92,6 +94,7 @@ public function setNewMerchantReconciliationIdentifier($newMerchantReconciliatio
protected function configureOptions(OptionsResolver $resolver)
{
$resolver->setRequired(['currentMerchantReconciliationIdentifier', 'newMerchantReconciliationIdentifier']);
$resolver->setDefined(['transaction_info']);
$resolver->setAllowedTypes('currentMerchantReconciliationIdentifier', 'string');
$resolver->setAllowedTypes('newMerchantReconciliationIdentifier', 'string');
}
Expand Down
5 changes: 4 additions & 1 deletion src/Api/Payments/CaptureReservation.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
use Altapay\Traits\AmountTrait;
use Altapay\Traits\OrderlinesTrait;
use Altapay\Traits\TransactionsTrait;
use Altapay\Traits\TransactionInfoTrait;
use GuzzleHttp\Exception\ClientException as GuzzleHttpClientException;
use GuzzleHttp\Exception\GuzzleException;
use GuzzleHttp\Psr7\Request;
Expand All @@ -53,6 +54,7 @@ class CaptureReservation extends AbstractApi
use TransactionsTrait;
use OrderlinesTrait;
use AmountTrait;
use TransactionInfoTrait;

/**
* If you wish to define the reconciliation identifier used in the reconciliation csv files
Expand Down Expand Up @@ -128,7 +130,8 @@ protected function configureOptions(OptionsResolver $resolver)
'invoice_number',
'sales_tax',
'orderLines',
'shippingTrackingInfo'
'shippingTrackingInfo',
'transaction_info'
]);
$resolver->addAllowedTypes('reconciliation_identifier', 'string');
$resolver->addAllowedTypes('invoice_number', 'string');
Expand Down
4 changes: 3 additions & 1 deletion src/Api/Payments/RefundCapturedReservation.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ class RefundCapturedReservation extends AbstractApi
use Traits\TransactionsTrait;
use Traits\OrderlinesTrait;
use Traits\AmountTrait;
use Traits\TransactionInfoTrait;

/**
* If you wish to define the reconciliation identifier used in the reconciliation csv files
Expand Down Expand Up @@ -111,7 +112,8 @@ protected function configureOptions(OptionsResolver $resolver)
'reconciliation_identifier',
'invoice_number',
'allow_over_refund',
'orderLines'
'orderLines',
'transaction_info'
]);
$resolver->addAllowedTypes('reconciliation_identifier', 'string');
$resolver->addAllowedTypes('invoice_number', ['string', 'int']);
Expand Down