From c6582e4c3c088ee95a3e5527a87f39fb8a8ab0a9 Mon Sep 17 00:00:00 2001 From: Kalista Payne Date: Tue, 12 May 2026 11:13:08 -0500 Subject: [PATCH] Squashed commit of the following: commit 39e29846dd409024ac40b2fb3bb3944ddf9813d2 Author: Kalista Payne Date: Wed May 6 22:45:25 2026 -0500 fix(lint): no-undef commit 75bbb5a88ae8bbc495203c47e15b3889f942c338 Author: Kalista Payne Date: Wed May 6 22:24:10 2026 -0500 fix(paypal): cancel sub when payment skipped --- website/server/libs/payments/paypal.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/website/server/libs/payments/paypal.js b/website/server/libs/payments/paypal.js index 370604b617..45790948f3 100644 --- a/website/server/libs/payments/paypal.js +++ b/website/server/libs/payments/paypal.js @@ -331,6 +331,7 @@ api.ipn = async function ipnApi (options = {}) { 'recurring_payment_profile_cancel', 'recurring_payment_failed', 'recurring_payment_expired', + 'recurring_payment_skipped', 'subscr_cancel', 'subscr_failed', ]; @@ -345,6 +346,9 @@ api.ipn = async function ipnApi (options = {}) { // resulting in the loss of subscription credits if (user.hasCancelled()) return; + if (txn_type === 'recurring_payment_skipped') { + await this.paypalBillingAgreementCancel(recurring_payment_id, { note: 'Missed payment' }); + } await payments.cancelSubscription({ user, paymentMethod: this.constants.PAYMENT_METHOD }); return; }