Created
June 20, 2013 22:21
-
-
Save nodesocket/5827251 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function callbackHandler(response) { | |
switch (response.status) { | |
case 201: | |
// WOO HOO! | |
// response.data.uri == uri of the card or bank account resource | |
break; | |
case 400: | |
// missing field - check response.error for details | |
break; | |
case 402: | |
// we couldn't authorize the buyer's credit card | |
// check response.error for details | |
break | |
case 404: | |
// your marketplace URI is incorrect | |
break; | |
case 500: | |
// Balanced did something bad, please retry the request | |
break; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment