I have noticed that there are a number of records on our database which should not be there. These are records which have been generated when a member started a payment through the payment portal (PayFast) and then discontinued it. These records have a strange payment ID which is not anything like the payment ID that the PayFast use. They are not reflected on the front end of our site as having paid, but when I interrogate the database to find the numbers of members that have paid, I get wrong numbers for this reason. Is this a bug perhaps or is there a reason why these records are being generated?
Nothing is wrong. The system needs to store these records into database before redirect users to payment gateway for processing payment. These records has published = 0 instead of published = 1 like paid subscription records, ignore the records which has published = 0 in database
OK, so is there any reason why I shouldn't delete all those records with published = 0 other than we would lose the details of those that started to pay, but for whatever reason, the payment failed? I suppose I should not delete those who might also be in the process of paying - perhaps give them a day or two.
You can delete them if you want. But Yes, give them a day or two before deleting
Please also note that sometime (although it rarely happens), users paid for the subscription but payment gateway could not notify Membership Pro for some reasons, so the status is still Pending (although users paid). So be careful with deleting the records