@sergdudko/stripe-js
Version:
Supercharge Your Stripe Integration with Enhanced Methods for stripe-js: Take Full Control of Customer Card Management Right from Your Frontend! Elevate Your Payment Processing Capabilities with Ease and Efficiency.
33 lines (32 loc) • 1.68 kB
JavaScript
import { confirmPaymentIntentByCard } from "./confirmPaymentIntentByCard.js";
import { confirmPaymentIntentByPaymentMethod } from "./confirmPaymentIntentByPaymentMethod.js";
import { addSourceToCustomer } from "./addSourceToCustomer.js";
import { deleteSourceFromCustomer } from "./deleteSourceFromCustomer.js";
import { getAllCards } from "./getAllCards.js";
import { getCustomer } from "./getCustomer.js";
import { setDefaultCard } from "./setDefaultCard.js";
import { getDefaultCard } from "./getDefaultCard.js";
import { addPaymentMethodToCustomer } from "./addPaymentMethodToCustomer.js";
import { deletePaymentMethodFromCustomer } from "./deletePaymentMethodFromCustomer.js";
import { getAllPaymentMethods } from "./getAllPaymentMethods.js";
import { setDefaultPaymentMethod } from "./setDefaultPaymentMethod.js";
/**
* additional stripe methods
*/
export class StripeExtension {
constructor(apiKey) {
this.confirmPaymentIntentByCard = confirmPaymentIntentByCard;
this.confirmPaymentIntentByPaymentMethod = confirmPaymentIntentByPaymentMethod;
this.addSourceToCustomer = addSourceToCustomer;
this.deleteSourceFromCustomer = deleteSourceFromCustomer;
this.getAllCards = getAllCards;
this.getCustomer = getCustomer;
this.setDefaultCard = setDefaultCard;
this.getDefaultCard = getDefaultCard;
this.addPaymentMethodToCustomer = addPaymentMethodToCustomer;
this.deletePaymentMethodFromCustomer = deletePaymentMethodFromCustomer;
this.getAllPaymentMethods = getAllPaymentMethods;
this.setDefaultPaymentMethod = setDefaultPaymentMethod;
this._apiKey = apiKey;
}
}