Pepguy commited on
Commit
717df7e
·
verified ·
1 Parent(s): 9d9dc43

Update app.js

Browse files
Files changed (1) hide show
  1. app.js +1 -1
app.js CHANGED
@@ -106,7 +106,7 @@ app.post('/webhook/paystack', (req, res) => {
106
  const isRefund = /refund/i.test(event);
107
  const isChargeSuccess = /charge\.success/i.test(event);
108
  const isInvoiceOrSubscription = /invoice\.(payment_succeeded|paid)|subscription\./i.test(event);
109
- const isPayment = isChargeSuccess || isInvoiceOrSubscription;
110
 
111
  if (isRefund || isPayment) {
112
  console.log('--- PAYSTACK WEBHOOK (INTERESTING EVENT) ---');
 
106
  const isRefund = /refund/i.test(event);
107
  const isChargeSuccess = /charge\.success/i.test(event);
108
  const isInvoiceOrSubscription = /invoice\.(payment_succeeded|paid)|subscription\./i.test(event);
109
+ const isPayment = isChargeSuccess; // || isInvoiceOrSubscription;
110
 
111
  if (isRefund || isPayment) {
112
  console.log('--- PAYSTACK WEBHOOK (INTERESTING EVENT) ---');