Skip to content

Commit

Permalink
Merge pull request #3 from Adyen/develop
Browse files Browse the repository at this point in the history
Fix checkout service URL, support sending hashes in requests
  • Loading branch information
Colin Rood authored Sep 5, 2018
2 parents b09f4fa + 0d39b3c commit b110b7e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion lib/adyen/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def service_url_base(service)
else
case service
when "Checkout"
"https://checkout-#{@env}.adyen.com/"
"https://checkout-#{@env}.adyen.com"
when "Account", "Fund", "Notification"
"https://cal-#{@env}.adyen.com/cal/services"
when "Recurring", "Payment"
Expand Down Expand Up @@ -87,6 +87,11 @@ def call_adyen_api(service, action, request_data, version)
end
end

# convert request hashes to json string
if request_data.is_a? Hash
request_data = request_data.to_json
end

# post request to Adyen
begin
response = conn.post do |req|
Expand Down
2 changes: 1 addition & 1 deletion lib/adyen/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Adyen
VERSION = "1.0.0".freeze
VERSION = "1.0.1".freeze
end

0 comments on commit b110b7e

Please sign in to comment.