9 Apr Edited #1

Refunds and pending payments included in total revenue

Ultimate subscriber
Refunded payments are included in total revenue.
Sandbox payments are included after switching to live mode.
I want to remove these through sql, but there is a pid entry which is unsafe to update?

Revenue should only display completed payments, because people just spam open and close coinbase to generate more entries.
Shade 9 Apr Edited
#2
Good catch. Added to BankPipe development. Note that "pending" payments are deleted after 1 week by default (you can set BankPipe's task to run more often if you want).

You can safely remove payments in bankpipe_payments table, there are no dependent tables or fields. As payments are not marked as sandboxed, the easiest (and possibly only) way to do this is to delete them on a dateline basis. Pick the last payment "pid" you've done in the sandbox and run:

DELETE FROM {prefix}bankpipe_payments WHERE pid < {pid}
Replace {pid} with the aforementioned pid, and {prefix} with your table prefix.