Closed Bug 704971 Opened 13 years ago Closed 13 years ago

Purchase IPN concurrency fun

Categories

(addons.mozilla.org Graveyard :: Public Pages, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: andy+bugzilla, Assigned: andy+bugzilla)

References

Details

There's a fun issue with IPNs and purchases.

When a payment is created, we give it a status of pending.

Because we don't want to rely upon the IPN, we check payment status and if it's good, we mark the payment as purchased. When the payment gets marked as purchased we create the records in the database to show it as paid, creating purchase and install records.

However the IPN then comes along and only works if the above has happened and then alters the transaction id and uuid, only if it's not purchased.

A few things suck here:

- if the thank you page fails to show or people leave or the internet dies then payment has gone through but we don't have a record. We have to take the IPN as god and make sure that if all we get back is an IPN, we believe it.

- the order above is not guaranteed and may be different. If that's the case things get messy.

To do:

- cope with the thank you page never loading and make sure that if the IPN comes through the purchase is good.

- cope with IPNs, thank you pages arriving in different orders and still doing what we want.
Blocks: 690899
https://github.com/mozilla/zamboni/commit/e8412b
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.