spree_mollie 0.0.1 → 0.0.2
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/app/models/spree/gateway/mollie_bank_transfer.rb +43 -0
- data/app/models/spree/gateway/mollie_belflus_direct_net.rb +43 -0
- data/app/models/spree/gateway/mollie_bitcoin.rb +43 -0
- data/app/models/spree/gateway/mollie_creditcard.rb +43 -0
- data/app/models/spree/gateway/{mollie.rb → mollie_ideal.rb} +3 -2
- data/app/models/spree/gateway/mollie_kbccbc_payment_button.rb +43 -0
- data/app/models/spree/gateway/mollie_pay_pal.rb +43 -0
- data/app/models/spree/gateway/mollie_paysafecard.rb +43 -0
- data/app/models/spree/gateway/mollie_sepa_direct_debit.rb +43 -0
- data/app/models/spree/gateway/mollie_sofort_banking.rb +43 -0
- data/lib/spree_mollie/engine.rb +10 -1
- data/spree_mollie-0.0.1.gem +0 -0
- data/spree_mollie.gemspec +1 -1
- metadata +13 -13
- data/app/models/spree/mollie_checkout.rb +0 -4
- data/app/views/spree/admin/payments/_mollie_complete.html.erb +0 -20
- data/app/views/spree/admin/payments/mollie_refund.html.erb +0 -38
- data/app/views/spree/admin/payments/source_forms/_mollie.html.erb +0 -6
- data/app/views/spree/admin/payments/source_views/_mollie.html.erb +0 -35
- data/app/views/spree/checkout/payment/_mollie.html.erb +0 -9
- data/db/migrate/20130808030836_add_transaction_id_to_spree_paypal_express_checkouts.rb +0 -6
- data/db/migrate/20130809013846_add_state_to_spree_paypal_express_checkouts.rb +0 -5
- data/db/migrate/20130809014319_add_refunded_fields_to_spree_paypal_express_checkouts.rb +0 -8
- data/db/migrate/20140117051315_rename_payment_methods.rb +0 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9a67d84a1482110f3790ed12b54100e368bfc819
|
4
|
+
data.tar.gz: 521f9af2c1b66cb11239545ff4d95a08da715168
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 631573ea594e4226f1f81cfe604f2623431cb0fa9560eb16e02154710937cf67fd3ba1a5fe81d24418f619f6e0180452d3e55e57a35c6be7d3d2f980c46ea02f
|
7
|
+
data.tar.gz: 458cc1f0d45a6429ca219860a411b4e27ea6037cf9360c7a6147f523117651af1af4e8b6fd6ed343f208277a92d594b501c8ef0c9527891f6d0614d9ef188e85
|
@@ -0,0 +1,43 @@
|
|
1
|
+
require "mollie/api/client"
|
2
|
+
module Spree
|
3
|
+
class Gateway::MollieBankTransfer < Gateway
|
4
|
+
preference :partner_id, :string
|
5
|
+
|
6
|
+
def provider_class
|
7
|
+
::Mollie::API::Client
|
8
|
+
end
|
9
|
+
|
10
|
+
def payment_source_class
|
11
|
+
nil
|
12
|
+
end
|
13
|
+
|
14
|
+
def method_type
|
15
|
+
"mollie"
|
16
|
+
end
|
17
|
+
|
18
|
+
def provider
|
19
|
+
unless @mollie
|
20
|
+
@mollie = ::Mollie::API::Client.new
|
21
|
+
@mollie.setApiKey preferred_partner_id
|
22
|
+
end
|
23
|
+
return @mollie
|
24
|
+
end
|
25
|
+
|
26
|
+
def purchase(amount, express_checkout, gateway_options={})
|
27
|
+
puts amount.inspect
|
28
|
+
puts express_checkout.inspect
|
29
|
+
puts gateway_options.inspect
|
30
|
+
|
31
|
+
provider.payment.create(
|
32
|
+
amount: amount,
|
33
|
+
description: "TODO something here",
|
34
|
+
method: Mollie::API::Object::Method::BANKTRANSFER,
|
35
|
+
redirectUrl: "TODO redirect url here"
|
36
|
+
)
|
37
|
+
end
|
38
|
+
|
39
|
+
def cancel response
|
40
|
+
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
require "mollie/api/client"
|
2
|
+
module Spree
|
3
|
+
class Gateway::MollieBelflusDirectNet < Gateway
|
4
|
+
preference :partner_id, :string
|
5
|
+
|
6
|
+
def provider_class
|
7
|
+
::Mollie::API::Client
|
8
|
+
end
|
9
|
+
|
10
|
+
def payment_source_class
|
11
|
+
nil
|
12
|
+
end
|
13
|
+
|
14
|
+
def method_type
|
15
|
+
"mollie"
|
16
|
+
end
|
17
|
+
|
18
|
+
def provider
|
19
|
+
unless @mollie
|
20
|
+
@mollie = ::Mollie::API::Client.new
|
21
|
+
@mollie.setApiKey preferred_partner_id
|
22
|
+
end
|
23
|
+
return @mollie
|
24
|
+
end
|
25
|
+
|
26
|
+
def purchase(amount, express_checkout, gateway_options={})
|
27
|
+
puts amount.inspect
|
28
|
+
puts express_checkout.inspect
|
29
|
+
puts gateway_options.inspect
|
30
|
+
|
31
|
+
provider.payment.create(
|
32
|
+
amount: amount,
|
33
|
+
description: "TODO something here",
|
34
|
+
method: Mollie::API::Object::Method::BELFIUS,
|
35
|
+
redirectUrl: "TODO redirect url here"
|
36
|
+
)
|
37
|
+
end
|
38
|
+
|
39
|
+
def cancel response
|
40
|
+
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
require "mollie/api/client"
|
2
|
+
module Spree
|
3
|
+
class Gateway::MollieBitcoin < Gateway
|
4
|
+
preference :partner_id, :string
|
5
|
+
|
6
|
+
def provider_class
|
7
|
+
::Mollie::API::Client
|
8
|
+
end
|
9
|
+
|
10
|
+
def payment_source_class
|
11
|
+
nil
|
12
|
+
end
|
13
|
+
|
14
|
+
def method_type
|
15
|
+
"mollie"
|
16
|
+
end
|
17
|
+
|
18
|
+
def provider
|
19
|
+
unless @mollie
|
20
|
+
@mollie = ::Mollie::API::Client.new
|
21
|
+
@mollie.setApiKey preferred_partner_id
|
22
|
+
end
|
23
|
+
return @mollie
|
24
|
+
end
|
25
|
+
|
26
|
+
def purchase(amount, express_checkout, gateway_options={})
|
27
|
+
puts amount.inspect
|
28
|
+
puts express_checkout.inspect
|
29
|
+
puts gateway_options.inspect
|
30
|
+
|
31
|
+
provider.payment.create(
|
32
|
+
amount: amount,
|
33
|
+
description: "TODO something here",
|
34
|
+
method: Mollie::API::Object::Method::BITCOIN,
|
35
|
+
redirectUrl: "TODO redirect url here"
|
36
|
+
)
|
37
|
+
end
|
38
|
+
|
39
|
+
def cancel response
|
40
|
+
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
require "mollie/api/client"
|
2
|
+
module Spree
|
3
|
+
class Gateway::MollieCreditcard < Gateway
|
4
|
+
preference :partner_id, :string
|
5
|
+
|
6
|
+
def provider_class
|
7
|
+
::Mollie::API::Client
|
8
|
+
end
|
9
|
+
|
10
|
+
def payment_source_class
|
11
|
+
nil
|
12
|
+
end
|
13
|
+
|
14
|
+
def method_type
|
15
|
+
"mollie"
|
16
|
+
end
|
17
|
+
|
18
|
+
def provider
|
19
|
+
unless @mollie
|
20
|
+
@mollie = ::Mollie::API::Client.new
|
21
|
+
@mollie.setApiKey preferred_partner_id
|
22
|
+
end
|
23
|
+
return @mollie
|
24
|
+
end
|
25
|
+
|
26
|
+
def purchase(amount, express_checkout, gateway_options={})
|
27
|
+
puts amount.inspect
|
28
|
+
puts express_checkout.inspect
|
29
|
+
puts gateway_options.inspect
|
30
|
+
|
31
|
+
provider.payment.create(
|
32
|
+
amount: amount,
|
33
|
+
description: "TODO something here",
|
34
|
+
method: Mollie::API::Object::Method::CREDITCARD,
|
35
|
+
redirectUrl: "TODO redirect url here"
|
36
|
+
)
|
37
|
+
end
|
38
|
+
|
39
|
+
def cancel response
|
40
|
+
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require "mollie/api/client"
|
2
2
|
module Spree
|
3
|
-
class Gateway::
|
4
|
-
preference :partner_id, :string
|
3
|
+
class Gateway::MollieIDEAL < Gateway
|
4
|
+
preference :partner_id, :string
|
5
5
|
|
6
6
|
def provider_class
|
7
7
|
::Mollie::API::Client
|
@@ -31,6 +31,7 @@ module Spree
|
|
31
31
|
provider.payment.create(
|
32
32
|
amount: amount,
|
33
33
|
description: "TODO something here",
|
34
|
+
method: Mollie::API::Object::Method::IDEAL,
|
34
35
|
redirectUrl: "TODO redirect url here"
|
35
36
|
)
|
36
37
|
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
require "mollie/api/client"
|
2
|
+
module Spree
|
3
|
+
class Gateway::MollieKbccbcPaymentButton < Gateway
|
4
|
+
preference :partner_id, :string
|
5
|
+
|
6
|
+
def provider_class
|
7
|
+
::Mollie::API::Client
|
8
|
+
end
|
9
|
+
|
10
|
+
def payment_source_class
|
11
|
+
nil
|
12
|
+
end
|
13
|
+
|
14
|
+
def method_type
|
15
|
+
"mollie"
|
16
|
+
end
|
17
|
+
|
18
|
+
def provider
|
19
|
+
unless @mollie
|
20
|
+
@mollie = ::Mollie::API::Client.new
|
21
|
+
@mollie.setApiKey preferred_partner_id
|
22
|
+
end
|
23
|
+
return @mollie
|
24
|
+
end
|
25
|
+
|
26
|
+
def purchase(amount, express_checkout, gateway_options={})
|
27
|
+
puts amount.inspect
|
28
|
+
puts express_checkout.inspect
|
29
|
+
puts gateway_options.inspect
|
30
|
+
|
31
|
+
provider.payment.create(
|
32
|
+
amount: amount,
|
33
|
+
description: "TODO something here",
|
34
|
+
method: Mollie::API::Object::Method::KBC ,
|
35
|
+
redirectUrl: "TODO redirect url here"
|
36
|
+
)
|
37
|
+
end
|
38
|
+
|
39
|
+
def cancel response
|
40
|
+
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
require "mollie/api/client"
|
2
|
+
module Spree
|
3
|
+
class Gateway::MolliePayPal < Gateway
|
4
|
+
preference :partner_id, :string
|
5
|
+
|
6
|
+
def provider_class
|
7
|
+
::Mollie::API::Client
|
8
|
+
end
|
9
|
+
|
10
|
+
def payment_source_class
|
11
|
+
nil
|
12
|
+
end
|
13
|
+
|
14
|
+
def method_type
|
15
|
+
"mollie"
|
16
|
+
end
|
17
|
+
|
18
|
+
def provider
|
19
|
+
unless @mollie
|
20
|
+
@mollie = ::Mollie::API::Client.new
|
21
|
+
@mollie.setApiKey preferred_partner_id
|
22
|
+
end
|
23
|
+
return @mollie
|
24
|
+
end
|
25
|
+
|
26
|
+
def purchase(amount, express_checkout, gateway_options={})
|
27
|
+
puts amount.inspect
|
28
|
+
puts express_checkout.inspect
|
29
|
+
puts gateway_options.inspect
|
30
|
+
|
31
|
+
provider.payment.create(
|
32
|
+
amount: amount,
|
33
|
+
description: "TODO something here",
|
34
|
+
method: Mollie::API::Object::Method::PAYPAL ,
|
35
|
+
redirectUrl: "TODO redirect url here"
|
36
|
+
)
|
37
|
+
end
|
38
|
+
|
39
|
+
def cancel response
|
40
|
+
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
require "mollie/api/client"
|
2
|
+
module Spree
|
3
|
+
class Gateway::MolliePaysafecard < Gateway
|
4
|
+
preference :partner_id, :string
|
5
|
+
|
6
|
+
def provider_class
|
7
|
+
::Mollie::API::Client
|
8
|
+
end
|
9
|
+
|
10
|
+
def payment_source_class
|
11
|
+
nil
|
12
|
+
end
|
13
|
+
|
14
|
+
def method_type
|
15
|
+
"mollie"
|
16
|
+
end
|
17
|
+
|
18
|
+
def provider
|
19
|
+
unless @mollie
|
20
|
+
@mollie = ::Mollie::API::Client.new
|
21
|
+
@mollie.setApiKey preferred_partner_id
|
22
|
+
end
|
23
|
+
return @mollie
|
24
|
+
end
|
25
|
+
|
26
|
+
def purchase(amount, express_checkout, gateway_options={})
|
27
|
+
puts amount.inspect
|
28
|
+
puts express_checkout.inspect
|
29
|
+
puts gateway_options.inspect
|
30
|
+
|
31
|
+
provider.payment.create(
|
32
|
+
amount: amount,
|
33
|
+
description: "TODO something here",
|
34
|
+
method: Mollie::API::Object::Method::PAYSAFECARD,
|
35
|
+
redirectUrl: "TODO redirect url here"
|
36
|
+
)
|
37
|
+
end
|
38
|
+
|
39
|
+
def cancel response
|
40
|
+
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
require "mollie/api/client"
|
2
|
+
module Spree
|
3
|
+
class Gateway::MollieSepaDirectDebit < Gateway
|
4
|
+
preference :partner_id, :string
|
5
|
+
|
6
|
+
def provider_class
|
7
|
+
::Mollie::API::Client
|
8
|
+
end
|
9
|
+
|
10
|
+
def payment_source_class
|
11
|
+
nil
|
12
|
+
end
|
13
|
+
|
14
|
+
def method_type
|
15
|
+
"mollie"
|
16
|
+
end
|
17
|
+
|
18
|
+
def provider
|
19
|
+
unless @mollie
|
20
|
+
@mollie = ::Mollie::API::Client.new
|
21
|
+
@mollie.setApiKey preferred_partner_id
|
22
|
+
end
|
23
|
+
return @mollie
|
24
|
+
end
|
25
|
+
|
26
|
+
def purchase(amount, express_checkout, gateway_options={})
|
27
|
+
puts amount.inspect
|
28
|
+
puts express_checkout.inspect
|
29
|
+
puts gateway_options.inspect
|
30
|
+
|
31
|
+
provider.payment.create(
|
32
|
+
amount: amount,
|
33
|
+
description: "TODO something here",
|
34
|
+
method: Mollie::API::Object::Method::DIRECTDEBIT,
|
35
|
+
redirectUrl: "TODO redirect url here"
|
36
|
+
)
|
37
|
+
end
|
38
|
+
|
39
|
+
def cancel response
|
40
|
+
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
require "mollie/api/client"
|
2
|
+
module Spree
|
3
|
+
class Gateway::MollieSOFORTBanking < Gateway
|
4
|
+
preference :partner_id, :string
|
5
|
+
|
6
|
+
def provider_class
|
7
|
+
::Mollie::API::Client
|
8
|
+
end
|
9
|
+
|
10
|
+
def payment_source_class
|
11
|
+
nil
|
12
|
+
end
|
13
|
+
|
14
|
+
def method_type
|
15
|
+
"mollie"
|
16
|
+
end
|
17
|
+
|
18
|
+
def provider
|
19
|
+
unless @mollie
|
20
|
+
@mollie = ::Mollie::API::Client.new
|
21
|
+
@mollie.setApiKey preferred_partner_id
|
22
|
+
end
|
23
|
+
return @mollie
|
24
|
+
end
|
25
|
+
|
26
|
+
def purchase(amount, express_checkout, gateway_options={})
|
27
|
+
puts amount.inspect
|
28
|
+
puts express_checkout.inspect
|
29
|
+
puts gateway_options.inspect
|
30
|
+
|
31
|
+
provider.payment.create(
|
32
|
+
amount: amount,
|
33
|
+
description: "TODO something here",
|
34
|
+
method: Mollie::API::Object::Method::SOFORT,
|
35
|
+
redirectUrl: "TODO redirect url here"
|
36
|
+
)
|
37
|
+
end
|
38
|
+
|
39
|
+
def cancel response
|
40
|
+
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
data/lib/spree_mollie/engine.rb
CHANGED
@@ -20,7 +20,16 @@ module SpreeMollie
|
|
20
20
|
config.to_prepare &method(:activate).to_proc
|
21
21
|
|
22
22
|
initializer "spree.mollie.payment_methods", :after => "spree.register.payment_methods" do |app|
|
23
|
-
app.config.spree.payment_methods << Spree::Gateway::
|
23
|
+
app.config.spree.payment_methods << Spree::Gateway::MollieCreditcard
|
24
|
+
app.config.spree.payment_methods << Spree::Gateway::MollieSOFORTBanking
|
25
|
+
app.config.spree.payment_methods << Spree::Gateway::MollieIDEAL
|
26
|
+
app.config.spree.payment_methods << Spree::Gateway::MollieBankTransfer
|
27
|
+
app.config.spree.payment_methods << Spree::Gateway::MollieSepaDirectDebit
|
28
|
+
app.config.spree.payment_methods << Spree::Gateway::MolliePayPal
|
29
|
+
app.config.spree.payment_methods << Spree::Gateway::MollieBitcoin
|
30
|
+
app.config.spree.payment_methods << Spree::Gateway::MolliePaysafecard
|
31
|
+
app.config.spree.payment_methods << Spree::Gateway::MollieKbccbcPaymentButton
|
32
|
+
app.config.spree.payment_methods << Spree::Gateway::MollieBelflusDirectNet
|
24
33
|
end
|
25
34
|
end
|
26
35
|
end
|
Binary file
|
data/spree_mollie.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spree_mollie
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- rostislav.korin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-01-
|
11
|
+
date: 2017-01-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: spree_core
|
@@ -182,25 +182,25 @@ files:
|
|
182
182
|
- app/assets/stylesheets/spree/frontend/spree_mollie.css
|
183
183
|
- app/controllers/spree/admin/mollie_return_controller.rb
|
184
184
|
- app/controllers/spree/admin/payments_controller_decorator.rb
|
185
|
-
- app/models/spree/gateway/
|
186
|
-
- app/models/spree/
|
187
|
-
- app/
|
188
|
-
- app/
|
189
|
-
- app/
|
190
|
-
- app/
|
191
|
-
- app/
|
185
|
+
- app/models/spree/gateway/mollie_bank_transfer.rb
|
186
|
+
- app/models/spree/gateway/mollie_belflus_direct_net.rb
|
187
|
+
- app/models/spree/gateway/mollie_bitcoin.rb
|
188
|
+
- app/models/spree/gateway/mollie_creditcard.rb
|
189
|
+
- app/models/spree/gateway/mollie_ideal.rb
|
190
|
+
- app/models/spree/gateway/mollie_kbccbc_payment_button.rb
|
191
|
+
- app/models/spree/gateway/mollie_pay_pal.rb
|
192
|
+
- app/models/spree/gateway/mollie_paysafecard.rb
|
193
|
+
- app/models/spree/gateway/mollie_sepa_direct_debit.rb
|
194
|
+
- app/models/spree/gateway/mollie_sofort_banking.rb
|
192
195
|
- bin/rails
|
193
196
|
- config/locales/en.yml
|
194
197
|
- config/routes.rb
|
195
|
-
- db/migrate/20130808030836_add_transaction_id_to_spree_paypal_express_checkouts.rb
|
196
|
-
- db/migrate/20130809013846_add_state_to_spree_paypal_express_checkouts.rb
|
197
|
-
- db/migrate/20130809014319_add_refunded_fields_to_spree_paypal_express_checkouts.rb
|
198
|
-
- db/migrate/20140117051315_rename_payment_methods.rb
|
199
198
|
- lib/generators/spree_mollie/install/install_generator.rb
|
200
199
|
- lib/spree_mollie.rb
|
201
200
|
- lib/spree_mollie/engine.rb
|
202
201
|
- lib/spree_mollie/factories.rb
|
203
202
|
- spec/spec_helper.rb
|
203
|
+
- spree_mollie-0.0.1.gem
|
204
204
|
- spree_mollie.gemspec
|
205
205
|
homepage: http://www.spreecommerce.com
|
206
206
|
licenses:
|
@@ -1,20 +0,0 @@
|
|
1
|
-
<%= form_tag mollie_refund_admin_order_payment_path(@order, @payment) do %>
|
2
|
-
<div class="label-block left five columns alpha">
|
3
|
-
<div>
|
4
|
-
<fieldset data-hook="admin_variant_new_form">
|
5
|
-
<legend><%= Spree.t('refund', :scope => :mollie) %></legend>
|
6
|
-
<div class='field'>
|
7
|
-
<%= label_tag 'refund_amount', Spree.t(:refund_amount, :scope => 'mollie') %>
|
8
|
-
<small><em><%= Spree.t(:original_amount, :scope => 'mollie', :amount => @payment.display_amount) %></em></small><br>
|
9
|
-
<% symbol = ::Money.new(1, Spree::Config[:currency]).symbol %>
|
10
|
-
<% if Spree::Config[:currency_symbol_position] == "before" %>
|
11
|
-
<%= symbol %><%= text_field_tag 'refund_amount', @payment.amount %>
|
12
|
-
<% else %>
|
13
|
-
<%= text_field_tag 'refund_amount', @payment.amount %><%= symbol %>
|
14
|
-
<% end %>
|
15
|
-
</div>
|
16
|
-
<%= button Spree.t(:refund, scope: 'mollie'), 'money' %>
|
17
|
-
</fieldset>
|
18
|
-
</div>
|
19
|
-
</div>
|
20
|
-
<% end %>
|
@@ -1,38 +0,0 @@
|
|
1
|
-
<%= render :partial => 'spree/admin/shared/order_tabs', :locals => { :current => 'Payments' } %>
|
2
|
-
|
3
|
-
<% content_for :page_title do %>
|
4
|
-
/ <%= link_to Spree.t(:payments), admin_order_payments_path(@order) %>
|
5
|
-
/ <%= payment_method_name(@payment) %>
|
6
|
-
/ <%= Spree.t('refund', :scope => :mollie) %>
|
7
|
-
<% end %>
|
8
|
-
|
9
|
-
<%= form_tag mollie_refund_admin_order_payment_path(@order, @payment) do %>
|
10
|
-
<div class="label-block left five columns alpha">
|
11
|
-
<div>
|
12
|
-
<fieldset data-hook="admin_variant_new_form">
|
13
|
-
<legend><%= Spree.t('refund', :scope => :mollie) %></legend>
|
14
|
-
<div class='form-group'>
|
15
|
-
<%= label_tag 'refund_amount', Spree.t(:refund_amount, :scope => 'mollie') %>
|
16
|
-
<small><em><%= Spree.t(:original_amount, :scope => 'mollie', :amount => @payment.display_amount) %></em></small><br>
|
17
|
-
</div>
|
18
|
-
|
19
|
-
<% currency = ::Money::Currency.new(Spree::Config[:currency]) %>
|
20
|
-
<div class="form-group">
|
21
|
-
<div class="input-group">
|
22
|
-
<% if currency.symbol_first %>
|
23
|
-
<span class="input-group-addon" id="basic-addon1"><%= currency.symbol %></span>
|
24
|
-
<%= text_field_tag 'refund_amount', @payment.amount, class: 'form-control' %>
|
25
|
-
<% else %>
|
26
|
-
<%= text_field_tag 'refund_amount', @payment.amount, class: 'form-control' %>
|
27
|
-
<span class="input-group-addon" id="basic-addon1"><%= currency.symbol %></span>
|
28
|
-
<% end %>
|
29
|
-
</div>
|
30
|
-
</div>
|
31
|
-
|
32
|
-
<div class="form-group">
|
33
|
-
<%= button Spree.t(:refund, scope: 'mollie'), 'money', class: 'btn btn-primary' %>
|
34
|
-
</div>
|
35
|
-
</fieldset>
|
36
|
-
</div>
|
37
|
-
</div>
|
38
|
-
<% end %>
|
@@ -1,35 +0,0 @@
|
|
1
|
-
<fieldset data-hook="mollie">
|
2
|
-
<legend align="center"><%= Spree.t(:transaction, :scope => :mollie) %></legend>
|
3
|
-
|
4
|
-
<div class="row">
|
5
|
-
<div class="alpha six columns">
|
6
|
-
<dl>
|
7
|
-
<dt><%= Spree.t(:payer_id, :scope => :mollie) %>:</dt>
|
8
|
-
<dd><%= payment.source.payer_id %></dd>
|
9
|
-
|
10
|
-
<dt><%= Spree.t(:token, :scope => :mollie) %>:</dt>
|
11
|
-
<dd><%= payment.source.token %></dd>
|
12
|
-
|
13
|
-
<dt><%= Spree.t(:transaction_id) %>:</dt>
|
14
|
-
<dd><%= payment.source.transaction_id %></dd>
|
15
|
-
</dl>
|
16
|
-
</div>
|
17
|
-
|
18
|
-
<% if payment.source.state != 'refunded' %>
|
19
|
-
<%= button_link_to Spree.t('actions.refund', scope: :mollie), spree.mollie_refund_admin_order_payment_path(@order, payment), icon: 'money' %>
|
20
|
-
<% else %>
|
21
|
-
<div class="alpha six columns">
|
22
|
-
<dl>
|
23
|
-
<dt><%= Spree.t(:state, :scope => :mollie) %>:</dt>
|
24
|
-
<dd><%= payment.source.state.titleize %></dd>
|
25
|
-
|
26
|
-
<dt><%= Spree.t(:refunded_at, :scope => :mollie) %>:</dt>
|
27
|
-
<dd><%= pretty_time(payment.source.refunded_at) %></dd>
|
28
|
-
|
29
|
-
<dt><%= Spree.t(:refund_transaction_id, :scope => :mollie) %>:</dt>
|
30
|
-
<dd><%= payment.source.refund_transaction_id %></dd>
|
31
|
-
</dl>
|
32
|
-
</div>
|
33
|
-
<% end %>
|
34
|
-
</div>
|
35
|
-
</fieldset>
|
@@ -1,8 +0,0 @@
|
|
1
|
-
class AddRefundedFieldsToSpreeMollieCheckouts < ActiveRecord::Migration
|
2
|
-
def change
|
3
|
-
add_column :spree_mollie_checkouts, :refund_transaction_id, :string
|
4
|
-
add_column :spree_mollie_checkouts, :refunded_at, :datetime
|
5
|
-
add_column :spree_mollie_checkouts, :refund_type, :string
|
6
|
-
add_column :spree_mollie_checkouts, :created_at, :datetime
|
7
|
-
end
|
8
|
-
end
|
@@ -1,13 +0,0 @@
|
|
1
|
-
class RenamePaymentMethods < ActiveRecord::Migration
|
2
|
-
def up
|
3
|
-
execute <<-SQL
|
4
|
-
update spree_payment_methods set type = 'Spree::Gateway::Mollie' WHERE type = 'Spree::BillingIntegration::Mollie'
|
5
|
-
SQL
|
6
|
-
end
|
7
|
-
|
8
|
-
def down
|
9
|
-
execute <<-SQL
|
10
|
-
update spree_payment_methods set type = 'Spree::BillingIntegration::Mollie' WHERE type = 'Spree::Gateway::Mollie'
|
11
|
-
SQL
|
12
|
-
end
|
13
|
-
end
|