Skip to content

Commit

Permalink
stripe-request: Add a description to the API Key
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonycastelli committed Apr 29, 2018
1 parent 8058569 commit 51edf58
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Sources/Stripe/API/StripeRequest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ public class StripeAPIRequest: StripeRequest {

headers.forEach { finalHeaders.add(name: $0.name, value: $0.value) }

// Get the appropiate API key based on the environment and if the test key is present
let apiKey = self.httpClient.container.environment == .development ? (self.testApiKey ?? self.apiKey) : self.apiKey
finalHeaders.add(name: .authorization, value: "Bearer \(apiKey)")

Expand Down

0 comments on commit 51edf58

Please sign in to comment.