From 74eefdd3979618c52f0c3d3707b66926286dfc39 Mon Sep 17 00:00:00 2001 From: Adam Alfredsson Date: Tue, 11 Jul 2023 13:58:36 +0200 Subject: [PATCH 1/3] Change swish payment method id --- src/enums/paymentMethods.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/enums/paymentMethods.js b/src/enums/paymentMethods.js index d7c10cc1..d82e39ef 100644 --- a/src/enums/paymentMethods.js +++ b/src/enums/paymentMethods.js @@ -7,5 +7,5 @@ module.exports = { avtalegiro: 7, vipps_recurring: 8, facebook: 9, - swish: 10, + swish: 11, }; From 5ca4dacfb8efdc2d62c6afc4ea30eb49be069955 Mon Sep 17 00:00:00 2001 From: Adam Alfredsson Date: Tue, 11 Jul 2023 13:58:55 +0200 Subject: [PATCH 2/3] Add swish payment method to seed --- prisma/fakedata/json/fakePayments.json | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/prisma/fakedata/json/fakePayments.json b/prisma/fakedata/json/fakePayments.json index 437137cd..2f7c53ef 100644 --- a/prisma/fakedata/json/fakePayments.json +++ b/prisma/fakedata/json/fakePayments.json @@ -79,5 +79,14 @@ "flat_fee": 0, "percentage_fee": 0, "lastUpdated": "2022-12-18T16:59:41.000Z" + }, + { + "ID": 11, + "payment_name": "Swish", + "abbriv": "Swish", + "short_desc": "", + "flat_fee": 0, + "percentage_fee": 0, + "lastUpdated": "2022-12-18T17:00:01.000Z" } ] From c7caa16a5f57e0ec61cc8d231340354308c84d78 Mon Sep 17 00:00:00 2001 From: Adam Alfredsson Date: Wed, 19 Jul 2023 09:15:20 +0200 Subject: [PATCH 3/3] Methods enum reuse payment method enum --- src/enums/methods.ts | 12 +++++++----- src/enums/{paymentMethods.js => paymentMethods.ts} | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) rename src/enums/{paymentMethods.js => paymentMethods.ts} (88%) diff --git a/src/enums/methods.ts b/src/enums/methods.ts index 3dae4268..2ff4178e 100644 --- a/src/enums/methods.ts +++ b/src/enums/methods.ts @@ -1,7 +1,9 @@ +import paymentMethods from "./paymentMethods"; + export default { - VIPPS: 6, - BANK: 2, - PAYPAL: 3, - AVTALEGIRO: 7, - SWISH: 10, + VIPPS: paymentMethods.vipps, + BANK: paymentMethods.bank, + PAYPAL: paymentMethods.paypal, + AVTALEGIRO: paymentMethods.avtalegiro, + SWISH: paymentMethods.swish, }; diff --git a/src/enums/paymentMethods.js b/src/enums/paymentMethods.ts similarity index 88% rename from src/enums/paymentMethods.js rename to src/enums/paymentMethods.ts index d82e39ef..3a5b40c6 100644 --- a/src/enums/paymentMethods.js +++ b/src/enums/paymentMethods.ts @@ -1,4 +1,4 @@ -module.exports = { +export default { bank: 2, bank_no_KID: 5, vipps_KID: 4,