-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat: added setup for payment method management widget #13
base: main
Are you sure you want to change the base?
Conversation
hyperswitchSDK/Core/HyperPaymentMethodManagement/PaymentMethodManagement.swift
Outdated
Show resolved
Hide resolved
public func presentPaymentManagementSheet(viewController: UIViewController, configuration: PMMConfiguration, completion: @escaping (PaymentMethodManagementSheetResult) -> ()) { | ||
let pmManagement = PaymentMethodManagement(ephemeralKey: PaymentSession.ephemeralKey ?? "", configuration: configuration) | ||
pmManagement.presentPaymentMethodManagementView(from: viewController, completion: completion) | ||
public func getPaymentMethodManagementWidget(frame: CGRect, onAddPaymentMethod: (() -> Void)?, completion: @escaping (PaymentMethodManagementResult) -> ()) -> UIControl { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
incorrect approach don't use a function to get widget, use widget UIView Directly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UIView/Control
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but that would become asymetric to how we consume the paymentSheet. If that's ok then this is just a wrapper function, we can eliminate that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
correct this is different from payment sheet, lets eliminate the wrapper function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done 👍
print("-- exit widget") | ||
DispatchQueue.main.async { | ||
if let view = RNViewManager.sharedInstance.rootView { | ||
let reactNativeVC: UIViewController? = view.reactViewController() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you are adding widget view to a UIViewController and then dismissing it, try to just remove the view
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done 👍
8770631
to
84b2494
Compare
aa6355e
to
b85f2bd
Compare
ADDED
REMOVED
SCREENSHOTS
RECORDING
Screen.Recording.2024-10-18.at.5.55.44.PM.mov