payza_payments 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 +4 -4
- data/.travis.yml +1 -1
- data/README.md +1 -1
- data/lib/payza_payments/ipn_handler.rb +1 -1
- data/lib/payza_payments/version.rb +1 -1
- data/test/dummy/app/controllers/application_controller.rb +1 -1
- data/test/dummy/app/controllers/dummy_controller.rb +7 -0
- data/test/dummy/config/routes.rb +2 -0
- data/test/dummy/spec/controllers/dummy_controller_spec.rb +8 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fe3de823c0e9139dc6283f6844554bc6e56d91a6
|
4
|
+
data.tar.gz: 09facf316cf520fa95358d0fff1873bbdbddf91f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4e936f49485c26dfd929ceedf227f2222eb2882bd5b6c8a2b9d732d723a02eb3300671255eeb8c20632d0b52ecf689f46840fbd37b06a329c1cc32d65175e6f2
|
7
|
+
data.tar.gz: 4af1afbade03e2c88a15c85d897ad2125c78e0fda1e3889fa622e56b418fabca6e967de0d12551fe858fcd0d5c4ffddee17b11797d299a3eb775c506b822a555
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# PayzaPayments
|
2
|
-
[](https://travis-ci.org/supernova32/payza_payments)
|
3
3
|
|
4
4
|
Configure buttons for Payza based on your requirements and validate IPN requests sent by Payza.
|
5
5
|
With this gem the user of your shop can pay for a digital item (or any type of item) and you can validate the transaction
|
@@ -2,4 +2,11 @@ class DummyController < ApplicationController
|
|
2
2
|
def index
|
3
3
|
@payza = PayzaPayments::ButtonGenerator.new PAYZA_CONFIG
|
4
4
|
end
|
5
|
+
|
6
|
+
def ipn_notification
|
7
|
+
@payza = PayzaPayments::IpnHandler.new PAYZA_CONFIG
|
8
|
+
@response = @payza.handle_ipn_v2(params[:token])
|
9
|
+
p @response.inspect
|
10
|
+
render nothing: true
|
11
|
+
end
|
5
12
|
end
|
data/test/dummy/config/routes.rb
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
Dummy::Application.routes.draw do
|
2
2
|
|
3
3
|
root 'dummy#index'
|
4
|
+
|
5
|
+
post '/ipn_notify' => 'dummy#ipn_notification', as: 'ipn_notify'
|
4
6
|
# The priority is based upon order of creation: first created -> highest priority.
|
5
7
|
# See how all your routes lay out with "rake routes".
|
6
8
|
|
@@ -40,4 +40,12 @@ describe DummyController do
|
|
40
40
|
response.body.should have_xpath './/input[@name="ap_image"]'
|
41
41
|
end
|
42
42
|
end
|
43
|
+
|
44
|
+
context 'post an ipn request' do
|
45
|
+
before { post :ipn_notification, { token: 'jkfhaugf9wuflegfbasf=='} }
|
46
|
+
it { should respond_with :success }
|
47
|
+
it 'should be an invalid token' do
|
48
|
+
assigns(:response).should == 'INVALID REQUEST'
|
49
|
+
end
|
50
|
+
end
|
43
51
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: payza_payments
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Patricio Cano
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-07-
|
11
|
+
date: 2013-07-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|