test(ipn): log IPN data for troubleshooting
This commit is contained in:
@@ -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.'));
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user