Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lib/adyen/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ def service_url_base(service)
case service
when "Checkout"
url = "https://checkout-#{@env}.adyen.com/checkout/services/PaymentSetupAndVerification"
when "CheckoutUtility"
url = "https://checkout-#{@env}.adyen.com"
when "Account", "Fund", "Notification"
url = "https://cal-#{@env}.adyen.com/cal/services"
when "Recurring", "Payment", "Payout"
Expand Down
5 changes: 5 additions & 0 deletions spec/checkout_utility_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
}
end

it "sets the correct service URL base" do
client = Adyen::Client.new(env: :test)
expect(client.service_url_base(@shared_values[:service])).to eq("https://checkout-test.adyen.com")
end

# must be created manually because every field in the response is an array
it "makes an origin_keys call" do
parsed_body = create_test(@shared_values[:client], @shared_values[:service], "origin_keys", @shared_values[:client].checkout_utility)
Expand Down