5

i am using Xcode 8 , swift 3. installed via carthage and braintree version 4.7.2.

clicking on the proceed with sandbox purchase button its not getting back to app and no nounce received and no error received.

enter image description here is there anything i missed during setup.

i am using PayPal on time checkout.

              @IBAction func customPayPalButtonPressed(_ sender: AnyObject) {


                    let payPalDriver : BTPayPalDriver = BTPayPalDriver.init(apiClient: self.apiClient!)

                    payPalDriver.viewControllerPresentingDelegate = self
                    payPalDriver.appSwitchDelegate = self

                    let payPalRequest = BTPayPalRequest(amount: "100.00")
                    payPalRequest.currencyCode = "USD"
                    payPalDriver.requestOneTimePayment(payPalRequest) { (tokenizedPayPalAccount, error) -> Void in

                        if (tokenizedPayPalAccount != nil) {

                            print(tokenizedPayPalAccount.debugDescription)
                        }else if (error != nil) {
                            print(error?.localizedDescription)
                            print(error.debugDescription)
                        }else {

                            print("Cancled")

                        }
                    }



                }               
  • Did you complete the [Setup for App Switch](https://developers.braintreepayments.com/guides/client-sdk/setup/ios/v4#setup-for-app-switch) steps? In particular, did you [update your application delegate](https://developers.braintreepayments.com/guides/client-sdk/setup/ios/v4#update-your-application-delegate)? – Shea Dec 27 '16 at 23:28
  • 1
    yes i have followed the document carefaully and figured out that 1. if i user old method - func application(_ application: UIApplication, open url: URL, sourceApplication: String?, annotation: Any) -> Bool it works properly and user new method 2.func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any]) -> Bool does not work – Ajay Singh Thakur Dec 28 '16 at 10:45
  • @AjaySinghThakur I have exactly the same problem as you, could you explain in a little more detail how you solved it? I don't fully understand your comment here. Thank you! – AJGronevelt Sep 09 '17 at 23:34
  • 1
    @AJGronevelt please refer this link -https://github.com/braintree/braintree_ios/issues/282 – Ajay Singh Thakur Sep 11 '17 at 06:02

0 Answers0