Skip to content
This repository has been archived by the owner on Nov 28, 2023. It is now read-only.

Completion Handler Not Working #117

Open
akkshay opened this issue Jan 3, 2016 · 2 comments
Open

Completion Handler Not Working #117

akkshay opened this issue Jan 3, 2016 · 2 comments

Comments

@akkshay
Copy link

akkshay commented Jan 3, 2016

I have the following code in my app.

Venmo.sharedInstance().sendPaymentTo("TestNumber", amount: 1, note: "Testing", completionHandler: {(transaction: VENTransaction!, success: Bool, error: NSError!) -> Void in
if error != nil {
print(error)
} else {
print("no error")
}
})

When I change TestNumber to a valid number, and run it, the payment goes through but "no error" is not printed to the console. I'm using the AppSwitch mode. I want to be able to make my app execute some code if the payment is successful, but I have no way of knowing whether it is if the completion handler is not working. How can I resolve this issue?

@eliperkins
Copy link

Are you completing the app switch? Or is this meant to be triggered by the API? Are there any warnings logged in the console that might be preventing the app switch?

@akkshay
Copy link
Author

akkshay commented Jan 4, 2016

The AppSwitch is working, but once nothing is being printed to the console. I need to be able to know if the payment was successful so that I can execute some more code in my app.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants