| var card = { | |
| number: params.cc, | |
| exp_month: params.exp_month, | |
| exp_year: params.exp_year, | |
| cvc: params.cvc | |
| }; | |
| return new Promise(function (resolve, reject) { | |
| stripe.charges.create({ | |
| description: description, | |
| amount: price * quantity, | |
| currency: currency, | |
| card: card, | |
| receipt_email: email | |
| }, function (error, charge) { | |
| if (error) { | |
| reject(error); | |
| } else { | |
| resolve(charge); | |
| } | |
| }); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment