diff --git a/config/constants.rb b/config/constants.rb index 0b81a6a..5a05f9f 100644 --- a/config/constants.rb +++ b/config/constants.rb @@ -6,6 +6,7 @@ # APIURI = ENV['BITPAYAPI'] +PEM = ENV['BITPAYPEM'] || "-----BEGIN EC PRIVATE KEY-----\nMHQCAQEEICg7E4NN53YkaWuAwpoqjfAofjzKI7Jq1f532dX+0O6QoAcGBSuBBAAK\noUQDQgAEjZcNa6Kdz6GQwXcUD9iJ+t1tJZCx7hpqBuJV2/IrQBfue8jh8H7Q/4vX\nfAArmNMaGotTpjdnymWlMfszzXJhlw==\n-----END EC PRIVATE KEY-----\n" # Specify a bitpay txid which has 6+ confirmations. Default belongs to 'bitpayrubyclient@gmail.com' test account REFUND_TRANSACTION = ENV['REFUND_TRANSACTION'] diff --git a/features/step_definitions/step_helpers.rb b/features/step_definitions/step_helpers.rb index 8aa88c3..999801f 100644 --- a/features/step_definitions/step_helpers.rb +++ b/features/step_definitions/step_helpers.rb @@ -15,7 +15,7 @@ module BitPay end def new_client_from_stored_values - pem = ENV['BITPAYPEM'].gsub("\\n", "\n") + pem = PEM.gsub("\\n", "\n") BitPay::SDK::Client.new(api_uri: APIURI, pem: pem, insecure: true) end