diff --git a/CHANGELOG.md b/CHANGELOG.md index 093cbf7..c998713 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.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. diff --git a/src/AbstractApi.php b/src/AbstractApi.php index 82c6522..23a4e4e 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.6'; + const PHP_API_VERSION = '3.5.7'; /** * Event dispatcher diff --git a/src/Api/Others/UpdateReconciliationIdentifier.php b/src/Api/Others/UpdateReconciliationIdentifier.php index f52f17e..5c9c1cb 100644 --- a/src/Api/Others/UpdateReconciliationIdentifier.php +++ b/src/Api/Others/UpdateReconciliationIdentifier.php @@ -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; @@ -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'); } diff --git a/src/Api/Payments/CaptureReservation.php b/src/Api/Payments/CaptureReservation.php index 4717e36..87ae96f 100644 --- a/src/Api/Payments/CaptureReservation.php +++ b/src/Api/Payments/CaptureReservation.php @@ -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; @@ -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 @@ -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'); diff --git a/src/Api/Payments/RefundCapturedReservation.php b/src/Api/Payments/RefundCapturedReservation.php index 2b478e2..3f40e29 100644 --- a/src/Api/Payments/RefundCapturedReservation.php +++ b/src/Api/Payments/RefundCapturedReservation.php @@ -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 @@ -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']);