spree-contrib/spree_store_credit_payment_method — pull request #9 by gmacdougall (2014-08-12 21:22:19+00:00)
Title: Lock store credit before modifying.

This prevents a potential race condition where store credit can be
consumed by multiple checkouts happening simultaneously.

As with most race conditions, it's difficult to replicate in a test
environment, but this will now lock the store credit prior to
modification, so that modifications happen within a transaction with the
correct up to date values.