@dbbs/strapi-stripe-payment
Version:
Strapi integration plugin for Stripe payment system
16 lines (15 loc) • 552 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const stripe_1 = __importDefault(require("stripe"));
exports.default = ({ strapi }) => {
const stripeApiKey = strapi.config.get('server.stripe.apiKey');
if (!stripeApiKey) {
throw new Error('stripeApiKey is not defined');
}
return new stripe_1.default(stripeApiKey, {
apiVersion: '2024-04-10'
});
};