Closed anniemark271983 closed 2 years ago
Hello @anniemark271983 -
Venmo is currently available only for merchants and customers in the US. To test in India you would likely need to use something like a VPN with a location in the US. As this is outside of the scope of the SDK, we cannot speak to how to set this up, but other merchants have had success with similar solutions.
The Utils
class is not developed by Braintree, so I cannot speak to why the alerts are not showing. Are you able to add print statements to the above so we can troubleshoot further and let us know the results of what is printed. Something like the following:
venmoDriver.tokenizeVenmoAccount(with: venmoRequest) { (nonce, error) in
Utils.hideProgress()
if let e = error {
print(e.localizedDescription)
} else if let n = nonce {
print(n)
} else {
print("Cancelled")
}
}
Additionally, can you confirm that you are making it into the tokenizeVenmoAccount
function at all?
My Utils is as bellow, Also I have checked with print method nothing is print
class Utils { class func showAlertWithOK(_ viewDelegate: AnyObject,strMessage:String){ let alertController = UIAlertController(title: nil, message: strMessage, preferredStyle: .alert) alertController.addAction(UIAlertAction(title: "OK", style: .default, handler: nil)) viewDelegate.present(alertController, animated: true, completion: nil) } }
also, how can I set the price while requesting on Venmo payment?
Also I have checked with print method nothing is print
If nothing is being printed, that leads me to believe that you are not making it into your getVenmoToken()
function. Where is this function being called? I would recommend adding some additional logging as that will help us troubleshoot the issue you are having to know where in your code you are running into issues.
also, how can I set the price while requesting on Venmo payment?
You will pass an amount in when you create a transaction on the server passing in the nonce from the client along with device data.
Closing this issue due to inactivity. Please feel free to reopen this issue if you are still running into issues and we would be happy to help troubleshoot further.
Posting message from #810:
I am not getting called back after opening the Venmo application, Paypal is working fine and getting calls back in the application and also the nonce
so can you please let me know what is the issue here?
The below open URL method is called proper while Paypal payment but it's not call while Venmo payment
func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
print("application option URL->",url) if (url.scheme?.hasPrefix("fb"))! { ApplicationDelegate.shared.application(UIApplication.shared,open: url,sourceApplication: nil,annotation: [UIApplication.OpenURLOptionsKey.annotation]) } else if (url.scheme?.hasPrefix("google"))! { return GIDSignIn.sharedInstance.handle(url) } else { if url.scheme?.localizedCaseInsensitiveCompare("com...payments") == .orderedSame { return BTAppContextSwitcher.handleOpenURL(url) } }
return false }
Please confirm that you have followed the steps to:
BTAppContextSwitcher
's handleOpenURL
method from within the application:openURL:options
app delegate method. If you take a look at your code compared to the example, you will see that you need to add in your URL scheme registered in step 1.Hello @anniemark271983 - I am closing this issue again due to inactivity. Please feel free to reopen this issue with the answers to the above questions if you are still running into issues and we would be happy to help troubleshoot further.
Also need to check bellow error
var venmoDriver: BTVenmoDriver! = nil
override func viewDidLoad() {
}