activemerchant-bpoint 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/Readme.md CHANGED
@@ -58,7 +58,7 @@ creditcard = ActiveMerchant::Billing::CreditCard.new(
58
58
  )
59
59
 
60
60
 
61
- token = gateway.store(credit_card).params['token']
61
+ token = gateway.store(credit_card).params['billingid']
62
62
 
63
63
  response = gateway.purchase(amount, token, options)
64
64
 
@@ -71,7 +71,10 @@ module ActiveMerchant
71
71
  end
72
72
 
73
73
  def parse_element(response, node)
74
- return response[node.name.underscore.to_sym] = node.text unless node.has_elements?
74
+ unless node.has_elements?
75
+ return response[:billingid] = node.text if node.name == 'Token'
76
+ return response[node.name.underscore.to_sym] = node.text
77
+ end
75
78
 
76
79
  node.elements.each{|element| parse_element(response, element) }
77
80
  end
@@ -1,5 +1,5 @@
1
1
  module ActiveMerchant
2
2
  module Bpoint
3
- VERSION = "1.0.0"
3
+ VERSION = "1.0.1"
4
4
  end
5
5
  end
@@ -38,7 +38,7 @@ describe ActiveMerchant::Billing::BpointGateway do
38
38
  end
39
39
 
40
40
  context 'making a purchase with a stored credit card' do
41
- let!(:token) { VCR.use_cassette('store valid CC') { gateway.store(success_credit_card).params['token'] } }
41
+ let!(:token) { VCR.use_cassette('store valid CC') { gateway.store(success_credit_card).params['billingid'] } }
42
42
 
43
43
  context 'with a valid token' do
44
44
  subject { VCR.use_cassette('valid token purchase') { gateway.purchase(1000, token, options) } }
@@ -65,7 +65,7 @@ describe ActiveMerchant::Billing::BpointGateway do
65
65
  it { should be_success }
66
66
 
67
67
  it 'should return a token' do
68
- subject.params['token'].should be_present
68
+ subject.params['billingid'].should be_present
69
69
  end
70
70
  end
71
71
 
@@ -77,7 +77,7 @@ describe ActiveMerchant::Billing::BpointGateway do
77
77
  end
78
78
 
79
79
  context 'removing a credit card from storage' do
80
- let!(:token) { VCR.use_cassette('store valid CC') { gateway.store(success_credit_card).params['token'] } }
80
+ let!(:token) { VCR.use_cassette('store valid CC') { gateway.store(success_credit_card).params['billingid'] } }
81
81
 
82
82
  context 'when given a valid token' do
83
83
  subject { VCR.use_cassette('unstore valid token') { gateway.unstore(token) } }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activemerchant-bpoint
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-12-14 00:00:00.000000000 Z
12
+ date: 2011-12-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
16
- requirement: &70283272734580 !ruby/object:Gem::Requirement
16
+ requirement: &70153605818460 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *70283272734580
24
+ version_requirements: *70153605818460
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: vcr
27
- requirement: &70283272734080 !ruby/object:Gem::Requirement
27
+ requirement: &70153605817980 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *70283272734080
35
+ version_requirements: *70153605817980
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: fakeweb
38
- requirement: &70283272733560 !ruby/object:Gem::Requirement
38
+ requirement: &70153605817500 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *70283272733560
46
+ version_requirements: *70153605817500
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: activemerchant
49
- requirement: &70283272732860 !ruby/object:Gem::Requirement
49
+ requirement: &70153605816700 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,7 +54,7 @@ dependencies:
54
54
  version: 1.20.0
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *70283272732860
57
+ version_requirements: *70153605816700
58
58
  description: An ActiveMerchant plugin that provides a full featured BPOINT gateway.
59
59
  Development sponsored by Sentia Australia.
60
60
  email: