You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 24, 2020. It is now read-only.
// there was an error. Fix it.
} else {
// got stripe token, now charge it or smt
token = response.id
console.log("token ", token);
}
}`
what the next step ? submiting the token and the user data ? like email , payment amount ? currency ? submit all that to the node.js server where charge is done ? so just use a http$.post ? or what else !!
The text was updated successfully, but these errors were encountered:
kudsyf you need to call whatever backend system you have and pass in the token. Your backend then has to take that token and some amount and send it to Stripe to make the actual payment, and maybe respond with "OK" to your frontend:
} else {
// got stripe token, now charge it or smt
token = response.id
console.log("token ", token);
amount = 100;
makeOneTimePayment(amount, token).then(function(result) {
$scope.updatedAccountCredits = result.data;
console.log("Got OK from backend. Account credits updated.");
$scope.showCreditsUpdated = true;
}, function(error) {
console.log("Error occured on backend when charging account. Please contact support");
});
}
where makeOneTimePayment() is a method you have to write that calls the backend.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
as in the example code
` $scope.handleStripe = function(status, response) {
console.log("STRIPE ", response);
if (response.error) {
what the next step ? submiting the token and the user data ? like email , payment amount ? currency ? submit all that to the node.js server where charge is done ? so just use a http$.post ? or what else !!
The text was updated successfully, but these errors were encountered: