test(ipn): log IPN data for troubleshooting

This commit is contained in:
Kalista Payne
2026-04-06 13:56:15 -05:00
parent 80e4b8617a
commit d80c43c82a
2 changed files with 2 additions and 2 deletions
@@ -181,6 +181,8 @@ api.ipn = {
async handler (req, res) {
res.sendStatus(200);
logger.info('PayPal IPN', req.body);
paypalPayments
.ipn(req.body)
.catch(err => logger.error(err, 'Error handling Paypal IPN message.'));
-2
View File
@@ -6,7 +6,6 @@ import _ from 'lodash';
import paypalIpn from 'pp-ipn';
import paypal from 'paypal-rest-sdk';
import cc from 'coupon-code';
import logger from '../logger';
import shared from '../../../common';
import payments from './payments'; // eslint-disable-line import/no-cycle
import { getGemsBlock, validateGiftMessage } from './gems'; // eslint-disable-line import/no-cycle
@@ -214,7 +213,6 @@ api.subscribeSuccess = async function subscribeSuccess (options = {}) {
user, groupId, block, headers, token,
} = options;
const result = await this.paypalBillingAgreementExecute(token, {});
logger.info('PayPal Subscription', { state: result.state, details: result.agreement_details });
await payments.createSubscription({
user,
groupId,