sofort 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/lib/generators/templates/sofort.rb +4 -3
- data/lib/sofort/client.rb +7 -2
- data/lib/sofort/version.rb +1 -1
- data/lib/sofort.rb +8 -6
- 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: 4e10d4485cbc38ca1b4d51d997e62ed564421201
|
4
|
+
data.tar.gz: cf85b0bd03870fee5712ee84fb9a89f6084e99dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 43d12697710785d8c4af848192ea69b735d177960b1245d8d17b5ea06c647725b4a9a061761d932ff0c0ead294b19c0cef4f9b888b3db8d745924e795d927115
|
7
|
+
data.tar.gz: f85d608a247ef3a480b1b25b6cfe79ace81e15ab860b096d3f49712e2cd34aadc01e0bc118f7a3c0c012dd23a139c9b0950252918baa7f38782e83622706f6bd
|
data/README.md
CHANGED
@@ -25,12 +25,12 @@ Or install it yourself as:
|
|
25
25
|
```
|
26
26
|
init api client
|
27
27
|
```ruby
|
28
|
-
client=Sofort::Client.new
|
28
|
+
client = Sofort::Client.new
|
29
29
|
```
|
30
30
|
### Example of pay
|
31
31
|
you can set more attributes, please look at config/initializers/sofort.rb
|
32
32
|
```ruby
|
33
|
-
client.pay(12, 'skopu', { success_url: 'http://google.com', abort_url: 'https://google.com'})
|
33
|
+
client.pay(12, 'skopu', { success_url: 'http://google.com', abort_url: 'https://google.com' } )
|
34
34
|
```
|
35
35
|
```ruby
|
36
36
|
=> {"transaction"=>"89043-182942-5490DD29-53B3",
|
@@ -73,7 +73,7 @@ Or install it yourself as:
|
|
73
73
|
"iban"=>"DE50250700240444432900",
|
74
74
|
"country_code"=>"DE"},
|
75
75
|
"recipient"=>
|
76
|
-
{"holder"=>"
|
76
|
+
{"holder"=>"Company on Demand",
|
77
77
|
"account_number"=>"12312312",
|
78
78
|
"bank_code"=>"12312312",
|
79
79
|
"bank_name"=>"Commerzbank AG",
|
@@ -1,11 +1,12 @@
|
|
1
1
|
Sofort.setup do |config|
|
2
|
-
|
2
|
+
|
3
3
|
config.base_url = "https://api.sofort.com/api/xml"
|
4
4
|
config.user_id = 'sofort_user_id'
|
5
5
|
config.api_key = 'api_key'
|
6
6
|
config.abort_url = 'abort_url'
|
7
7
|
config.success_url = 'success_url'
|
8
|
-
|
8
|
+
config.notification_url = 'notification_url'
|
9
|
+
|
9
10
|
config.email_customer = 'email_customer'
|
10
11
|
config.notification_email = 'notification_email'
|
11
12
|
config.project_id = 'project_id'
|
@@ -13,4 +14,4 @@ Sofort.setup do |config|
|
|
13
14
|
config.currency_code = "EUR"
|
14
15
|
config.reason = "Reason"
|
15
16
|
|
16
|
-
end
|
17
|
+
end
|
data/lib/sofort/client.rb
CHANGED
@@ -53,6 +53,8 @@ module Sofort
|
|
53
53
|
success_url = opts[:success_url] || Sofort.success_url
|
54
54
|
abort_url = opts[:abort_url] || Sofort.abort_url
|
55
55
|
email_customer = opts[:email_customer] || Sofort.email_customer
|
56
|
+
notification_email = opts[:notification_email] || Sofort.notification_email
|
57
|
+
notification_url = opts[:notification_url] || Sofort.notification_url
|
56
58
|
|
57
59
|
{
|
58
60
|
amount: amount,
|
@@ -66,14 +68,17 @@ module Sofort
|
|
66
68
|
},
|
67
69
|
email_customer: email_customer,
|
68
70
|
notification_emails: {
|
69
|
-
notification_email:
|
71
|
+
notification_email: notification_email
|
72
|
+
},
|
73
|
+
notification_urls: {
|
74
|
+
notification_url: notification_url
|
70
75
|
},
|
71
76
|
success_url: success_url,
|
72
77
|
abort_url: abort_url,
|
73
78
|
su: '',
|
74
79
|
project_id: Sofort.project_id
|
75
80
|
}.to_xml(root: 'multipay', skip_types: true, dasherize: false)
|
76
|
-
|
81
|
+
|
77
82
|
end
|
78
83
|
end
|
79
84
|
end
|
data/lib/sofort/version.rb
CHANGED
data/lib/sofort.rb
CHANGED
@@ -2,12 +2,13 @@ require 'sofort/version'
|
|
2
2
|
require 'sofort/client'
|
3
3
|
|
4
4
|
module Sofort
|
5
|
-
|
5
|
+
|
6
6
|
mattr_accessor :user_id
|
7
7
|
mattr_accessor :api_key
|
8
8
|
mattr_accessor :base_url
|
9
9
|
mattr_accessor :abort_url
|
10
10
|
mattr_accessor :success_url
|
11
|
+
mattr_accessor :notification_url
|
11
12
|
mattr_accessor :email_customer
|
12
13
|
mattr_accessor :notification_email
|
13
14
|
mattr_accessor :project_id
|
@@ -21,15 +22,16 @@ module Sofort
|
|
21
22
|
@@base_url = "https://api.sofort.com/api/xml"
|
22
23
|
@@abort_url = 'abort_url'
|
23
24
|
@@success_url = 'success_url'
|
24
|
-
|
25
|
+
@@notification_url = 'notification_url'
|
26
|
+
|
25
27
|
@@email_customer = 'email_customer'
|
26
28
|
@@notification_email = 'notification_email'
|
27
29
|
@@project_id = 'project_id'
|
28
30
|
@@country_code = "DE"
|
29
31
|
@@currency_code = "EUR"
|
30
32
|
@@reson = "Reason"
|
31
|
-
|
32
|
-
def self.setup
|
33
|
-
yield self
|
34
|
-
end
|
33
|
+
|
34
|
+
def self.setup
|
35
|
+
yield self
|
36
|
+
end
|
35
37
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sofort
|
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
|
- skopu
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-09-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|