Use test keys for Stripe when in dev mode

This commit is contained in:
SachaG 2017-06-30 11:22:13 +09:00
parent a370cca0ce
commit 296fe702b2
2 changed files with 2 additions and 2 deletions

View file

@ -73,7 +73,7 @@ class Checkout extends React.Component {
<div className={classNames('stripe-checkout', {'checkout-loading': this.state.loading})}>
<StripeCheckout
token={this.onToken}
stripeKey={stripeSettings.publishableKey}
stripeKey={Meteor.isDevelopment ? stripeSettings.publishableKeyTest : stripeSettings.publishableKey}
ComponentClass="div"
name={product.name}
description={product.description}

View file

@ -28,7 +28,7 @@ export const createCharge = async (args) => {
}
// initialize Stripe
const keySecret = stripeSettings.secretKey;
const keySecret = Meteor.isDevelopment ? stripeSettings.secretKeyTest : stripeSettings.secretKey;
const stripe = new Stripe(keySecret);
// if an associated collection name and document id have been provided,