All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Prop Mapping for Dual Architectures: Corrected the native Android
@ReactPropannotation name from"buttonType"to"type". This aligns it with the TS/codegen spec and ensures the Google Pay button type works correctly across both the Old Architecture (Paper) and New Architecture (Fabric).
- TypeScript & Codegen Alignment: Resolved issues where React Native Codegen does not support union types. Added missing types and restructured exports to ensure full compatibility with the Fabric/TurboModule codegen system.
- Google Pay Schema Alignment: Made
merchantIdinmerchantInforequests optional to align exactly with the Google Pay API specifications.
- Memory Leak resolved in GooglePayButtonComponent: Fixed a memory leak on Android where the
GlobalLayoutListenerwas not being cleaned up, by properly removing the listener when the view detached from the window. - Simplified Android Manifest Requirements: Updated setup documentation to remove the requirement of setting
com.google.android.gms.wallet.api.enabledmanually, streamlining the developer integration flow. - New Architecture Prop Compatibility: Addressed a layout and mapping mismatch between New Architecture (Fabric) and legacy Paper bridge prop resolutions for the Google Pay button.
- iOS Nullability & Native Module Crashes: Added safeguards to ensure that referencing the Google Pay native module or accessing
GooglePayButtonConstantson iOS (or other unsupported platforms) returnsnullsafely instead of crashing. - Example App iOS Compile: Overrode constant checks in the example app to allow clean builds and mock payment flows on iOS.
- Stabilized Workspace Package Import: Refactored the internal example application to cleanly import the library package using Yarn workspaces.
- GooglePayButtonConstants TypeScript Types: Corrected typing definitions and property accessors for the exported button configuration constants.
- React Native New Architecture Support: Introduced full support for TurboModules and Fabric (newarch) while maintaining backwards compatibility with the legacy Bridge (Paper) architecture.
- Improved Type Coverage: Added explicit typings for
GooglePayPaymentDataand added partial typings for theinfofield insideGooglePayPaymentMethodData.
- Safe Nullable Array Parsing: Enhanced Android JSON parser helpers (
mapToJsonandarrayToJson) to gracefully handle null values in nestedReadableArraystructures instead of throwing runtime exceptions. - Kotlin Lateinit Crash Prevention: Resolved a potential crash by correcting uninitialized
lateinitproperties on Android. - Build Exports: Cleaned up package bundling, exports, and circular dependencies in TypeScript files.
- SDK Dependency Upgrade: Upgraded the core
play-services-walletdependency on Android to19.4.0for improved security and performance.
- AGP 7+ Namespace Support: Added the required namespace field to the Android
build.gradlefile, allowing seamless compilation with newer Android Gradle Plugin versions (7.x and 8.x).
- Duplicate View Manager Registration: Fixed a crash where React Native threw a
"Tried to register two views with the same name GooglePayButton"error. - iOS Get-Constants Protection: Handled potential null references when retrieving constants from non-existent native modules on iOS.
- Deprecation Warnings: Resolved Android package name deprecation warnings in native Gradle builds.
- Google Pay Native Button Wrapper: Introduced a high-quality, native Android
PayButtonwrapper view component. - Layout Refresh Integration: Added manual
requestLayout()triggers inside the native layout view to ensure immediate button redraws.
- NextJS Dependency: Removed
nextfrom the package.json's required peer dependencies, reducing project bloat.
- Immutable softwareInfo Fix: Patched a bug when assigning software metadata information when the SDK's
softwareInfoconfiguration object was set to immutable.
- Initial Release: Initial implementation of the React Native Make Payment library wrapping Google Pay's API under a W3C-inspired Payment Request specification.