swipestripe/silverstripe-swipestripe — pull request #45 by silverstripe-elliot (2014-05-26 13:03:43+00:00)
Title: Modifications for Bitcoin and other digital currency

I have been working on a seperate project using Swipestripe that accepts Bitcoins as a payment option. Swipestripe does not provide adequate support for digital currencies out of the box, so I have made a few modifications.

* I have adjusted the PriceField in the CMS to allow a greater precision than two digits, as this means the smallest unit of price we can allow at current market rates is approximately NZD $7. Behind the scenes, Swipestripe can handle four (so $0.07) but Bitcoin supports up to eight.
* I have updated all Decimal(19,4) database fields to Decimal(19,8).
* I created a BaseCurrencyPrecision field in ShopConfig with a default value of 2. PriceField uses the greater value if set, and validates more than 2 digits after the decimal place.