Skip to content

Commit

Permalink
Issue/1452 (#1453)
Browse files Browse the repository at this point in the history
* Fixes #1337

* Fixes #1452
  • Loading branch information
Jose Constela authored and Aaron Judd committed Sep 30, 2016
1 parent 1f5ae40 commit a3dea41
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions imports/plugins/included/stripe/server/methods/stripeapi.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,7 @@ StripeApi.methods.captureCharge = new ValidatedMethod({
} else {
stripe = require("stripe")(apiKey);
}
const capturePromise = stripe.charges.capture(transactionId, captureDetails, (error, result) => {
return { error, result };
});
const capturePromise = stripe.charges.capture(transactionId, captureDetails);
const captureResults = Promise.await(capturePromise);
return captureResults;
}
Expand Down Expand Up @@ -151,9 +149,7 @@ StripeApi.methods.listRefunds = new ValidatedMethod({
} else {
stripe = require("stripe")(apiKey);
}
const refundListPromise = stripe.refunds.list({ charge: transactionId }, (error, result) => {
return { error, result };
});
const refundListPromise = stripe.refunds.list({ charge: transactionId });
const refundListResults = Promise.await(refundListPromise);
return refundListResults;
}
Expand Down

0 comments on commit a3dea41

Please sign in to comment.