diff --git a/CHANGELOG.md b/CHANGELOG.md index d7b502c..846e986 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,10 +4,14 @@ 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.6.0] - 2026-05-22 +## [3.6.1] - 2026-06-23 ### Added - Add support for new parameters in `cardWallet/session` and `cardWallet/authorize`. +> **Note:** This change is backward compatible for existing merchants using the legacy Apple Pay integration. Merchants who want to migrate to the new Apple Pay flow can follow the migration guide below: +> +> [Migration guideline for legacy Apple Pay integration](https://documentation.altapay.com/Content/Ecom/Payment%20Types/Payment%20Provider%20Specifics/Apple%20Pay.htm) + ## [3.5.9] - 2026-05-08 ### Added - Refactor `checkoutSession` to extend `PaymentRequest` to enable support for all standard payment parameters. diff --git a/src/AbstractApi.php b/src/AbstractApi.php index 6c7083f..d7da726 100644 --- a/src/AbstractApi.php +++ b/src/AbstractApi.php @@ -55,7 +55,7 @@ abstract class AbstractApi /** * PHP API version */ - const PHP_API_VERSION = '3.6.0'; + const PHP_API_VERSION = '3.6.1'; /** * Event dispatcher diff --git a/src/Api/Ecommerce/PaymentRequest.php b/src/Api/Ecommerce/PaymentRequest.php index cb41a40..a8c5090 100644 --- a/src/Api/Ecommerce/PaymentRequest.php +++ b/src/Api/Ecommerce/PaymentRequest.php @@ -307,7 +307,7 @@ public function setSessionId($sessionId) */ protected function configureOptions(OptionsResolver $resolver) { - $resolver->setRequired(['terminal', 'shop_orderid', 'amount', 'currency']); + $this->setupRequirements($resolver); $resolver->setDefined([ 'language', 'transaction_info', @@ -359,6 +359,16 @@ protected function configureOptions(OptionsResolver $resolver) }); } + /** + * @param OptionsResolver $resolver + * + * @return void + */ + protected function setupRequirements(OptionsResolver $resolver) + { + $resolver->setRequired(['terminal', 'shop_orderid', 'amount', 'currency']); + } + /** * Handle response * diff --git a/src/Api/Payments/CardWalletSession.php b/src/Api/Payments/CardWalletSession.php index 62d648a..e90beef 100644 --- a/src/Api/Payments/CardWalletSession.php +++ b/src/Api/Payments/CardWalletSession.php @@ -68,6 +68,15 @@ public function setApplePayRequestData(array $applePayRequestData) return $this; } + /** + * @param OptionsResolver $resolver + * + * @return void + */ + protected function setupRequirements(OptionsResolver $resolver) + { + } + /** * Configure options * @@ -79,7 +88,15 @@ protected function configureOptions(OptionsResolver $resolver) { parent::configureOptions($resolver); - $resolver->setDefined(['validationUrl', 'domain', 'applePayRequestData']); + $resolver->setDefined([ + 'terminal', + 'shop_orderid', + 'amount', + 'currency', + 'validationUrl', + 'domain', + 'applePayRequestData' + ]); $resolver->addAllowedTypes('validationUrl', 'string'); $resolver->addAllowedTypes('domain', 'string');