@medusajs/payment-stripe 0.0.3 → 1.0.0-rc-20241003153304

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. package/dist/core/stripe-base.d.ts +6 -7
  2. package/dist/core/stripe-base.d.ts.map +1 -0
  3. package/dist/core/stripe-base.js +238 -440
  4. package/dist/core/stripe-base.js.map +1 -0
  5. package/dist/index.d.ts +2 -1
  6. package/dist/index.d.ts.map +1 -0
  7. package/dist/index.js +5 -5
  8. package/dist/index.js.map +1 -0
  9. package/dist/services/index.d.ts +1 -0
  10. package/dist/services/index.d.ts.map +1 -0
  11. package/dist/services/index.js +1 -1
  12. package/dist/services/index.js.map +1 -0
  13. package/dist/services/stripe-bancontact.d.ts +1 -0
  14. package/dist/services/stripe-bancontact.d.ts.map +1 -0
  15. package/dist/services/stripe-bancontact.js +14 -35
  16. package/dist/services/stripe-bancontact.js.map +1 -0
  17. package/dist/services/stripe-blik.d.ts +1 -0
  18. package/dist/services/stripe-blik.d.ts.map +1 -0
  19. package/dist/services/stripe-blik.js +14 -35
  20. package/dist/services/stripe-blik.js.map +1 -0
  21. package/dist/services/stripe-giropay.d.ts +1 -0
  22. package/dist/services/stripe-giropay.d.ts.map +1 -0
  23. package/dist/services/stripe-giropay.js +14 -35
  24. package/dist/services/stripe-giropay.js.map +1 -0
  25. package/dist/services/stripe-ideal.d.ts +1 -0
  26. package/dist/services/stripe-ideal.d.ts.map +1 -0
  27. package/dist/services/stripe-ideal.js +14 -35
  28. package/dist/services/stripe-ideal.js.map +1 -0
  29. package/dist/services/stripe-provider.d.ts +1 -0
  30. package/dist/services/stripe-provider.d.ts.map +1 -0
  31. package/dist/services/stripe-provider.js +11 -32
  32. package/dist/services/stripe-provider.js.map +1 -0
  33. package/dist/services/stripe-przelewy24.d.ts +1 -0
  34. package/dist/services/stripe-przelewy24.d.ts.map +1 -0
  35. package/dist/services/stripe-przelewy24.js +14 -35
  36. package/dist/services/stripe-przelewy24.js.map +1 -0
  37. package/dist/tsconfig.tsbuildinfo +1 -0
  38. package/dist/types/index.d.ts +11 -7
  39. package/dist/types/index.d.ts.map +1 -0
  40. package/dist/types/index.js +1 -1
  41. package/dist/types/index.js.map +1 -0
  42. package/dist/utils/get-smallest-unit.d.ts +17 -0
  43. package/dist/utils/get-smallest-unit.d.ts.map +1 -0
  44. package/dist/utils/get-smallest-unit.js +68 -0
  45. package/dist/utils/get-smallest-unit.js.map +1 -0
  46. package/package.json +15 -16
@@ -1,16 +1,14 @@
1
1
  import Stripe from "stripe";
2
- import { MedusaContainer, PaymentProviderError, PaymentProviderSessionResponse, PaymentSessionStatus, ProviderWebhookPayload, UpdatePaymentProviderSession, WebhookActionResult } from "@medusajs/types";
3
- import { AbstractPaymentProvider } from "@medusajs/utils";
4
- import { CreatePaymentProviderSession } from "@medusajs/types";
5
- import { PaymentIntentOptions, StripeCredentials, StripeOptions } from "../types";
6
- declare abstract class StripeBase extends AbstractPaymentProvider<StripeCredentials> {
2
+ import { CreatePaymentProviderSession, MedusaContainer, PaymentProviderError, PaymentProviderSessionResponse, ProviderWebhookPayload, UpdatePaymentProviderSession, WebhookActionResult } from "@medusajs/framework/types";
3
+ import { AbstractPaymentProvider, PaymentSessionStatus } from "@medusajs/framework/utils";
4
+ import { PaymentIntentOptions, StripeOptions } from "../types";
5
+ declare abstract class StripeBase extends AbstractPaymentProvider<StripeOptions> {
7
6
  protected readonly options_: StripeOptions;
8
7
  protected stripe_: Stripe;
9
8
  protected container_: MedusaContainer;
9
+ static validateOptions(options: StripeOptions): void;
10
10
  protected constructor(container: MedusaContainer, options: StripeOptions);
11
- protected init(): Stripe;
12
11
  abstract get paymentIntentOptions(): PaymentIntentOptions;
13
- private validateOptions;
14
12
  get options(): StripeOptions;
15
13
  getPaymentIntentOptions(): PaymentIntentOptions;
16
14
  getPaymentStatus(paymentSessionData: Record<string, unknown>): Promise<PaymentSessionStatus>;
@@ -37,3 +35,4 @@ declare abstract class StripeBase extends AbstractPaymentProvider<StripeCredenti
37
35
  protected buildError(message: string, error: Stripe.StripeRawError | PaymentProviderError | Error): PaymentProviderError;
38
36
  }
39
37
  export default StripeBase;
38
+ //# sourceMappingURL=stripe-base.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stripe-base.d.ts","sourceRoot":"","sources":["../../src/core/stripe-base.ts"],"names":[],"mappings":"AAEA,OAAO,MAAM,MAAM,QAAQ,CAAA;AAE3B,OAAO,EACL,4BAA4B,EAC5B,eAAe,EACf,oBAAoB,EACpB,8BAA8B,EAC9B,sBAAsB,EACtB,4BAA4B,EAC5B,mBAAmB,EACpB,MAAM,2BAA2B,CAAA;AAClC,OAAO,EACL,uBAAuB,EAMvB,oBAAoB,EACrB,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAGL,oBAAoB,EACpB,aAAa,EACd,MAAM,UAAU,CAAA;AAMjB,uBAAe,UAAW,SAAQ,uBAAuB,CAAC,aAAa,CAAC;IACtE,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAE,aAAa,CAAA;IAC1C,SAAS,CAAC,OAAO,EAAE,MAAM,CAAA;IACzB,SAAS,CAAC,UAAU,EAAE,eAAe,CAAA;IAErC,MAAM,CAAC,eAAe,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI;IAMpD,SAAS,aAAa,SAAS,EAAE,eAAe,EAAE,OAAO,EAAE,aAAa;IAUxE,QAAQ,KAAK,oBAAoB,IAAI,oBAAoB,CAAA;IAEzD,IAAI,OAAO,IAAI,aAAa,CAE3B;IAED,uBAAuB,IAAI,oBAAoB;IAmBzC,gBAAgB,CACpB,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC1C,OAAO,CAAC,oBAAoB,CAAC;IAsB1B,eAAe,CACnB,KAAK,EAAE,4BAA4B,GAClC,OAAO,CAAC,oBAAoB,GAAG,8BAA8B,CAAC;IAgE3D,gBAAgB,CACpB,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC3C,OAAO,EAAE,MAAM,CAAC,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