# Changelog

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.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased

### Added

### Fixed

### Changed

## v2.18.0 - 2026-04-15

### Added

- Added validation for custom amount based on selected payment method limits
  ([WEB-1612](https://raisenow.atlassian.net/browse/WEB-1612)).

### Fixed

- Show debug section when `#widgetdebug` fragment is present in the URL without requiring a page reload ([WEB-3358](https://raisenow.atlassian.net/browse/WEB-3358)).
- Trim leading and trailing whitespace from standard fields ([WEB-3304](https://raisenow.atlassian.net/browse/WEB-3304)).
- Fixed a bug when `subscriptionUpdateComplete` event was not triggered for EPMS subscriptions ([WEB-3441](https://raisenow.atlassian.net/browse/WEB-3441)).

### Changed

- Updated `.browserslistrc` ([WEB-3211](https://raisenow.atlassian.net/browse/WEB-3211)).
- Updated dependencies.
- Updated TypeScript configuration.
- Updated ESLint configuration.
- Show Config Deployment Tag in Debug Main section ([WEB-3357](https://raisenow.atlassian.net/browse/WEB-3357)).

## v2.18.0 - 2026-03-25

### Added

- Added support for `card` payment method with Worldline provider in EPMS ([WEB-3307](https://raisenow.atlassian.net/browse/WEB-3307)).
- Added support for `netbanking` payment method with Worldline provider in EPMS ([WEB-3308](https://raisenow.atlassian.net/browse/WEB-3308)).
- Added ADR for embed mode implementation ([WEB-3310](https://raisenow.atlassian.net/browse/WEB-3310)).

### Changed

- Allow "cover the fee" feature when "payment_cover_fee" block is hidden ([WEB-3289](https://raisenow.atlassian.net/browse/WEB-3289)).
- Added a comment related to a potential fix in future for custom_parameters ([WEB-3329](https://raisenow.atlassian.net/browse/WEB-3329)).
- Call `getCardInfo` method in `datatrans` secure fields handler to retrieve and expose card data ([WEB-3327](https://raisenow.atlassian.net/browse/WEB-3327)).
- Move `tailwind` to `devDependencies`.
- Updated `@rnw-npm/money` library and refactored money-related helpers ([WEB-3379](https://raisenow.atlassian.net/browse/WEB-3379)).
- Added `min` and `max` interpolated values to `minimum_custom_amount` and `maximum_custom_amount` validation error messages with formatting.
- Removed `formatAmountWithCurrency` parser helper.
- Don't expose `helpers` object on `WidgetCore` class.

## v2.17.2 - 2026-03-18

### Fixed

- Fixed modifications to `paymentForm.data` inside the `beforePaymentSend` event callback were not reflected in the final EPMS payment payload ([WEB-3381](https://raisenow.atlassian.net/browse/WEB-3381))

## v2.17.1 - 2026-02-18

### Added

- Added an option to highlight recurring interval ([WEB-2899](https://raisenow.atlassian.net/browse/WEB-2899)).
- Use `Intl` API to render country names ([WEB-3176](https://raisenow.atlassian.net/browse/WEB-3176)).

### Fixed

- Fixed unhandled error in Spreedly handler under specific conditions ([WEB-3315](https://raisenow.atlassian.net/browse/WEB-3315)).
- Fixed "Subscription not found" error when EPP subscription token is passed in the URL query parameters ([WEB-3328](https://raisenow.atlassian.net/browse/WEB-3328)).

## v2.17.0 - 2026-01-28

### Added

- Added error log message when payment method profile is missing for selected payment method
  ([WEB-3141](https://raisenow.atlassian.net/browse/WEB-3141)).
- Show Result page if `error-details` query parameter is present in the URL
  ([WEB-3141](https://raisenow.atlassian.net/browse/WEB-3141)).
- Added cover fee adjustment logic, added `coverFeeAdjustmentEnabled` config option
  ([WEB-3194](https://raisenow.atlassian.net/browse/WEB-3194)).
- Added possibility to set `planned_effective_from` and `planned_end` properties to subscriptions
  ([WEB-3228](https://raisenow.atlassian.net/browse/WEB-3228)).
- Show PDF download link for `ch_dd` and `ch_ta` direct debit payment methods
  ([WEB-2922](https://raisenow.atlassian.net/browse/WEB-2922)).

### Fixed

- Fixed bug when some events were triggered multiple times when request is blocked by AWS WAF
  ([WEB-3268](https://raisenow.atlassian.net/browse/WEB-3268), [WEB-3238](https://raisenow.atlassian.net/browse/WEB-3238))

### Changed

- Removed default `apiKey` and `merchantId` values from `epp` and `eppStage` config options
  ([WEB-3141](https://raisenow.atlassian.net/browse/WEB-3141)).
- Removed default `accountUuid` value from `epmsStage` config option
  ([WEB-3141](https://raisenow.atlassian.net/browse/WEB-3141)).
- Use `Intl` for amounts calculations, formatting and currency name translations
  instead of custom implementation, removed `PaymentCurrency` type
  ([WEB-3066](https://raisenow.atlassian.net/browse/WEB-3066)).

## v2.16.8 - 2025-12-01

### Fixed

- Enhanced compatibility with older browser versions ([WEB-3201](https://raisenow.atlassian.net/browse/WEB-3201)):
  - Removed `allow-top-navigation-to-custom-protocols` from iframe sandbox attributes for better compatibility.

### Changed

- Enable Stripe Radar initialization for all supported Stripe payment methods
  ([WEB-3103](https://raisenow.atlassian.net/browse/WEB-3103)).
- Set `planned_effective_from` to tomorrow's date on EPP-EPMS subscription migration
  ([WEB-3192](https://raisenow.atlassian.net/browse/WEB-3192)).

## v2.16.7 - 2025-11-13

### Added

- Added status polling for EPMS subscriptions
  ([WEB-3149](https://raisenow.atlassian.net/browse/WEB-3149)).
- Added PLN to supported currencies
  ([WEB-3102](https://raisenow.atlassian.net/browse/WEB-3102)).

### Fixed

- Fixed regression introduced in v2.16.5
  ([WEB-3151](https://raisenow.atlassian.net/browse/WEB-3151)):
  - Removed iframe-specific logic for manual embeddings while maintaining
    specific handling for Solution Embed wrapper scenarios.
  - Replaced automatic iframe detection with explicit `rnw-embed` query parameter
    detection, which is automatically added by the Solution Embed wrapper.
  - Renamed `isEmbeddedInIframe` property to `embedMode` for better clarity.
  - Renamed CSS class from `tamaro-embedded-in-iframe` to `tamaro-embed-mode`
    for consistency.
  - Enhanced test coverage.

### Changed

- Enhanced payment agreement handling by reading UUID from `raisenow_parameters` property of EPMS subscription object
  ([WEB-3111](https://raisenow.atlassian.net/browse/WEB-3111)).
- Optimized object fetching logic in WidgetApi for better readability.
- Enhanced E2E test coverage for object fetching with expanded assertions and validation.
- Improved Cypress test helpers for iframe-related interactions.
- Navigation improvements ([WEB-3019](https://raisenow.atlassian.net/browse/WEB-3019)):
  - Replaced `@raisenow/history` with a custom implementation.
  - Implemented URL query params synchronization between parent window and iframe, implemented top-level navigation.
  - Added "Navigation" subsection to "Debug" section.
- Updated dependencies.

## v2.16.6 - 2025-10-09

Rolled back to v2.16.4 state due to found regression introduced in v2.16.5.

## v2.16.5 - 2025-10-08

### Added

- Enhanced Tamaro iframe embedding and iframe messaging possibilities
  ([WEB-2780](https://raisenow.atlassian.net/browse/WEB-2780)):
  - Made possible Tamaro to be embedded within Solution Embed wrapper.
  - Added iframe detection capability to determine if Tamaro widget is embedded
    within an iframe with a possibility to override it for some specific cases.
  - Introduced `EmbedIframeChildHandler` for parent-child iframe communication
    between Tamaro and Solution Embed wrapper.
    - Delegates scroll events to parent window to keep the same user experience.
    - Monitors body height changes and automatically adjusts iframe height.
  - Made widget scroll to the top when the form is submitted before redirection
    to another page (e.g. Twint Checkout page).
  - Replaced `@rnw-npm/channel-messenger` dependency with `penpal`,
    updated all communication APIs accordingly in all involved classes
    (`EmbedIframeChildHandler`, `PgwProxyIframeParentHandler`,
    `EppCardIframeParentHandler`, `EppCardIframeChildHandler`).
  - Use `@rnw-npm/content-processing`, `@rnw-npm/dom-manipulation` and
    `@rnw-npm/iframe-messaging-types` packages.
- Added `minimumReleaseAge` pnpm config option to reduce the risk of installing compromised packages
  ([WEB-3107](https://raisenow.atlassian.net/browse/WEB-3107)).

### Changed

- Use `debug` logger instead of manually prepending namespace to each log message
  ([WEB-3096](https://raisenow.atlassian.net/browse/WEB-3096)):
  - Used `createLogger` utility from `@rnw-npm/web-logger` package
    to create a namespaced logger instance.
  - Replaced all `console.log` and `console.error` calls.
  - Removed obsolete `debugEppCardIframe`, `debugPgwProxyIframe` and `debugSecureFields`
    config options.
- Updated dependencies.

## v2.16.4 - 2025-09-04

### Fixed

- Fixed a regression introduced in v2.14.0 which caused to incorrect
  legacy payment method names resolution when they are used
  in the `allowedRecurringPaymentMethods` configuration option
  ([WEB-3090](https://raisenow.atlassian.net/browse/WEB-3090)).

## v2.16.3 - 2025-09-03

- Stripe Radar session ([WEB-3003](https://raisenow.atlassian.net/browse/WEB-3003)).
- Send `create_payment_source` and `create_supporter` fields to EPMS
  when `oneClickPayment` option is enabled and checkbox is checked
  ([WEB-2736](https://raisenow.atlassian.net/browse/WEB-2736)).

## v2.16.2 - 2025-08-20

### Fixed

- Fixed a regression introduced in v2.16.0, which caused Stripe JS SDK to not load/initialize.

## v2.16.1 - 2025-08-19

### Changed

- Switch to `react-jsx`, remove unneeded React imports.
- Extract `ChannelMessenger` into separate `@rnw-npm/channel-messenger` package
  ([WEB-3039](https://raisenow.atlassian.net/browse/WEB-3039)).
- Delegate PGW requests to the PGW Proxy Iframe.
  ([WEB-3039](https://raisenow.atlassian.net/browse/WEB-3039)).
- Properly handle AWS WAF `captcha` and `challenge` actions, render AWS WAF Captcha when needed
  ([WEB-3039](https://raisenow.atlassian.net/browse/WEB-3039)).

## v2.16.0 - 2025-07-30

### Added

- Added HMAC support
  ([WEB-2923](https://raisenow.atlassian.net/browse/WEB-2923)).
- Added a step in the pipeline to run npm audit of 3rd party libraries
  ([WEB-2967](https://raisenow.atlassian.net/browse/WEB-2967)).
- One-off payments with PayPal unbranded card
  ([WEB-2587](https://raisenow.atlassian.net/browse/WEB-2587)).

### Fixed

- Fixed the bug when spinner was shown if the page was restored from the browser's `bfcache`
  ([WEB-2991](https://raisenow.atlassian.net/browse/WEB-2991)).
- Fixed Secure Fields handlers to fetch card token only once before submitting the form
  ([WEB-2458](https://raisenow.atlassian.net/browse/WEB-2458)).

### Changed

- Preserve existing subscription schedule and purpose info when migrating EPP subscription to EPMS
  ([WEB-2985](https://raisenow.atlassian.net/browse/WEB-2985)).
- Updated dependencies.

## v2.15.4 - 2025-07-14

### Changed

- Replaced all SCSS files with CSS
  ([WEB-2561](https://raisenow.atlassian.net/browse/WEB-2561)).
- Fixed card expiration date validation logic to allow current month
  ([WEB-2956](https://raisenow.atlassian.net/browse/WEB-2956)).
- Fixed NL translation
  ([WEB-2977](https://raisenow.atlassian.net/browse/WEB-2977)).

## v2.15.3 - 2025-06-16

### Fixed

- `getPurifiedString` converts empty strings to `undefined`
  ([WEB-2904](https://raisenow.atlassian.net/browse/WEB-2904)).
- Fix broken `AbTesting` feature, add tests
  ([WEB-2914](https://raisenow.atlassian.net/browse/WEB-2914)).

### Changed

- Verify secure tokenization with session authentication
  ([WEB-2811](https://raisenow.atlassian.net/browse/WEB-2811)).

## v2.15.2 - 2025-05-15

### Fixed

- Fetch payment agreement by subscription uuid, use PDF link from payment agreement object
  ([WEB-2881](https://raisenow.atlassian.net/browse/WEB-2881)).

### Changed

- Made compatibility changes for Payment Agreements data model
  ([WEB-2882](https://raisenow.atlassian.net/browse/WEB-2882)).

## v2.15.1 - 2025-05-07

### Changed

- Added eslint rules to sort type and object keys, class members and JSX props.
- Extended regular expressions to detect card types
  ([WEB-2864](https://raisenow.atlassian.net/browse/WEB-2864)).

## v2.15.0 - 2025-04-24

### Added

- Added `direct_debit` payment method for EPMS
  ([WEB-2652](https://raisenow.atlassian.net/browse/WEB-2652)).
- Added detection for Direct Debit variants `ch_dd`, `ch_ta` and `sepa_dd`
  ([WEB-2652](https://raisenow.atlassian.net/browse/WEB-2652)).
- Deprecate `dd` payment method (make it an alias)
  ([WEB-2652](https://raisenow.atlassian.net/browse/WEB-2652)).
- Fetch `userIdToken` before PayPal SDK initialization
  ([WEB-2713](https://raisenow.atlassian.net/browse/WEB-2713)).
- Fix handling of `onCancel` and `onApprove` events of PayPal SDK
  ([WEB-2869](https://raisenow.atlassian.net/browse/WEB-2869)).
- Added new `ch_qr_reference` payment method
  ([WEB-2722](https://raisenow.atlassian.net/browse/WEB-2722)).
- Prevent updating subscription with the new payment source if
  its status is not active
  ([WEB-2796](https://raisenow.atlassian.net/browse/WEB-2796)).
- Added possibility to create EPMS subscription based on EPP subscription
  ([WEB-2802](https://raisenow.atlassian.net/browse/WEB-2802)).

### Fixed

- Fixed `afterRender` event occasionally getting fired too early
  ([WEB-2793](https://raisenow.atlassian.net/browse/WEB-2793)).
- Fixed `SouthKoreanCardHandler` messages being logged without `debug` mode enabled.

### Changed

## v2.14.1 - 2025-02-26

### Added

- Added `payment_information.first_six_digits` property to EPMS payment object
  when payment method is `card` with Spreedly
  ([WEB-2715](https://raisenow.atlassian.net/browse/WEB-2715)).

### Fixed

- Fixed a regression that error page is not shown when
  `hasEpmsPaymentResponseError` or `hasEpmsSubscriptionUpdateResponseError` are set
  ([WEB-2735](https://raisenow.atlassian.net/browse/WEB-2735)).
- Fixed typo in translations
  ([WEB-2714](https://raisenow.atlassian.net/browse/WEB-2714)).

### Changed

- Ignore `supporter.uuid` property and don't pass it to the payment form
  when supporter clicks "Make another donation" link
  ([WEB-2733](https://raisenow.atlassian.net/browse/WEB-2733)).

## v2.14.0 - 2025-02-06

### Added

- Added config option `fetchPaymentDataOnQueryParamsChange` to be able to
  enable/disable payment data fetching on query params change
  ([WEB-2558](https://raisenow.atlassian.net/browse/WEB-2558)).
- Added `eps`, `bancontact` and `ideal` payment methods
  ([WEB-2668](https://raisenow.atlassian.net/browse/WEB-2668)).
- Initial support for "Payment agreement" objects handling,
  "Swiss QR Bill" payment method on EMPS
  ([WEB-2643](https://raisenow.atlassian.net/browse/WEB-2643)).

### Fixed

- Don't check subscription status before triggering `paymentComplete` event,
  since we don't have subscription status polling, status will not be changed,
  so we trigger `paymentComplete` event right away
  ([WEB-2558](https://raisenow.atlassian.net/browse/WEB-2558)).
- Removed triggering of payment status polling right after receiving response
  after creating EPMS payment, cleaning state on `retryPayment` call
  ([WEB-2515](https://raisenow.atlassian.net/browse/WEB-2515)).
- Improve line breaks of text content, fix links styling
  ([WEB-2580](https://raisenow.atlassian.net/browse/WEB-2580)).

### Changed

- Removes `sepa_dd` payment method restrictions for donation tax receipt
  ([WEB-2667](https://raisenow.atlassian.net/browse/WEB-2667)).

## v2.13.2 - 2025-01-15

### Fixed

- Made `setParam()` calls in `SpreedlySecureFieldsHandler` to be called
  right before `tokenizeCreditCard()` call to workaround one of Spreedly bugs
  ([WEB-2458](https://raisenow.atlassian.net/browse/WEB-2458)).

### Changed

- Made changes to skip `validateCardLength` validation if cart type is `undefined`
  or not present in a list of known card types, skip `card_type_supported` validation
  for South Korean cards, updated e2e tests
  ([WEB-2664](https://raisenow.atlassian.net/browse/WEB-2664)).

## v2.13.1 - 2024-12-16

### Added

- Add a CHANGELOG to git projects ([WEB-2596](https://raisenow.atlassian.net/browse/WEB-2596))
- Fixed the issue when event handlers execution stops if one of the previous handlers
  in the stack throws an error ([WEB-2632](https://raisenow.atlassian.net/browse/WEB-2632))
- Added a possibility to fetch migrated EPMS subscription with EPP `subscription_token` query parameter
  ([WEB-2500](https://raisenow.atlassian.net/browse/WEB-2500))
