lib/gopay.rb in gopay-ruby-0.1.1 vs lib/gopay.rb in gopay-ruby-0.2.0
- old
+ new
@@ -34,10 +34,14 @@
'payment-all'
end
end
def get_content_type(path)
- path == '/api/payments/payment' ? 'application/json' : 'application/x-www-form-urlencoded'
+ if (path == '/api/payments/payment') || (path =~ /create-recurrence/)
+ 'application/json'
+ else
+ 'application/x-www-form-urlencoded'
+ end
end
# payment-create - for new payment
# payment-all - for testing state etc
def token(scope = 'payment-create')
\ No newline at end of file