-
Notifications
You must be signed in to change notification settings - Fork 753
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f6e5ad3
commit 09bb044
Showing
3 changed files
with
1 addition
and
27 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,6 @@ cache: | |
directories: | ||
- node_modules | ||
node_js: | ||
- '6' | ||
- '8' | ||
- '10' | ||
sudo: false | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,9 +48,6 @@ const stripe = Stripe('sk_test_...'); | |
//… | ||
``` | ||
|
||
On older versions of Node, you can use [promises](#using-promises) | ||
or [callbacks](#using-callbacks) instead of `async`/`await`. | ||
|
||
## Initialize with config object | ||
|
||
The package can be initialized with several options: | ||
|
@@ -135,28 +132,6 @@ stripe.customers | |
}); | ||
``` | ||
|
||
### Using callbacks | ||
|
||
On versions of Node.js prior to v7.9: | ||
|
||
```js | ||
var stripe = require('stripe')('sk_test_...'); | ||
|
||
stripe.customers.create( | ||
{ | ||
email: '[email protected]', | ||
}, | ||
function(err, customer) { | ||
if (err) { | ||
// Deal with an error (will be `null` if no error occurred). | ||
} | ||
|
||
// Do something with created customer object | ||
console.log(customer.id); | ||
} | ||
); | ||
``` | ||
|
||
### Configuring Timeout | ||
|
||
Request timeout is configurable (the default is Node's default of 120 seconds): | ||
|
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