lib/active_merchant/billing/gateways/paymill.rb in activemerchant-1.60.0 vs lib/active_merchant/billing/gateways/paymill.rb in activemerchant-1.61.0
- old
+ new
@@ -60,9 +60,19 @@
gsub(%r((Authorization: Basic )\w+), '\1[FILTERED]').
gsub(/(account.number=)(\d*)/, '\1[FILTERED]').
gsub(/(account.verification=)(\d*)/, '\1[FILTERED]')
end
+ def verify_credentials
+ begin
+ ssl_get(live_url + "transactions/nonexistent", headers)
+ rescue ResponseError => e
+ return false if e.response.code.to_i == 401
+ end
+
+ true
+ end
+
private
def add_credit_card(post, credit_card)
post['account.number'] = credit_card.number
post['account.expiry.month'] = sprintf("%.2i", credit_card.month)