diff --git a/processor/package-lock.json b/processor/package-lock.json index 8b77ff1..58d0cd2 100644 --- a/processor/package-lock.json +++ b/processor/package-lock.json @@ -1,12 +1,12 @@ { "name": "shopmacher-mollie-processor", - "version": "0.0.30", + "version": "0.0.31", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "shopmacher-mollie-processor", - "version": "0.0.30", + "version": "0.0.31", "hasInstallScript": true, "license": "MIT", "dependencies": { @@ -8924,4 +8924,4 @@ } } } -} +} \ No newline at end of file diff --git a/processor/package.json b/processor/package.json index 3d80ed8..fc31f00 100644 --- a/processor/package.json +++ b/processor/package.json @@ -1,7 +1,7 @@ { "name": "shopmacher-mollie-processor", "description": "Integration between commercetools and mollie payment service provider", - "version": "0.0.30", + "version": "0.0.31", "main": "index.js", "private": true, "scripts": { diff --git a/processor/src/utils/map.utils.ts b/processor/src/utils/map.utils.ts index 360deef..ad95dcb 100644 --- a/processor/src/utils/map.utils.ts +++ b/processor/src/utils/map.utils.ts @@ -69,7 +69,9 @@ export const mapCommercetoolsPaymentCustomFieldsToMollieListParams = async ( const getSpecificPaymentParams = (method: PaymentMethod | CustomPaymentMethod, paymentRequest: any) => { switch (method) { case PaymentMethod.applepay: - return { applePayPaymentToken: JSON.stringify(paymentRequest.applePayPaymentToken ?? {}) }; + return paymentRequest.applePayPaymentToken + ? { applePayPaymentToken: JSON.stringify(paymentRequest.applePayPaymentToken) } + : {}; case PaymentMethod.banktransfer: return { dueDate: calculateDueDate(readConfiguration().mollie.bankTransferDueDate),