/* global process */ // Attach missing prepaidID properties to Payments // TODO: investigate payments that match multiple prepaids // TODO: investigate payments that don't match any prepaids // Payments and Stripe charges are tightly bound via payment.stripe.chargeID // Stripe charges and prepaids are loosely bound via maxRedeemers, type, and user // Steps: // 1. Find paid prepaids for courses and subscriptions // 2. Find paid prepaids disconnected from payments // 3. Find Stripe charge payments for disconnected prepaid users // 4. Set payment.prepaidID for charges matching prepaids if (process.argv.length !== 4) { log("Usage: node