From 1024ac1a3679180eb9097e33d13776dc6f4b4a75 Mon Sep 17 00:00:00 2001 From: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com> Date: Tue, 4 Oct 2022 10:48:39 +0200 Subject: [PATCH] fix(medusa-payment-manual): Add missing update method (#2254) --- .changeset/shaggy-needles-raise.md | 5 +++++ .../src/services/manual-payment.js | 10 ++++++++++ 2 files changed, 15 insertions(+) create mode 100644 .changeset/shaggy-needles-raise.md diff --git a/.changeset/shaggy-needles-raise.md b/.changeset/shaggy-needles-raise.md new file mode 100644 index 0000000000000..85fb346a854aa --- /dev/null +++ b/.changeset/shaggy-needles-raise.md @@ -0,0 +1,5 @@ +--- +"medusa-payment-manual": patch +--- + +fix(medusa-payment-manual): Add missing update method diff --git a/packages/medusa-payment-manual/src/services/manual-payment.js b/packages/medusa-payment-manual/src/services/manual-payment.js index 775721a27816a..9afc5797e7a00 100644 --- a/packages/medusa-payment-manual/src/services/manual-payment.js +++ b/packages/medusa-payment-manual/src/services/manual-payment.js @@ -52,6 +52,16 @@ class ManualPaymentService extends PaymentService { return sessionData.data } + /** + . + * @param {object} sessionData - payment session data. + * @param {object} update - payment session update data. + * @returns {object} existing data merged with update data + */ + async updatePaymentData(sessionData, update) { + return { ...sessionData.data, ...update.data } + } + async deletePayment() { return }