catarse_pagarme 2.0.0 → 2.0.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/Gemfile.lock +1 -1
- data/app/controllers/catarse_pagarme/credit_card_base_controller.rb +3 -3
- data/app/controllers/catarse_pagarme/notifications_controller.rb +6 -0
- data/app/controllers/catarse_pagarme/slip_controller.rb +3 -3
- data/config/routes.rb +4 -1
- data/lib/catarse_pagarme/version.rb +1 -1
- data/spec/controllers/catarse_pagarme/notifications_controller_spec.rb +2 -2
- 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: bd1c38dbfedfe7811ad3ce48e7f4f1a47d5b58d1
|
|
4
|
+
data.tar.gz: 774cd6aa399b49b02d556860666f05fd1a9ce882
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6c8c380fe5c5289fb83a2c1843bb4457fa76dd03a8440b6cad776e778d800cd9a9c9e1edf1ae3e1551eeb5661874e3f72c47b921e5c7b308704eebe49cf3cb9c
|
|
7
|
+
data.tar.gz: fcab2bcc585f6b081ff2fa9bb1eb4037d7ec90f1e04531342ccf680200770098288b01d0ffc7271a1c5f54c669f14a7fa979d77859fa14ed2f5d37f272af130c
|
data/Gemfile.lock
CHANGED
|
@@ -36,9 +36,9 @@ module CatarsePagarme
|
|
|
36
36
|
card_expiration_year: splited_month_and_year[1],
|
|
37
37
|
card_cvv: params[:payment_card_source],
|
|
38
38
|
amount: delegator.value_with_installment_tax(get_installment),
|
|
39
|
-
postback_url:
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
postback_url: ipn_pagarme_index_url(host: CatarsePagarme.configuration.host,
|
|
40
|
+
subdomain: CatarsePagarme.configuration.subdomain,
|
|
41
|
+
protocol: CatarsePagarme.configuration.protocol),
|
|
42
42
|
installments: get_installment,
|
|
43
43
|
customer: {
|
|
44
44
|
email: contribution.user.email,
|
|
@@ -21,9 +21,9 @@ module CatarsePagarme
|
|
|
21
21
|
payment_method: 'boleto',
|
|
22
22
|
boleto_expiration_date: 2.days.from_now,
|
|
23
23
|
amount: delegator.value_for_transaction,
|
|
24
|
-
postback_url:
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
postback_url: ipn_pagarme_index_url(host: CatarsePagarme.configuration.host,
|
|
25
|
+
subdomain: CatarsePagarme.configuration.subdomain,
|
|
26
|
+
protocol: CatarsePagarme.configuration.protocol),
|
|
27
27
|
customer: {
|
|
28
28
|
email: contribution.user.email,
|
|
29
29
|
name: contribution.user.name
|
data/config/routes.rb
CHANGED
|
@@ -4,12 +4,15 @@ CatarsePagarme::Engine.routes.draw do
|
|
|
4
4
|
member do
|
|
5
5
|
get :review
|
|
6
6
|
put :second_slip, to: 'slip#update'
|
|
7
|
-
post :ipn, to: 'notifications#create'
|
|
8
7
|
post :pay_credit_card, to: 'credit_cards#create'
|
|
9
8
|
post :pay_slip, to: 'slip#create'
|
|
10
9
|
post :pay_with_subscription, to: 'subscriptions#create'
|
|
11
10
|
put :pay_with_subscription, to: 'subscriptions#update'
|
|
12
11
|
end
|
|
13
12
|
|
|
13
|
+
collection do
|
|
14
|
+
post :ipn, to: 'notifications#create'
|
|
15
|
+
end
|
|
16
|
+
|
|
14
17
|
end
|
|
15
18
|
end
|
|
@@ -6,7 +6,7 @@ describe CatarsePagarme::NotificationsController do
|
|
|
6
6
|
end
|
|
7
7
|
|
|
8
8
|
let(:project) { create(:project, goal: 10_000, state: 'online') }
|
|
9
|
-
let(:contribution) { create(:contribution, value: 10, project: project) }
|
|
9
|
+
let(:contribution) { create(:contribution, value: 10, project: project, payment_id: 'abcd') }
|
|
10
10
|
let(:credit_card) { create(:credit_card, subscription_id: '1542')}
|
|
11
11
|
|
|
12
12
|
describe 'CREATE' do
|
|
@@ -24,7 +24,7 @@ describe CatarsePagarme::NotificationsController do
|
|
|
24
24
|
context "with valid contribution" do
|
|
25
25
|
before do
|
|
26
26
|
PaymentEngines.stub(:find_payment).and_return(contribution)
|
|
27
|
-
post :create, { locale: :pt, id:
|
|
27
|
+
post :create, { locale: :pt, id: 'abcd', use_route: 'catarse_pagarme' }
|
|
28
28
|
end
|
|
29
29
|
|
|
30
30
|
it "should save an extra_data into payment_notifications" do
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: catarse_pagarme
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.0.
|
|
4
|
+
version: 2.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Antônio Roberto Silva
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2014-10-
|
|
12
|
+
date: 2014-10-15 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: rails
|