unified_payment 1.0.1 → 1.1.0
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.
|
@@ -2,7 +2,6 @@ module UnifiedPayment
|
|
|
2
2
|
class Transaction < ActiveRecord::Base
|
|
3
3
|
include Utility
|
|
4
4
|
self.table_name = "unified_payment_transactions"
|
|
5
|
-
attr_accessible :amount, :gateway_session_id, :gateway_order_id, :url, :merchant_id, :approval_code, :xml_response, :pan, :response_description, :response_status, :order_description, :currency, :gateway_order_status
|
|
6
5
|
|
|
7
6
|
def self.create_order_at_unified(amount, options)
|
|
8
7
|
3.times do |attempt|
|
|
@@ -8,7 +8,7 @@ describe UnifiedPayment::Client do
|
|
|
8
8
|
end
|
|
9
9
|
|
|
10
10
|
context 'not able to reach gateway' do
|
|
11
|
-
it { expect { UnifiedPayment::Client.create_order(200)}.to raise_error(UnifiedPayment::Error
|
|
11
|
+
it { expect { UnifiedPayment::Client.create_order(200)}.to raise_error(UnifiedPayment::Error) }
|
|
12
12
|
end
|
|
13
13
|
|
|
14
14
|
context 'response status is not 00' do
|
|
@@ -80,7 +80,7 @@ describe UnifiedPayment::Client do
|
|
|
80
80
|
Builder::XmlMarkup.stub(:new).and_return(@xml_builder)
|
|
81
81
|
end
|
|
82
82
|
|
|
83
|
-
it { expect { UnifiedPayment::Client.get_order_status(1086880, '740A7AB7EB527908EB9507154CFAD389') }.to raise_error(UnifiedPayment::Error
|
|
83
|
+
it { expect { UnifiedPayment::Client.get_order_status(1086880, '740A7AB7EB527908EB9507154CFAD389') }.to raise_error(UnifiedPayment::Error) }
|
|
84
84
|
|
|
85
85
|
context 'response status is not 00' do
|
|
86
86
|
before do
|
|
@@ -118,7 +118,7 @@ describe UnifiedPayment::Client do
|
|
|
118
118
|
Builder::XmlMarkup.stub(:new).and_return(@xml_builder)
|
|
119
119
|
end
|
|
120
120
|
|
|
121
|
-
it { expect { UnifiedPayment::Client.reverse(1086880, '740A7AB7EB527908EB9507154CFAD389') }.to raise_error(UnifiedPayment::Error
|
|
121
|
+
it { expect { UnifiedPayment::Client.reverse(1086880, '740A7AB7EB527908EB9507154CFAD389') }.to raise_error(UnifiedPayment::Error) }
|
|
122
122
|
|
|
123
123
|
context 'response status is not 00' do
|
|
124
124
|
before do
|
|
@@ -4,9 +4,6 @@ require 'spec_helper'
|
|
|
4
4
|
|
|
5
5
|
describe UnifiedPayment::Transaction do
|
|
6
6
|
it { UnifiedPayment::Transaction.table_name.should eq('unified_payment_transactions') }
|
|
7
|
-
[:gateway_session_id, :gateway_order_id, :url, :merchant_id, :approval_code].each do |attribute|
|
|
8
|
-
it { should allow_mass_assignment_of attribute }
|
|
9
|
-
end
|
|
10
7
|
|
|
11
8
|
let(:unified_payment) { UnifiedPayment::Transaction.new }
|
|
12
9
|
context 'utility methods' do
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: unified_payment
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 19
|
|
5
5
|
prerelease:
|
|
6
6
|
segments:
|
|
7
7
|
- 1
|
|
8
|
-
- 0
|
|
9
8
|
- 1
|
|
10
|
-
|
|
9
|
+
- 0
|
|
10
|
+
version: 1.1.0
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- Manish Kangia
|
|
@@ -16,7 +16,7 @@ autorequire:
|
|
|
16
16
|
bindir: bin
|
|
17
17
|
cert_chain: []
|
|
18
18
|
|
|
19
|
-
date: 2014-03-
|
|
19
|
+
date: 2014-03-28 00:00:00 Z
|
|
20
20
|
dependencies:
|
|
21
21
|
- !ruby/object:Gem::Dependency
|
|
22
22
|
name: rails
|
|
@@ -26,11 +26,11 @@ dependencies:
|
|
|
26
26
|
requirements:
|
|
27
27
|
- - ">"
|
|
28
28
|
- !ruby/object:Gem::Version
|
|
29
|
-
hash:
|
|
29
|
+
hash: 27
|
|
30
30
|
segments:
|
|
31
|
-
-
|
|
31
|
+
- 4
|
|
32
32
|
- 0
|
|
33
|
-
version: "
|
|
33
|
+
version: "4.0"
|
|
34
34
|
type: :runtime
|
|
35
35
|
version_requirements: *id001
|
|
36
36
|
description: Interface to handle payments via UnifiedPayment for rails app.
|