-
Notifications
You must be signed in to change notification settings - Fork 13
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
SwiftUI support #32
Comments
Been Looking for the documentations to integrate RazerPay in swiftui, but got no luck. Looking forward to support the Apple's Latest Framework. |
This is the work around you can use, till we get final library update regarding swiftui support :
|
The other way around is to do something instead of having viewcontroller struct Demo: View {
@State var razorpay:RazorpayCheckout? = nil
var body: some View {
ZStack{
Text("Demo").onTapGesture {
}
}.onAppear{
self.razorpay = RazorpayCheckout.initWithKey("", andDelegateWithData:RazorPayIntegerationMediatator())
}
}
}
class RazorPayIntegerationMediatator : RazorpayPaymentCompletionProtocolWithData{
func onPaymentError(_ code: Int32, description str: String, andData response: [AnyHashable : Any]?) {
}
func onPaymentSuccess(_ payment_id: String, andData response: [AnyHashable : Any]?) {
}
} This way can be optimized in other ways too let me know if you found a better solution to it |
Describe the feature you'd like: Swiftui integration
Suggested implementation:
Describe alternatives you've considered:
Tried using uiviwerepresentable but got no luck
Teachability, Documentation, Adoption, Migration Strategy: latest framework of ios support
The text was updated successfully, but these errors were encountered: