killbill-orbital 0.1.0 → 0.1.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 288bc7de8943e3f9a5c0541c49b2f2390419edd6
4
- data.tar.gz: ac32f0b61b8d627d181e18680a5c64a14dbb53d7
3
+ metadata.gz: a9d2b43b5b0f77588cd43c1c2dbe7b1fbd179e06
4
+ data.tar.gz: 89c9027236eda7d63b0e08204b71b0da28fe704b
5
5
  SHA512:
6
- metadata.gz: 735dc4e01403936fcb52d6739b3bd8796ed2437c319b27b21cd9cbb58a36e9112229964b659e36134f79d2bd1adf874180e7f23e51b148bb52838c43f2eed44e
7
- data.tar.gz: 6ad4542fdbb2fd67c8deed7e47c496e9d39a37272bf9111ee704f2b281a05f89783c5f25be93c4d306a6f4940297ecc901257cf31e2465c0f3a8cd4795dfc019
6
+ metadata.gz: b6fcd695a3cc200e28065e546ac34ce7dc16751fa9a57f36d86d9aeb5dd9a2d527e094bb9e0f1cf97b5fb797a6472b9fc904c369ad61b7d2ff9d7e1ae35523d4
7
+ data.tar.gz: f7d816f206329ee0e30ed68ee4e92e45e29281db1244accfcc7a6bacb11e803e964ea1075cb48f0534e57d458cf8ff60378037b024dca800052222e360d4cf7b
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- killbill-orbital (0.1.0)
4
+ killbill-orbital (0.1.1)
5
5
  actionpack (~> 4.1.0)
6
6
  actionview (~> 4.1.0)
7
7
  activemerchant (~> 1.55.0)
data/NEWS CHANGED
@@ -1,2 +1,13 @@
1
+ 0.1.1
2
+ Return processor response in PaymentTransactionInfoPlugin
3
+
4
+ 0.1.0
5
+ Initial release for 0.18.x
6
+
7
+ 0.0.2
8
+ Map reference ids and gateway error code in response
9
+ Specify User-Agent and X-Request-Id headers
10
+ Make CardSecValInd configurable
11
+
1
12
  0.0.1
2
- Initial release
13
+ Initial release for 0.16.x
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
@@ -91,6 +91,12 @@ module Killbill #:nodoc:
91
91
  def gateway_error_code
92
92
  params_resp_code
93
93
  end
94
+
95
+ def to_transaction_info_plugin(transaction=nil)
96
+ t_info_plugin = super(transaction)
97
+ t_info_plugin.properties << create_plugin_property('processorResponse', params_host_resp_code)
98
+ t_info_plugin
99
+ end
94
100
  end
95
101
  end
96
102
  end
data/pom.xml CHANGED
@@ -25,7 +25,7 @@
25
25
  <groupId>org.kill-bill.billing.plugin.ruby</groupId>
26
26
  <artifactId>orbital-plugin</artifactId>
27
27
  <packaging>pom</packaging>
28
- <version>0.1.0</version>
28
+ <version>0.1.1</version>
29
29
  <name>orbital-plugin</name>
30
30
  <url>http://github.com/killbill/killbill-orbital-plugin</url>
31
31
  <description>Plugin for accessing Orbital as a payment gateway</description>
@@ -19,6 +19,7 @@ shared_examples 'common_specs' do
19
19
  payment_response.status.should eq(:PROCESSED), payment_response.gateway_error
20
20
  payment_response.amount.should == @amount
21
21
  payment_response.transaction_type.should == :PURCHASE
22
+ find_value_from_properties(payment_response.properties, 'processorResponse').should == '100'
22
23
 
23
24
  responses = Killbill::Orbital::OrbitalResponse.all
24
25
  responses.size.should == 2
@@ -36,6 +37,7 @@ shared_examples 'common_specs' do
36
37
  payment_response.status.should eq(:PROCESSED), payment_response.gateway_error
37
38
  payment_response.amount.should == @amount
38
39
  payment_response.transaction_type.should == :PURCHASE
40
+ find_value_from_properties(payment_response.properties, 'processorResponse').should == '100'
39
41
 
40
42
  # Try a full refund
41
43
  refund_response = @plugin.refund_payment(@pm.kb_account_id, @kb_payment.id, @kb_payment.transactions[1].id, @pm.kb_payment_method_id, @amount, @currency, @properties, @call_context)
@@ -49,6 +51,7 @@ shared_examples 'common_specs' do
49
51
  payment_response.status.should eq(:PROCESSED), payment_response.gateway_error
50
52
  payment_response.amount.should == @amount
51
53
  payment_response.transaction_type.should == :AUTHORIZE
54
+ find_value_from_properties(payment_response.properties, 'processorResponse').should == '100'
52
55
 
53
56
  # Try multiple partial captures
54
57
  partial_capture_amount = BigDecimal.new('10')
@@ -77,6 +80,7 @@ shared_examples 'common_specs' do
77
80
  payment_response.status.should eq(:PROCESSED), payment_response.gateway_error
78
81
  payment_response.amount.should == @amount
79
82
  payment_response.transaction_type.should == :AUTHORIZE
83
+ find_value_from_properties(payment_response.properties, 'processorResponse').should == '100'
80
84
 
81
85
  payment_response = @plugin.void_payment(@pm.kb_account_id, @kb_payment.id, @kb_payment.transactions[1].id, @pm.kb_payment_method_id, @properties, @call_context)
82
86
  payment_response.status.should eq(:PROCESSED), payment_response.gateway_error
@@ -88,6 +92,7 @@ shared_examples 'common_specs' do
88
92
  payment_response.status.should eq(:PROCESSED), payment_response.gateway_error
89
93
  payment_response.amount.should == @amount
90
94
  payment_response.transaction_type.should == :AUTHORIZE
95
+ find_value_from_properties(payment_response.properties, 'processorResponse').should == '100'
91
96
 
92
97
  partial_capture_amount = BigDecimal.new('10')
93
98
  payment_response = @plugin.capture_payment(@pm.kb_account_id, @kb_payment.id, @kb_payment.transactions[1].id, @pm.kb_payment_method_id, partial_capture_amount, @currency, @properties, @call_context)
@@ -99,6 +104,15 @@ shared_examples 'common_specs' do
99
104
  payment_response.status.should eq(:PROCESSED), payment_response.gateway_error
100
105
  payment_response.transaction_type.should == :VOID
101
106
  end
107
+
108
+ it 'should include host response code' do
109
+ # Sending a specific amount of 530 will trigger the Do Not Honor error.
110
+ payment_response = @plugin.authorize_payment(@pm.kb_account_id, @kb_payment.id, @kb_payment.transactions[0].id, @pm.kb_payment_method_id, BigDecimal.new('530'), @currency, @properties, @call_context)
111
+ payment_response.status.should eq(:ERROR), payment_response.gateway_error
112
+ payment_response.transaction_type.should == :AUTHORIZE
113
+ payment_response.amount.should be_nil
114
+ find_value_from_properties(payment_response.properties, 'processorResponse').should == '530'
115
+ end
102
116
  end
103
117
 
104
118
  shared_examples 'cvv_indicator_specs' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: killbill-orbital
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kill Bill core team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-11-29 00:00:00.000000000 Z
11
+ date: 2017-01-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement