diff --git a/composer.lock b/composer.lock index 643b1121..3e1f1e00 100644 --- a/composer.lock +++ b/composer.lock @@ -8,16 +8,16 @@ "packages": [ { "name": "billwerk/php-sdk", - "version": "v1.0.6", + "version": "v1.0.7", "source": { "type": "git", "url": "https://github.com/0zd0/billwerk-sdk-php.git", - "reference": "bb3ec517394aedd19c2ab9ea60b8d22f1cd09cdb" + "reference": "e8632117fe9b4e0328e64678477f5a281c0ee198" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/0zd0/billwerk-sdk-php/zipball/bb3ec517394aedd19c2ab9ea60b8d22f1cd09cdb", - "reference": "bb3ec517394aedd19c2ab9ea60b8d22f1cd09cdb", + "url": "https://api.github.com/repos/0zd0/billwerk-sdk-php/zipball/e8632117fe9b4e0328e64678477f5a281c0ee198", + "reference": "e8632117fe9b4e0328e64678477f5a281c0ee198", "shasum": "" }, "require": { @@ -49,9 +49,9 @@ "description": "Api SDK for Billwerk+", "support": { "issues": "https://github.com/0zd0/billwerk-sdk-php/issues", - "source": "https://github.com/0zd0/billwerk-sdk-php/tree/v1.0.6" + "source": "https://github.com/0zd0/billwerk-sdk-php/tree/v1.0.7" }, - "time": "2024-05-31T21:15:31+00:00" + "time": "2024-06-11T18:34:11+00:00" }, { "name": "guzzlehttp/guzzle", diff --git a/includes/Gateways/ReepayCheckout.php b/includes/Gateways/ReepayCheckout.php index dc12f95e..51ccc93a 100644 --- a/includes/Gateways/ReepayCheckout.php +++ b/includes/Gateways/ReepayCheckout.php @@ -8,6 +8,7 @@ namespace Reepay\Checkout\Gateways; +use Billwerk\Sdk\Enum\PaymentMethodEnum; use Billwerk\Sdk\Exception\BillwerkApiException; use Exception; use Reepay\Checkout\Utils\LoggingTrait; @@ -246,31 +247,62 @@ public function init_form_fields() { 'type' => 'multiselect', 'css' => 'height: 250px', 'options' => array( - 'card' => 'All available debit / credit cards', - 'dankort' => 'Dankort', - 'visa' => 'VISA', - 'visa_dk' => 'VISA/Dankort', - 'visa_elec' => 'VISA Electron', - 'mc' => 'MasterCard', - 'amex' => 'American Express', - 'mobilepay' => 'MobilePay', - 'viabill' => 'ViaBill', - 'klarna_pay_later' => 'Klarna Pay Later', - 'klarna_pay_now' => 'Klarna Pay Now', - 'klarna_slice_it' => 'Klarna Slice It', - 'resurs' => 'Resurs Bank', - 'swish' => 'Swish', - 'diners' => 'Diners Club', - 'maestro' => 'Maestro', - 'laser' => 'Laser', - 'discover' => 'Discover', - 'jcb' => 'JCB', - 'china_union_pay' => 'China Union Pay', - 'ffk' => 'Forbrugsforeningen', - 'paypal' => 'PayPal', - 'applepay' => 'Apple Pay', - 'googlepay' => 'Google Pay', - 'vipps' => 'Vipps', + PaymentMethodEnum::CARD => 'All available debit / credit cards', + PaymentMethodEnum::DANKORT => 'Dankort', + PaymentMethodEnum::VISA => 'VISA', + PaymentMethodEnum::VISA_ELEC => 'VISA Electron', + PaymentMethodEnum::MC => 'MasterCard', + PaymentMethodEnum::AMEX => 'American Express', + PaymentMethodEnum::MOBILEPAY => 'MobilePay Online', + PaymentMethodEnum::MOBILEPAY_SUBSCRIPTIONS => 'MobilePay Subscriptions', + PaymentMethodEnum::VIABILL => 'ViaBill', + PaymentMethodEnum::ANYDAY => 'AnyDay', + PaymentMethodEnum::RESURS => 'Resurs Bank', + PaymentMethodEnum::SWISH => 'Swish', + PaymentMethodEnum::VIPPS => 'Vipps', + PaymentMethodEnum::VIPPS_RECURRING => 'Vipps Recurring', + PaymentMethodEnum::DINERS => 'Diners Club', + PaymentMethodEnum::MAESTRO => 'Maestro', + PaymentMethodEnum::LASER => 'Laser', + PaymentMethodEnum::DISCOVER => 'Discover', + PaymentMethodEnum::JCB => 'JCB', + PaymentMethodEnum::CHINA_UNION_PAY => 'China Union Pay', + PaymentMethodEnum::FFK => 'Forbrugsforeningen', + PaymentMethodEnum::PAYPAL => 'PayPal', + PaymentMethodEnum::APPLEPAY => 'Apple Pay', + PaymentMethodEnum::GOOGLEPAY => 'Google Pay', + PaymentMethodEnum::KLARNA_PAY_LATER => 'Klarna Pay Later', + PaymentMethodEnum::KLARNA_PAY_NOW => 'Klarna Pay Now', + PaymentMethodEnum::KLARNA_SLICE_IT => 'Klarna Slice It', + PaymentMethodEnum::KLARNA_DIRECT_BANK_TRANSFER => 'Klarna Direct Bank Transfer', + PaymentMethodEnum::KLARNA_DIRECT_DEBIT => 'Klarna Direct Debit', + PaymentMethodEnum::IDEAL => 'iDEAL', + PaymentMethodEnum::BLIK => 'BLIK', + PaymentMethodEnum::P24 => 'Przelewy24 (P24)', + PaymentMethodEnum::VERKKOPANKKI => 'Finnish banks', + PaymentMethodEnum::GIROPAY => 'giropay', + PaymentMethodEnum::SEPA => 'SEPA Direct Debit', + PaymentMethodEnum::BANCOMATPAY => 'BANCOMAT Pay', + PaymentMethodEnum::BANCONTACT => 'Bancontact', + PaymentMethodEnum::EPS => 'EPS', + PaymentMethodEnum::ESTONIA_BANKS => 'Estonian Banks', + PaymentMethodEnum::LATVIA_BANKS => 'Latvian Banks', + PaymentMethodEnum::LITHUANIA_BANKS => 'Lithuanian Banks', + PaymentMethodEnum::MB_WAY => 'MB Way', + PaymentMethodEnum::MULTIBANCO => 'Multibanco', + PaymentMethodEnum::MYBANK => 'mBank', + PaymentMethodEnum::PAYCONIQ => 'Payconiq', + PaymentMethodEnum::PAYSAFECARD => 'Paysafecard', + PaymentMethodEnum::PAYSERA => 'Paysera', + PaymentMethodEnum::POSTFINANCE => 'PostFinance', + PaymentMethodEnum::SATISPAY => 'Satisfy', + PaymentMethodEnum::TRUSTLY => 'Trustly', + PaymentMethodEnum::TWINT => 'Twint', + PaymentMethodEnum::WECHATPAY => 'WeChat Pay', + PaymentMethodEnum::SANTANDER => 'Santander', + PaymentMethodEnum::OFFLINE_BANK_TRANSFER => 'Bank Transfer', + PaymentMethodEnum::OFFLINE_CASH => 'Cash', + PaymentMethodEnum::OFFLINE_OTHER => 'Other', ), 'default' => array(), ),