WordPress.org

Ready to get started?Download WordPress

Forums

Easy Digital Downloads
[resolved] Sales logging behavior (8 posts)

  1. Ahaenor
    Member
    Posted 1 year ago #

    Hello!

    I'm studiyng a downloads and sales logging and reporting code and come to a possible bug.

    It seems like downloads and earnings reports are based on a data from the sales log. But sales are logging only in time of completing the purchase.

    So if one payment is done, and then is turned on (payment status becomes "complete"), a sales log entry is created this moment. And then if this payment is turned off (status == "pending" again), log entry stays in place, as if payment is still actual.

    This can be much worse if a payment was turned on and off several times - there will be a several similar log entries.

    It seems to me that logs can't be good data source to create an actual picture of funds situation. I'm thinking of creating a custom BD table that ties payments, downloads and their statuses. It's data will be updated on each payments status change, so it will always be actual.

    Am i thinking in right direction?)

    http://wordpress.org/extend/plugins/easy-digital-downloads/

  2. Yes that is true, though when payments are marked as "failed" or are deleted, the "completion" process is reversed.

    The question I have for you is this: why would you ever manually change a sale from complete to pending?

  3. Ahaenor
    Member
    Posted 1 year ago #

    There's a lots of reasons, actually. From moderator's "human error" to payment systems complications and errors.

    Does payment reversing process add some new log entries? Or, maybe, it's deleting the old ones? Right now i've seen only logging of payment completion, but maybe i've missed something.

    And in addition to possibility of deleting/pending a payments, deletion of downloads is also possible.

    All this situation is pretty much asking for some "actual data storing place".

  4. I can imagine going from complete to revoked, or complete to deleted, but just do not see complete to pending, unless perhaps you are taking manual payments, such as cash or check.

    Payment reversing removes log data.

    Deleting a product deletes meta data for that product but not connected log entries.

  5. Ahaenor
    Member
    Posted 1 year ago #

    Yes, actually, many of our payments (and even payment systems) are manual of some sort or the other.

    Does revoked payment have "refund" status? And do failed payment have it's own status?

  6. Any payment can be set to "refunded".

    failed, refunded, pending, complete, and revoked are the valid payment statuses.

  7. Ahaenor
    Member
    Posted 1 year ago #

    Ok, thanks for your help.

    We've thinked about this and decided that re-pending function is best fit for our payment systems spesifics, so i'll try to extend EDD's behavior this way in my plugin.

  8. Okay!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.