@absolutejs/commerce-stripe 0.1.0-beta.0 → 0.1.1-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +6 -1
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -42,7 +42,8 @@ var createStripePayment = (config) => {
42
42
  lineItems,
43
43
  metadata: session.metadata ?? {},
44
44
  paymentStatus: session.payment_status ?? null,
45
- shippingAddress: toAddress(details)
45
+ shippingAddress: toAddress(details),
46
+ status: session.status ?? null
46
47
  };
47
48
  };
48
49
  const createCheckout = async (input) => {
@@ -113,6 +114,10 @@ var createStripePayment = (config) => {
113
114
  });
114
115
  return coupon.id;
115
116
  },
117
+ async retrieveCheckout(sessionId) {
118
+ const session = await stripe.checkout.sessions.retrieve(sessionId);
119
+ return normalizeSession(session);
120
+ },
116
121
  async refundBySession(sessionId) {
117
122
  const session = await stripe.checkout.sessions.retrieve(sessionId);
118
123
  const intent = typeof session.payment_intent === "string" ? session.payment_intent : session.payment_intent?.id ?? null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@absolutejs/commerce-stripe",
3
- "version": "0.1.0-beta.0",
3
+ "version": "0.1.1-beta.0",
4
4
  "description": "Stripe payment + checkout adapter for @absolutejs/commerce",
5
5
  "repository": {
6
6
  "type": "git",
@@ -33,7 +33,7 @@
33
33
  "typecheck": "tsc --noEmit"
34
34
  },
35
35
  "dependencies": {
36
- "@absolutejs/commerce": "0.1.0-beta.0",
36
+ "@absolutejs/commerce": "0.1.1-beta.0",
37
37
  "stripe": "^22.0.0"
38
38
  },
39
39
  "devDependencies": {