ogone 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +17 -0
- data/.rspec +2 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +23 -0
- data/README.md +93 -0
- data/Rakefile +1 -0
- data/lib/ogone.rb +3 -0
- data/lib/ogone/ecommerce.rb +120 -0
- data/lib/ogone/status.rb +45 -0
- data/lib/ogone/version.rb +3 -0
- data/ogone.gemspec +28 -0
- data/spec/ogone/ecommerce_spec.rb +118 -0
- data/spec/spec_helper.rb +7 -0
- metadata +103 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: bec0a5e938c818872281ccd8fb3b33005b67234e
|
4
|
+
data.tar.gz: 7a28120c828924c4656abf5b562047720c5a76a3
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 6b26d16f4c5741fb7eb0a7037b57ebcbd958d52e65a125d8d81d3fbb1ef559bdb941673e6ff98dbf3d6670a3dd4d2c4538fa97e08e8200bd9f86d1f1f10ebfd1
|
7
|
+
data.tar.gz: a55ebdc4b42f54fb82ee78b44cf95775a74123b8e7cc56f639188cb67ea6aa963361d1bf1cc2b1860f1ef51f5762aeca015681acec13579d9e04143c691d4f54
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
Copyright (c) 2013 Applidget
|
2
|
+
Copyright (c) 2013 Sébastien Saunier
|
3
|
+
|
4
|
+
MIT License
|
5
|
+
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
7
|
+
a copy of this software and associated documentation files (the
|
8
|
+
"Software"), to deal in the Software without restriction, including
|
9
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
10
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
11
|
+
permit persons to whom the Software is furnished to do so, subject to
|
12
|
+
the following conditions:
|
13
|
+
|
14
|
+
The above copyright notice and this permission notice shall be
|
15
|
+
included in all copies or substantial portions of the Software.
|
16
|
+
|
17
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
18
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
19
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
20
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
21
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
22
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
23
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,93 @@
|
|
1
|
+
# Ogone
|
2
|
+
|
3
|
+
This gem helps you to quickly get a `form` that can be submitted and redirect
|
4
|
+
your users to the ogone ecommerce form where they can pay. This gem is flexible
|
5
|
+
as it does not rely on a hard-coded configuration to be used. Therefore you can
|
6
|
+
dynamically handle several PSPIDs.
|
7
|
+
|
8
|
+
## Usage
|
9
|
+
|
10
|
+
In your controller,
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require "ogone"
|
14
|
+
|
15
|
+
class PaymentController
|
16
|
+
def ogone_form
|
17
|
+
@ogone = Ogone::Ecommerce.new :pspid => "your_pspid",
|
18
|
+
:environment => "prod",
|
19
|
+
:sha_algo => "SHA1", # Configured in your back-office
|
20
|
+
:sha_in => "......", # Configured in your back-office
|
21
|
+
:sha_out => "....." # Configured in your back-office
|
22
|
+
|
23
|
+
# Add mandatory parameters. Alternatively can be passed directly in `@ogone.fields_for_payment`
|
24
|
+
@ogone.add_parameters(
|
25
|
+
:CURRENCY => "EUR",
|
26
|
+
:AMOUNT => 2000, # Beware, that would be 20 EUR
|
27
|
+
:ORDERID => "...",
|
28
|
+
:LANGUAGE => "en_US"
|
29
|
+
# And many more parameters, refer to the Ogone documentation
|
30
|
+
)
|
31
|
+
|
32
|
+
# Configure where the user should be redirected once the payment is completed
|
33
|
+
# This sets the following urls:
|
34
|
+
# - ACCEPTURL
|
35
|
+
# - DECLINEURL
|
36
|
+
# - EXCEPTIONURL
|
37
|
+
# - CANCELURL
|
38
|
+
@ogone.add_single_return_url "http://your_application/route/to/ogone/return"
|
39
|
+
end
|
40
|
+
end
|
41
|
+
```
|
42
|
+
|
43
|
+
Then in your view, you can quickly get the form up and running:
|
44
|
+
|
45
|
+
```erb
|
46
|
+
<%# ogone_form.html.erb %>
|
47
|
+
|
48
|
+
<%= form_tag @ogone.form_action, :method => :post %>
|
49
|
+
<% @ogone.fields_for_payment.each do |name, value| %>
|
50
|
+
<%= hidden_field_tag name, value %>
|
51
|
+
<% end %>
|
52
|
+
|
53
|
+
<%= submit_tag "Pay" %>
|
54
|
+
<% end %>
|
55
|
+
```
|
56
|
+
|
57
|
+
When clicking on the `Pay` button, your user will be redirected to the Ogone
|
58
|
+
Ecommerce platform to enter his/her credit card info and pay. When the payment
|
59
|
+
is completed, the user will be redirected to your application.
|
60
|
+
|
61
|
+
This will be done via a `POST` request from Ogone to your app. This request contains
|
62
|
+
parameters that Ogone gives to you so that you can update your own database. Before
|
63
|
+
doing anything, you should check that the request signature is correct to make sure
|
64
|
+
it comes from Ogone. To do so, just call:
|
65
|
+
|
66
|
+
```ruby
|
67
|
+
require "ogone"
|
68
|
+
|
69
|
+
class PaymentController
|
70
|
+
def ogone_return
|
71
|
+
@ogone = Ogone::Ecommerce.new :sha_algo => "SHA1", :sha_out => "...."
|
72
|
+
|
73
|
+
begin
|
74
|
+
@ogone.check_shasign_out! params
|
75
|
+
|
76
|
+
status = params[:STATUS].to_i
|
77
|
+
if Ogone::PAID_STATUSES.include? status
|
78
|
+
# TODO: update database with payment info.
|
79
|
+
end
|
80
|
+
rescue Ogone::Ecommerce::OutboundSignatureMismatch
|
81
|
+
# The request did not come from Ogone, or there is a misconfiguration of sha_out.
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
```
|
86
|
+
|
87
|
+
## Contributing
|
88
|
+
|
89
|
+
1. Fork it
|
90
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
91
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
92
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
93
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
data/lib/ogone.rb
ADDED
@@ -0,0 +1,120 @@
|
|
1
|
+
module Ogone
|
2
|
+
class Ecommerce
|
3
|
+
VALID_ENVIRONMENTS = %w(test prod) unless const_defined? :VALID_ENVIRONMENTS
|
4
|
+
SIGNING_ALGORITHMS = %w(SHA1 SHA256 SHA512) unless const_defined? :SIGNING_ALGORITHMS
|
5
|
+
|
6
|
+
class ConfigurationError < StandardError; end
|
7
|
+
|
8
|
+
MANDATORY_PARAMETERS = %w(PSPID ORDERID AMOUNT CURRENCY LANGUAGE) unless const_defined? :MANDATORY_PARAMETERS
|
9
|
+
class MandatoryParameterMissing < StandardError; end
|
10
|
+
|
11
|
+
OUTBOUND_SIGNATURE_PARAMETERS = %w(AAVADDRESS AAVCHECK AAVZIP ACCEPTANCE ALIAS AMOUNT BIN \
|
12
|
+
BRAND CARDNO CCCTY CN COMPLUS CREATION_STATUS CURRENCY \
|
13
|
+
CVCCHECK DCC_COMMPERCENTAGE DCC_CONVAMOUNT DCC_CONVCCY \
|
14
|
+
DCC_EXCHRATE DCC_EXCHRATESOURCE DCC_EXCHRATETS DCC_INDICATOR \
|
15
|
+
DCC_MARGINPERCENTAGE DCC_VALIDHOURS DIGESTCARDNO ECI ED \
|
16
|
+
ENCCARDNO FXAMOUNT FXCURRENCY IP IPCTY NBREMAILUSAGE NBRIPUSAGE\
|
17
|
+
NBRIPUSAGE_ALLTX NBRUSAGE NCERROR ORDERID PAYID PM SCO_CATEGORY \
|
18
|
+
SCORING STATUS SUBBRAND SUBSCRIPTION_ID TRXDATE VC).collect &:to_sym unless const_defined? :OUTBOUND_SIGNATURE_PARAMETERS
|
19
|
+
class OutboundSignatureMismatch < StandardError; end
|
20
|
+
|
21
|
+
attr_accessor :sha_in, :sha_out
|
22
|
+
|
23
|
+
def initialize(options = {})
|
24
|
+
@parameters = Hash.new
|
25
|
+
[:sha_algo, :environment, :pspid, :sha_in, :sha_out].each do |config|
|
26
|
+
self.send :"#{config}=", options[config] unless options[config].nil?
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
def sha_algo=(sha_algo)
|
31
|
+
unless SIGNING_ALGORITHMS.include?(sha_algo)
|
32
|
+
raise ArgumentError.new("Unsupported signature algorithm: #{sha_algo}")
|
33
|
+
end
|
34
|
+
@sha_algo = sha_algo
|
35
|
+
end
|
36
|
+
|
37
|
+
def environment=(environment)
|
38
|
+
unless VALID_ENVIRONMENTS.include? environment.to_s
|
39
|
+
raise ArgumentError.new("Unsupported Ogone environment: #{environment}")
|
40
|
+
end
|
41
|
+
@environment = environment
|
42
|
+
end
|
43
|
+
|
44
|
+
def pspid=(pspid)
|
45
|
+
raise ArgumentError.new("PSPID cannot be empty") if pspid.nil? || pspid == ""
|
46
|
+
@parameters[:PSPID] = pspid
|
47
|
+
end
|
48
|
+
|
49
|
+
def form_action
|
50
|
+
unless VALID_ENVIRONMENTS.include? @environment.to_s
|
51
|
+
raise ConfigurationError.new("Unsupported Ogone environment: '#{@environment}'.")
|
52
|
+
end
|
53
|
+
"https://secure.ogone.com/ncol/#{@environment}/orderstandard_utf8.asp"
|
54
|
+
end
|
55
|
+
|
56
|
+
def add_single_return_url(return_url)
|
57
|
+
[:ACCEPTURL, :DECLINEURL, :EXCEPTIONURL, :CANCELURL].each do |field|
|
58
|
+
@parameters[field] = return_url
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
def add_parameters(parameters)
|
63
|
+
@parameters.merge! parameters
|
64
|
+
end
|
65
|
+
|
66
|
+
def fields_for_payment(parameters = {})
|
67
|
+
add_parameters(parameters || {})
|
68
|
+
check_mandatory_parameters!
|
69
|
+
|
70
|
+
upcase_keys(@parameters).merge :SHASIGN => sha_in_sign
|
71
|
+
end
|
72
|
+
|
73
|
+
def check_shasign_out!(params)
|
74
|
+
params = upcase_keys(params)
|
75
|
+
raise OutboundSignatureMismatch.new if sha_out_sign(params) != params[:SHASIGN]
|
76
|
+
end
|
77
|
+
|
78
|
+
def upcase_keys(hash)
|
79
|
+
hash.inject({}) { |h, (k, v)| h[k.upcase.to_sym] = v; h }
|
80
|
+
end
|
81
|
+
|
82
|
+
private
|
83
|
+
|
84
|
+
def sha_in_sign
|
85
|
+
to_hash = sorted_upcased_parameters.inject([]) {
|
86
|
+
|a, (k, v)| a << "#{k}=#{v}#{@sha_in}" unless v.nil? || v == ""
|
87
|
+
a
|
88
|
+
}.join
|
89
|
+
sign to_hash
|
90
|
+
end
|
91
|
+
|
92
|
+
def sha_out_sign(params)
|
93
|
+
to_hash = OUTBOUND_SIGNATURE_PARAMETERS.inject([]) {
|
94
|
+
|a, p| a << "#{p}=#{params[p]}#{@sha_out}" unless params[p].nil? || params[p] == ""
|
95
|
+
a
|
96
|
+
}.join
|
97
|
+
sign to_hash
|
98
|
+
end
|
99
|
+
|
100
|
+
def sign(to_hash)
|
101
|
+
unless SIGNING_ALGORITHMS.include?(@sha_algo)
|
102
|
+
raise ArgumentError.new("Unsupported signature algorithm: '#{@sha_algo}'")
|
103
|
+
end
|
104
|
+
Digest.const_get(@sha_algo).hexdigest(to_hash).upcase
|
105
|
+
end
|
106
|
+
|
107
|
+
def sorted_upcased_parameters
|
108
|
+
upcase_keys(@parameters).sort
|
109
|
+
end
|
110
|
+
|
111
|
+
def check_mandatory_parameters!
|
112
|
+
MANDATORY_PARAMETERS.each do |parameter|
|
113
|
+
unless @parameters.include? parameter.to_sym
|
114
|
+
raise MandatoryParameterMissing.new parameter
|
115
|
+
end
|
116
|
+
end
|
117
|
+
end
|
118
|
+
|
119
|
+
end
|
120
|
+
end
|
data/lib/ogone/status.rb
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
module Ogone
|
2
|
+
|
3
|
+
STATUS = {
|
4
|
+
0 => 'Incomplete or invalid',
|
5
|
+
1 => 'Cancelled by client',
|
6
|
+
2 => 'Authorization refused',
|
7
|
+
4 => 'Order stored',
|
8
|
+
41 => 'Waiting client payment',
|
9
|
+
5 => 'Authorized',
|
10
|
+
51 => 'Authorization waiting',
|
11
|
+
52 => 'Authorization not known',
|
12
|
+
55 => 'Stand-by',
|
13
|
+
59 => 'Authoriz. to get manually',
|
14
|
+
6 => 'Authorized and cancelled',
|
15
|
+
61 => 'Author. deletion waiting',
|
16
|
+
62 => 'Author. deletion uncertain',
|
17
|
+
63 => 'Author. deletion refused',
|
18
|
+
64 => 'Authorized and cancelled',
|
19
|
+
7 => 'Payment deleted',
|
20
|
+
71 => 'Payment deletion pending',
|
21
|
+
72 => 'Payment deletion uncertain',
|
22
|
+
73 => 'Payment deletion refused',
|
23
|
+
74 => 'Payment deleted',
|
24
|
+
75 => 'Deletion processed by merchant',
|
25
|
+
8 => 'Refund',
|
26
|
+
81 => 'Refund pending',
|
27
|
+
82 => 'Refund uncertain',
|
28
|
+
83 => 'Refund refused',
|
29
|
+
84 => 'Payment declined by the acquirer',
|
30
|
+
85 => 'Refund processed by merchant',
|
31
|
+
9 => 'Payment requested',
|
32
|
+
91 => 'Payment processing',
|
33
|
+
92 => 'Payment uncertain',
|
34
|
+
93 => 'Payment refused',
|
35
|
+
94 => 'Refund declined by the acquirer',
|
36
|
+
95 => 'Payment processed by merchant',
|
37
|
+
99 => 'Being processed'
|
38
|
+
} unless const_defined? :STATUS
|
39
|
+
|
40
|
+
PAID_STATUSES = [4, 5, 9] unless const_defined? :PAID_STATUSES
|
41
|
+
PENDING_STATUSES = [41, 51, 52, 91, 92, 99] unless const_defined? :PENDING_STATUSES
|
42
|
+
CANCELLED_STATUSES = [1] unless const_defined? :CANCELLED_STATUSES
|
43
|
+
REFUNDED_STATUSES = [8] unless const_defined? :REFUNDED_STATUSES
|
44
|
+
|
45
|
+
end
|
data/ogone.gemspec
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'ogone/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "ogone"
|
8
|
+
spec.version = Ogone::VERSION
|
9
|
+
spec.authors = ["Sebastien Saunier"]
|
10
|
+
spec.email = ["seb@saunier.me"]
|
11
|
+
spec.description = %q{Flexible Ogone ecommerce wrapper
|
12
|
+
|
13
|
+
Deal simply with multiple ogone ecommerce account within your application.
|
14
|
+
No hard coded configuration read from a *.yml file.
|
15
|
+
}
|
16
|
+
spec.summary = %q{Flexible Ogone ecommerce wrapper}
|
17
|
+
spec.homepage = "https://github.com/applidget/ogone"
|
18
|
+
spec.license = "MIT"
|
19
|
+
|
20
|
+
spec.files = `git ls-files`.split($/)
|
21
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
22
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
23
|
+
spec.require_paths = ["lib"]
|
24
|
+
|
25
|
+
spec.add_development_dependency "bundler", "~> 1.3"
|
26
|
+
spec.add_development_dependency "rake"
|
27
|
+
spec.add_development_dependency "rspec"
|
28
|
+
end
|
@@ -0,0 +1,118 @@
|
|
1
|
+
require "ogone/ecommerce"
|
2
|
+
|
3
|
+
module Ogone
|
4
|
+
describe Ecommerce do
|
5
|
+
|
6
|
+
before(:each) do
|
7
|
+
@ogone = Ogone::Ecommerce.new
|
8
|
+
end
|
9
|
+
|
10
|
+
it "should raise an error if incorrect sha algorithm given" do
|
11
|
+
lambda { @ogone.sha_algo = 'WRONG_SHA' }.should raise_error ArgumentError
|
12
|
+
end
|
13
|
+
|
14
|
+
it "should raise an error if incorrect ogone environment given" do
|
15
|
+
lambda { @ogone.environment = 'WRONG_ENV' }.should raise_error ArgumentError
|
16
|
+
end
|
17
|
+
|
18
|
+
it "should raise an error if an empty PSPID is specified" do
|
19
|
+
lambda { @ogone.pspid = '' }.should raise_error ArgumentError
|
20
|
+
end
|
21
|
+
|
22
|
+
it "should render the test Ogone url" do
|
23
|
+
@ogone.environment = "test"
|
24
|
+
@ogone.form_action.should eq "https://secure.ogone.com/ncol/test/orderstandard_utf8.asp"
|
25
|
+
end
|
26
|
+
|
27
|
+
it "should render the production Ogone url" do
|
28
|
+
@ogone.environment = "prod"
|
29
|
+
@ogone.form_action.should eq "https://secure.ogone.com/ncol/prod/orderstandard_utf8.asp"
|
30
|
+
end
|
31
|
+
|
32
|
+
it "should have the PSPID stored in the parameters" do
|
33
|
+
@ogone.pspid = "pspid"
|
34
|
+
parameters[:PSPID].should eq "pspid"
|
35
|
+
end
|
36
|
+
|
37
|
+
describe "#check_shasign_out!" do
|
38
|
+
|
39
|
+
before(:each) do
|
40
|
+
@ogone = Ogone::Ecommerce.new :sha_out => "sha_out", :sha_algo => "SHA1"
|
41
|
+
end
|
42
|
+
|
43
|
+
it "should check an inbound signature" do
|
44
|
+
params = ogone_return_parameters
|
45
|
+
lambda { @ogone.check_shasign_out! params }.should_not raise_error Ogone::Ecommerce::OutboundSignatureMismatch
|
46
|
+
end
|
47
|
+
|
48
|
+
it "should throw an error if the outbound shasign does not match" do
|
49
|
+
params = {
|
50
|
+
"amonut" => "160",
|
51
|
+
"SHASIGN" => "FOO"
|
52
|
+
}
|
53
|
+
lambda { @ogone.check_shasign_out! params }.should raise_error Ogone::Ecommerce::OutboundSignatureMismatch
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
describe "#fields_for_payment" do
|
58
|
+
|
59
|
+
before(:each) do
|
60
|
+
@ogone = Ogone::Ecommerce.new :pspid => "pspid", :sha_in => "sha_in", :sha_algo => "SHA1"
|
61
|
+
end
|
62
|
+
|
63
|
+
it "should give a hash ready to be used in `hidden_field_tag`" do
|
64
|
+
fields = @ogone.fields_for_payment :AMOUNT => 100,
|
65
|
+
:CURRENCY => "EUR",
|
66
|
+
:ORDERID => "123",
|
67
|
+
:LANGUAGE => "en_US"
|
68
|
+
|
69
|
+
fields[:SHASIGN].should eq "AA7CA1F98159D14D0943311092F5435F239B4B36"
|
70
|
+
end
|
71
|
+
|
72
|
+
it "should also work if parameters were given with #add_parameters" do
|
73
|
+
@ogone.add_parameters :AMOUNT => 100, :CURRENCY => "EUR", :ORDERID => "123", :LANGUAGE => "en_US"
|
74
|
+
|
75
|
+
fields = @ogone.fields_for_payment
|
76
|
+
fields[:SHASIGN].should eq "AA7CA1F98159D14D0943311092F5435F239B4B36"
|
77
|
+
end
|
78
|
+
|
79
|
+
end
|
80
|
+
|
81
|
+
describe "#add_single_return_url" do
|
82
|
+
it "should allow lazy folks to give just one back url" do
|
83
|
+
@ogone.add_single_return_url "http://iamsola.zy"
|
84
|
+
parameters[:ACCEPTURL].should eq "http://iamsola.zy"
|
85
|
+
parameters[:DECLINEURL].should eq "http://iamsola.zy"
|
86
|
+
parameters[:EXCEPTIONURL].should eq "http://iamsola.zy"
|
87
|
+
parameters[:CANCELURL].should eq "http://iamsola.zy"
|
88
|
+
end
|
89
|
+
end
|
90
|
+
|
91
|
+
private
|
92
|
+
|
93
|
+
def parameters
|
94
|
+
@ogone.instance_variable_get :@parameters
|
95
|
+
end
|
96
|
+
|
97
|
+
def ogone_return_parameters
|
98
|
+
{
|
99
|
+
"orderID" => "r_511b52f7230b430b3f000003_19",
|
100
|
+
"currency" => "EUR",
|
101
|
+
"amount" => "160",
|
102
|
+
"PM" => "CreditCard",
|
103
|
+
"ACCEPTANCE" => "",
|
104
|
+
"STATUS" => "1",
|
105
|
+
"CARDNO" => "",
|
106
|
+
"ED" => "",
|
107
|
+
"CN" => "Sebastien Saunier",
|
108
|
+
"TRXDATE" => "02/13/13",
|
109
|
+
"PAYID" => "19113975",
|
110
|
+
"NCERROR" => "",
|
111
|
+
"BRAND" => "",
|
112
|
+
"COMPLUS" => "registration_511b52f7230b430b3f000003",
|
113
|
+
"IP" => "80.12.86.33",
|
114
|
+
"SHASIGN" => "F3F5F963C700F56B69EA36173F5BFB3B28CA25E5",
|
115
|
+
}
|
116
|
+
end
|
117
|
+
end
|
118
|
+
end
|
data/spec/spec_helper.rb
ADDED
metadata
ADDED
@@ -0,0 +1,103 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: ogone
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Sebastien Saunier
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2013-09-11 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.3'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.3'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ! '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ! '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ! '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
description: ! "Flexible Ogone ecommerce wrapper\n\nDeal simply with multiple ogone
|
56
|
+
ecommerce account within your application.\nNo hard coded configuration read from
|
57
|
+
a *.yml file.\n "
|
58
|
+
email:
|
59
|
+
- seb@saunier.me
|
60
|
+
executables: []
|
61
|
+
extensions: []
|
62
|
+
extra_rdoc_files: []
|
63
|
+
files:
|
64
|
+
- .gitignore
|
65
|
+
- .rspec
|
66
|
+
- Gemfile
|
67
|
+
- LICENSE.txt
|
68
|
+
- README.md
|
69
|
+
- Rakefile
|
70
|
+
- lib/ogone.rb
|
71
|
+
- lib/ogone/ecommerce.rb
|
72
|
+
- lib/ogone/status.rb
|
73
|
+
- lib/ogone/version.rb
|
74
|
+
- ogone.gemspec
|
75
|
+
- spec/ogone/ecommerce_spec.rb
|
76
|
+
- spec/spec_helper.rb
|
77
|
+
homepage: https://github.com/applidget/ogone
|
78
|
+
licenses:
|
79
|
+
- MIT
|
80
|
+
metadata: {}
|
81
|
+
post_install_message:
|
82
|
+
rdoc_options: []
|
83
|
+
require_paths:
|
84
|
+
- lib
|
85
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ! '>='
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
91
|
+
requirements:
|
92
|
+
- - ! '>='
|
93
|
+
- !ruby/object:Gem::Version
|
94
|
+
version: '0'
|
95
|
+
requirements: []
|
96
|
+
rubyforge_project:
|
97
|
+
rubygems_version: 2.1.0
|
98
|
+
signing_key:
|
99
|
+
specification_version: 4
|
100
|
+
summary: Flexible Ogone ecommerce wrapper
|
101
|
+
test_files:
|
102
|
+
- spec/ogone/ecommerce_spec.rb
|
103
|
+
- spec/spec_helper.rb
|