unlock_gateway 0.0.3 → 0.0.4
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5a899941b45bf6475771f02b67696673e27a90e8
|
4
|
+
data.tar.gz: 31b1d3c340898adf93489c7abd8c5749e0022de3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ddfc78a147f2c1078fe116a5adaa9ee8cc03ab40b128f526a2b7b37f747c9451270b6afa187789163c61161bd914b11508b76230d3e532e9daba1caab82c944e
|
7
|
+
data.tar.gz: f6723e0bdefb4c895e139ab6f8725b2af92e123ad3ca7c91ddc6e4ba932ed6f54e5ac158cc537cb6d18c30b05edc70de7665dc62260534c1aa6f9d3a8b5704a6
|
@@ -1,10 +1,14 @@
|
|
1
1
|
module UnlockGateway
|
2
2
|
module Models
|
3
|
+
|
4
|
+
# This module will be included in Unlock's Contribution model. All methods will run in the context of an instance of Contribution model.
|
3
5
|
module Contribution
|
4
6
|
|
7
|
+
# This method should implement a way to check the state of the subscription with the gateway and update the contribution's state according to it's real state within the gateway.
|
5
8
|
def update_state_from_gateway!
|
6
9
|
end
|
7
10
|
|
8
11
|
end
|
12
|
+
|
9
13
|
end
|
10
14
|
end
|
@@ -1,28 +1,37 @@
|
|
1
1
|
module UnlockGateway
|
2
2
|
module Models
|
3
|
+
|
4
|
+
# This module will be included in Unlock's Gateway model. All methods will run in the context of an instance of Gateway model.
|
3
5
|
module Gateway
|
4
6
|
|
7
|
+
# This method should return the name of the payment gateway to be displayed in Unlock's gateways configurations.
|
5
8
|
def name
|
6
9
|
self.module_name
|
7
10
|
end
|
8
11
|
|
12
|
+
# This method should return the description of the payment gateway to be displayed in Unlock's gateways configurations.
|
9
13
|
def description
|
10
14
|
end
|
11
15
|
|
16
|
+
# This method should return the image PATH of the payment gateway to be displayed in Unlock's gateways configurations, such as 'my_gateway/logo.png'.
|
12
17
|
def image
|
13
18
|
end
|
14
19
|
|
20
|
+
# This method should return the path for the routes generated by the gateway, such as '/my_gateway'.
|
15
21
|
def path
|
16
22
|
end
|
17
23
|
|
24
|
+
# This method should return true if the gateway has a sandbox alternative and false if not.
|
18
25
|
def has_sandbox?
|
19
26
|
true
|
20
27
|
end
|
21
28
|
|
29
|
+
# This method should return an Array of UnlockGateway::Setting that will be displayed when configuring the gateway's settings. Here is the place for API keys, etc.
|
22
30
|
def available_settings
|
23
31
|
[]
|
24
32
|
end
|
25
33
|
|
26
34
|
end
|
35
|
+
|
27
36
|
end
|
28
37
|
end
|