3 #This drops anything from the database that could cause live things to happen.
4 #You'd want to do this on a test copy of your live database but NEVER on the
7 #-all exports (all records in part_export, part_export_option export_svc)
8 #-all non-POST invoice destinations (cust_main_invoice)
9 #-all payment gateways and agent payment gw overrides (payment_gateway,
10 # payment_gateway_option, agent_payment_gateway)
11 #-everything in the job queue (queue and queue_arg)
12 #-business-onlinepayment and business-onlinepayment-ach config
14 #-masks all payment info
16 foreach my $table (qw(
19 payment_gateway_option
25 print "DELETE FROM $table;\n";
26 print "DELETE FROM h_$table;\n";
29 foreach my $table (qw(
33 print "DELETE FROM $table;\n";
36 print "DELETE FROM cust_main_invoice WHERE dest != 'POST';\n";
39 business-onlinepayment
40 business-onlinepayment-ach
42 print "DELETE FROM conf WHERE name = '$item';\n";
43 print "DELETE FROM h_conf WHERE name = '$item';\n";
46 my @ptables = map { ($_, "h_$_") } qw(
53 foreach my $table (@ptables) {
54 print "UPDATE $table SET payinfo = paymask WHERE payby IN ( 'CARD','DCRD','CHEK','DCHK' );\n";
57 print "UPDATE cust_main set paycvv = NULL;\n";
58 print "UPDATE h_cust_main set paycvv = NULL;\n";