Skip to content

Commit

Permalink
Priority: Adjust credential name
Browse files Browse the repository at this point in the history
Unit:
20 tests, 117 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

Remote:
30 tests, 87 assertions, 1 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
96.6667% passed
Failing: test_failed_purchase_missing_card_verification_number, also failing on master

Rubocop: 749 files inspected, no offenses detected

EVS-1315
  • Loading branch information
therufs committed Sep 20, 2022
1 parent 4b28690 commit c89124b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@
* BpPlus: Allow spaces in card number [ajawadmirza] #4585
* Shift4: Decline referral transactions and parse message for internal server errors [ajawadmirza] #4583
* Litle: Update homepage_url [gasb150] #4491
* Priority: Update credential handling [therufs] #4571

== Version 1.126.0 (April 15th, 2022)
* Moneris: Add 3DS MPI field support [esmitperez] #4373
Expand Down
4 changes: 2 additions & 2 deletions lib/active_merchant/billing/gateways/priority.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ class PriorityGateway < Gateway
self.display_name = 'Priority'

def initialize(options = {})
requires!(options, :merchant_id, :key, :secret)
requires!(options, :merchant_id, :api_key, :secret)
super
end

def basic_auth
Base64.strict_encode64("#{@options[:key]}:#{@options[:secret]}")
Base64.strict_encode64("#{@options[:api_key]}:#{@options[:secret]}")
end

def request_headers
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures.yml
Original file line number Diff line number Diff line change
Expand Up @@ -892,7 +892,7 @@ plugnpay:
password: PASSWORD

priority:
key: SANDBOX_KEY
api_key: SANDBOX_KEY
secret: SECRET
merchant_id: MERCHANT_ID

Expand Down
2 changes: 1 addition & 1 deletion test/unit/gateways/priority_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ class PriorityTest < Test::Unit::TestCase
include CommStub

def setup
@gateway = PriorityGateway.new(key: 'sandbox_key', secret: 'secret', merchant_id: 'merchant_id')
@gateway = PriorityGateway.new(api_key: 'sandbox_key', secret: 'secret', merchant_id: 'merchant_id')
@amount = 4
@credit_card = credit_card
@invalid_credit_card = credit_card('4111')
Expand Down

0 comments on commit c89124b

Please sign in to comment.