apigy / selfstarter

Roll your own crowdfunding

Home Page:selfstarter.us

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Erase old backers record

yulau opened this issue · comments

Hi, I found a very serious issue, please help.

When I am using selfstarter, I was testing the checkout function,
so I clicked the checkout buttons many times, it leads me to Amazon site,
But I never really process the payment in Amazon.

But then, on the selfstarter homepage, the number of backers and money is still counting it.
so now I got many "test" backers and thousands of money funded...
Can you please help on how to fix it?

And Is there any way that I can Erase all those backers" record?
Like can I make it back to 0 backers and $0 funded?

Thanks a lot.

Oh man, I hope this gets fixed really soon. Thank you for creating the issue. I wonder if this bug is live and how many actual backers are there on Lockitron.com

The number of backers should be based on a count of valid Amazon tokens that have been returned to Selfstarter. When you are in the sandbox mode, you can create a bunch of fake orders quickly that provide fake multi-auth tokens. Is this what occurred? Or did you cancel/leave Amazon midway through?

People who start an order but don't finish should not be counted - even in sandbox mode.

If a person cancels their order, you should have a valid IPN endpoint which then deletes the order on Selfstarter.

For third party verification, these tokens can be provided to someone else who can call them against the Amazon service to see if they are real.

I just pushed a fix.

With Lockitron.com, we had to modify certain parts of Selfstarter because the code for Selfstarter was too tightly coupled with the rest of our codebase -- we kind of rushed this out without testing it enough first.

The problem was that it did Order.count which literally counts all the rows in the orders table -- now, it does Order.where("token != ? OR token != ?", "", nil).count --- token is where we store Amazon's multi-use token. When the checkout process is successful, Amazon passes us back this multi-use token, and, when the product is ready to ship, we use it to actually charge the credit card. Now, this will count the orders based on the orders with multi-use tokens.

Thank you very much for your help and explanation!
I'll try to work it out.