Feat/support samsung pay styles - #41
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds support for selecting between two Samsung Pay button styles ("Pay with Samsung Pay" vs. Samsung Pay logo only) on Android, exposing a new buttonType style option to React Native consumers. The Android fragment now swaps drawables and applies orientation-aware padding accordingly. The PR also bundles an unrelated CONTRIBUTING.md rewrite and assorted yarn.lock updates.
Changes:
- New
SamsungPayButtonTypeenum, propagated throughSamsungPayMoyasarStyle, the native spec, and the KotlinMerchantInfo/fragment to choose the rendered drawable and padding. - New
pay_with_samsung_pay_logovector drawable (now the default) with a layout listener re-applying drawable/orientation-specific padding. - Substantial unrelated
CONTRIBUTING.mdrewrite andyarn.lockdependency churn.
Reviewed changes
Copilot reviewed 12 out of 13 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/models/component_models/samsung_pay_button_type.ts | New enum mapping TS keys to native string values. |
| src/models/component_models/moyasar_style.ts | Adds optional buttonType to SamsungPayMoyasarStyle. |
| src/specs/RTNSamsungPayNativeComponent.android.ts | Adds buttonType?: string to native MerchantInfo. |
| src/views/samsung_pay/samsung_pay.tsx | Forwards buttonType with default to native props; removes TODO. |
| src/index.tsx | Re-exports the new enum. |
| example/src/App.tsx | Demonstrates the new buttonType style option. |
| android/.../SamsungPayButtonViewModel.kt | Adds buttonType field to MerchantInfo. |
| android/.../SamsungPayButtonFragmentManagerImpl.kt | Reads buttonType from JS props and passes through. |
| android/.../SamsungPayButtonFragment.kt | Selects drawable, applies padding, registers layout listener for orientation-aware padding. |
| android/.../res/layout/fragment_samsung_pay.xml | Switches default drawable and padding to new logo. |
| android/.../res/drawable/pay_with_samsung_pay_logo.xml | New vector asset for the "Pay with Samsung Pay" logo. |
| CONTRIBUTING.md | Large unrelated documentation rewrite. |
| yarn.lock | Unrelated transitive dependency bumps. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
sultan-algarbi
approved these changes
May 18, 2026
sultan-algarbi
left a comment
Contributor
There was a problem hiding this comment.
Outstanding work, Abdulaziz
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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://moyasar-team.atlassian.net/browse/SDK-102