Correctly use string.format() when making cowry logs.
Close order when payment is pending, failed, refunded etc.
Merge pull request #591 from benkonrath/cowry-cleanups-fixes

Cowry cleanups fixes