Created
April 3, 2018 12:25
-
-
Save sebelga/02f5397d0d8433924d766fbd75802a8f to your computer and use it in GitHub Desktop.
This file contains hidden or 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
const stripe = require('./vendors/stripe'); | |
// No changes on the processPayement | |
async function processPayement(amount, source, description) { | |
let charge; | |
try { | |
charge = await stripe.charges.create({ | |
amount, | |
source, | |
description, | |
currency: "usd" | |
}); | |
} catch(e) { | |
// Error handling | |
} | |
// ... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment