From c1ac250b92216cf50fd268cd7c679332ae5fd98b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Armando=20Rodr=C3=ADguez?= <127134616+armando-rodriguez-cko@users.noreply.github.com> Date: Tue, 29 Sep 2026 11:49:14 +0200 Subject: [PATCH] fix: sync PaymentMethodsType enum with Flow API spec Adds 26 payment methods missing from the enum (alipay_cn, alipay_hk, alma, benefit, bizum, dana, gcash, kakaopay, klarna, mbway, mobilepay, octopus, paynow, plaid, qpay, remember_me, sepa, stcpay, stored_card, tabby, tamara, tng, truemoney, twint, vipps, wechatpay) and marks giropay and sofort as deprecated since they are no longer part of the specification. Related to checkout/checkout-sdk-php#338 Co-Authored-By: Claude Sonnet 5 --- .../payments/sessions/payment_methods_type.rb | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/lib/checkout_sdk/payments/sessions/payment_methods_type.rb b/lib/checkout_sdk/payments/sessions/payment_methods_type.rb index 7209098..6717c08 100644 --- a/lib/checkout_sdk/payments/sessions/payment_methods_type.rb +++ b/lib/checkout_sdk/payments/sessions/payment_methods_type.rb @@ -2,19 +2,55 @@ module CheckoutSdk module Payments + # The type of payment method that can be enabled or disabled for a payment session. + # + # This is a consolidated list covering every payment method the Flow API accepts for + # enabled_payment_methods / disabled_payment_methods. Constants marked deprecated are no + # longer part of the specification but are kept for backward compatibility. module PaymentMethodsType + ALIPAY_CN = 'alipay_cn' + ALIPAY_HK = 'alipay_hk' + ALMA = 'alma' APPLEPAY = 'applepay' BANCONTACT = 'bancontact' + BENEFIT = 'benefit' + BIZUM = 'bizum' CARD = 'card' + DANA = 'dana' EPS = 'eps' + # @deprecated No longer part of the specification. GIROPAY = 'giropay' + GCASH = 'gcash' GOOGLEPAY = 'googlepay' IDEAL = 'ideal' + KAKAOPAY = 'kakaopay' + KLARNA = 'klarna' KNET = 'knet' + MBWAY = 'mbway' + MOBILEPAY = 'mobilepay' MULTIBANCO = 'multibanco' + OCTOPUS = 'octopus' PRZELEWY24 = 'p24' + PAYNOW = 'paynow' PAYPAL = 'paypal' + PLAID = 'plaid' + QPAY = 'qpay' + # Fully supported by the API but deliberately unlisted in the public specification, so + # that merchants do not disable Remember Me en masse. Do not remove it as an unspecified + # value. + REMEMBER_ME = 'remember_me' + SEPA = 'sepa' + # @deprecated No longer part of the specification. SOFORT = 'sofort' + STCPAY = 'stcpay' + STORED_CARD = 'stored_card' + TABBY = 'tabby' + TAMARA = 'tamara' + TNG = 'tng' + TRUEMONEY = 'truemoney' + TWINT = 'twint' + VIPPS = 'vipps' + WECHATPAY = 'wechatpay' end end end