@beabee/beabee-common 1.10.22 → 1.10.23
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.
|
@@ -4,12 +4,12 @@ exports.calcPaymentFee = void 0;
|
|
|
4
4
|
const data_1 = require("../data");
|
|
5
5
|
const stripeFees = {
|
|
6
6
|
gb: {
|
|
7
|
-
[data_1.PaymentMethod.StripeCard]: (amount) => 0.2 + 0.
|
|
7
|
+
[data_1.PaymentMethod.StripeCard]: (amount) => 0.2 + 0.015 * amount,
|
|
8
8
|
[data_1.PaymentMethod.StripeSEPA]: () => 0.3,
|
|
9
|
-
[data_1.PaymentMethod.StripeBACS]: (amount) => 0.2
|
|
9
|
+
[data_1.PaymentMethod.StripeBACS]: (amount) => Math.min(2, Math.max(0.2, 0.01 * amount)),
|
|
10
10
|
},
|
|
11
11
|
eu: {
|
|
12
|
-
[data_1.PaymentMethod.StripeCard]: (amount) => 0.25 + 0.
|
|
12
|
+
[data_1.PaymentMethod.StripeCard]: (amount) => 0.25 + 0.015 * amount,
|
|
13
13
|
[data_1.PaymentMethod.StripeSEPA]: () => 0.35,
|
|
14
14
|
[data_1.PaymentMethod.StripeBACS]: () => 0, // Not available
|
|
15
15
|
},
|
|
@@ -19,7 +19,7 @@ const stripeFees = {
|
|
|
19
19
|
[data_1.PaymentMethod.StripeBACS]: () => 0, // Not available
|
|
20
20
|
},
|
|
21
21
|
};
|
|
22
|
-
const gcFee = (amount) => 0.2 + amount
|
|
22
|
+
const gcFee = (amount) => 0.2 + amount * 0.01;
|
|
23
23
|
function calcPaymentFee(feeable, country) {
|
|
24
24
|
const feeFn = feeable.paymentMethod === data_1.PaymentMethod.GoCardlessDirectDebit
|
|
25
25
|
? gcFee
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ContributionPeriod, PaymentMethod } from "../data";
|
|
2
2
|
const stripeFees = {
|
|
3
3
|
gb: {
|
|
4
|
-
[PaymentMethod.StripeCard]: (amount) => 0.2 + 0.
|
|
4
|
+
[PaymentMethod.StripeCard]: (amount) => 0.2 + 0.015 * amount,
|
|
5
5
|
[PaymentMethod.StripeSEPA]: () => 0.3,
|
|
6
|
-
[PaymentMethod.StripeBACS]: (amount) => 0.2
|
|
6
|
+
[PaymentMethod.StripeBACS]: (amount) => Math.min(2, Math.max(0.2, 0.01 * amount)),
|
|
7
7
|
},
|
|
8
8
|
eu: {
|
|
9
|
-
[PaymentMethod.StripeCard]: (amount) => 0.25 + 0.
|
|
9
|
+
[PaymentMethod.StripeCard]: (amount) => 0.25 + 0.015 * amount,
|
|
10
10
|
[PaymentMethod.StripeSEPA]: () => 0.35,
|
|
11
11
|
[PaymentMethod.StripeBACS]: () => 0, // Not available
|
|
12
12
|
},
|
|
@@ -16,7 +16,7 @@ const stripeFees = {
|
|
|
16
16
|
[PaymentMethod.StripeBACS]: () => 0, // Not available
|
|
17
17
|
},
|
|
18
18
|
};
|
|
19
|
-
const gcFee = (amount) => 0.2 + amount
|
|
19
|
+
const gcFee = (amount) => 0.2 + amount * 0.01;
|
|
20
20
|
export function calcPaymentFee(feeable, country) {
|
|
21
21
|
const feeFn = feeable.paymentMethod === PaymentMethod.GoCardlessDirectDebit
|
|
22
22
|
? gcFee
|