easy_pay_u_latam 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -3
- data/lib/easy_pay_u_latam/Configuration.rb +4 -4
- data/lib/easy_pay_u_latam/version.rb +1 -1
- data/lib/easy_pay_u_latam.rb +1 -1
- 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: 9164f2267a7d048c20c34633778eefe975ff6efe
|
4
|
+
data.tar.gz: 117167d8b9f7743a0da5da1cc2b45b6d6c6c50a2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 150c866ec04dd0e0c6c710ea72768cfab26d640a3153822db6795f06d9c6390c6995b6f620ad99218ed3dc661e3bf937e3e390b5916e52255e67f49a3aacd7ce
|
7
|
+
data.tar.gz: 3ad373a48fe13c38f81fe18ede9fec42d0167068477b862ceeef3b687b130baa4fe2845476e98a4c41d3a8a4d7cfb5fc27996121a383369208d973ce9d6a5357
|
data/README.md
CHANGED
@@ -8,7 +8,7 @@ Add this line to your application's Gemfile:
|
|
8
8
|
gem 'easy_pay_u_latam'
|
9
9
|
```
|
10
10
|
|
11
|
-
We strongly recommend using Devise gem.
|
11
|
+
We strongly recommend using Devise gem, this gem use current_user and some other devise methods for fetching user payments.
|
12
12
|
```ruby
|
13
13
|
gem 'devise'
|
14
14
|
```
|
@@ -67,7 +67,7 @@ module EasyPayULatam
|
|
67
67
|
end
|
68
68
|
```
|
69
69
|
|
70
|
-
You
|
70
|
+
You should override the engine application_mailer so it can send success and error emails after PayU confirmation.
|
71
71
|
```ruby
|
72
72
|
# app/mailers/easy_pay_u_latam/application_mailer.rb
|
73
73
|
module EasyPayULatam
|
@@ -79,7 +79,9 @@ module EasyPayULatam
|
|
79
79
|
end
|
80
80
|
```
|
81
81
|
|
82
|
-
Finally create some method on any of you controllers that create the instance and data base record of the PayUPayment, you must especify amount, currency and description, period
|
82
|
+
Finally create some method on any of you controllers that create the instance and data base record of the PayUPayment, you must especify amount, currency and description, period. The fields start_date, and end_date are optionals if you are using this gem for subscriptions like payments.
|
83
|
+
|
84
|
+
This is the method your should link with an anchor or button, it will automatically redirect to the web checkout view you need before redirecting to PayU.
|
83
85
|
```ruby
|
84
86
|
@payu_payment = EasyPayULatam::PayuPayment.create(
|
85
87
|
amount: amount,
|
@@ -24,7 +24,7 @@ module EasyPayULatam
|
|
24
24
|
end
|
25
25
|
|
26
26
|
def get_api_key
|
27
|
-
if
|
27
|
+
if ENV["RAILS_ENV"] == "development" || ENV["RAILS_ENV"] == "test"
|
28
28
|
@test_api_key
|
29
29
|
else
|
30
30
|
@api_key
|
@@ -32,7 +32,7 @@ module EasyPayULatam
|
|
32
32
|
end
|
33
33
|
|
34
34
|
def get_merchant_id
|
35
|
-
if
|
35
|
+
if ENV["RAILS_ENV"] == "development" || ENV["RAILS_ENV"] == "test"
|
36
36
|
@test_merchant_id
|
37
37
|
else
|
38
38
|
@merchant_id
|
@@ -40,7 +40,7 @@ module EasyPayULatam
|
|
40
40
|
end
|
41
41
|
|
42
42
|
def get_account_id
|
43
|
-
if
|
43
|
+
if ENV["RAILS_ENV"] == "development" || ENV["RAILS_ENV"] == "test"
|
44
44
|
@test_account_id
|
45
45
|
else
|
46
46
|
@account_id
|
@@ -48,7 +48,7 @@ module EasyPayULatam
|
|
48
48
|
end
|
49
49
|
|
50
50
|
def get_payu_url
|
51
|
-
if
|
51
|
+
if ENV["RAILS_ENV"] == "development" || ENV["RAILS_ENV"] == "test"
|
52
52
|
@test_payu_url
|
53
53
|
else
|
54
54
|
@payu_url
|
data/lib/easy_pay_u_latam.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: easy_pay_u_latam
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- DEVPENGUIN
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-10-
|
11
|
+
date: 2017-10-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|