-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4942 from rattrayalex-stripe/fix-57-rattrayalex-s…
…tripe-set-stripe-app-info Use stripe.setAppInfo to identify ReactionCommerce to Stripe (fixes #57)
- Loading branch information
Showing
11 changed files
with
65 additions
and
21 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
imports/plugins/included/marketplace/server/no-meteor/util/getStripeInstance.js
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import stripeNpm from "stripe"; | ||
import packageJson from "/package.json"; | ||
|
||
// This should not be customized per application. | ||
const APP_INFO = { | ||
name: "ReactionCommerceMarketplace", | ||
version: packageJson.version, | ||
url: packageJson.url | ||
}; | ||
|
||
/** | ||
* @name getStripeInstance | ||
* @param {String} stripeApiKey Stripe API Key, see https://stripe.com/docs/keys | ||
* @returns {Object} The Stripe SDK object | ||
*/ | ||
export default function getStripeInstance(stripeApiKey) { | ||
const stripe = stripeNpm(stripeApiKey); | ||
stripe.setAppInfo(APP_INFO); | ||
return stripe; | ||
} |
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
4 changes: 2 additions & 2 deletions
4
...ipe/server/no-meteor/util/getStripeApi.js → .../server/no-meteor/util/getStripeApiKey.js
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
20 changes: 20 additions & 0 deletions
20
imports/plugins/included/payments-stripe/server/no-meteor/util/getStripeInstance.js
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import stripeNpm from "stripe"; | ||
import packageJson from "/package.json"; | ||
|
||
// This should not be customized per application. | ||
const APP_INFO = { | ||
name: "ReactionCommerce", | ||
version: packageJson.version, | ||
url: packageJson.url | ||
}; | ||
|
||
/** | ||
* @name getStripeInstance | ||
* @param {String} stripeApiKey Stripe API Key, see https://stripe.com/docs/keys | ||
* @returns {Object} The Stripe SDK object | ||
*/ | ||
export default function getStripeInstance(stripeApiKey) { | ||
const stripe = stripeNpm(stripeApiKey); | ||
stripe.setAppInfo(APP_INFO); | ||
return stripe; | ||
} |
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
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
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
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
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
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
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