easy_pay_u_latam 0.1.18 → 0.1.19
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c4a4d762c11131172e32d443f38d3d2e4b01f6cfd159f81faa24dcd99381183e
|
|
4
|
+
data.tar.gz: 724a6627b626555b646c4243ea63a01692c7861b2164285c69fa1f0443b9e718
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 766db0c51dd2f553c1e2ec5b5103053e2d2ef849d8385622cc901cbc909c935d6d2e84622faadba0d50fe90e122149a1d666275bb03f2e0474fd4ac9379b75da
|
|
7
|
+
data.tar.gz: 833a8a9d1434e86b7e80e6ce037d1af1c19222e5430e7528523adb8925e3f3ce1b53cb6e02abc0aedccfeaeebb5ec67930a8f2e52793de1dd155d80f7873a351
|
|
@@ -27,6 +27,8 @@ module EasyPayULatam
|
|
|
27
27
|
|
|
28
28
|
if !current_user.last_payment.nil? && current_user.last_payment.end_date > Date.today
|
|
29
29
|
subs.params["trialDays"] = (current_user.last_payment.end_date - Date.today).to_i
|
|
30
|
+
elsif current_user.last_payment.nil?
|
|
31
|
+
subs.params["trialDays"] = @plan.trial_days.blank? ? 0 : @plan.trial_days
|
|
30
32
|
end
|
|
31
33
|
|
|
32
34
|
subs.params["notifyUrl"] = "#{@payUConfig.get_root_url}/easy_pay_u_latam/api/v1/pay_u_payments/#{ @payu_payment.id}/confirmation.json?user_id=#{current_user.id}"
|
|
@@ -68,6 +70,7 @@ module EasyPayULatam
|
|
|
68
70
|
|
|
69
71
|
def generate_payment(plan_code)
|
|
70
72
|
plan = Plan.actives.find_by_payu_plan_code plan_code
|
|
73
|
+
@plan = plan
|
|
71
74
|
# period_moths = 1 if plan.interval.downcase == "day"
|
|
72
75
|
period_moths = 1 if plan.interval.downcase == "month"
|
|
73
76
|
period_moths = 6 if plan.interval.downcase == "semester"
|
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.19
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- DEVPENGUIN
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-12-
|
|
11
|
+
date: 2018-12-13 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|