You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR adds a PayButtonText feature allowing merchants to customize the payment button text in English and Arabic. The implementation adds a new optional field across Dart/Android/iOS layers.
Security Assessment: ✅ No critical issues – This change does not introduce CHD exposure or violate PCI boundaries.
Code Quality: ⚠️Pre-existing issues remain – The PR does not fix any of the significant logging/security issues documented in CLAUDE.md.
Detailed Findings
✅ Security Analysis (No Blockers)
A) Boundary Proof: "Wrapper Only"
PASS: PayButtonText contains only UI strings (en/ar localization), no CHD
PASS: Field is optional, follows existing patterns
PASS: Data flows from Dart → Native SDKs via JSON in creationParams
B) Platform Channels
NO NEW RISKS: PayButtonText is serialized/deserialized like other config fields
PRE-EXISTING ISSUE (unchanged by this PR):
apiKey still in creationParams payload (checkout_arguments.dart:9, checkout_widget.dart:33-35)
No error handling on channel calls – unhandled PlatformException would propagate apiKey
C) Flutter Logging / Error Handling
NO NEW RISKS: PayButtonText not logged in new code
PRE-EXISTING ISSUES (unchanged by this PR):
SDK: print("OttuCheckoutWidget.dispose()") in checkout_widget.dart:26
Android: 27 Log.* calls with NO debug/release guard in CheckoutView.kt
iOS: New Logger.swift added but uses OSLog (appropriate for iOS)
Sample app: LogInterceptor(responseBody: true, requestBody: true) always active
⚠️ iOS Code Refactoring
The PR includes a massive 429-line refactoring of CheckoutPlatformView.swift (+256/-173 lines). This is NOT documented in the PR description ("MS-496: Pay button text - Second part").
Concerns:
Scope creep: The refactoring is not mentioned in the Jira ticket reference
Review difficulty: Large-scale formatting/structural changes mixed with feature addition
Risk: Harder to identify if bugs were introduced in the refactoring vs the feature
Recommendation:
When making large refactorings, separate them into distinct commits or PRs from feature additions. This makes review safer and rollback easier if issues arise.
📝 Code Quality Issues (Non-Blocking)
1. Commented-Out Code
File: lib/src/pay_button_text.dart:19-26
/* extention Language on PayButtonText { forLanguage(String language) =switch (language) {case "en" : en;case "ar" : ar;}}*/
Typo: "extention" → "extension"
Dead code should be removed, not committed
If needed for future reference, use git history
Impact: Low – just clutter, but reduces code cleanliness
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://plexteq-ottu.atlassian.net/browse/MS-496 Second part