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

Facing issues with PUCBWebVC #29

Open
anmolmalhotra opened this issue Sep 15, 2018 · 5 comments
Open

Facing issues with PUCBWebVC #29

anmolmalhotra opened this issue Sep 15, 2018 · 5 comments

Comments

@anmolmalhotra
Copy link

Can you please tell me how can I initialise PUCBWebVC - postParam argument with String?

let payUWebView = try PUCBWebVC(postParam: String!, url: URL!, merchantKey: String!)

As far as I can understand, your paymentParam property in your sample app is of type PayUModelPaymentParams. Do you want me to convert that to string or there is another way which you haven't listed in your documentation? Your documentation says go to SDK Wiki to know more about generating postParams and there you're showing me how to generate PayUModelPaymentParams?

Can you help here?

@anmolmalhotra
Copy link
Author

What am I missing here, can you please tell me? Is it a .?

missing_fullstop

@vipin04
Copy link

vipin04 commented Sep 15, 2018

Hi @anmolmalhotra!

Can you share the version of libraries you are using?
Specifically, please share the version of SDK & Custom Browser.

@vipin04
Copy link

vipin04 commented Sep 17, 2018

@anmolmalhotra : Using PayUCreateRequest class of SDK, you can get the valid string format of PayUModelPaymentParams. These stringified paymentParams needs to be passed to CB.

@anmolmalhotra
Copy link
Author

anmolmalhotra commented Sep 18, 2018

@vipin04 Thank you. I will look into this class and will get back to you! Please accept my apology for replying so late.

As for the version, I am using the latest one for both of them.

@anmolmalhotra
Copy link
Author

anmolmalhotra commented Sep 19, 2018

Hey @vipin04,

What should I pass in forPaymentType?

Here's the code:

PayUCreateRequest().createRequest(withPaymentParam: paymentParams, forPaymentType: WHAT TO PASS HERE, withCompletionBlock: { (request, error) in
                    do {
                        let payUCustomBrowser = try PUCBWebVC(nsurlRequest: request as URLRequest, merchantKey: "merchant_key")
                        payUCustomBrowser.cbWebVCDelegate = self
                        self?.navigationController?.pushViewController(payUCustomBrowser, animated: true)
                    } catch {
                        print(error)
                    }
})

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