Skip to content

Feat/support samsung pay styles - #41

Merged
AbdulazizAlrabiah merged 5 commits into
mainfrom
feat/support-samsung-pay-styles
May 18, 2026
Merged

Feat/support samsung pay styles#41
AbdulazizAlrabiah merged 5 commits into
mainfrom
feat/support-samsung-pay-styles

Conversation

@AbdulazizAlrabiah

@AbdulazizAlrabiah AbdulazizAlrabiah commented May 16, 2026

Copy link
Copy Markdown
Collaborator

https://moyasar-team.atlassian.net/browse/SDK-102

  • Contributing MD enrichment and enhancement

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 SamsungPayButtonType enum, propagated through SamsungPayMoyasarStyle, the native spec, and the Kotlin MerchantInfo/fragment to choose the rendered drawable and padding.
  • New pay_with_samsung_pay_logo vector drawable (now the default) with a layout listener re-applying drawable/orientation-specific padding.
  • Substantial unrelated CONTRIBUTING.md rewrite and yarn.lock dependency 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.

Comment thread android/src/main/java/com/moyasarsdk/samsungpay/SamsungPayButtonFragment.kt Outdated
Comment thread src/specs/RTNSamsungPayNativeComponent.android.ts
Comment thread CONTRIBUTING.md Outdated
@Fghurayri
Fghurayri requested a review from sultan-algarbi May 16, 2026 15:26

@sultan-algarbi sultan-algarbi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Outstanding work, Abdulaziz

@AbdulazizAlrabiah
AbdulazizAlrabiah merged commit e807e7b into main May 18, 2026
12 of 15 checks passed
@AbdulazizAlrabiah
AbdulazizAlrabiah deleted the feat/support-samsung-pay-styles branch May 18, 2026 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants