@deenruv/payments-plugin 1.0.4 → 1.0.5

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.
@@ -23,7 +23,7 @@ export declare function amountToCents(amount: Amount): number;
23
23
  /**
24
24
  * Recalculate tax amount per order line instead of per unit for Mollie.
25
25
  * Deenruv calculates tax per unit, but Mollie expects the tax to be calculated per order line (the total of the quantities).
26
- * See https://github.com/deenruv-ecommerce/deenruv/issues/1939#issuecomment-1362962133 for more information on the rounding issue.
26
+ * See https://github.com/aexol-studio/deenruv/issues/1939#issuecomment-1362962133 for more information on the rounding issue.
27
27
  */
28
28
  export declare function calculateLineTaxAmount(taxRate: number, orderLinePriceWithTax: number): number;
29
29
  /**
@@ -94,7 +94,7 @@ exports.amountToCents = amountToCents;
94
94
  /**
95
95
  * Recalculate tax amount per order line instead of per unit for Mollie.
96
96
  * Deenruv calculates tax per unit, but Mollie expects the tax to be calculated per order line (the total of the quantities).
97
- * See https://github.com/deenruv-ecommerce/deenruv/issues/1939#issuecomment-1362962133 for more information on the rounding issue.
97
+ * See https://github.com/aexol-studio/deenruv/issues/1939#issuecomment-1362962133 for more information on the rounding issue.
98
98
  */
99
99
  function calculateLineTaxAmount(taxRate, orderLinePriceWithTax) {
100
100
  const taxMultiplier = taxRate / 100;
@@ -8,7 +8,7 @@ import { Order } from "@deenruv/core";
8
8
  * > For example, to charge ¥500, provide an amount value of 500.
9
9
  *
10
10
  * Therefore, for a fractionless currency like JPY, we need to divide the amount by 100 (since Deenruv always
11
- * stores money amounts multiplied by 100). See https://github.com/deenruv-ecommerce/deenruv/issues/1630
11
+ * stores money amounts multiplied by 100). See https://github.com/aexol-studio/deenruv/issues/1630
12
12
  */
13
13
  export declare function getAmountInStripeMinorUnits(order: Order): number;
14
14
  /**
@@ -10,7 +10,7 @@ exports.getAmountFromStripeMinorUnits = exports.getAmountInStripeMinorUnits = vo
10
10
  * > For example, to charge ¥500, provide an amount value of 500.
11
11
  *
12
12
  * Therefore, for a fractionless currency like JPY, we need to divide the amount by 100 (since Deenruv always
13
- * stores money amounts multiplied by 100). See https://github.com/deenruv-ecommerce/deenruv/issues/1630
13
+ * stores money amounts multiplied by 100). See https://github.com/aexol-studio/deenruv/issues/1630
14
14
  */
15
15
  function getAmountInStripeMinorUnits(order) {
16
16
  return currencyHasFractionPart(order.currencyCode)
@@ -62,7 +62,7 @@ exports.stripePaymentMethodHandler = new core_1.PaymentMethodHandler({
62
62
  },
63
63
  async createRefund(ctx, input, amount, order, payment, args) {
64
64
  // TODO: Consider passing the "reason" property once this feature request is addressed:
65
- // https://github.com/deenruv-ecommerce/deenruv/issues/893
65
+ // https://github.com/aexol-studio/deenruv/issues/893
66
66
  try {
67
67
  const refund = await stripeService.createRefund(ctx, order, payment, amount);
68
68
  if (refund.status === "succeeded") {
@@ -1 +1 @@
1
- {"version":3,"file":"stripe.handler.js","sourceRoot":"","sources":["../../src/stripe/stripe.handler.ts"],"names":[],"mappings":";;;;;;AAAA,wCAOuB;AACvB,oDAA4B;AAE5B,iDAA+D;AAC/D,qDAAiD;AAEjD,MAAM,EAAE,WAAW,EAAE,GAAG,gBAAM,CAAC,MAAM,CAAC;AAEtC,IAAI,aAA4B,CAAC;AAEjC;;GAEG;AACU,QAAA,0BAA0B,GAAG,IAAI,2BAAoB,CAAC;IACjE,IAAI,EAAE,QAAQ;IAEd,WAAW,EAAE,CAAC,EAAE,YAAY,EAAE,mBAAY,CAAC,EAAE,EAAE,KAAK,EAAE,iBAAiB,EAAE,CAAC;IAE1E,IAAI,EAAE;QACJ,MAAM,EAAE;YACN,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,CAAC,EAAE,YAAY,EAAE,mBAAY,CAAC,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC;YAC5D,EAAE,EAAE,EAAE,SAAS,EAAE,qBAAqB,EAAE;SACzC;QACD,aAAa,EAAE;YACb,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE;gBACL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AkB;oBACzB,aAAa,EAAE,OAAO,CAAC,aAAa;iBACrC,CAAC;aACH;YAED,IAAI,MAAM,CAAC,MAAM,KAAK,SAAS,EAAE;gBAC/B,OAAO;oBACL,KAAK,EAAE,SAAkB;oBACzB,aAAa,EAAE,OAAO,CAAC,aAAa;iBACrC,CAAC;aACH;YAED,OAAO;gBACL,KAAK,EAAE,QAAiB;gBACxB,aAAa,EAAE,OAAO,CAAC,aAAa;gBACpC,QAAQ,EAAE;oBACR,OAAO,EAAE,MAAM,CAAC,cAAc;iBAC/B;aACF,CAAC;SACH;QAAC,OAAO,CAAM,EAAE;YACf,IAAI,CAAC,YAAY,WAAW,EAAE;gBAC5B,OAAO;oBACL,KAAK,EAAE,QAAiB;oBACxB,aAAa,EAAE,OAAO,CAAC,aAAa;oBACpC,QAAQ,EAAE;wBACR,IAAI,EAAE,CAAC,CAAC,IAAI;wBACZ,OAAO,EAAE,CAAC,CAAC,OAAO;qBACnB;iBACF,CAAC;aACH;YACD,MAAM,CAAC,CAAC;SACT;IACH,CAAC;CACF,CAAC,CAAC"}
@@ -131,7 +131,7 @@ import { StripePluginOptions } from "./types";
131
131
  *
132
132
  * :::info
133
133
  * A full working storefront example of the Stripe integration can be found in the
134
- * [Remix Starter repo](https://github.com/deenruv-ecommerce/storefront-remix-starter/tree/master/app/components/checkout/stripe)
134
+ * [Remix Starter repo](https://github.com/aexol-studio/storefront-remix-starter/tree/master/app/components/checkout/stripe)
135
135
  * :::
136
136
  *
137
137
  * ## Local development
@@ -147,7 +147,7 @@ const stripe_service_1 = require("./stripe.service");
147
147
  *
148
148
  * :::info
149
149
  * A full working storefront example of the Stripe integration can be found in the
150
- * [Remix Starter repo](https://github.com/deenruv-ecommerce/storefront-remix-starter/tree/master/app/components/checkout/stripe)
150
+ * [Remix Starter repo](https://github.com/aexol-studio/storefront-remix-starter/tree/master/app/components/checkout/stripe)
151
151
  * :::
152
152
  *
153
153
  * ## Local development
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deenruv/payments-plugin",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "license": "MIT",
5
5
  "main": "package/index.js",
6
6
  "types": "package/index.d.ts",
@@ -27,8 +27,8 @@
27
27
  "body-parser": "^1.20.2",
28
28
  "currency.js": "2.0.4",
29
29
  "express": "^4.21.0",
30
- "@deenruv/common": "^1.0.4",
31
- "@deenruv/testing": "^1.0.4"
30
+ "@deenruv/common": "^1.0.5",
31
+ "@deenruv/testing": "^1.0.5"
32
32
  },
33
33
  "peerDependenciesMeta": {
34
34
  "@deenruv/core": "^1.0.0",
@@ -57,7 +57,7 @@
57
57
  "rimraf": "^5.0.5",
58
58
  "stripe": "^13.3.0",
59
59
  "typescript": "5.1.6",
60
- "@deenruv/core": "^1.0.4"
60
+ "@deenruv/core": "^1.0.5"
61
61
  },
62
62
  "scripts": {
63
63
  "watch": "tsc -p ./tsconfig.build.json --watch",