sofort 0.0.4 → 0.1.0
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/README.md +78 -9
- data/lib/generators/templates/sofort.rb +1 -1
- data/lib/sofort/client.rb +7 -6
- data/lib/sofort/version.rb +1 -1
- data/lib/sofort.rb +4 -1
- data/sofort-rails.gemspec +2 -2
- metadata +4 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3812c315bdf8f276afb128d495820df156dededd
|
|
4
|
+
data.tar.gz: 2dfba027b309ded48ba0d8032e469836ff004a6a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 389acf5610e2604083a279f6a93b27a74f15bd7624b7d1ce82fe16fe73988ffbcab850c2d145e52558ea95499c71342610ddf7adc4b18953d68c5e84a11588a4
|
|
7
|
+
data.tar.gz: 2b8fbe048617bc3f722fa913b14a647f44313d4c5d1bc41a7105984e271a867d820c8a5ed7fc2fcd17b7994a781bfb224a2b2bd126259ca720e6a697a35c0bc2
|
data/README.md
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
# Sofort
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Gem for use Sofort Api in Ruby. Payments and check details.
|
|
4
|
+
SOFORT Überweisung - Sofort Api Banking https://www.sofort.com/integrationCenter-eng-DE/content/view/full/2513
|
|
4
5
|
|
|
5
|
-
TODO: Write a gem description
|
|
6
6
|
|
|
7
7
|
## Installation
|
|
8
8
|
|
|
9
9
|
Add this line to your application's Gemfile:
|
|
10
10
|
|
|
11
|
-
gem 'sofort
|
|
11
|
+
gem 'sofort'
|
|
12
12
|
|
|
13
13
|
And then execute:
|
|
14
14
|
|
|
@@ -16,15 +16,84 @@ And then execute:
|
|
|
16
16
|
|
|
17
17
|
Or install it yourself as:
|
|
18
18
|
|
|
19
|
-
$ gem install sofort
|
|
19
|
+
$ gem install sofort
|
|
20
20
|
|
|
21
21
|
## Usage
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
generate initializer file(confing/initializers/sofort.rb). You can change a lot of defaults
|
|
23
|
+
```ruby
|
|
24
|
+
rails g sofort:install
|
|
25
|
+
```
|
|
26
|
+
init api client
|
|
27
|
+
```ruby
|
|
28
|
+
client=Sofort::Client.new
|
|
29
|
+
```
|
|
30
|
+
### Example of pay
|
|
31
|
+
you can set more attributes, please look at config/initializers/sofort.rb
|
|
32
|
+
```ruby
|
|
33
|
+
client.pay(12, 'skopu', { success_url: 'http://google.com', abort_url: 'https://google.com'})
|
|
34
|
+
```
|
|
35
|
+
```ruby
|
|
36
|
+
=> {"transaction"=>"89043-182942-5490DD29-53B3",
|
|
37
|
+
"payment_url"=>
|
|
38
|
+
"https://www.sofort.com/payment/go/894515b4df08d438eb76320asdasde3383ed72ae80"}
|
|
39
|
+
```
|
|
40
|
+
### Example of details
|
|
41
|
+
#### When no results
|
|
42
|
+
```ruby
|
|
43
|
+
client.details('89043-182942-5490DD29-53B3')
|
|
44
|
+
```
|
|
45
|
+
```ruby
|
|
46
|
+
=> {"transactions"=>nil}
|
|
47
|
+
```
|
|
48
|
+
#### When results
|
|
49
|
+
```ruby
|
|
50
|
+
client.details('89043-182942-5490DD29-53B3')
|
|
51
|
+
```
|
|
52
|
+
```ruby
|
|
53
|
+
=> {"project_id"=>"your project id",
|
|
54
|
+
"transaction"=>"89043-182942-5490DD29-53B3",
|
|
55
|
+
"test"=>"0",
|
|
56
|
+
"time"=>"2014-12-16T17:16:21+01:00",
|
|
57
|
+
"status"=>"untraceable",
|
|
58
|
+
"status_reason"=>"sofort_bank_account_needed",
|
|
59
|
+
"status_modified"=>"2014-12-16T17:16:21+01:00",
|
|
60
|
+
"payment_method"=>"su",
|
|
61
|
+
"language_code"=>"de",
|
|
62
|
+
"amount"=>"42.00",
|
|
63
|
+
"amount_refunded"=>"0.00",
|
|
64
|
+
"currency_code"=>"EUR",
|
|
65
|
+
"reasons"=>{"reason"=>"Order 212"},
|
|
66
|
+
"user_variables"=>nil,
|
|
67
|
+
"sender"=>
|
|
68
|
+
{"holder"=>"Payer Name",
|
|
69
|
+
"account_number"=>"12312312",
|
|
70
|
+
"bank_code"=>"12312312",
|
|
71
|
+
"bank_name"=>"Deutsche Bank AG",
|
|
72
|
+
"bic"=>"DEUTDEDBHAN",
|
|
73
|
+
"iban"=>"DE50250700240444432900",
|
|
74
|
+
"country_code"=>"DE"},
|
|
75
|
+
"recipient"=>
|
|
76
|
+
{"holder"=>"Clean on Demand UG",
|
|
77
|
+
"account_number"=>"12312312",
|
|
78
|
+
"bank_code"=>"12312312",
|
|
79
|
+
"bank_name"=>"Commerzbank AG",
|
|
80
|
+
"bic"=>"C12312312",
|
|
81
|
+
"iban"=>"DE12312312",
|
|
82
|
+
"country_code"=>"DE"},
|
|
83
|
+
"email_customer"=>"your@gmail.com",
|
|
84
|
+
"phone_customer"=>nil,
|
|
85
|
+
"exchange_rate"=>"1.0000",
|
|
86
|
+
"costs"=>{"fees"=>"0.63", "currency_code"=>"EUR", "exchange_rate"=>"1.0000"},
|
|
87
|
+
"su"=>{"consumer_protection"=>"0"},
|
|
88
|
+
"status_history_items"=>
|
|
89
|
+
{"status_history_item"=>
|
|
90
|
+
{"status"=>"untraceable",
|
|
91
|
+
"status_reason"=>"sofort_bank_account_needed",
|
|
92
|
+
"time"=>"2014-12-16T17:16:21+01:00"}}}
|
|
93
|
+
```
|
|
25
94
|
## Contributing
|
|
26
95
|
|
|
27
|
-
1. Fork it ( https://github.com/
|
|
96
|
+
1. Fork it ( https://github.com/skopu/sofort/fork )
|
|
28
97
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
|
29
98
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
|
30
99
|
4. Push to the branch (`git push origin my-new-feature`)
|
data/lib/sofort/client.rb
CHANGED
|
@@ -47,11 +47,12 @@ module Sofort
|
|
|
47
47
|
end
|
|
48
48
|
|
|
49
49
|
def pay_xml(amount, name, opts)
|
|
50
|
-
reason = opts[
|
|
51
|
-
currency_code = opts[
|
|
52
|
-
country_code = opts[
|
|
53
|
-
success_url = opts[
|
|
54
|
-
abort_url = opts[
|
|
50
|
+
reason = opts[:reason] || Sofort.reason
|
|
51
|
+
currency_code = opts[:currency_code] || Sofort.currency_code
|
|
52
|
+
country_code = opts[:country_code] || Sofort.country_code
|
|
53
|
+
success_url = opts[:success_url] || Sofort.success_url
|
|
54
|
+
abort_url = opts[:abort_url] || Sofort.abort_url
|
|
55
|
+
email_customer = opts[:email_customer] || Sofort.email_customer
|
|
55
56
|
|
|
56
57
|
{
|
|
57
58
|
amount: amount,
|
|
@@ -63,7 +64,7 @@ module Sofort
|
|
|
63
64
|
holder: name,
|
|
64
65
|
country_code: country_code
|
|
65
66
|
},
|
|
66
|
-
email_customer:
|
|
67
|
+
email_customer: email_customer,
|
|
67
68
|
notification_emails: {
|
|
68
69
|
notification_email: Sofort.notification_email
|
|
69
70
|
},
|
data/lib/sofort/version.rb
CHANGED
data/lib/sofort.rb
CHANGED
data/sofort-rails.gemspec
CHANGED
|
@@ -9,8 +9,8 @@ Gem::Specification.new do |spec|
|
|
|
9
9
|
spec.authors = ["skopu"]
|
|
10
10
|
spec.email = ["sebastian.skopp@gmail.com"]
|
|
11
11
|
spec.summary = %q{Ruby Client for Sofort Api}
|
|
12
|
-
spec.description = %q{
|
|
13
|
-
spec.homepage = ""
|
|
12
|
+
spec.description = %q{Gem for use Sofort Api in Ruby. Payments and check details. SOFORT Überweisung - Sofort Api Banking}
|
|
13
|
+
spec.homepage = "https://github.com/skopu/sofort"
|
|
14
14
|
spec.license = "MIT"
|
|
15
15
|
|
|
16
16
|
spec.files = `git ls-files -z`.split("\x0")
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sofort
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0
|
|
4
|
+
version: 0.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- skopu
|
|
@@ -108,7 +108,8 @@ dependencies:
|
|
|
108
108
|
- - ">="
|
|
109
109
|
- !ruby/object:Gem::Version
|
|
110
110
|
version: '0'
|
|
111
|
-
description:
|
|
111
|
+
description: Gem for use Sofort Api in Ruby. Payments and check details. SOFORT Überweisung
|
|
112
|
+
- Sofort Api Banking
|
|
112
113
|
email:
|
|
113
114
|
- sebastian.skopp@gmail.com
|
|
114
115
|
executables: []
|
|
@@ -126,7 +127,7 @@ files:
|
|
|
126
127
|
- lib/sofort/client.rb
|
|
127
128
|
- lib/sofort/version.rb
|
|
128
129
|
- sofort-rails.gemspec
|
|
129
|
-
homepage:
|
|
130
|
+
homepage: https://github.com/skopu/sofort
|
|
130
131
|
licenses:
|
|
131
132
|
- MIT
|
|
132
133
|
metadata: {}
|