@payloadcms/plugin-ecommerce 3.79.0-canary.4 → 3.79.0-internal.bae07a9

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.
@@ -1 +1 @@
1
- {"version":3,"file":"confirmOrder.d.ts","sourceRoot":"","sources":["../../../../src/payments/adapters/stripe/confirmOrder.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAA;AAE3B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAC7D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAEnD,KAAK,KAAK,GAAG;IACX,UAAU,CAAC,EAAE,MAAM,CAAC,YAAY,CAAC,YAAY,CAAC,CAAA;IAC9C,OAAO,CAAC,EAAE,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,CAAA;IACxC,SAAS,EAAE,iBAAiB,CAAC,WAAW,CAAC,CAAA;CAC1C,CAAA;AAED,eAAO,MAAM,YAAY,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,WAAW,CAAC,cAAc,CAAC,CAAC,cAAc,CA+HpF,CAAA"}
1
+ {"version":3,"file":"confirmOrder.d.ts","sourceRoot":"","sources":["../../../../src/payments/adapters/stripe/confirmOrder.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAA;AAE3B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAC7D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAEnD,KAAK,KAAK,GAAG;IACX,UAAU,CAAC,EAAE,MAAM,CAAC,YAAY,CAAC,YAAY,CAAC,CAAA;IAC9C,OAAO,CAAC,EAAE,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,CAAA;IACxC,SAAS,EAAE,iBAAiB,CAAC,WAAW,CAAC,CAAA;CAC1C,CAAA;AAED,eAAO,MAAM,YAAY,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,WAAW,CAAC,cAAc,CAAC,CAAC,cAAc,CAmIpF,CAAA"}
@@ -32,6 +32,7 @@ export const confirmOrder = (props)=>async ({ cartsSlug = 'carts', data, ordersS
32
32
  // Find our existing transaction by the payment intent ID
33
33
  const transactionsResults = await payload.find({
34
34
  collection: transactionsSlug,
35
+ req,
35
36
  where: {
36
37
  'stripe.paymentIntentID': {
37
38
  equals: paymentIntentID
@@ -69,7 +70,8 @@ export const confirmOrder = (props)=>async ({ cartsSlug = 'carts', data, ordersS
69
70
  transactions: [
70
71
  transaction.id
71
72
  ]
72
- }
73
+ },
74
+ req
73
75
  });
74
76
  const timestamp = new Date().toISOString();
75
77
  await payload.update({
@@ -77,7 +79,8 @@ export const confirmOrder = (props)=>async ({ cartsSlug = 'carts', data, ordersS
77
79
  collection: cartsSlug,
78
80
  data: {
79
81
  purchasedAt: timestamp
80
- }
82
+ },
83
+ req
81
84
  });
82
85
  await payload.update({
83
86
  id: transaction.id,
@@ -85,7 +88,8 @@ export const confirmOrder = (props)=>async ({ cartsSlug = 'carts', data, ordersS
85
88
  data: {
86
89
  order: order.id,
87
90
  status: 'succeeded'
88
- }
91
+ },
92
+ req
89
93
  });
90
94
  return {
91
95
  message: 'Payment initiated successfully',
@@ -96,7 +100,10 @@ export const confirmOrder = (props)=>async ({ cartsSlug = 'carts', data, ordersS
96
100
  } : {}
97
101
  };
98
102
  } catch (error) {
99
- payload.logger.error(error, 'Error initiating payment with Stripe');
103
+ payload.logger.error({
104
+ err: error,
105
+ msg: 'Error confirming order with Stripe'
106
+ });
100
107
  throw new Error(error instanceof Error ? error.message : 'Unknown error initiating payment');
101
108
  }
102
109
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/payments/adapters/stripe/confirmOrder.ts"],"sourcesContent":["import Stripe from 'stripe'\n\nimport type { PaymentAdapter } from '../../../types/index.js'\nimport type { StripeAdapterArgs } from './index.js'\n\ntype Props = {\n apiVersion?: Stripe.StripeConfig['apiVersion']\n appInfo?: Stripe.StripeConfig['appInfo']\n secretKey: StripeAdapterArgs['secretKey']\n}\n\nexport const confirmOrder: (props: Props) => NonNullable<PaymentAdapter>['confirmOrder'] =\n (props) =>\n async ({\n cartsSlug = 'carts',\n data,\n ordersSlug = 'orders',\n req,\n transactionsSlug = 'transactions',\n }) => {\n const payload = req.payload\n const { apiVersion, appInfo, secretKey } = props || {}\n\n const customerEmail = data.customerEmail\n\n const paymentIntentID = data.paymentIntentID as string\n\n if (!secretKey) {\n throw new Error('Stripe secret key is required')\n }\n\n if (!paymentIntentID) {\n throw new Error('PaymentIntent ID is required')\n }\n\n const stripe = new Stripe(secretKey, {\n // API version can only be the latest, stripe recommends ts ignoring it\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore - ignoring since possible versions are not type safe, only the latest version is recognised\n apiVersion: apiVersion || '2025-03-31.basil',\n appInfo: appInfo || {\n name: 'Stripe Payload Plugin',\n url: 'https://payloadcms.com',\n },\n })\n\n try {\n let customer = (\n await stripe.customers.list({\n email: customerEmail,\n })\n ).data[0]\n\n if (!customer?.id) {\n customer = await stripe.customers.create({\n email: customerEmail,\n })\n }\n\n // Find our existing transaction by the payment intent ID\n const transactionsResults = await payload.find({\n collection: transactionsSlug,\n where: {\n 'stripe.paymentIntentID': {\n equals: paymentIntentID,\n },\n },\n })\n\n const transaction = transactionsResults.docs[0]\n\n if (!transactionsResults.totalDocs || !transaction) {\n throw new Error('No transaction found for the provided PaymentIntent ID')\n }\n\n // Verify the payment intent exists and retrieve it\n const paymentIntent = await stripe.paymentIntents.retrieve(paymentIntentID)\n\n const cartID = paymentIntent.metadata.cartID\n const cartItemsSnapshot = paymentIntent.metadata.cartItemsSnapshot\n ? JSON.parse(paymentIntent.metadata.cartItemsSnapshot)\n : undefined\n\n const shippingAddress = paymentIntent.metadata.shippingAddress\n ? JSON.parse(paymentIntent.metadata.shippingAddress)\n : undefined\n\n if (!cartID) {\n throw new Error('Cart ID not found in the PaymentIntent metadata')\n }\n\n if (!cartItemsSnapshot || !Array.isArray(cartItemsSnapshot)) {\n throw new Error('Cart items snapshot not found or invalid in the PaymentIntent metadata')\n }\n\n const order = await payload.create({\n collection: ordersSlug,\n data: {\n amount: paymentIntent.amount,\n currency: paymentIntent.currency.toUpperCase(),\n ...(req.user ? { customer: req.user.id } : { customerEmail }),\n items: cartItemsSnapshot,\n shippingAddress,\n status: 'processing',\n transactions: [transaction.id],\n },\n })\n\n const timestamp = new Date().toISOString()\n\n await payload.update({\n id: cartID,\n collection: cartsSlug,\n data: {\n purchasedAt: timestamp,\n },\n })\n\n await payload.update({\n id: transaction.id,\n collection: transactionsSlug,\n data: {\n order: order.id,\n status: 'succeeded',\n },\n })\n\n return {\n message: 'Payment initiated successfully',\n orderID: order.id,\n transactionID: transaction.id,\n ...(order.accessToken ? { accessToken: order.accessToken } : {}),\n }\n } catch (error) {\n payload.logger.error(error, 'Error initiating payment with Stripe')\n\n throw new Error(error instanceof Error ? error.message : 'Unknown error initiating payment')\n }\n }\n"],"names":["Stripe","confirmOrder","props","cartsSlug","data","ordersSlug","req","transactionsSlug","payload","apiVersion","appInfo","secretKey","customerEmail","paymentIntentID","Error","stripe","name","url","customer","customers","list","email","id","create","transactionsResults","find","collection","where","equals","transaction","docs","totalDocs","paymentIntent","paymentIntents","retrieve","cartID","metadata","cartItemsSnapshot","JSON","parse","undefined","shippingAddress","Array","isArray","order","amount","currency","toUpperCase","user","items","status","transactions","timestamp","Date","toISOString","update","purchasedAt","message","orderID","transactionID","accessToken","error","logger"],"mappings":"AAAA,OAAOA,YAAY,SAAQ;AAW3B,OAAO,MAAMC,eACX,CAACC,QACD,OAAO,EACLC,YAAY,OAAO,EACnBC,IAAI,EACJC,aAAa,QAAQ,EACrBC,GAAG,EACHC,mBAAmB,cAAc,EAClC;QACC,MAAMC,UAAUF,IAAIE,OAAO;QAC3B,MAAM,EAAEC,UAAU,EAAEC,OAAO,EAAEC,SAAS,EAAE,GAAGT,SAAS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Stripe from 'stripe'\n\nimport type { PaymentAdapter } from '../../../types/index.js'\nimport type { StripeAdapterArgs } from './index.js'\n\ntype Props = {\n apiVersion?: Stripe.StripeConfig['apiVersion']\n appInfo?: Stripe.StripeConfig['appInfo']\n secretKey: StripeAdapterArgs['secretKey']\n}\n\nexport const confirmOrder: (props: Props) => NonNullable<PaymentAdapter>['confirmOrder'] =\n (props) =>\n async ({\n cartsSlug = 'carts',\n data,\n ordersSlug = 'orders',\n req,\n transactionsSlug = 'transactions',\n }) => {\n const payload = req.payload\n const { apiVersion, appInfo, secretKey } = props || {}\n\n const customerEmail = data.customerEmail\n\n const paymentIntentID = data.paymentIntentID as string\n\n if (!secretKey) {\n throw new Error('Stripe secret key is required')\n }\n\n if (!paymentIntentID) {\n throw new Error('PaymentIntent ID is required')\n }\n\n const stripe = new Stripe(secretKey, {\n // API version can only be the latest, stripe recommends ts ignoring it\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore - ignoring since possible versions are not type safe, only the latest version is recognised\n apiVersion: apiVersion || '2025-03-31.basil',\n appInfo: appInfo || {\n name: 'Stripe Payload Plugin',\n url: 'https://payloadcms.com',\n },\n })\n\n try {\n let customer = (\n await stripe.customers.list({\n email: customerEmail,\n })\n ).data[0]\n\n if (!customer?.id) {\n customer = await stripe.customers.create({\n email: customerEmail,\n })\n }\n\n // Find our existing transaction by the payment intent ID\n const transactionsResults = await payload.find({\n collection: transactionsSlug,\n req,\n where: {\n 'stripe.paymentIntentID': {\n equals: paymentIntentID,\n },\n },\n })\n\n const transaction = transactionsResults.docs[0]\n\n if (!transactionsResults.totalDocs || !transaction) {\n throw new Error('No transaction found for the provided PaymentIntent ID')\n }\n\n // Verify the payment intent exists and retrieve it\n const paymentIntent = await stripe.paymentIntents.retrieve(paymentIntentID)\n\n const cartID = paymentIntent.metadata.cartID\n const cartItemsSnapshot = paymentIntent.metadata.cartItemsSnapshot\n ? JSON.parse(paymentIntent.metadata.cartItemsSnapshot)\n : undefined\n\n const shippingAddress = paymentIntent.metadata.shippingAddress\n ? JSON.parse(paymentIntent.metadata.shippingAddress)\n : undefined\n\n if (!cartID) {\n throw new Error('Cart ID not found in the PaymentIntent metadata')\n }\n\n if (!cartItemsSnapshot || !Array.isArray(cartItemsSnapshot)) {\n throw new Error('Cart items snapshot not found or invalid in the PaymentIntent metadata')\n }\n\n const order = await payload.create({\n collection: ordersSlug,\n data: {\n amount: paymentIntent.amount,\n currency: paymentIntent.currency.toUpperCase(),\n ...(req.user ? { customer: req.user.id } : { customerEmail }),\n items: cartItemsSnapshot,\n shippingAddress,\n status: 'processing',\n transactions: [transaction.id],\n },\n req,\n })\n\n const timestamp = new Date().toISOString()\n\n await payload.update({\n id: cartID,\n collection: cartsSlug,\n data: {\n purchasedAt: timestamp,\n },\n req,\n })\n\n await payload.update({\n id: transaction.id,\n collection: transactionsSlug,\n data: {\n order: order.id,\n status: 'succeeded',\n },\n req,\n })\n\n return {\n message: 'Payment initiated successfully',\n orderID: order.id,\n transactionID: transaction.id,\n ...(order.accessToken ? { accessToken: order.accessToken } : {}),\n }\n } catch (error) {\n payload.logger.error({ err: error, msg: 'Error confirming order with Stripe' })\n\n throw new Error(error instanceof Error ? error.message : 'Unknown error initiating payment')\n }\n }\n"],"names":["Stripe","confirmOrder","props","cartsSlug","data","ordersSlug","req","transactionsSlug","payload","apiVersion","appInfo","secretKey","customerEmail","paymentIntentID","Error","stripe","name","url","customer","customers","list","email","id","create","transactionsResults","find","collection","where","equals","transaction","docs","totalDocs","paymentIntent","paymentIntents","retrieve","cartID","metadata","cartItemsSnapshot","JSON","parse","undefined","shippingAddress","Array","isArray","order","amount","currency","toUpperCase","user","items","status","transactions","timestamp","Date","toISOString","update","purchasedAt","message","orderID","transactionID","accessToken","error","logger","err","msg"],"mappings":"AAAA,OAAOA,YAAY,SAAQ;AAW3B,OAAO,MAAMC,eACX,CAACC,QACD,OAAO,EACLC,YAAY,OAAO,EACnBC,IAAI,EACJC,aAAa,QAAQ,EAC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AAK,CAAC;gBAAEE,KAAKF;gBAAOG,KAAK;YAAqC;YAE7E,MAAM,IAAIlD,MAAM+C,iBAAiB/C,QAAQ+C,MAAMJ,OAAO,GAAG;QAC3D;IACF,EAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"initiatePayment.d.ts","sourceRoot":"","sources":["../../../../src/payments/adapters/stripe/initiatePayment.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAA;AAE3B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAC7D,OAAO,KAAK,EAA6B,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAE9E,KAAK,KAAK,GAAG;IACX,UAAU,CAAC,EAAE,MAAM,CAAC,YAAY,CAAC,YAAY,CAAC,CAAA;IAC9C,OAAO,CAAC,EAAE,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,CAAA;IACxC,SAAS,EAAE,iBAAiB,CAAC,WAAW,CAAC,CAAA;CAC1C,CAAA;AAED,eAAO,MAAM,eAAe,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,WAAW,CAAC,cAAc,CAAC,CAAC,iBAAiB,CA4H1F,CAAA"}
1
+ {"version":3,"file":"initiatePayment.d.ts","sourceRoot":"","sources":["../../../../src/payments/adapters/stripe/initiatePayment.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAA;AAE3B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAC7D,OAAO,KAAK,EAA6B,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAE9E,KAAK,KAAK,GAAG;IACX,UAAU,CAAC,EAAE,MAAM,CAAC,YAAY,CAAC,YAAY,CAAC,CAAA;IAC9C,OAAO,CAAC,EAAE,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,CAAA;IACxC,SAAS,EAAE,iBAAiB,CAAC,WAAW,CAAC,CAAA;CAC1C,CAAA;AAED,eAAO,MAAM,eAAe,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,WAAW,CAAC,cAAc,CAAC,CAAC,iBAAiB,CA6H1F,CAAA"}
@@ -91,7 +91,8 @@ export const initiatePayment = (props)=>async ({ data, req, transactionsSlug })=
91
91
  customerID: customer.id,
92
92
  paymentIntentID: paymentIntent.id
93
93
  }
94
- }
94
+ },
95
+ req
95
96
  });
96
97
  const returnData = {
97
98
  clientSecret: paymentIntent.client_secret || '',
@@ -100,7 +101,10 @@ export const initiatePayment = (props)=>async ({ data, req, transactionsSlug })=
100
101
  };
101
102
  return returnData;
102
103
  } catch (error) {
103
- payload.logger.error(error, 'Error initiating payment with Stripe');
104
+ payload.logger.error({
105
+ err: error,
106
+ msg: 'Error initiating payment with Stripe'
107
+ });
104
108
  throw new Error(error instanceof Error ? error.message : 'Unknown error initiating payment');
105
109
  }
106
110
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/payments/adapters/stripe/initiatePayment.ts"],"sourcesContent":["import Stripe from 'stripe'\n\nimport type { PaymentAdapter } from '../../../types/index.js'\nimport type { InitiatePaymentReturnType, StripeAdapterArgs } from './index.js'\n\ntype Props = {\n apiVersion?: Stripe.StripeConfig['apiVersion']\n appInfo?: Stripe.StripeConfig['appInfo']\n secretKey: StripeAdapterArgs['secretKey']\n}\n\nexport const initiatePayment: (props: Props) => NonNullable<PaymentAdapter>['initiatePayment'] =\n (props) =>\n async ({ data, req, transactionsSlug }) => {\n const payload = req.payload\n const { apiVersion, appInfo, secretKey } = props || {}\n\n const customerEmail = data.customerEmail\n const currency = data.currency\n const cart = data.cart\n const amount = cart.subtotal\n const billingAddressFromData = data.billingAddress\n const shippingAddressFromData = data.shippingAddress\n\n if (!secretKey) {\n throw new Error('Stripe secret key is required.')\n }\n\n if (!currency) {\n throw new Error('Currency is required.')\n }\n\n if (!cart || !cart.items || cart.items.length === 0) {\n throw new Error('Cart is empty or not provided.')\n }\n\n if (!customerEmail || typeof customerEmail !== 'string') {\n throw new Error('A valid customer email is required to make a purchase.')\n }\n\n if (!amount || typeof amount !== 'number' || amount <= 0) {\n throw new Error('A valid amount is required to initiate a payment.')\n }\n\n const stripe = new Stripe(secretKey, {\n // API version can only be the latest, stripe recommends ts ignoring it\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore - ignoring since possible versions are not type safe, only the latest version is recognised\n apiVersion: apiVersion || '2025-06-30.preview',\n appInfo: appInfo || {\n name: 'Stripe Payload Plugin',\n url: 'https://payloadcms.com',\n },\n })\n\n try {\n let customer = (\n await stripe.customers.list({\n email: customerEmail,\n })\n ).data[0]\n\n if (!customer?.id) {\n customer = await stripe.customers.create({\n email: customerEmail,\n })\n }\n\n const flattenedCart = cart.items.map((item) => {\n const productID = typeof item.product === 'object' ? item.product.id : item.product\n const variantID = item.variant\n ? typeof item.variant === 'object'\n ? item.variant.id\n : item.variant\n : undefined\n\n // Preserve any additional custom properties (e.g., deliveryOption, customizations)\n // that may have been added via cartItemMatcher\n const { product: _product, variant: _variant, ...customProperties } = item\n\n return {\n ...customProperties,\n product: productID,\n quantity: item.quantity,\n ...(variantID ? { variant: variantID } : {}),\n }\n })\n\n const shippingAddressAsString = JSON.stringify(shippingAddressFromData)\n\n const paymentIntent = await stripe.paymentIntents.create({\n amount,\n automatic_payment_methods: {\n enabled: true,\n },\n currency,\n customer: customer.id,\n metadata: {\n cartID: cart.id,\n cartItemsSnapshot: JSON.stringify(flattenedCart),\n shippingAddress: shippingAddressAsString,\n },\n })\n\n // Create a transaction for the payment intent in the database\n const transaction = await payload.create({\n collection: transactionsSlug,\n data: {\n ...(req.user ? { customer: req.user.id } : { customerEmail }),\n amount: paymentIntent.amount,\n billingAddress: billingAddressFromData,\n cart: cart.id,\n currency: paymentIntent.currency.toUpperCase(),\n items: flattenedCart,\n paymentMethod: 'stripe',\n status: 'pending',\n stripe: {\n customerID: customer.id,\n paymentIntentID: paymentIntent.id,\n },\n },\n })\n\n const returnData: InitiatePaymentReturnType = {\n clientSecret: paymentIntent.client_secret || '',\n message: 'Payment initiated successfully',\n paymentIntentID: paymentIntent.id,\n }\n\n return returnData\n } catch (error) {\n payload.logger.error(error, 'Error initiating payment with Stripe')\n\n throw new Error(error instanceof Error ? error.message : 'Unknown error initiating payment')\n }\n }\n"],"names":["Stripe","initiatePayment","props","data","req","transactionsSlug","payload","apiVersion","appInfo","secretKey","customerEmail","currency","cart","amount","subtotal","billingAddressFromData","billingAddress","shippingAddressFromData","shippingAddress","Error","items","length","stripe","name","url","customer","customers","list","email","id","create","flattenedCart","map","item","productID","product","variantID","variant","undefined","_product","_variant","customProperties","quantity","shippingAddressAsString","JSON","stringify","paymentIntent","paymentIntents","automatic_payment_methods","enabled","metadata","cartID","cartItemsSnapshot","transaction","collection","user","toUpperCase","paymentMethod","status","customerID","paymentIntentID","returnData","clientSecret","client_secret","message","error","logger"],"mappings":"AAAA,OAAOA,YAAY,SAAQ;AAW3B,OAAO,MAAMC,kBACX,CAACC,QACD,OAAO,EAAEC,IAAI,EAAEC,GAAG,EAAEC,gBAAgB,EAAE;QACpC,MAAMC,UAAUF,IAAIE,OAAO;QAC3B,MAAM,EAAEC,UAAU,EAAEC,OAAO,EAAEC,SAAS,EAAE,GAAGP,SAAS,CAAC;QAErD,MAAMQ,gBAAgBP,KAAKO,aAAa;QACxC,MAAMC,WAAWR,KAAKQ,QAAQ;QAC9B,MAAMC,OAAOT,KAAKS,IAAI;QACtB,MAAMC,SAASD,KAAKE,QAAQ;QAC5B,MAAMC,yBAAyBZ,KAAKa,cAAc;QAClD,MAAMC,0BAA0Bd,KAAKe,eAAe;QAEpD,IAAI,CAACT,WAAW;YACd,MAAM,IAAIU,MAAM;QAClB;QAEA,IAAI,CAACR,UAAU;YACb,MAAM,IAAIQ,MAAM;QAClB;QAEA,IAAI,CAACP,QAAQ,CAACA,KAAKQ,KAAK,IAAIR,KAAKQ,KAAK,CAACC,MAAM,KAAK,GAAG;YACnD,MAAM,IAAIF,MAAM;QAClB;QAEA,IAAI,CAACT,iBAAiB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B;gBACAmC,2BAA2B;oBACzBC,SAAS;gBACX;gBACAtC;gBACAc,UAAUA,SAASI,EAAE;gBACrBqB,UAAU;oBACRC,QAAQvC,KAAKiB,EAAE;oBACfuB,mBAAmBR,KAAKC,SAAS,CAACd;oBAClCb,iBAAiByB;gBACnB;YACF;YAEA,8DAA8D;YAC9D,MAAMU,cAAc,MAAM/C,QAAQwB,MAAM,CAAC;gBACvCwB,YAAYjD;gBACZF,MAAM;oBACJ,GAAIC,IAAImD,IAAI,GAAG;wBAAE9B,UAAUrB,IAAImD,IAAI,CAAC1B,EAAE;oBAAC,IAAI;wBAAEnB;oBAAc,CAAC;oBAC5DG,QAAQiC,cAAcjC,MAAM;oBAC5BG,gBAAgBD;oBAChBH,MAAMA,KAAKiB,EAAE;oBACblB,UAAUmC,cAAcnC,QAAQ,CAAC6C,WAAW;oBAC5CpC,OAAOW;oBACP0B,eAAe;oBACfC,QAAQ;oBACRpC,QAAQ;wBACNqC,YAAYlC,SAASI,EAAE;wBACvB+B,iBAAiBd,cAAcjB,EAAE;oBACnC;gBACF;YACF;YAEA,MAAMgC,aAAwC;gBAC5CC,cAAchB,cAAciB,aAAa,IAAI;gBAC7CC,SAAS;gBACTJ,iBAAiBd,cAAcjB,EAAE;YACnC;YAEA,OAAOgC;QACT,EAAE,OAAOI,OAAO;YACd3D,QAAQ4D,MAAM,CAACD,KAAK,CAACA,OAAO;YAE5B,MAAM,IAAI9C,MAAM8C,iBAAiB9C,QAAQ8C,MAAMD,OAAO,GAAG;QAC3D;IACF,EAAC"}
1
+ {"version":3,"sources":["../../../../src/payments/adapters/stripe/initiatePayment.ts"],"sourcesContent":["import Stripe from 'stripe'\n\nimport type { PaymentAdapter } from '../../../types/index.js'\nimport type { InitiatePaymentReturnType, StripeAdapterArgs } from './index.js'\n\ntype Props = {\n apiVersion?: Stripe.StripeConfig['apiVersion']\n appInfo?: Stripe.StripeConfig['appInfo']\n secretKey: StripeAdapterArgs['secretKey']\n}\n\nexport const initiatePayment: (props: Props) => NonNullable<PaymentAdapter>['initiatePayment'] =\n (props) =>\n async ({ data, req, transactionsSlug }) => {\n const payload = req.payload\n const { apiVersion, appInfo, secretKey } = props || {}\n\n const customerEmail = data.customerEmail\n const currency = data.currency\n const cart = data.cart\n const amount = cart.subtotal\n const billingAddressFromData = data.billingAddress\n const shippingAddressFromData = data.shippingAddress\n\n if (!secretKey) {\n throw new Error('Stripe secret key is required.')\n }\n\n if (!currency) {\n throw new Error('Currency is required.')\n }\n\n if (!cart || !cart.items || cart.items.length === 0) {\n throw new Error('Cart is empty or not provided.')\n }\n\n if (!customerEmail || typeof customerEmail !== 'string') {\n throw new Error('A valid customer email is required to make a purchase.')\n }\n\n if (!amount || typeof amount !== 'number' || amount <= 0) {\n throw new Error('A valid amount is required to initiate a payment.')\n }\n\n const stripe = new Stripe(secretKey, {\n // API version can only be the latest, stripe recommends ts ignoring it\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore - ignoring since possible versions are not type safe, only the latest version is recognised\n apiVersion: apiVersion || '2025-06-30.preview',\n appInfo: appInfo || {\n name: 'Stripe Payload Plugin',\n url: 'https://payloadcms.com',\n },\n })\n\n try {\n let customer = (\n await stripe.customers.list({\n email: customerEmail,\n })\n ).data[0]\n\n if (!customer?.id) {\n customer = await stripe.customers.create({\n email: customerEmail,\n })\n }\n\n const flattenedCart = cart.items.map((item) => {\n const productID = typeof item.product === 'object' ? item.product.id : item.product\n const variantID = item.variant\n ? typeof item.variant === 'object'\n ? item.variant.id\n : item.variant\n : undefined\n\n // Preserve any additional custom properties (e.g., deliveryOption, customizations)\n // that may have been added via cartItemMatcher\n const { product: _product, variant: _variant, ...customProperties } = item\n\n return {\n ...customProperties,\n product: productID,\n quantity: item.quantity,\n ...(variantID ? { variant: variantID } : {}),\n }\n })\n\n const shippingAddressAsString = JSON.stringify(shippingAddressFromData)\n\n const paymentIntent = await stripe.paymentIntents.create({\n amount,\n automatic_payment_methods: {\n enabled: true,\n },\n currency,\n customer: customer.id,\n metadata: {\n cartID: cart.id,\n cartItemsSnapshot: JSON.stringify(flattenedCart),\n shippingAddress: shippingAddressAsString,\n },\n })\n\n // Create a transaction for the payment intent in the database\n const transaction = await payload.create({\n collection: transactionsSlug,\n data: {\n ...(req.user ? { customer: req.user.id } : { customerEmail }),\n amount: paymentIntent.amount,\n billingAddress: billingAddressFromData,\n cart: cart.id,\n currency: paymentIntent.currency.toUpperCase(),\n items: flattenedCart,\n paymentMethod: 'stripe',\n status: 'pending',\n stripe: {\n customerID: customer.id,\n paymentIntentID: paymentIntent.id,\n },\n },\n req,\n })\n\n const returnData: InitiatePaymentReturnType = {\n clientSecret: paymentIntent.client_secret || '',\n message: 'Payment initiated successfully',\n paymentIntentID: paymentIntent.id,\n }\n\n return returnData\n } catch (error) {\n payload.logger.error({ err: error, msg: 'Error initiating payment with Stripe' })\n\n throw new Error(error instanceof Error ? error.message : 'Unknown error initiating payment')\n }\n }\n"],"names":["Stripe","initiatePayment","props","data","req","transactionsSlug","payload","apiVersion","appInfo","secretKey","customerEmail","currency","cart","amount","subtotal","billingAddressFromData","billingAddress","shippingAddressFromData","shippingAddress","Error","items","length","stripe","name","url","customer","customers","list","email","id","create","flattenedCart","map","item","productID","product","variantID","variant","undefined","_product","_variant","customProperties","quantity","shippingAddressAsString","JSON","stringify","paymentIntent","paymentIntents","automatic_payment_methods","enabled","metadata","cartID","cartItemsSnapshot","transaction","collection","user","toUpperCase","paymentMethod","status","customerID","paymentIntentID","returnData","clientSecret","client_secret","message","error","logger","err","msg"],"mappings":"AAAA,OAAOA,YAAY,SAAQ;AAW3B,OAAO,MAAMC,kBACX,CAACC,QACD,OAAO,EAAEC,IAAI,EAAEC,GAAG,EAAEC,gBAAgB,EAAE;QACpC,MAAMC,UAAUF,IAAIE,OAAO;QAC3B,MAAM,EAAEC,UAAU,EAAEC,OAAO,EAAEC,SAAS,EAAE,GAAGP,SAAS,CAAC;QAErD,MAAMQ,gBAAgBP,KAAKO,aAAa;QACx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AAOgC;QACT,EAAE,OAAOI,OAAO;YACd3D,QAAQ4D,MAAM,CAACD,KAAK,CAAC;gBAAEE,KAAKF;gBAAOG,KAAK;YAAuC;YAE/E,MAAM,IAAIjD,MAAM8C,iBAAiB9C,QAAQ8C,MAAMD,OAAO,GAAG;QAC3D;IACF,EAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@payloadcms/plugin-ecommerce",
3
- "version": "3.79.0-canary.4",
3
+ "version": "3.79.0-internal.bae07a9",
4
4
  "description": "Ecommerce plugin for Payload",
5
5
  "keywords": [
6
6
  "payload",
@@ -74,23 +74,23 @@
74
74
  ],
75
75
  "dependencies": {
76
76
  "qs-esm": "7.0.2",
77
- "@payloadcms/translations": "3.79.0-canary.4",
78
- "@payloadcms/ui": "3.79.0-canary.4"
77
+ "@payloadcms/translations": "3.79.0-internal.bae07a9",
78
+ "@payloadcms/ui": "3.79.0-internal.bae07a9"
79
79
  },
80
80
  "devDependencies": {
81
81
  "@types/json-schema": "7.0.15",
82
82
  "@types/react": "19.2.9",
83
83
  "@types/react-dom": "19.2.3",
84
84
  "stripe": "18.3.0",
85
+ "@payloadcms/next": "3.79.0-internal.bae07a9",
86
+ "@payloadcms/translations": "3.79.0-internal.bae07a9",
85
87
  "@payloadcms/eslint-config": "3.28.0",
86
- "@payloadcms/next": "3.79.0-canary.4",
87
- "@payloadcms/translations": "3.79.0-canary.4",
88
- "payload": "3.79.0-canary.4"
88
+ "payload": "3.79.0-internal.bae07a9"
89
89
  },
90
90
  "peerDependencies": {
91
91
  "react": "^19.0.1 || ^19.1.2 || ^19.2.1",
92
92
  "react-dom": "^19.0.1 || ^19.1.2 || ^19.2.1",
93
- "payload": "3.79.0-canary.4"
93
+ "payload": "3.79.0-internal.bae07a9"
94
94
  },
95
95
  "publishConfig": {
96
96
  "registry": "https://registry.npmjs.org/"