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

How to get data from PUCBWebVCDelegate protocol response? #32

Open
anmolmalhotra opened this issue Sep 22, 2018 · 1 comment
Open

How to get data from PUCBWebVCDelegate protocol response? #32

anmolmalhotra opened this issue Sep 22, 2018 · 1 comment

Comments

@anmolmalhotra
Copy link

The payUResponse comes as Any in PUCBWebVCDelegate protocol and when I try to change Any to [String: Any] it doesn't do that.

Here's the code:

func payUSuccessResponse(_ payUResponse: Any!, surlResponse: Any!) {
        
        if payUResponse != nil {
            print(payUResponse)
        }
        
        if let response = payUResponse as? [String: Any] {
            
            print(response)
            
            if let id = response["id"] as? Int {
                print("ID", id)
                
                createBooking(with: "\(id)", and: false)
            }
        }
    }

It is failing at if let response =. Can you tell me how I am going to fetch id from payUResponse?

@karthikmandava7
Copy link

@anmolmalhotra Have you got the solution for this ? I'm also facing same issue...

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

No branches or pull requests

2 participants