stall-atos 0.1.1 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: daf588b4c8f1d06db827b602cc8eae3b4a137139
4
- data.tar.gz: 34163d8ac6e761c506ce37d2ae8f8d01e2e55f2f
3
+ metadata.gz: 49fd0d4a1497869ad8c4f4c654fa99b18e31ce29
4
+ data.tar.gz: f7bb221e69c0b36a06e476259fd27412b09254ba
5
5
  SHA512:
6
- metadata.gz: 8e136677ec3ac23ae433114051d390e2084065e758d96092850285224f125a35df9980d66eab82065cc358acba7ea6acdf4680e7b0049d152c4d53b46553c588
7
- data.tar.gz: 048de03bba28c77bacc848f3fd228086b66973bc5a91a861998debca45332d31b40c1625e96f4b4f820208deeef8ded14cfe5907f10ebdaa24a4f361cd4a1ef0
6
+ metadata.gz: ac8aa7095ff2a27ac9361baffc085b76944b05e48b1ddeb1b0eeb3c6bb3a4075480d2b60b6563ec55effa23907da33f8b908b3a3843f56aab019b38ade54057a
7
+ data.tar.gz: 9e6c53d18f19239797055fa6989f042ad78f5bdea7bf9f50e76f170ccee458dc7cf518902bc355a4631a3876bc0f6934ecfacde4ba44085915430b228c5f169f
data/README.md CHANGED
@@ -70,6 +70,19 @@ You can find the route with :
70
70
  rake routes | grep payment/notify
71
71
  ```
72
72
 
73
+ ### Faking a payment notification
74
+
75
+ From your console :
76
+
77
+ ```ruby
78
+ # Fetch the cart you want to simulate a payment notification for
79
+ cart = Cart.last
80
+ # Create the fake notification request
81
+ request = Stall::Atos::FakeGatewayPaymentNotification.new(cart)
82
+ # Pass it to the PaymentNotificationService, where the simulation will take place
83
+ Stall::PaymentNotificationService.new('atos', request).call
84
+ ```
85
+
73
86
  ## Contributing
74
87
 
75
88
  Bug reports and pull requests are welcome on GitHub at https://github.com/stall-rails/stall-atos.
@@ -101,20 +101,20 @@ module Stall
101
101
  @request = request
102
102
  end
103
103
 
104
- def rendering_options
105
- { nothing: true }
104
+ def valid?
105
+ response.valid?
106
106
  end
107
107
 
108
108
  def success?
109
109
  response.success?
110
110
  end
111
111
 
112
- def notify
113
- cart.payment.pay! if success?
112
+ def process
113
+ valid? && success?
114
114
  end
115
115
 
116
- def valid?
117
- response.valid?
116
+ def rendering_options
117
+ { nothing: true }
118
118
  end
119
119
 
120
120
  def cart
@@ -1,5 +1,5 @@
1
1
  module Stall
2
2
  module Atos
3
- VERSION = "0.1.1"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  end
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
19
19
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
20
  spec.require_paths = ['lib']
21
21
 
22
- spec.add_dependency 'stall', '~> 0.1'
22
+ spec.add_dependency 'stall', '~> 0.3'
23
23
 
24
24
  spec.add_development_dependency 'bundler', '~> 1.11'
25
25
  spec.add_development_dependency 'rake', '~> 10.0'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stall-atos
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - vala
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-11-28 00:00:00.000000000 Z
11
+ date: 2017-02-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: stall
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0.1'
19
+ version: '0.3'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0.1'
26
+ version: '0.3'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -113,7 +113,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
113
113
  version: '0'
114
114
  requirements: []
115
115
  rubyforge_project:
116
- rubygems_version: 2.5.1
116
+ rubygems_version: 2.6.8
117
117
  signing_key:
118
118
  specification_version: 4
119
119
  summary: Stall e-commerce CM-CIC payment gateway integration