tres_delta 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tres_delta/gateway.rb +1 -1
- data/lib/tres_delta/version.rb +1 -1
- data/spec/tres_delta/gateway_spec.rb +16 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3bd901254bdd6d1270a1a7e3dc50fc65cead3147
|
4
|
+
data.tar.gz: 1fade24b9790a4d2f66be124e576f36ef346535d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1933149c262649a6af3d1bf965ce9c6b5b86bf41847f2568ba5a1c1f3739c3f004861f30ab72105b77be6a018f02054992f43f0ac31e2c2917e53c4bed84a22e
|
7
|
+
data.tar.gz: 2dc7b7b9c868e59568e73f17ec711057c7e5ab648cd2dda102ff6fee7405e641c1bccf4851dfd57d81cf1b1b2b90b517f3576c10fa9aeb7ec7e4185afd6d6228
|
data/lib/tres_delta/gateway.rb
CHANGED
@@ -51,7 +51,7 @@ module TresDelta
|
|
51
51
|
'cc:CardAccountNumber' => credit_card.number,
|
52
52
|
'cc:ExpirationMonth' => credit_card.expiration_month,
|
53
53
|
'cc:ExpirationYear' => credit_card.expiration_year,
|
54
|
-
'NameOnCard'
|
54
|
+
'cc:NameOnCard' => credit_card.name,
|
55
55
|
'CardSecurityCode' => credit_card.security_code,
|
56
56
|
'CardSecurityCodeIndicator' => credit_card.has_security_code? ? 'Provided' : 'None'
|
57
57
|
}
|
data/lib/tres_delta/version.rb
CHANGED
@@ -6,6 +6,8 @@ describe TresDelta::Gateway do
|
|
6
6
|
let(:customer) { TresDelta::Customer.new(name: 'FOO BAR') }
|
7
7
|
let(:good_address) { "10124 Brentridge Ct" }
|
8
8
|
let(:security_code) { nil }
|
9
|
+
let(:address) { good_address }
|
10
|
+
let(:address_params) { { :address => address } }
|
9
11
|
|
10
12
|
# arbitrary: Cisco, TX
|
11
13
|
let(:zip_code_good) { '76437' }
|
@@ -35,6 +37,18 @@ describe TresDelta::Gateway do
|
|
35
37
|
end
|
36
38
|
end
|
37
39
|
|
40
|
+
describe "#credit_card_params" do
|
41
|
+
subject(:params) { gateway.credit_card_params(credit_card) }
|
42
|
+
|
43
|
+
it "should include the card number" do
|
44
|
+
expect(params['cc:CardAccountNumber']).to eq('4242424242424242')
|
45
|
+
end
|
46
|
+
|
47
|
+
it "should include the name on the card" do
|
48
|
+
expect(params['cc:NameOnCard']).to eq('Joe Customer')
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
38
52
|
describe "credit card zip code verification" do
|
39
53
|
|
40
54
|
# magic numbers, see ThreeDelta docs
|
@@ -46,7 +60,7 @@ describe TresDelta::Gateway do
|
|
46
60
|
|
47
61
|
let(:response) { gateway.card_verification(transaction_key, credit_card) }
|
48
62
|
|
49
|
-
context "checking card security code"
|
63
|
+
context "checking card security code" do
|
50
64
|
let(:zip_code) { zip_code_good }
|
51
65
|
subject { response.card_security_code_response }
|
52
66
|
|
@@ -58,7 +72,7 @@ describe TresDelta::Gateway do
|
|
58
72
|
let(:security_code) { "" }
|
59
73
|
|
60
74
|
it { should eq('None') }
|
61
|
-
it "should respond true"
|
75
|
+
it "should respond true" do
|
62
76
|
expect(response.success?).to be_true
|
63
77
|
end
|
64
78
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tres_delta
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- 1000Bulbs
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-04-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: savon
|