diff --git a/processor/src/utils/map.utils.ts b/processor/src/utils/map.utils.ts index 197c3fc..f865ab2 100644 --- a/processor/src/utils/map.utils.ts +++ b/processor/src/utils/map.utils.ts @@ -95,7 +95,7 @@ export const createMollieCreatePaymentParams = (payment: Payment): PaymentCreate description: paymentRequest.description ?? '', amount: makeMollieAmount(amountPlanned), redirectUrl: paymentRequest.redirectUrl ?? null, - webhookUrl: paymentRequest.webhookUrl ?? defaultWebhookEndpoint, + webhookUrl: defaultWebhookEndpoint, billingAddress: paymentRequest.billingAddress ?? {}, shippingAddress: paymentRequest.shippingAddress ?? {}, locale: paymentRequest.locale ?? null, diff --git a/processor/tests/utils/map.utils.spec.ts b/processor/tests/utils/map.utils.spec.ts index e26d4c0..980aa98 100644 --- a/processor/tests/utils/map.utils.spec.ts +++ b/processor/tests/utils/map.utils.spec.ts @@ -139,6 +139,9 @@ describe('createMollieCreatePaymentParams', () => { }; const mollieCreatePaymentParams = createMollieCreatePaymentParams(CTPayment); + // Always use our default webhook endpoint + const defaultWebhookEndpoint = new URL(process.env.CONNECT_SERVICE_URL ?? '').origin + '/webhook'; + expect(mollieCreatePaymentParams).toEqual({ method: 'creditcard', amount: { @@ -147,7 +150,7 @@ describe('createMollieCreatePaymentParams', () => { }, locale: customFieldObject.locale, redirectUrl: customFieldObject.redirectUrl, - webhookUrl: customFieldObject.webhookUrl, + webhookUrl: defaultWebhookEndpoint, description: customFieldObject.description, applicationFee: {}, billingAddress: {},