Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide default pay button configuration #1701

Merged

Conversation

nauaros
Copy link
Contributor

@nauaros nauaros commented May 30, 2024

Summary

  • Define configuration property to show/hide default submit button.
  • Add logic to add / remove scroll view from the view hierarchy based on the submit button configuration.
  • Apply submit button configuration to all required components.
  • Build advanced card component flow to showcase / QA submit button configuration.
Demo

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

This pull request does not contain a valid label. Please add one of the following labels: ['new', 'changed', 'fixed', 'removed', 'deprecated', 'chore', 'improvement']

Copy link
Contributor

@erenbesel erenbesel left a comment

Choose a reason for hiding this comment

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

Great start, just small comments!

Adyen/UI/Form/FormViewController.swift Outdated Show resolved Hide resolved
Adyen/UI/Form/FormViewController.swift Outdated Show resolved Hide resolved
Adyen/UI/Form/FormViewController.swift Show resolved Hide resolved
Adyen/UI/Form/FormViewController.swift Outdated Show resolved Hide resolved
@nauaros nauaros marked this pull request as ready for review June 11, 2024 11:55
@nauaros nauaros added the new a pull request that adds a new feature label Jun 11, 2024
@goergisn goergisn requested a review from erenbesel June 13, 2024 11:40
Adyen/Core/Components/StoredPaymentMethodComponent.swift Outdated Show resolved Hide resolved
Adyen/UI/Form/FormView.swift Outdated Show resolved Hide resolved
Adyen/UI/Form/FormView.swift Show resolved Hide resolved
Adyen/UI/Form/FormViewController.swift Show resolved Hide resolved
Adyen/UI/Form/FormViewController.swift Show resolved Hide resolved
@atmamont
Copy link
Contributor

I will do manual testing on Monday.

@atmamont
Copy link
Contributor

Should this one have new label and a corresponding release notes? Some merchants would be really happy to get this feature.

Copy link
Contributor

👀 27 public changes detected

Comparing https://github.com/Adyen/adyen-ios.git @ hide-pay-button-configuration to https://github.com/Adyen/adyen-ios.git @ COIOS-382_Configurable_pay_button


Adyen

BasicComponentConfiguration

  • 😶‍🌫️ public func init(style: Adyen.FormComponentStyle, localizationParameters: Adyen.LocalizationParameters?) -> Adyen.BasicComponentConfiguration was removed
  • ❇️ public func init(style: Adyen.FormComponentStyle, showSubmitButton: Swift.Bool, localizationParameters: Adyen.LocalizationParameters?) -> Adyen.BasicComponentConfiguration was added
  • ❇️ public var showSubmitButton: Swift.Bool { get } was added

PersonalInformationConfiguration

  • 😶‍🌫️ public func init(style: Adyen.FormComponentStyle, shopperInformation: Adyen.PrefilledShopperInformation?, localizationParameters: Adyen.LocalizationParameters?) -> Adyen.PersonalInformationConfiguration was removed
  • ❇️ public func init(style: Adyen.FormComponentStyle, showSubmitButton: Swift.Bool, shopperInformation: Adyen.PrefilledShopperInformation?, localizationParameters: Adyen.LocalizationParameters?) -> Adyen.PersonalInformationConfiguration was added
  • ❇️ public var showSubmitButton: Swift.Bool { get } was added

StoredPaymentMethodComponent.Configuration

  • 😶‍🌫️ public func init(localizationParameters: Adyen.LocalizationParameters?) -> Adyen.StoredPaymentMethodComponent.Configuration was removed
  • ❇️ public func init(showSubmitButton: Swift.Bool, localizationParameters: Adyen.LocalizationParameters?) -> Adyen.StoredPaymentMethodComponent.Configuration was added
  • ❇️ public var showSubmitButton: Swift.Bool { get } was added

AdyenCard

CardComponent

  • ❇️ public func submit() -> Void was added

CardComponent.Configuration

  • 😶‍🌫️ public func init(style: Adyen.FormComponentStyle, shopperInformation: Adyen.PrefilledShopperInformation?, localizationParameters: Adyen.LocalizationParameters?, showsHolderNameField: Swift.Bool, showsStorePaymentMethodField: Swift.Bool, showsSecurityCodeField: Swift.Bool, koreanAuthenticationMode: AdyenCard.CardComponent.FieldVisibility, socialSecurityNumberMode: AdyenCard.CardComponent.FieldVisibility, storedCardConfiguration: AdyenCard.StoredCardConfiguration, allowedCardTypes: [Adyen.CardType]?, installmentConfiguration: Adyen.InstallmentConfiguration?, billingAddress: AdyenCard.BillingAddressConfiguration) -> AdyenCard.CardComponent.Configuration was removed
  • ❇️ public func init(style: Adyen.FormComponentStyle, showSubmitButton: Swift.Bool, shopperInformation: Adyen.PrefilledShopperInformation?, localizationParameters: Adyen.LocalizationParameters?, showsHolderNameField: Swift.Bool, showsStorePaymentMethodField: Swift.Bool, showsSecurityCodeField: Swift.Bool, koreanAuthenticationMode: AdyenCard.CardComponent.FieldVisibility, socialSecurityNumberMode: AdyenCard.CardComponent.FieldVisibility, storedCardConfiguration: AdyenCard.StoredCardConfiguration, allowedCardTypes: [Adyen.CardType]?, installmentConfiguration: Adyen.InstallmentConfiguration?, billingAddress: AdyenCard.BillingAddressConfiguration) -> AdyenCard.CardComponent.Configuration was added
  • ❇️ public var showSubmitButton: Swift.Bool { get } was added

GiftCardComponent

  • ❇️ public func init(paymentMethod: Adyen.GiftCardPaymentMethod, context: Adyen.AdyenContext, amount: Adyen.Amount, style: Adyen.FormComponentStyle, showSubmitButton: Swift.Bool, showsSecurityCodeField: Swift.Bool) -> AdyenCard.GiftCardComponent was added
  • 😶‍🌫️ public func init(paymentMethod: Adyen.GiftCardPaymentMethod, context: Adyen.AdyenContext, amount: Adyen.Amount, style: Adyen.FormComponentStyle, showsSecurityCodeField: Swift.Bool) -> AdyenCard.GiftCardComponent was removed
  • ❇️ public func init(paymentMethod: Adyen.MealVoucherPaymentMethod, context: Adyen.AdyenContext, amount: Adyen.Amount, style: Adyen.FormComponentStyle, showSubmitButton: Swift.Bool, showsSecurityCodeField: Swift.Bool) -> AdyenCard.GiftCardComponent was added
  • 😶‍🌫️ public func init(paymentMethod: Adyen.MealVoucherPaymentMethod, context: Adyen.AdyenContext, amount: Adyen.Amount, style: Adyen.FormComponentStyle, showsSecurityCodeField: Swift.Bool) -> AdyenCard.GiftCardComponent was removed
  • ❇️ public var showSubmitButton: Swift.Bool { get } was added

AdyenCashAppPay

CashAppPayConfiguration

  • 😶‍🌫️ public func init(redirectURL: Foundation.URL, referenceId: Swift.String?, showsStorePaymentMethodField: Swift.Bool, storePaymentMethod: Swift.Bool, style: Adyen.FormComponentStyle, localizationParameters: Adyen.LocalizationParameters?) -> AdyenCashAppPay.CashAppPayConfiguration was removed
  • ❇️ public func init(redirectURL: Foundation.URL, referenceId: Swift.String?, showsStorePaymentMethodField: Swift.Bool, storePaymentMethod: Swift.Bool, style: Adyen.FormComponentStyle, showSubmitButton: Swift.Bool, localizationParameters: Adyen.LocalizationParameters?) -> AdyenCashAppPay.CashAppPayConfiguration was added
  • ❇️ public var showSubmitButton: Swift.Bool { get } was added

AdyenComponents

ACHDirectDebitComponent.Configuration

  • 😶‍🌫️ public func init(style: Adyen.FormComponentStyle, shopperInformation: Adyen.PrefilledShopperInformation?, localizationParameters: Adyen.LocalizationParameters?, showsStorePaymentMethodField: Swift.Bool, showsBillingAddress: Swift.Bool, billingAddressCountryCodes: [Swift.String]) -> AdyenComponents.ACHDirectDebitComponent.Configuration was removed
  • ❇️ public func init(style: Adyen.FormComponentStyle, showSubmitButton: Swift.Bool, shopperInformation: Adyen.PrefilledShopperInformation?, localizationParameters: Adyen.LocalizationParameters?, showsStorePaymentMethodField: Swift.Bool, showsBillingAddress: Swift.Bool, billingAddressCountryCodes: [Swift.String]) -> AdyenComponents.ACHDirectDebitComponent.Configuration was added
  • ❇️ public var showSubmitButton: Swift.Bool { get } was added

BoletoComponent.Configuration

  • 😶‍🌫️ public func init(style: Adyen.FormComponentStyle, localizationParameters: Adyen.LocalizationParameters?, shopperInformation: Adyen.PrefilledShopperInformation?, showEmailAddress: Swift.Bool) -> AdyenComponents.BoletoComponent.Configuration was removed
  • ❇️ public func init(style: Adyen.FormComponentStyle, showSubmitButton: Swift.Bool, localizationParameters: Adyen.LocalizationParameters?, shopperInformation: Adyen.PrefilledShopperInformation?, showEmailAddress: Swift.Bool) -> AdyenComponents.BoletoComponent.Configuration was added
  • ❇️ public var showSubmitButton: Swift.Bool { get } was added

Analyzed modules: Adyen, AdyenActions, AdyenCard, AdyenCashAppPay, AdyenComponents, AdyenDelegatedAuthentication, AdyenDropIn, AdyenEncryption, AdyenSession, AdyenSwiftUI, AdyenTwint, AdyenWeChatPay

Copy link

sonarcloud bot commented Jul 12, 2024

@nauaros nauaros merged commit 9221d73 into COIOS-382_Configurable_pay_button Jul 12, 2024
10 checks passed
@nauaros nauaros deleted the hide-pay-button-configuration branch July 12, 2024 09:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore a pull request that has chore changes that shouldn't be in the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants