Port changes from https://github.com/UnityTech/active_merchant/compare/5b08e0c...96c9c35700