spree_adyen 0.11.0 → 6.0.7
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/LICENSE +16 -4
- data/README.md +9 -51
- data/Rakefile +7 -18
- data/app/jobs/spree_adyen/base_job.rb +1 -1
- data/app/jobs/spree_adyen/configure_job.rb +19 -0
- data/app/maintenance_tasks/spree_adyen/maintenance_tasks/migrate_payments.rb +129 -0
- data/app/models/spree/payment_sessions/adyen.rb +42 -35
- data/app/models/spree/payment_setup_sessions/adyen.rb +1 -25
- data/app/models/spree_adyen/amounts.rb +69 -0
- data/app/models/spree_adyen/gateway/payment_sessions.rb +228 -98
- data/app/models/spree_adyen/gateway/payment_setup_sessions.rb +36 -136
- data/app/models/spree_adyen/gateway/webhooks.rb +142 -0
- data/app/models/spree_adyen/gateway.rb +275 -399
- data/app/models/spree_adyen/payment_sources/ach_direct_debit.rb +1 -13
- data/app/models/spree_adyen/payment_sources/affirm.rb +1 -13
- data/app/models/spree_adyen/payment_sources/afterpay.rb +1 -13
- data/app/models/spree_adyen/payment_sources/alipay.rb +1 -15
- data/app/models/spree_adyen/payment_sources/alipay_hk.rb +1 -13
- data/app/models/spree_adyen/payment_sources/alma.rb +1 -13
- data/app/models/spree_adyen/payment_sources/ancv.rb +1 -13
- data/app/models/spree_adyen/payment_sources/atome.rb +1 -13
- data/app/models/spree_adyen/payment_sources/bacs.rb +1 -13
- data/app/models/spree_adyen/payment_sources/bancontact.rb +1 -15
- data/app/models/spree_adyen/payment_sources/bank_transfer.rb +1 -13
- data/app/models/spree_adyen/payment_sources/base.rb +9 -1
- data/app/models/spree_adyen/payment_sources/benefit.rb +1 -13
- data/app/models/spree_adyen/payment_sources/billie.rb +1 -13
- data/app/models/spree_adyen/payment_sources/bizum.rb +1 -13
- data/app/models/spree_adyen/payment_sources/blik.rb +1 -11
- data/app/models/spree_adyen/payment_sources/boleto.rb +1 -13
- data/app/models/spree_adyen/payment_sources/card.rb +14 -0
- data/app/models/spree_adyen/payment_sources/cash_app_afterpay.rb +1 -13
- data/app/models/spree_adyen/payment_sources/cashapp.rb +1 -13
- data/app/models/spree_adyen/payment_sources/clearpay.rb +1 -13
- data/app/models/spree_adyen/payment_sources/dana.rb +1 -13
- data/app/models/spree_adyen/payment_sources/doku.rb +1 -15
- data/app/models/spree_adyen/payment_sources/duitnow.rb +1 -13
- data/app/models/spree_adyen/payment_sources/eps.rb +1 -15
- data/app/models/spree_adyen/payment_sources/fastlane.rb +1 -15
- data/app/models/spree_adyen/payment_sources/fpx.rb +1 -15
- data/app/models/spree_adyen/payment_sources/gcash.rb +1 -15
- data/app/models/spree_adyen/payment_sources/gift_cards.rb +1 -15
- data/app/models/spree_adyen/payment_sources/giropay.rb +1 -15
- data/app/models/spree_adyen/payment_sources/grabpay.rb +1 -15
- data/app/models/spree_adyen/payment_sources/ideal.rb +1 -11
- data/app/models/spree_adyen/payment_sources/klarna.rb +1 -28
- data/app/models/spree_adyen/payment_sources/oney.rb +1 -9
- data/app/models/spree_adyen/payment_sources/online_banking_czech_republic.rb +1 -11
- data/app/models/spree_adyen/payment_sources/online_banking_poland.rb +1 -11
- data/app/models/spree_adyen/payment_sources/pay_by_bank.rb +1 -11
- data/app/models/spree_adyen/payment_sources/paypal.rb +1 -11
- data/app/models/spree_adyen/payment_sources/paypo.rb +1 -11
- data/app/models/spree_adyen/payment_sources/paysafecard.rb +1 -11
- data/app/models/spree_adyen/payment_sources/rate_pay_direct_debit.rb +1 -11
- data/app/models/spree_adyen/payment_sources/riverty.rb +1 -11
- data/app/models/spree_adyen/payment_sources/samsung_pay.rb +1 -11
- data/app/models/spree_adyen/payment_sources/scalapay.rb +1 -9
- data/app/models/spree_adyen/payment_sources/sepa_direct_debit.rb +1 -11
- data/app/models/spree_adyen/payment_sources/trustly.rb +1 -11
- data/app/models/spree_adyen/payment_sources/unknown.rb +1 -15
- data/app/models/spree_adyen/payment_sources/wechat_pay.rb +1 -11
- data/app/models/spree_adyen/result.rb +155 -0
- data/app/models/spree_adyen/variants.rb +230 -0
- data/app/presenters/spree_adyen/application_info_presenter.rb +4 -4
- data/app/presenters/spree_adyen/session_presenter.rb +153 -0
- data/app/services/spree_adyen/configure.rb +121 -0
- data/app/subscribers/spree_adyen/capture_held_payments_subscriber.rb +41 -0
- data/config/locales/en.yml +21 -6
- data/lib/generators/spree_adyen/install/install_generator.rb +12 -12
- data/lib/spree_adyen/engine.rb +6 -70
- data/lib/spree_adyen/factories.rb +1 -3
- data/lib/spree_adyen/testing_support/factories/gateway_factory.rb +10 -17
- data/lib/spree_adyen/testing_support/factories/payment_session_factory.rb +18 -34
- data/lib/spree_adyen.rb +5 -30
- data/lib/tasks/configure_adyen_gateways.rake +39 -0
- metadata +35 -177
- data/app/assets/config/spree_adyen_manifest.js +0 -5
- data/app/controllers/spree_adyen/apple_pay_domain_verification_controller.rb +0 -11
- data/app/controllers/spree_adyen/payment_sessions_controller.rb +0 -67
- data/app/controllers/spree_adyen/store_controller_decorator.rb +0 -9
- data/app/controllers/spree_adyen/webhooks_controller.rb +0 -46
- data/app/helpers/spree_adyen/base_helper.rb +0 -18
- data/app/javascript/spree_adyen/application.js +0 -17
- data/app/javascript/spree_adyen/controllers/checkout_adyen_controller.js +0 -80
- data/app/javascript/spree_adyen/controllers/redirect_adyen_controller.js +0 -35
- data/app/jobs/spree_adyen/add_allowed_origin_job.rb +0 -24
- data/app/jobs/spree_adyen/webhooks/process_authorisation_event_job.rb +0 -10
- data/app/jobs/spree_adyen/webhooks/process_cancellation_event_job.rb +0 -10
- data/app/jobs/spree_adyen/webhooks/process_capture_event_job.rb +0 -10
- data/app/models/spree_adyen/base.rb +0 -6
- data/app/models/spree_adyen/custom_domain_decorator.rb +0 -17
- data/app/models/spree_adyen/order_decorator.rb +0 -23
- data/app/models/spree_adyen/payment_decorator.rb +0 -66
- data/app/models/spree_adyen/payment_method_decorator.rb +0 -15
- data/app/models/spree_adyen/payment_session.rb +0 -121
- data/app/models/spree_adyen/payment_sources/apple_pay.rb +0 -19
- data/app/models/spree_adyen/payment_sources/bcmc.rb +0 -17
- data/app/models/spree_adyen/payment_sources/bcmc_mobile.rb +0 -17
- data/app/models/spree_adyen/payment_sources/ebanking_fi.rb +0 -19
- data/app/models/spree_adyen/payment_sources/eft_directdebit_ca.rb +0 -19
- data/app/models/spree_adyen/payment_sources/eftpos_australia.rb +0 -19
- data/app/models/spree_adyen/payment_sources/elo.rb +0 -19
- data/app/models/spree_adyen/payment_sources/givex.rb +0 -19
- data/app/models/spree_adyen/payment_sources/gopay_wallet.rb +0 -19
- data/app/models/spree_adyen/payment_sources/grabpay_paylater.rb +0 -19
- data/app/models/spree_adyen/payment_sources/hipercard.rb +0 -19
- data/app/models/spree_adyen/payment_sources/kakaopay.rb +0 -19
- data/app/models/spree_adyen/payment_sources/kcp_naverpay.rb +0 -19
- data/app/models/spree_adyen/store_decorator.rb +0 -17
- data/app/presenters/spree_adyen/address_presenter.rb +0 -21
- data/app/presenters/spree_adyen/cancel_payload_presenter.rb +0 -31
- data/app/presenters/spree_adyen/capture_payload_presenter.rb +0 -36
- data/app/presenters/spree_adyen/checkout_presenter.rb +0 -51
- data/app/presenters/spree_adyen/payment_sessions/request_payload_presenter.rb +0 -140
- data/app/presenters/spree_adyen/payment_setup_sessions/request_payload_presenter.rb +0 -81
- data/app/presenters/spree_adyen/payments/request_payload_presenter.rb +0 -85
- data/app/presenters/spree_adyen/refund_payload_presenter.rb +0 -38
- data/app/presenters/spree_adyen/webhook_payload_presenter.rb +0 -28
- data/app/presenters/spree_adyen/webhooks/credit_card_presenter.rb +0 -43
- data/app/services/spree_adyen/gateways/add_allowed_origin.rb +0 -36
- data/app/services/spree_adyen/gateways/configuration.rb +0 -41
- data/app/services/spree_adyen/gateways/configure.rb +0 -60
- data/app/services/spree_adyen/payment_sessions/find_or_create.rb +0 -51
- data/app/services/spree_adyen/payment_sessions/process_with_result.rb +0 -49
- data/app/services/spree_adyen/payment_setup_sessions/create_source_from_result.rb +0 -71
- data/app/services/spree_adyen/payment_setup_sessions/handle_authorisation.rb +0 -48
- data/app/services/spree_adyen/webhooks/actions/create_source.rb +0 -112
- data/app/services/spree_adyen/webhooks/actions/find_or_create_credit_card.rb +0 -33
- data/app/services/spree_adyen/webhooks/event.rb +0 -104
- data/app/services/spree_adyen/webhooks/event_processors/authorisation_event_processor.rb +0 -69
- data/app/services/spree_adyen/webhooks/event_processors/cancellation_event_processor.rb +0 -49
- data/app/services/spree_adyen/webhooks/event_processors/capture_event_processor.rb +0 -48
- data/app/services/spree_adyen/webhooks/handle_event.rb +0 -43
- data/app/services/spree_adyen/webhooks/standard_hmac_validator.rb +0 -37
- data/app/views/layouts/spree_adyen/default.html.erb +0 -14
- data/app/views/spree/admin/payment_methods/configuration_guides/_spree_adyen.html.erb +0 -14
- data/app/views/spree/admin/payment_methods/custom_form_fields/_spree_adyen.html.erb +0 -18
- data/app/views/spree/admin/payment_methods/descriptions/_spree_adyen.html.erb +0 -12
- data/app/views/spree/admin/payments/source_forms/_spree_adyen.html.erb +0 -7
- data/app/views/spree/checkout/payment/_spree_adyen.html.erb +0 -40
- data/app/views/spree_adyen/_drop_in.html.erb +0 -12
- data/app/views/spree_adyen/_head.html.erb +0 -2
- data/app/views/spree_adyen/payment_sessions/redirect.html.erb +0 -5
- data/config/importmap.rb +0 -7
- data/config/initializers/spree.rb +0 -34
- data/config/initializers/spree_permitted_attributes.rb +0 -5
- data/config/routes.rb +0 -35
- data/db/migrate/20250630150000_setup_spree_adyen_models.rb +0 -17
- data/db/migrate/20250811140113_add_channel_to_adyen_payment_sessions.rb +0 -10
- data/db/migrate/20250813152608_add_return_url_to_spree_adyen_payment_sessions.rb +0 -15
- data/lib/spree_adyen/configuration.rb +0 -42
- data/lib/spree_adyen/testing_support/factories/payment_setup_session_factory.rb +0 -15
- data/lib/spree_adyen/version.rb +0 -7
- data/lib/spree_api_v2/spree/api/v2/storefront/adyen/base_controller.rb +0 -21
- data/lib/spree_api_v2/spree/api/v2/storefront/adyen/payment_sessions_controller.rb +0 -72
- data/lib/spree_api_v2/spree_adyen/api/v2/storefront/payment_session_serializer.rb +0 -21
- data/vendor/javascript/@adyen--adyen-web.js +0 -4
- data/vendor/stylesheets/adyen.css +0 -106
|
@@ -1,17 +1,5 @@
|
|
|
1
1
|
module SpreeAdyen
|
|
2
2
|
module PaymentSources
|
|
3
|
-
class AchDirectDebit <
|
|
4
|
-
def actions
|
|
5
|
-
%w[credit void]
|
|
6
|
-
end
|
|
7
|
-
|
|
8
|
-
def self.display_name
|
|
9
|
-
'ACH Direct Debit'
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
def display_payment_info
|
|
13
|
-
'ACH Direct Debit'
|
|
14
|
-
end
|
|
15
|
-
end
|
|
3
|
+
class AchDirectDebit < Base; end
|
|
16
4
|
end
|
|
17
5
|
end
|
|
@@ -1,17 +1,5 @@
|
|
|
1
1
|
module SpreeAdyen
|
|
2
2
|
module PaymentSources
|
|
3
|
-
class Affirm <
|
|
4
|
-
def actions
|
|
5
|
-
%w[credit void capture]
|
|
6
|
-
end
|
|
7
|
-
|
|
8
|
-
def self.display_name
|
|
9
|
-
'Affirm'
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
def display_payment_info
|
|
13
|
-
'Affirm'
|
|
14
|
-
end
|
|
15
|
-
end
|
|
3
|
+
class Affirm < Base; end
|
|
16
4
|
end
|
|
17
5
|
end
|
|
@@ -1,17 +1,5 @@
|
|
|
1
1
|
module SpreeAdyen
|
|
2
2
|
module PaymentSources
|
|
3
|
-
class Afterpay <
|
|
4
|
-
def actions
|
|
5
|
-
%w[credit void]
|
|
6
|
-
end
|
|
7
|
-
|
|
8
|
-
def self.display_name
|
|
9
|
-
'Afterpay'
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
def display_payment_info
|
|
13
|
-
'Afterpay'
|
|
14
|
-
end
|
|
15
|
-
end
|
|
3
|
+
class Afterpay < Base; end
|
|
16
4
|
end
|
|
17
5
|
end
|
|
@@ -1,19 +1,5 @@
|
|
|
1
1
|
module SpreeAdyen
|
|
2
2
|
module PaymentSources
|
|
3
|
-
class Alipay <
|
|
4
|
-
store_accessor :public_metadata, :buyer_id, :buyer_logon_id, :trade_no
|
|
5
|
-
|
|
6
|
-
def actions
|
|
7
|
-
%w[credit void]
|
|
8
|
-
end
|
|
9
|
-
|
|
10
|
-
def self.display_name
|
|
11
|
-
'Alipay'
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
def display_buyer_info
|
|
15
|
-
"Alipay: #{buyer_logon_id}"
|
|
16
|
-
end
|
|
17
|
-
end
|
|
3
|
+
class Alipay < Base; end
|
|
18
4
|
end
|
|
19
5
|
end
|
|
@@ -1,17 +1,5 @@
|
|
|
1
1
|
module SpreeAdyen
|
|
2
2
|
module PaymentSources
|
|
3
|
-
class AlipayHk <
|
|
4
|
-
def actions
|
|
5
|
-
%w[credit void]
|
|
6
|
-
end
|
|
7
|
-
|
|
8
|
-
def self.display_name
|
|
9
|
-
'AlipayHK'
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
def display_payment_info
|
|
13
|
-
'AlipayHK'
|
|
14
|
-
end
|
|
15
|
-
end
|
|
3
|
+
class AlipayHk < Base; end
|
|
16
4
|
end
|
|
17
5
|
end
|
|
@@ -1,17 +1,5 @@
|
|
|
1
1
|
module SpreeAdyen
|
|
2
2
|
module PaymentSources
|
|
3
|
-
class Alma <
|
|
4
|
-
def actions
|
|
5
|
-
%w[credit void]
|
|
6
|
-
end
|
|
7
|
-
|
|
8
|
-
def self.display_name
|
|
9
|
-
'Alma'
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
def display_payment_info
|
|
13
|
-
'Alma'
|
|
14
|
-
end
|
|
15
|
-
end
|
|
3
|
+
class Alma < Base; end
|
|
16
4
|
end
|
|
17
5
|
end
|
|
@@ -1,17 +1,5 @@
|
|
|
1
1
|
module SpreeAdyen
|
|
2
2
|
module PaymentSources
|
|
3
|
-
class Ancv <
|
|
4
|
-
def actions
|
|
5
|
-
%w[credit void]
|
|
6
|
-
end
|
|
7
|
-
|
|
8
|
-
def self.display_name
|
|
9
|
-
'ANCV'
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
def display_payment_info
|
|
13
|
-
'ANCV'
|
|
14
|
-
end
|
|
15
|
-
end
|
|
3
|
+
class Ancv < Base; end
|
|
16
4
|
end
|
|
17
5
|
end
|
|
@@ -1,17 +1,5 @@
|
|
|
1
1
|
module SpreeAdyen
|
|
2
2
|
module PaymentSources
|
|
3
|
-
class Atome <
|
|
4
|
-
def actions
|
|
5
|
-
%w[credit void]
|
|
6
|
-
end
|
|
7
|
-
|
|
8
|
-
def self.display_name
|
|
9
|
-
'Atome'
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
def display_payment_info
|
|
13
|
-
'Atome'
|
|
14
|
-
end
|
|
15
|
-
end
|
|
3
|
+
class Atome < Base; end
|
|
16
4
|
end
|
|
17
5
|
end
|
|
@@ -1,17 +1,5 @@
|
|
|
1
1
|
module SpreeAdyen
|
|
2
2
|
module PaymentSources
|
|
3
|
-
class Bacs <
|
|
4
|
-
def actions
|
|
5
|
-
%w[credit void capture]
|
|
6
|
-
end
|
|
7
|
-
|
|
8
|
-
def self.display_name
|
|
9
|
-
'BACS Direct Debit'
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
def display_payment_info
|
|
13
|
-
'BACS Direct Debit'
|
|
14
|
-
end
|
|
15
|
-
end
|
|
3
|
+
class Bacs < Base; end
|
|
16
4
|
end
|
|
17
5
|
end
|
|
@@ -1,19 +1,5 @@
|
|
|
1
1
|
module SpreeAdyen
|
|
2
2
|
module PaymentSources
|
|
3
|
-
class Bancontact <
|
|
4
|
-
store_accessor :public_metadata, :bank_code, :card_number
|
|
5
|
-
|
|
6
|
-
def actions
|
|
7
|
-
%w[credit]
|
|
8
|
-
end
|
|
9
|
-
|
|
10
|
-
def self.display_name
|
|
11
|
-
'Bancontact'
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
def display_card_info
|
|
15
|
-
"Card: #{card_number} (Bank: #{bank_code})"
|
|
16
|
-
end
|
|
17
|
-
end
|
|
3
|
+
class Bancontact < Base; end
|
|
18
4
|
end
|
|
19
5
|
end
|
|
@@ -1,17 +1,5 @@
|
|
|
1
1
|
module SpreeAdyen
|
|
2
2
|
module PaymentSources
|
|
3
|
-
class BankTransfer <
|
|
4
|
-
def actions
|
|
5
|
-
%w[credit void]
|
|
6
|
-
end
|
|
7
|
-
|
|
8
|
-
def self.display_name
|
|
9
|
-
'Bank transfer'
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
def display_payment_info
|
|
13
|
-
'Bank transfer'
|
|
14
|
-
end
|
|
15
|
-
end
|
|
3
|
+
class BankTransfer < Base; end
|
|
16
4
|
end
|
|
17
5
|
end
|
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
module SpreeAdyen
|
|
2
2
|
module PaymentSources
|
|
3
|
+
# What a buyer paid with through Adyen, other than a card saved for reuse.
|
|
4
|
+
# Each stored 5.x name is a one-line subclass, so rows written by 5.x load;
|
|
5
|
+
# the method's display name comes from SpreeAdyen::Variants.
|
|
3
6
|
class Base < ::Spree::PaymentSource
|
|
4
|
-
|
|
7
|
+
store_accessor :metadata, :adyen_variant
|
|
8
|
+
|
|
9
|
+
# @return [String]
|
|
10
|
+
def self.display_name
|
|
11
|
+
SpreeAdyen::Variants.display_name(name.demodulize) || name.demodulize.titleize
|
|
12
|
+
end
|
|
5
13
|
end
|
|
6
14
|
end
|
|
7
15
|
end
|
|
@@ -1,17 +1,5 @@
|
|
|
1
1
|
module SpreeAdyen
|
|
2
2
|
module PaymentSources
|
|
3
|
-
class Benefit <
|
|
4
|
-
def actions
|
|
5
|
-
%w[credit void]
|
|
6
|
-
end
|
|
7
|
-
|
|
8
|
-
def self.display_name
|
|
9
|
-
'BENEFIT'
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
def display_payment_info
|
|
13
|
-
'BENEFIT'
|
|
14
|
-
end
|
|
15
|
-
end
|
|
3
|
+
class Benefit < Base; end
|
|
16
4
|
end
|
|
17
5
|
end
|
|
@@ -1,17 +1,5 @@
|
|
|
1
1
|
module SpreeAdyen
|
|
2
2
|
module PaymentSources
|
|
3
|
-
class Billie <
|
|
4
|
-
def actions
|
|
5
|
-
%w[credit void capture]
|
|
6
|
-
end
|
|
7
|
-
|
|
8
|
-
def self.display_name
|
|
9
|
-
'Billie'
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
def display_payment_info
|
|
13
|
-
'Billie'
|
|
14
|
-
end
|
|
15
|
-
end
|
|
3
|
+
class Billie < Base; end
|
|
16
4
|
end
|
|
17
5
|
end
|
|
@@ -1,17 +1,5 @@
|
|
|
1
1
|
module SpreeAdyen
|
|
2
2
|
module PaymentSources
|
|
3
|
-
class Bizum <
|
|
4
|
-
def actions
|
|
5
|
-
%w[credit void]
|
|
6
|
-
end
|
|
7
|
-
|
|
8
|
-
def self.display_name
|
|
9
|
-
'Bizum'
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
def display_payment_info
|
|
13
|
-
'Bizum'
|
|
14
|
-
end
|
|
15
|
-
end
|
|
3
|
+
class Bizum < Base; end
|
|
16
4
|
end
|
|
17
5
|
end
|
|
@@ -1,17 +1,5 @@
|
|
|
1
1
|
module SpreeAdyen
|
|
2
2
|
module PaymentSources
|
|
3
|
-
class Boleto <
|
|
4
|
-
def actions
|
|
5
|
-
%w[credit void]
|
|
6
|
-
end
|
|
7
|
-
|
|
8
|
-
def self.display_name
|
|
9
|
-
'Boleto Bancário'
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
def display_payment_info
|
|
13
|
-
'Boleto Bancário'
|
|
14
|
-
end
|
|
15
|
-
end
|
|
3
|
+
class Boleto < Base; end
|
|
16
4
|
end
|
|
17
5
|
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
module SpreeAdyen
|
|
2
|
+
module PaymentSources
|
|
3
|
+
# A card paid with but not saved: a guest's, or one the buyer did not ask
|
|
4
|
+
# to keep. Adyen gives no number, name or expiry a Spree::CreditCard needs,
|
|
5
|
+
# and it could never be charged again, so it must not show among saved cards.
|
|
6
|
+
class Card < Base
|
|
7
|
+
store_accessor :metadata, :brand, :last_digits, :wallet
|
|
8
|
+
|
|
9
|
+
def self.display_name
|
|
10
|
+
'Card'
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -1,17 +1,5 @@
|
|
|
1
1
|
module SpreeAdyen
|
|
2
2
|
module PaymentSources
|
|
3
|
-
class CashAppAfterpay <
|
|
4
|
-
def actions
|
|
5
|
-
%w[credit void]
|
|
6
|
-
end
|
|
7
|
-
|
|
8
|
-
def self.display_name
|
|
9
|
-
'Cash App Afterpay'
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
def display_payment_info
|
|
13
|
-
'Cash App Afterpay'
|
|
14
|
-
end
|
|
15
|
-
end
|
|
3
|
+
class CashAppAfterpay < Base; end
|
|
16
4
|
end
|
|
17
5
|
end
|
|
@@ -1,17 +1,5 @@
|
|
|
1
1
|
module SpreeAdyen
|
|
2
2
|
module PaymentSources
|
|
3
|
-
class Cashapp <
|
|
4
|
-
def actions
|
|
5
|
-
%w[credit void]
|
|
6
|
-
end
|
|
7
|
-
|
|
8
|
-
def self.display_name
|
|
9
|
-
'Cash App Pay'
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
def display_payment_info
|
|
13
|
-
'Cash App Pay'
|
|
14
|
-
end
|
|
15
|
-
end
|
|
3
|
+
class Cashapp < Base; end
|
|
16
4
|
end
|
|
17
5
|
end
|
|
@@ -1,17 +1,5 @@
|
|
|
1
1
|
module SpreeAdyen
|
|
2
2
|
module PaymentSources
|
|
3
|
-
class Clearpay <
|
|
4
|
-
def actions
|
|
5
|
-
%w[credit void capture]
|
|
6
|
-
end
|
|
7
|
-
|
|
8
|
-
def self.display_name
|
|
9
|
-
'Clearpay'
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
def display_payment_info
|
|
13
|
-
'Clearpay'
|
|
14
|
-
end
|
|
15
|
-
end
|
|
3
|
+
class Clearpay < Base; end
|
|
16
4
|
end
|
|
17
5
|
end
|
|
@@ -1,17 +1,5 @@
|
|
|
1
1
|
module SpreeAdyen
|
|
2
2
|
module PaymentSources
|
|
3
|
-
class Dana <
|
|
4
|
-
def actions
|
|
5
|
-
%w[credit void]
|
|
6
|
-
end
|
|
7
|
-
|
|
8
|
-
def self.display_name
|
|
9
|
-
'DANA'
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
def display_payment_info
|
|
13
|
-
'DANA'
|
|
14
|
-
end
|
|
15
|
-
end
|
|
3
|
+
class Dana < Base; end
|
|
16
4
|
end
|
|
17
5
|
end
|
|
@@ -1,19 +1,5 @@
|
|
|
1
1
|
module SpreeAdyen
|
|
2
2
|
module PaymentSources
|
|
3
|
-
class Doku <
|
|
4
|
-
store_accessor :public_metadata, :payment_reference
|
|
5
|
-
|
|
6
|
-
def actions
|
|
7
|
-
%w[credit void]
|
|
8
|
-
end
|
|
9
|
-
|
|
10
|
-
def self.display_name
|
|
11
|
-
'Doku Indomaret'
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
def display_payment_info
|
|
15
|
-
"Doku Indomaret: #{payment_reference}"
|
|
16
|
-
end
|
|
17
|
-
end
|
|
3
|
+
class Doku < Base; end
|
|
18
4
|
end
|
|
19
5
|
end
|
|
@@ -1,17 +1,5 @@
|
|
|
1
1
|
module SpreeAdyen
|
|
2
2
|
module PaymentSources
|
|
3
|
-
class Duitnow <
|
|
4
|
-
def actions
|
|
5
|
-
%w[credit void]
|
|
6
|
-
end
|
|
7
|
-
|
|
8
|
-
def self.display_name
|
|
9
|
-
'DuitNow'
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
def display_payment_info
|
|
13
|
-
'DuitNow'
|
|
14
|
-
end
|
|
15
|
-
end
|
|
3
|
+
class Duitnow < Base; end
|
|
16
4
|
end
|
|
17
5
|
end
|
|
@@ -1,19 +1,5 @@
|
|
|
1
1
|
module SpreeAdyen
|
|
2
2
|
module PaymentSources
|
|
3
|
-
class Eps <
|
|
4
|
-
store_accessor :public_metadata, :payment_reference
|
|
5
|
-
|
|
6
|
-
def actions
|
|
7
|
-
%w[credit void]
|
|
8
|
-
end
|
|
9
|
-
|
|
10
|
-
def self.display_name
|
|
11
|
-
'EPS'
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
def display_payment_info
|
|
15
|
-
"EPS: #{payment_reference}"
|
|
16
|
-
end
|
|
17
|
-
end
|
|
3
|
+
class Eps < Base; end
|
|
18
4
|
end
|
|
19
5
|
end
|
|
@@ -1,19 +1,5 @@
|
|
|
1
1
|
module SpreeAdyen
|
|
2
2
|
module PaymentSources
|
|
3
|
-
class Fastlane <
|
|
4
|
-
store_accessor :public_metadata, :payment_reference
|
|
5
|
-
|
|
6
|
-
def actions
|
|
7
|
-
%w[credit void]
|
|
8
|
-
end
|
|
9
|
-
|
|
10
|
-
def self.display_name
|
|
11
|
-
'Fastlane by Paypal'
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
def display_payment_info
|
|
15
|
-
"Fastlane by Paypal: #{payment_reference}"
|
|
16
|
-
end
|
|
17
|
-
end
|
|
3
|
+
class Fastlane < Base; end
|
|
18
4
|
end
|
|
19
5
|
end
|
|
@@ -1,19 +1,5 @@
|
|
|
1
1
|
module SpreeAdyen
|
|
2
2
|
module PaymentSources
|
|
3
|
-
class Fpx <
|
|
4
|
-
store_accessor :public_metadata, :payment_reference
|
|
5
|
-
|
|
6
|
-
def actions
|
|
7
|
-
%w[credit void]
|
|
8
|
-
end
|
|
9
|
-
|
|
10
|
-
def self.display_name
|
|
11
|
-
'FPX Online banking Malaysia'
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
def display_payment_info
|
|
15
|
-
"FPX Online banking Malaysia: #{payment_reference}"
|
|
16
|
-
end
|
|
17
|
-
end
|
|
3
|
+
class Fpx < Base; end
|
|
18
4
|
end
|
|
19
5
|
end
|
|
@@ -1,19 +1,5 @@
|
|
|
1
1
|
module SpreeAdyen
|
|
2
2
|
module PaymentSources
|
|
3
|
-
class Gcash <
|
|
4
|
-
store_accessor :public_metadata, :payment_reference
|
|
5
|
-
|
|
6
|
-
def actions
|
|
7
|
-
%w[credit void]
|
|
8
|
-
end
|
|
9
|
-
|
|
10
|
-
def self.display_name
|
|
11
|
-
'GCash'
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
def display_payment_info
|
|
15
|
-
"GCash: #{payment_reference}"
|
|
16
|
-
end
|
|
17
|
-
end
|
|
3
|
+
class Gcash < Base; end
|
|
18
4
|
end
|
|
19
5
|
end
|
|
@@ -1,19 +1,5 @@
|
|
|
1
1
|
module SpreeAdyen
|
|
2
2
|
module PaymentSources
|
|
3
|
-
class GiftCards <
|
|
4
|
-
store_accessor :public_metadata, :payment_reference
|
|
5
|
-
|
|
6
|
-
def actions
|
|
7
|
-
%w[credit void]
|
|
8
|
-
end
|
|
9
|
-
|
|
10
|
-
def self.display_name
|
|
11
|
-
'Gift cards'
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
def display_payment_info
|
|
15
|
-
"Gift cards: #{payment_reference}"
|
|
16
|
-
end
|
|
17
|
-
end
|
|
3
|
+
class GiftCards < Base; end
|
|
18
4
|
end
|
|
19
5
|
end
|
|
@@ -1,19 +1,5 @@
|
|
|
1
1
|
module SpreeAdyen
|
|
2
2
|
module PaymentSources
|
|
3
|
-
class Giropay <
|
|
4
|
-
store_accessor :public_metadata, :bank_code, :bic, :account_number
|
|
5
|
-
|
|
6
|
-
def actions
|
|
7
|
-
%w[credit]
|
|
8
|
-
end
|
|
9
|
-
|
|
10
|
-
def self.display_name
|
|
11
|
-
'Giropay'
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
def display_bank_info
|
|
15
|
-
"Bank: #{bank_code} (BIC: #{bic})"
|
|
16
|
-
end
|
|
17
|
-
end
|
|
3
|
+
class Giropay < Base; end
|
|
18
4
|
end
|
|
19
5
|
end
|
|
@@ -1,19 +1,5 @@
|
|
|
1
1
|
module SpreeAdyen
|
|
2
2
|
module PaymentSources
|
|
3
|
-
class Grabpay <
|
|
4
|
-
store_accessor :public_metadata, :payment_reference
|
|
5
|
-
|
|
6
|
-
def actions
|
|
7
|
-
%w[credit void]
|
|
8
|
-
end
|
|
9
|
-
|
|
10
|
-
def self.display_name
|
|
11
|
-
'GrabPay'
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
def display_payment_info
|
|
15
|
-
"GrabPay: #{payment_reference}"
|
|
16
|
-
end
|
|
17
|
-
end
|
|
3
|
+
class Grabpay < Base; end
|
|
18
4
|
end
|
|
19
5
|
end
|
|
@@ -1,32 +1,5 @@
|
|
|
1
1
|
module SpreeAdyen
|
|
2
2
|
module PaymentSources
|
|
3
|
-
class Klarna <
|
|
4
|
-
store_accessor :public_metadata, :payment_method_type, :authorization_token, :session_id
|
|
5
|
-
|
|
6
|
-
def actions
|
|
7
|
-
%w[credit void capture]
|
|
8
|
-
end
|
|
9
|
-
|
|
10
|
-
def self.display_name
|
|
11
|
-
'Klarna'
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
def display_payment_info
|
|
15
|
-
"Klarna: #{payment_method_type}"
|
|
16
|
-
end
|
|
17
|
-
|
|
18
|
-
def payment_method_type_display
|
|
19
|
-
case payment_method_type
|
|
20
|
-
when 'paynow'
|
|
21
|
-
'Pay Now'
|
|
22
|
-
when 'paylater'
|
|
23
|
-
'Pay Later'
|
|
24
|
-
when 'slice_it'
|
|
25
|
-
'Slice It'
|
|
26
|
-
else
|
|
27
|
-
payment_method_type&.titleize
|
|
28
|
-
end
|
|
29
|
-
end
|
|
30
|
-
end
|
|
3
|
+
class Klarna < Base; end
|
|
31
4
|
end
|
|
32
5
|
end
|