spree_gateway 3.3.0.rc2 → 3.3.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/config/locales/bg.yml +0 -7
- data/config/locales/de.yml +0 -7
- data/config/locales/en.yml +0 -7
- data/config/locales/sv.yml +0 -7
- data/lib/spree_gateway/engine.rb +0 -1
- data/spree_gateway.gemspec +1 -1
- metadata +5 -28
- data/app/models/spree/billing_integration/skrill/quick_checkout.rb +0 -48
- data/app/models/spree/skrill_transaction.rb +0 -19
- data/config/routes.rb +0 -13
- data/db/migrate/20111118164631_create_skrill_transactions.rb +0 -13
- data/lib/active_merchant/billing/skrill.rb +0 -18
- data/lib/controllers/frontend/spree/checkout_controller_decorator.rb +0 -51
- data/lib/controllers/frontend/spree/skrill_status_controller.rb +0 -39
- data/lib/views/backend/spree/admin/payments/source_views/_quickcheckout.html.erb +0 -39
- data/lib/views/frontend/spree/checkout/payment/_quickcheckout.html.erb +0 -26
- data/spec/controllers/spree/checkout_controller_spec.rb +0 -13
- data/spec/controllers/spree/skrill_status_controller_spec.rb +0 -8
- data/spec/factories/payment_method_factory.rb +0 -5
- data/spec/factories/skrill_transaction_factory.rb +0 -10
- data/spec/lib/active_merchant/billing_skrill_spec.rb +0 -18
- data/spec/models/billing_integration/skrill_quick_checkout_spec.rb +0 -11
- data/spec/models/skrill_transaction_spec.rb +0 -9
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 004df4f3c77bf0c04a3b9d59538ed7dafaea22b6
|
|
4
|
+
data.tar.gz: a020217f107e4dbee4c3c19a41681458cf8690b8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 541ed6c0fe8ff8672158525d467c0bb5ce0f29fe19077d9938820e854039373e1698c59519f7f59978e947998012b9a0e027de2791dfb33345ff1ad398dc6b85
|
|
7
|
+
data.tar.gz: 8b2acfe180f5107865211355993a4d5df8245e7d7a77cd373cc251c8ed68a1df63fb54ce0d82d8d6d4c839cb6db1da4b34860f4b06f35ce5154980e3a1d8e945
|
data/config/locales/bg.yml
CHANGED
|
@@ -2,10 +2,3 @@
|
|
|
2
2
|
bg:
|
|
3
3
|
spree:
|
|
4
4
|
payment_has_been_cancelled: Плащането беше прекъснато.
|
|
5
|
-
complete_skrill_checkout: Моля довършете Вашето плащане със Skrill преди да продължите
|
|
6
|
-
skrill: Skrill
|
|
7
|
-
skrill_transaction: Транзакция
|
|
8
|
-
skrill_customer_id: Клиентски номер
|
|
9
|
-
skrill_transaction_id: Номер на транкцията
|
|
10
|
-
skrill_payment_type: Вид на плащане
|
|
11
|
-
skrill_payment_currency: Валута
|
data/config/locales/de.yml
CHANGED
|
@@ -2,10 +2,3 @@
|
|
|
2
2
|
de:
|
|
3
3
|
spree:
|
|
4
4
|
payment_has_been_cancelled: Die Zahlung wurde abgebrochen.
|
|
5
|
-
complete_skrill_checkout: Bitte schliessen Sie die Skrill-Zahlung ab
|
|
6
|
-
skrill: Skrill
|
|
7
|
-
skrill_transaction: Transaktion
|
|
8
|
-
skrill_customer_id: Kunden ID
|
|
9
|
-
skrill_transaction_id: Transaktions ID
|
|
10
|
-
skrill_payment_type: Bezahlart
|
|
11
|
-
skrill_payment_currency: Währung
|
data/config/locales/en.yml
CHANGED
|
@@ -2,13 +2,6 @@
|
|
|
2
2
|
en:
|
|
3
3
|
spree:
|
|
4
4
|
payment_has_been_cancelled: The payment has been cancelled.
|
|
5
|
-
complete_skrill_checkout: Please complete Skrill checkout before continuing
|
|
6
|
-
skrill: Skrill
|
|
7
|
-
skrill_transaction: Transaction
|
|
8
|
-
skrill_customer_id: Customer ID
|
|
9
|
-
skrill_transaction_id: Transaction ID
|
|
10
|
-
skrill_payment_type: Payment Type
|
|
11
|
-
skrill_payment_currency: Payment Currency
|
|
12
5
|
log_entry:
|
|
13
6
|
braintree:
|
|
14
7
|
message: Message
|
data/config/locales/sv.yml
CHANGED
|
@@ -2,10 +2,3 @@
|
|
|
2
2
|
sv:
|
|
3
3
|
spree:
|
|
4
4
|
payment_has_been_cancelled: Betalningen har avbrutits.
|
|
5
|
-
complete_skrill_checkout: Var god fyll i Skrill kassan innan du fortsätter
|
|
6
|
-
skrill: Skrill
|
|
7
|
-
skrill_transaction: Transaktion
|
|
8
|
-
skrill_customer_id: Kund ID
|
|
9
|
-
skrill_transaction_id: Transaktion ID
|
|
10
|
-
skrill_payment_type: Betalningstyp
|
|
11
|
-
skrill_payment_currency: Betalningsvaluta
|
data/lib/spree_gateway/engine.rb
CHANGED
|
@@ -5,7 +5,6 @@ module SpreeGateway
|
|
|
5
5
|
config.autoload_paths += %W(#{config.root}/lib)
|
|
6
6
|
|
|
7
7
|
initializer "spree.gateway.payment_methods", :after => "spree.register.payment_methods" do |app|
|
|
8
|
-
app.config.spree.payment_methods << Spree::BillingIntegration::Skrill::QuickCheckout
|
|
9
8
|
app.config.spree.payment_methods << Spree::Gateway::AuthorizeNet
|
|
10
9
|
app.config.spree.payment_methods << Spree::Gateway::AuthorizeNetCim
|
|
11
10
|
app.config.spree.payment_methods << Spree::Gateway::BalancedGateway
|
data/spree_gateway.gemspec
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: spree_gateway
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.3.0
|
|
4
|
+
version: 3.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Spree Commerce
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-07-
|
|
11
|
+
date: 2017-07-24 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: spree_core
|
|
@@ -354,7 +354,6 @@ files:
|
|
|
354
354
|
- README.md
|
|
355
355
|
- Rakefile
|
|
356
356
|
- app/models/spree/billing_integration.rb
|
|
357
|
-
- app/models/spree/billing_integration/skrill/quick_checkout.rb
|
|
358
357
|
- app/models/spree/gateway/authorize_net.rb
|
|
359
358
|
- app/models/spree/gateway/authorize_net_cim.rb
|
|
360
359
|
- app/models/spree/gateway/balanced_gateway.rb
|
|
@@ -381,13 +380,10 @@ files:
|
|
|
381
380
|
- app/models/spree/gateway/stripe_gateway.rb
|
|
382
381
|
- app/models/spree/gateway/usa_epay_transaction.rb
|
|
383
382
|
- app/models/spree/gateway/worldpay.rb
|
|
384
|
-
- app/models/spree/skrill_transaction.rb
|
|
385
383
|
- config/locales/bg.yml
|
|
386
384
|
- config/locales/de.yml
|
|
387
385
|
- config/locales/en.yml
|
|
388
386
|
- config/locales/sv.yml
|
|
389
|
-
- config/routes.rb
|
|
390
|
-
- db/migrate/20111118164631_create_skrill_transactions.rb
|
|
391
387
|
- db/migrate/20121017004102_update_braintree_payment_method_type.rb
|
|
392
388
|
- db/migrate/20130213222555_update_stripe_payment_method_type.rb
|
|
393
389
|
- db/migrate/20130415222802_update_balanced_payment_method_type.rb
|
|
@@ -396,11 +392,8 @@ files:
|
|
|
396
392
|
- gemfiles/spree_3_1.gemfile
|
|
397
393
|
- gemfiles/spree_3_2.gemfile
|
|
398
394
|
- gemfiles/spree_master.gemfile
|
|
399
|
-
- lib/active_merchant/billing/skrill.rb
|
|
400
395
|
- lib/assets/javascripts/spree/frontend/spree_gateway.js
|
|
401
396
|
- lib/assets/stylesheets/spree/frontend/spree_gateway.css
|
|
402
|
-
- lib/controllers/frontend/spree/checkout_controller_decorator.rb
|
|
403
|
-
- lib/controllers/frontend/spree/skrill_status_controller.rb
|
|
404
397
|
- lib/generators/spree_gateway/install/install_generator.rb
|
|
405
398
|
- lib/spree_gateway.rb
|
|
406
399
|
- lib/spree_gateway/engine.rb
|
|
@@ -408,18 +401,10 @@ files:
|
|
|
408
401
|
- lib/views/backend/spree/admin/log_entries/_stripe.html.erb
|
|
409
402
|
- lib/views/backend/spree/admin/payments/source_forms/_quickcheckout.html.erb
|
|
410
403
|
- lib/views/backend/spree/admin/payments/source_forms/_stripe.html.erb
|
|
411
|
-
- lib/views/backend/spree/admin/payments/source_views/_quickcheckout.html.erb
|
|
412
404
|
- lib/views/backend/spree/admin/payments/source_views/_stripe.html.erb
|
|
413
|
-
- lib/views/frontend/spree/checkout/payment/_quickcheckout.html.erb
|
|
414
405
|
- lib/views/frontend/spree/checkout/payment/_stripe.html.erb
|
|
415
406
|
- script/rails
|
|
416
|
-
- spec/controllers/spree/checkout_controller_spec.rb
|
|
417
|
-
- spec/controllers/spree/skrill_status_controller_spec.rb
|
|
418
|
-
- spec/factories/payment_method_factory.rb
|
|
419
|
-
- spec/factories/skrill_transaction_factory.rb
|
|
420
407
|
- spec/features/stripe_checkout_spec.rb
|
|
421
|
-
- spec/lib/active_merchant/billing_skrill_spec.rb
|
|
422
|
-
- spec/models/billing_integration/skrill_quick_checkout_spec.rb
|
|
423
408
|
- spec/models/gateway/authorize_net_cim_spec.rb
|
|
424
409
|
- spec/models/gateway/authorize_net_spec.rb
|
|
425
410
|
- spec/models/gateway/balanced_gateway_spec.rb
|
|
@@ -444,7 +429,6 @@ files:
|
|
|
444
429
|
- spec/models/gateway/stripe_gateway_spec.rb
|
|
445
430
|
- spec/models/gateway/usa_epay_transaction_spec.rb
|
|
446
431
|
- spec/models/gateway/worldpay_spec.rb
|
|
447
|
-
- spec/models/skrill_transaction_spec.rb
|
|
448
432
|
- spec/spec_helper.rb
|
|
449
433
|
- spec/support/wait_for_stripe.rb
|
|
450
434
|
- spree_gateway.gemspec
|
|
@@ -463,24 +447,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
463
447
|
version: '0'
|
|
464
448
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
465
449
|
requirements:
|
|
466
|
-
- - "
|
|
450
|
+
- - ">="
|
|
467
451
|
- !ruby/object:Gem::Version
|
|
468
|
-
version:
|
|
452
|
+
version: '0'
|
|
469
453
|
requirements:
|
|
470
454
|
- none
|
|
471
455
|
rubyforge_project:
|
|
472
|
-
rubygems_version: 2.6.
|
|
456
|
+
rubygems_version: 2.6.11
|
|
473
457
|
signing_key:
|
|
474
458
|
specification_version: 4
|
|
475
459
|
summary: Additional Payment Gateways for Spree Commerce
|
|
476
460
|
test_files:
|
|
477
|
-
- spec/controllers/spree/checkout_controller_spec.rb
|
|
478
|
-
- spec/controllers/spree/skrill_status_controller_spec.rb
|
|
479
|
-
- spec/factories/payment_method_factory.rb
|
|
480
|
-
- spec/factories/skrill_transaction_factory.rb
|
|
481
461
|
- spec/features/stripe_checkout_spec.rb
|
|
482
|
-
- spec/lib/active_merchant/billing_skrill_spec.rb
|
|
483
|
-
- spec/models/billing_integration/skrill_quick_checkout_spec.rb
|
|
484
462
|
- spec/models/gateway/authorize_net_cim_spec.rb
|
|
485
463
|
- spec/models/gateway/authorize_net_spec.rb
|
|
486
464
|
- spec/models/gateway/balanced_gateway_spec.rb
|
|
@@ -505,6 +483,5 @@ test_files:
|
|
|
505
483
|
- spec/models/gateway/stripe_gateway_spec.rb
|
|
506
484
|
- spec/models/gateway/usa_epay_transaction_spec.rb
|
|
507
485
|
- spec/models/gateway/worldpay_spec.rb
|
|
508
|
-
- spec/models/skrill_transaction_spec.rb
|
|
509
486
|
- spec/spec_helper.rb
|
|
510
487
|
- spec/support/wait_for_stripe.rb
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
module Spree
|
|
2
|
-
class BillingIntegration::Skrill::QuickCheckout < BillingIntegration
|
|
3
|
-
preference :merchant_id, :string
|
|
4
|
-
preference :language, :string, :default => 'EN'
|
|
5
|
-
preference :currency, :string, :default => 'EUR'
|
|
6
|
-
preference :payment_options, :string, :default => 'ACC'
|
|
7
|
-
preference :pay_to_email, :string , :default => 'your@merchant.email_here'
|
|
8
|
-
|
|
9
|
-
def provider_class
|
|
10
|
-
ActiveMerchant::Billing::Skrill
|
|
11
|
-
end
|
|
12
|
-
|
|
13
|
-
def redirect_url(order, opts = {})
|
|
14
|
-
opts.merge! self.preferences
|
|
15
|
-
|
|
16
|
-
set_global_options(opts)
|
|
17
|
-
|
|
18
|
-
opts[:detail1_text] = order.number
|
|
19
|
-
opts[:detail1_description] = "Order:"
|
|
20
|
-
|
|
21
|
-
opts[:pay_from_email] = order.email
|
|
22
|
-
opts[:firstname] = order.bill_address.firstname
|
|
23
|
-
opts[:lastname] = order.bill_address.lastname
|
|
24
|
-
opts[:address] = order.bill_address.address1
|
|
25
|
-
opts[:address2] = order.bill_address.address2
|
|
26
|
-
opts[:phone_number] = order.bill_address.phone.gsub(/\D/,'') if order.bill_address.phone
|
|
27
|
-
opts[:city] = order.bill_address.city
|
|
28
|
-
opts[:postal_code] = order.bill_address.zipcode
|
|
29
|
-
opts[:state] = order.bill_address.state.nil? ? order.bill_address.state_name.to_s : order.bill_address.state.abbr
|
|
30
|
-
opts[:country] = order.bill_address.country.name
|
|
31
|
-
opts[:pay_to_email] = self.preferred_pay_to_email
|
|
32
|
-
opts[:hide_login] = 1
|
|
33
|
-
opts[:merchant_fields] = 'platform,order_id,payment_method_id'
|
|
34
|
-
opts[:platform] = 'Spree'
|
|
35
|
-
opts[:order_id] = order.number
|
|
36
|
-
|
|
37
|
-
skrill = self.provider
|
|
38
|
-
skrill.payment_url(opts)
|
|
39
|
-
end
|
|
40
|
-
|
|
41
|
-
private
|
|
42
|
-
def set_global_options(opts)
|
|
43
|
-
opts[:recipient_description] = Spree::Config[:site_name]
|
|
44
|
-
opts[:payment_methods] = self.preferred_payment_options
|
|
45
|
-
end
|
|
46
|
-
|
|
47
|
-
end
|
|
48
|
-
end
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
module Spree
|
|
2
|
-
class SkrillTransaction < ActiveRecord::Base
|
|
3
|
-
has_many :payments, :as => :source
|
|
4
|
-
|
|
5
|
-
def actions
|
|
6
|
-
[]
|
|
7
|
-
end
|
|
8
|
-
|
|
9
|
-
def self.create_from_postback(params)
|
|
10
|
-
SkrillTransaction.create(:email => params[:pay_from_email],
|
|
11
|
-
:amount => params[:mb_amount],
|
|
12
|
-
:currency => params[:mb_currency],
|
|
13
|
-
:transaction_id => params[:mb_transaction_id],
|
|
14
|
-
:customer_id => params[:customer_id],
|
|
15
|
-
:payment_type => params[:payment_type])
|
|
16
|
-
end
|
|
17
|
-
|
|
18
|
-
end
|
|
19
|
-
end
|
data/config/routes.rb
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
Spree::Core::Engine.add_routes do
|
|
2
|
-
# Add your extension routes here
|
|
3
|
-
resources :orders, :only => [] do
|
|
4
|
-
resource :checkout, :controller => 'checkout' do
|
|
5
|
-
member do
|
|
6
|
-
get :skrill_cancel
|
|
7
|
-
get :skrill_return
|
|
8
|
-
end
|
|
9
|
-
end
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
post '/skrill' => 'skrill_status#update'
|
|
13
|
-
end
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
class CreateSkrillTransactions < SpreeExtension::Migration[4.2]
|
|
2
|
-
def change
|
|
3
|
-
create_table :spree_skrill_transactions do |t|
|
|
4
|
-
t.string :email
|
|
5
|
-
t.float :amount
|
|
6
|
-
t.string :currency
|
|
7
|
-
t.integer :transaction_id
|
|
8
|
-
t.integer :customer_id
|
|
9
|
-
t.string :payment_type
|
|
10
|
-
t.timestamps null: true
|
|
11
|
-
end
|
|
12
|
-
end
|
|
13
|
-
end
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
module ActiveMerchant #:nodoc:
|
|
2
|
-
module Billing #:nodoc:
|
|
3
|
-
class Skrill < Gateway
|
|
4
|
-
|
|
5
|
-
def service_url
|
|
6
|
-
"https://www.moneybookers.com/app/payment.pl"
|
|
7
|
-
end
|
|
8
|
-
|
|
9
|
-
def payment_url(opts)
|
|
10
|
-
post = PostData.new
|
|
11
|
-
post.merge! opts
|
|
12
|
-
|
|
13
|
-
"#{service_url}?#{post.to_s}"
|
|
14
|
-
end
|
|
15
|
-
|
|
16
|
-
end
|
|
17
|
-
end
|
|
18
|
-
end
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
module Spree
|
|
2
|
-
CheckoutController.class_eval do
|
|
3
|
-
before_action :confirm_skrill, :only => [:update]
|
|
4
|
-
|
|
5
|
-
def skrill_return
|
|
6
|
-
|
|
7
|
-
unless @order.payments.where(:source_type => 'Spree::SkrillTransaction').present?
|
|
8
|
-
payment_method = PaymentMethod.find(params[:payment_method_id])
|
|
9
|
-
skrill_transaction = SkrillTransaction.new
|
|
10
|
-
|
|
11
|
-
payment = @order.payments.create({:amount => @order.total,
|
|
12
|
-
:source => skrill_transaction,
|
|
13
|
-
:payment_method => payment_method},
|
|
14
|
-
:without_protection => true)
|
|
15
|
-
payment.started_processing!
|
|
16
|
-
payment.pend!
|
|
17
|
-
end
|
|
18
|
-
|
|
19
|
-
@order.update_attributes({:state => "complete", :completed_at => Time.now}, :without_protection => true)
|
|
20
|
-
|
|
21
|
-
until @order.state == "complete"
|
|
22
|
-
if @order.next!
|
|
23
|
-
@order.update_with_updater!
|
|
24
|
-
state_callback(:after)
|
|
25
|
-
end
|
|
26
|
-
end
|
|
27
|
-
|
|
28
|
-
@order.finalize!
|
|
29
|
-
|
|
30
|
-
flash.notice = Spree.t(:order_processed_successfully)
|
|
31
|
-
redirect_to completion_route
|
|
32
|
-
end
|
|
33
|
-
|
|
34
|
-
def skrill_cancel
|
|
35
|
-
flash[:error] = Spree.t(:payment_has_been_cancelled)
|
|
36
|
-
redirect_to edit_order_path(@order)
|
|
37
|
-
end
|
|
38
|
-
|
|
39
|
-
private
|
|
40
|
-
def confirm_skrill
|
|
41
|
-
return unless (params[:state] == "payment") && params[:order] && params[:order][:payments_attributes]
|
|
42
|
-
|
|
43
|
-
payment_method = PaymentMethod.find(params[:order][:payments_attributes].first[:payment_method_id])
|
|
44
|
-
if payment_method.kind_of?(BillingIntegration::Skrill::QuickCheckout)
|
|
45
|
-
#TODO confirming payment method
|
|
46
|
-
redirect_to edit_order_checkout_url(@order, :state => 'payment'),
|
|
47
|
-
:notice => Spree.t(:complete_skrill_checkout)
|
|
48
|
-
end
|
|
49
|
-
end
|
|
50
|
-
end
|
|
51
|
-
end
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
module Spree
|
|
2
|
-
class SkrillStatusController < ApplicationController
|
|
3
|
-
def update
|
|
4
|
-
@order = Order.find_by_number!(params[:order_id])
|
|
5
|
-
payment_method = PaymentMethod.find(params[:payment_method_id])
|
|
6
|
-
skrill_transaction = SkrillTransaction.create_from_postback params
|
|
7
|
-
|
|
8
|
-
payment = @order.payments.where(:state => "pending",
|
|
9
|
-
:payment_method_id => payment_method).first
|
|
10
|
-
|
|
11
|
-
if payment
|
|
12
|
-
payment.source = skrill_transaction
|
|
13
|
-
payment.save
|
|
14
|
-
else
|
|
15
|
-
payment = @order.payments.create(:amount => @order.total,
|
|
16
|
-
:source => skrill_transaction,
|
|
17
|
-
:payment_method => payment_method)
|
|
18
|
-
end
|
|
19
|
-
|
|
20
|
-
payment.started_processing!
|
|
21
|
-
|
|
22
|
-
unless payment.completed?
|
|
23
|
-
case params[:status]
|
|
24
|
-
when "0"
|
|
25
|
-
payment.pend #may already be pending
|
|
26
|
-
when "2" #processed / captured
|
|
27
|
-
payment.complete!
|
|
28
|
-
when "-1", "-2"
|
|
29
|
-
payment.failure!
|
|
30
|
-
else
|
|
31
|
-
raise "Unexpected payment status"
|
|
32
|
-
end
|
|
33
|
-
end
|
|
34
|
-
|
|
35
|
-
render :text => ""
|
|
36
|
-
end
|
|
37
|
-
|
|
38
|
-
end
|
|
39
|
-
end
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
<fieldset>
|
|
2
|
-
<legend><%= Spree.t(:skrill) %></legend>
|
|
3
|
-
|
|
4
|
-
<table class="index">
|
|
5
|
-
<tr>
|
|
6
|
-
<th colspan="6"><%= Spree.t(:skrill_transaction) %></th>
|
|
7
|
-
</tr>
|
|
8
|
-
<tr>
|
|
9
|
-
<td><label><%= Spree.t(:email) %>:</label></td>
|
|
10
|
-
<td>
|
|
11
|
-
<%= payment.source.email %>
|
|
12
|
-
</td>
|
|
13
|
-
</tr>
|
|
14
|
-
<tr>
|
|
15
|
-
<td><label><%= Spree.t(:skrill_customer_id) %>:</label></td>
|
|
16
|
-
<td>
|
|
17
|
-
<%= payment.source.customer_id %>
|
|
18
|
-
</td>
|
|
19
|
-
</tr>
|
|
20
|
-
<tr>
|
|
21
|
-
<td><label><%= Spree.t(:skrill_transaction_id) %>:</label></td>
|
|
22
|
-
<td>
|
|
23
|
-
<%= payment.source.transaction_id %>
|
|
24
|
-
</td>
|
|
25
|
-
</tr>
|
|
26
|
-
<tr>
|
|
27
|
-
<td><label><%= Spree.t(:skrill_payment_type) %>:</label></td>
|
|
28
|
-
<td>
|
|
29
|
-
<%= payment.source.payment_type %>
|
|
30
|
-
</td>
|
|
31
|
-
</tr>
|
|
32
|
-
<tr>
|
|
33
|
-
<td><label><%= Spree.t(:skrill_payment_currency) %>:</label></td>
|
|
34
|
-
<td>
|
|
35
|
-
<%= payment.source.currency %>
|
|
36
|
-
</td>
|
|
37
|
-
</tr>
|
|
38
|
-
</table>
|
|
39
|
-
</fieldset>
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
<p data-hook="skrill_quick_checkout"></p>
|
|
2
|
-
|
|
3
|
-
<%
|
|
4
|
-
opts = {}
|
|
5
|
-
opts[:transaction_id] = "#{@order.number}"
|
|
6
|
-
opts[:amount] = @order.total
|
|
7
|
-
opts[:return_url] = skrill_return_order_checkout_url(@order, :token => @order.guest_token,
|
|
8
|
-
:payment_method_id => payment_method.id)
|
|
9
|
-
opts[:cancel_url] = skrill_cancel_order_checkout_url(@order, :token => @order.guest_token)
|
|
10
|
-
opts[:status_url] = skrill_url
|
|
11
|
-
opts[:payment_method_id] = payment_method.id
|
|
12
|
-
%>
|
|
13
|
-
|
|
14
|
-
<style>
|
|
15
|
-
iframe.skrill_frame{
|
|
16
|
-
border: 0px;
|
|
17
|
-
width: 500px;
|
|
18
|
-
height: 500px;
|
|
19
|
-
}
|
|
20
|
-
</style>
|
|
21
|
-
|
|
22
|
-
<fieldset id="skrill_payment__<%= payment_method.id %>" data-hook>
|
|
23
|
-
<legend><%= Spree.t(:payment_information) %></legend>
|
|
24
|
-
<iframe id="skrill_frame_<%= payment_method.id %>"
|
|
25
|
-
class="skrill_frame" src="<%= payment_method.redirect_url @order, opts %>"></iframe>
|
|
26
|
-
</fieldset>
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
require 'spec_helper'
|
|
2
|
-
|
|
3
|
-
describe ActiveMerchant::Billing::Skrill do
|
|
4
|
-
let(:url) { 'https://www.moneybookers.com/app/payment.pl' }
|
|
5
|
-
|
|
6
|
-
context '.service_url' do
|
|
7
|
-
it 'return its url' do
|
|
8
|
-
expect(subject.service_url).to eq url
|
|
9
|
-
end
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
context '.payment_url' do
|
|
13
|
-
it 'prepend options to url' do
|
|
14
|
-
options = { 'hi' => 'you' }
|
|
15
|
-
expect(subject.payment_url(options)).to eq "#{url}?hi=you"
|
|
16
|
-
end
|
|
17
|
-
end
|
|
18
|
-
end
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
require 'spec_helper'
|
|
2
|
-
|
|
3
|
-
describe Spree::BillingIntegration::Skrill::QuickCheckout, focus: true do
|
|
4
|
-
let(:quick_checkout) { create(:skrill_quick_checkout) }
|
|
5
|
-
|
|
6
|
-
context '.provider_class' do
|
|
7
|
-
it 'is a Billing::Skrill class' do
|
|
8
|
-
expect(quick_checkout.provider_class).to eq ::ActiveMerchant::Billing::Skrill
|
|
9
|
-
end
|
|
10
|
-
end
|
|
11
|
-
end
|