diff --git a/.gitignore b/.gitignore deleted file mode 100644 index e66d2ff..0000000 --- a/.gitignore +++ /dev/null @@ -1 +0,0 @@ -@eaDir \ No newline at end of file diff --git a/Bootstrap.php b/Bootstrap.php index 8b04669..0ea314b 100644 --- a/Bootstrap.php +++ b/Bootstrap.php @@ -13,8 +13,14 @@ use JTL\Shop; use JTL\Smarty\JTLSmarty; use Plugin\s360_unzer_shop5\paymentmethod\HeidelpayFlexiPayDirect; +use Plugin\s360_unzer_shop5\paymentmethod\HeidelpayGiropay; use Plugin\s360_unzer_shop5\paymentmethod\HeidelpayHirePurchaseDirectDebit; +use Plugin\s360_unzer_shop5\paymentmethod\HeidelpayInvoice; use Plugin\s360_unzer_shop5\paymentmethod\HeidelpayInvoiceFactoring; +use Plugin\s360_unzer_shop5\paymentmethod\HeidelpayInvoiceGuaranteed; +use Plugin\s360_unzer_shop5\paymentmethod\HeidelpaySEPADirectDebitGuaranteed; +use Plugin\s360_unzer_shop5\paymentmethod\HeidelpaySofort; +use Plugin\s360_unzer_shop5\paymentmethod\UnzerApplePay; use Plugin\s360_unzer_shop5\Seeders\Shop4PluginMigrationSeeder; use Plugin\s360_unzer_shop5\src\ApplePay\CertificationService; use Plugin\s360_unzer_shop5\src\Controllers\Admin\AdminApplePayController; @@ -362,7 +368,13 @@ private function getDeprecatedPaymentMethods(): array return [ HeidelpayInvoiceFactoring::class, HeidelpayHirePurchaseDirectDebit::class, - HeidelpayFlexiPayDirect::class + HeidelpayFlexiPayDirect::class, + UnzerApplePay::class, + HeidelpaySofort::class, + HeidelpayGiropay::class, + HeidelpayInvoice::class, + HeidelpayInvoiceGuaranteed::class, + HeidelpaySEPADirectDebitGuaranteed::class, ]; } diff --git a/CHANGELOG.md b/CHANGELOG.md index 64d4ffd..051b4f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,20 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [2.0.0] (December 2025) + +> [!CAUTION] +> Version 2.0.0 is a breaking change - remember to test and create backup before updating your LIVE environment. + +### Added +- EAA Support, https://docs.unzer.com/online-payments/compliance/eaa/ +- **Klarna** Payment Method +- **Wero** Payment Method + +### Changed +- Migration from Unzer UI Component V1 to Unzer UI Component V2 +- Deprecated payment methods have been replaced with new ones, removed or renamed. For full list see [README.md](README.md) for an updated list. + ## [1.8.2] (September 2025) ### Added - added JTL 5.6 compatability diff --git a/README.md b/README.md index 02219a8..a7513dd 100644 --- a/README.md +++ b/README.md @@ -2,34 +2,29 @@ Dieses Plugin integriert die folgenden Unzer-Zahlungsarten im JTL Shop: -- Alipay -- ApplePay +- Apple Pay - Bancontact -- Direktüberweisung +- Kreditkarte und Click to Pay - EPS -- Giropay - Google Pay - iDEAL -- Kreditkarte -- Lastschrift -- SEPA Lastschrift +- Klarna - PayPal - Przelewy24 +- TWINT +- Direktüberweisung +- SEPA Lastschrift +- Lastschrift - Ratenkauf - Rechnungskauf -- SOFORT -- TWINT - Vorkasse - WeChat Pay -- (Veraltet) Unzer Ratenkauf -- (Veraltet) Unzer Rechnungskauf -- (Veraltet) Unzer Rechnungskauf (secured) -- (Veraltet) Unzer Lastschrift Gesichert +- Wero ## Installation / Update ### Systemvoraussetzungen - JTL-Shop 5.0.0+ und dessen Vorraussetzungen -- PHP Version: 7.4 - 8.3 +- PHP Version: 7.4 - 8.4 - Die folgenden PHP Erweiterungen - ext-json - ext-curl @@ -37,13 +32,6 @@ Dieses Plugin integriert die folgenden Unzer-Zahlungsarten im JTL Shop: ### Weitere Voraussetzungen Sie müssen bei Unzer registriert sein. -#### Apple Pay -Wenn Sie Apple Pay auf Ihrer Seite anbieten möchten, müssen Sie außerdem die folgenden Voraussetzungen erfüllen: - -- Apple Developer Account mit Teilnahme am Apple Developer Program, siehe Mitgliedschaft auswählen - Support - Apple Developer - -> **Ohne Teilnahme am am Apple Developer Program kann Apple Pay im Plugin nicht genutzt werden! Der einfache und kostenlose Apple Developer Account reicht nicht aus!** - ### Plugin-Installation Die Installation des Plugins erfolgt im Standardverfahren für JTL-Shop 5, wie es [hier](https://jtl-devguide.readthedocs.io/projects/jtl-shop/de/latest/shop_plugins/allgemein.html#pluginverwaltung-im-backend-von-jtl-shop) beschrieben ist. @@ -55,4 +43,59 @@ Gehen Sie dann in die Pluginverwaltung und betätigen Sie den Update-Button. ## Konfiguration Nach der eigentlichen Plugin-Installation ist es notwendig, die neuen Zahlungsmethoden zu aktivieren und zu den gewünschten Versandarten hinzuzufügen. -Weitere Informationen und Konfiguration finden Sie in der [Anleitung](https://redirect.solution360.de/?r=docsunzerjtl5) \ No newline at end of file +Weitere Informationen und Konfiguration finden Sie in der [Anleitung](https://redirect.solution360.de/?r=docsunzerjtl5) + + + + +--- + + + + +# Unzer payment methods (JTL Shop 5) + +This plugin integrates the following Unzer payment methods into the JTL Shop: + +- Apple Pay +- Bancontact +- Cards and Click to Pay +- EPS +- Google Pay +- iDEAL +- Klarna +- PayPal +- Przelewy24 +- TWINT +- Direct Bank Transfer +- SEPA Direct Debit +- Direct Debit +- Installment +- Invoice +- Prepayment +- WeChat Pay +- Wero + +## Installation/update +### System requirements +- JTL-Shop 5.0.0+ and its requirements +- PHP version: 7.4 - 8.4 +- The following PHP extensions + - ext-json + - ext-curl + +### Additional requirements +You must be registered with Unzer. + +### Plugin installation +The plugin is installed using the standard procedure for JTL-Shop 5, as described [here](https://jtl-devguide.readthedocs.io/projects/jtl-shop/de/latest/shop_plugins/allgemein.html#pluginverwaltung-im-backend-von-jtl-shop). + +### Plugin update +To update, upload the latest version of the plugin as you would for an installation (overwriting any existing plugin files if necessary) or follow the instructions in the Extension Store. + +Then go to the plugin management section and click the update button. + +## Configuration +After installing the plugin, you need to activate the new payment methods and add them to the desired shipping methods. + +For more information and configuration details, see the [instructions](https://redirect.solution360.de/?r=docsunzerjtl5). \ No newline at end of file diff --git a/adminmenu/template/partials/_order_detail.tpl b/adminmenu/template/partials/_order_detail.tpl index a5cd74e..cc366ae 100644 --- a/adminmenu/template/partials/_order_detail.tpl +++ b/adminmenu/template/partials/_order_detail.tpl @@ -215,9 +215,26 @@ {else} {__($hpPayment->getPaymentType()->getResourceName())} {/if} - - ({$hpPayment->getPaymentType()->getId()}) + + {if $hpOrder->Zahlungsinfo && !empty($hpOrder->Zahlungsinfo->cIBAN)} + {if !empty($hpOrder->Zahlungsinfo->cIBAN)} +
{lang key='iban' section='checkout'}
+
{$hpOrder->Zahlungsinfo->cIBAN}
+ {/if} + {if !empty($hpOrder->Zahlungsinfo->cBIC)} +
{lang key='bic' section='checkout'}
+
{$hpOrder->Zahlungsinfo->cBIC}
+ {/if} + {if !empty($hpOrder->Zahlungsinfo->cInhaber)} +
{lang key='accountHolder' section='checkout'}
+
{$hpOrder->Zahlungsinfo->cInhaber}
+ {/if} + {if !empty($hpOrder->Zahlungsinfo->cVerwendungszweck)} +
{lang key='purpose' section='checkout'}
+
{$hpOrder->Zahlungsinfo->cVerwendungszweck}
+ {/if} + {/if} diff --git a/adminmenu/template/partials/_order_item.tpl b/adminmenu/template/partials/_order_item.tpl index c8386b7..6e16e3b 100644 --- a/adminmenu/template/partials/_order_item.tpl +++ b/adminmenu/template/partials/_order_item.tpl @@ -90,10 +90,6 @@ {__($hpOrder->getPaymentTypeName())} {/if} {/if} - - {if $hpOrder->getPaymentTypeId()} - ({$hpOrder->getPaymentTypeId()}) - {/if} {\JTL\Catalog\Product\Preise::getLocalizedPriceString($hpOrder->getOrder()->fGesamtsumme, $hpOrder->getOrder()->Waehrung)} diff --git a/adminmenu/template/settings.tpl b/adminmenu/template/settings.tpl index cecd54b..b18172b 100644 --- a/adminmenu/template/settings.tpl +++ b/adminmenu/template/settings.tpl @@ -93,6 +93,92 @@ + {* UI Components *} +
+
+

{__('hpSettingsUIComponents')}

+
+ +
+ {* Font Family *} +
+
+ +
+
+ + {__('hpSettingsFontFamilyHelp')} +
+
+ + {* Text Color *} +
+
+ +
+
+ + {__('hpSettingsTextColorHelp')} +
+
+ + {* Brand Color *} +
+
+ +
+
+ + {__('hpSettingsBrandColorHelp')} +
+
+ + {* Background Color *} +
+
+ +
+
+ + {__('hpSettingsBackgroundColorHelp')} +
+
+ + {* Link Color *} +
+
+ +
+
+ + {__('hpSettingsLinkColorHelp')} +
+
+ + {* Corner Radius *} +
+
+ +
+
+ + {__('hpSettingsCornerRadiusHelp')} +
+
+ + {* Shadows *} +
+
+ +
+
+ + {__('hpSettingsShadowsHelp')} +
+
+
+
+ {* Advanced Settings *}
@@ -256,8 +342,8 @@ {__('hpSettingsPqMethodInstalmentInfoHelp')} diff --git a/apple-developer-merchantid-domain-association b/apple-developer-merchantid-domain-association index ed09029..996dbe9 100644 --- a/apple-developer-merchantid-domain-association +++ b/apple-developer-merchantid-domain-association @@ -1,3 +1 @@ -7b2276657273696f6e223a312c227073704964223a22443031343439453139324330414444363230413 -33641443243393834373337433245313930423230333138343431393437433743423736364338344534 -323638222c22637265617465644f6e223a313731383839323737333837377d \ No newline at end of file +7b2276657273696f6e223a312c227073704964223a2244303134343945313932433041444436323041333641443243393834373337433245313930423230333138343431393437433743423736364338344534323638222c22637265617465644f6e223a313731383839323737333837377d \ No newline at end of file diff --git a/checksums.csv b/checksums.csv index 16b5fed..6e38628 100644 --- a/checksums.csv +++ b/checksums.csv @@ -1,1058 +1,1077 @@ -4db0ef5803b943bc62cf9a6e0f7b40b5;Seeders/Shop4PluginMigrationSeeder.php -e1b9ba833fa2eae5ce86ea735f13d3ad;.babelrc -74bf8e5f571cac0b9df85d4ff7c6a8fb;CHANGELOG.md -c9f6e33220cf462393c7070cffcfff1a;NOTICE -bdab240d9f8ee3c00116400e934ca225;locale/de-DE/base.mo -efdf0b7b90984a3a2edb35a789f88248;locale/de-DE/base.po -a0445456d7fdf6274dc3f36d6c85b64d;locale/en-GB/base.mo -f36b138cb92f15ae3826dd31855d53e8;locale/en-GB/base.po -c466bfceae7a1c850f00a4bd2c8400db;composer.json -bcc814dcdea7b1904456777943f2b18f;src/Orders/OrderMappingModel.php -3da45aa29a08f869b95627a6e46e5f9a;src/Orders/OrderViewStruct.php -c1f8da0ce57d62d455c5e259c24685d0;src/Orders/OrderMappingEntity.php -8e0682ac5c506aa7ed6bc23a06970633;src/KeyPairs/KeyPairService.php -4a6bd5f25d0487b44b664403d6b0315c;src/KeyPairs/KeyPairModel.php -02ead16397ed114e97dc4a017cf2b30e;src/KeyPairs/KeyPairEntity.php -a3255fc904b7509e171553ea009c9c82;src/ApplePay/ActivateCertificateResource.php -1c8b2fa06b94c2fd1fd098791cb30b60;src/ApplePay/PrivateKeysResource.php -4ad80bac1bc3c0c244426c6dd6279a96;src/ApplePay/CertificateException.php -6703c52f0190cd22bfa1f72d7930fce1;src/ApplePay/CertificationService.php -767ba442de91503e5b6245c2d114a5c7;src/ApplePay/CertificatesResource.php -de87a7cc74d66c4983121d43a48c4797;src/Controllers/PaymentController.php -ed6b02252bb0726e3e39135281489753;src/Controllers/Admin/AdminController.php -1902987773d5d5f5582f0c90198628fd;src/Controllers/Admin/AdminApplePayController.php -e33561bdb1d33decddbddcb83e030ee9;src/Controllers/Admin/AdminSettingsController.php -8c4982325003accca6081c5319ee4825;src/Controllers/Admin/AdminKeyPairsController.php -5827d6899028ef0919847b0fdaafcee0;src/Controllers/Admin/AdminOrdersController.php -21ebbe688e1c2d78e8589131491bd361;src/Controllers/SyncWorkflowController.php -fa5a691923e7f21ba2ddcd5b5822706b;src/Controllers/ApplePayController.php -11b53980ad593ccfc4da61b43ff1fa4e;src/Controllers/SyncController.php -6b557d2f5af216698fad3cbb233f211e;src/Controllers/AjaxResponse.php -cc1c780662e1a85826bafc4dbfef25fc;src/Controllers/Controller.php -f510097b40df90505b40042b0e9b0c07;src/Controllers/HasAjaxResponse.php -6a4f5378cbdae8a8b90a56a9db41aef9;src/Controllers/FrontendOutputController.php -dd581e104187683d8fec2efa4ecd770b;src/Controllers/WebhookController.php -a73ea5c19bab6939e41d81018eb6c8e4;src/Charges/ChargeHandler.php -24bea0a602bf575ea6c7d432587c4fba;src/Charges/ChargeMappingModel.php -20db0d8770933362b0b8b7fa32c18494;src/Charges/ChargeMappingEntity.php -cdd8473949f46c33f6eda27bf3df5df5;src/Utils/Config.php -48830baed39f5710178337ad6d6f8444;src/Utils/TranslatorTrait.php -ff2e8ea1952f33020fe432ab359624d6;src/Utils/JtlLinkHelper.php -45d77592d5be177698832b19d2f84b78;src/Utils/Compatibility.php -4e1879d90f1a57b9c526919337e0de85;src/Utils/SessionHelper.php -d5d5d79ab6d86b5a965cf17240ff601e;src/Utils/JtlLoggerTrait.php -521e61755ca1485bfe834b40a50ac426;src/Utils/Logger.php -a78e5bba0c2635642ab607fbf73b0cea;src/Foundation/EventPayload.php -666e75baf5eddfcf0c50e83a5386bb5d;src/Foundation/ServiceProvider.php -b93684508161f05d1e5ab245170921cf;src/Foundation/EventSubscriber.php -a09b4b6da00f1cd498ddbac5b8c4d051;src/Foundation/Entity.php -fda45f203428056c6676cf83a15b4387;src/Foundation/Seeder.php -65ac9f0dfaadd308128767bb5c0553a3;src/Foundation/JsonSerializableTrait.php -97287cd9117f7b341aefb53cfe00ac64;src/Foundation/Model.php -07e542740aeb10d40b387b86ff17ca15;src/Foundation/Struct.php -8670bbececd78c3c6a8e52dd9105dc1d;src/Webhooks/PaymentEventSubscriber.php -6f67c55f48343fe977839454503b419a;src/Payments/PaymentMethodModuleFactory.php -487dd79e26e4a3f95778eecc0f4e45cd;src/Payments/PaymentHandler.php -d78c74c0918be9b079a8cf4655446589;src/Payments/Traits/HasState.php -1dc91617834a5b508913f5266b6e509a;src/Payments/Traits/HasCustomer.php -54f0fff5386a4145ce981a2c4e24d576;src/Payments/Traits/SupportsB2B.php -aa1212a34a1c3b4f1475e6b439603404;src/Payments/Traits/HasMetadata.php -5aefd466eee6fd9307f5a4226fc9a4ec;src/Payments/Traits/HasBasket.php -85dadc4e055384cf11546247308921f5;src/Payments/Traits/PriceCurrencyConverter.php -eafbb3fd550ede774e80f963759e71ea;src/Payments/Traits/HasPayStatus.php -4358bf25129c1cb3615eb2d37fc63285;src/Payments/Traits/CancelPaymentTransaction.php -7e92f962e6b3493af18618d393feb691;src/Payments/HeidelpayApiAdapter.php -25d79756477865b5c7ac6d4ea26c584c;src/Payments/HeidelpayPaymentMethod.php -b40a39212fa05718f866b4326766043c;src/Payments/Interfaces/RedirectPaymentInterface.php -ab1b1e5c0f257e793786fd8f49b3a9b7;src/Payments/Interfaces/NotificationInterface.php -04525b7293527904b5c527dd5aecbd9b;src/Payments/Interfaces/HandleStepReviewOrderInterface.php -36e5aa72d873a51ef1c3bd79a32acade;src/Payments/Interfaces/HandleStepAdditionalInterface.php -5a17589c176c45aedb1879dc120fcf86;src/Payments/Interfaces/CancelableInterface.php -ac4adca913172393fba84fda8c388a10;src/Payments/Interfaces/PaymentStatusInterface.php -d98195f0c1485f6412b599b3f1581902;src/Payments/Interfaces/HasPayButton.php -d0f2f1110b67eb7ac7e5bcfb6616f85d;info.xml -780b2b8990e8dba5534b2d1fa468c6f3;frontend/webhook.php -d1cefc6592de8b40196a42fe29bf0b90;frontend/js/unzer.js -14347895d75c97975bd9fb96b1045f45;frontend/js/unzer.min.js -31b71988e4e9842199662383cd53004f;frontend/js/unzer.min.js.map -0a55c155b365f45e44a746fb9fadb0c0;frontend/js/unzer.js.map -7d33252335a08f70cdcf96bf75198070;frontend/src/scss/unzer.scss -15112aab51c1133c80096c05759e4008;frontend/src/js/utils/errors.js -cf44e5fa2ae44e1a9756651963bfe755;frontend/src/js/utils/debugging.js -47ca20fc9ed32ccc3789b88ab9c6f5c3;frontend/src/js/utils/types.js -e0f7fef48cb41f84f48b8d74c4e65700;frontend/src/js/payments/applepay.js -2d7423cbab40b379c86b8e7a55c5747b;frontend/src/js/payments/googlepay.js -ec006ece0868adb711ee2fd5dbbbd966;frontend/src/js/payments/applepay_v2.js -af6ab64577fa45987da4b50631d1f8e6;frontend/src/js/payments/general.js -c0d6fea5b6f79b94d5f15234cec4e856;frontend/src/js/payments/instalment.js -58f523f49a1d7f9eafaac13f17f847c5;frontend/src/js/app.js -69e55611331387e2c73e9562b7491fe3;frontend/template/dummy.tpl -8110e4696b7c303cc9b2000bafd6aac6;frontend/template/apple_pay_button.tpl -3e34c443a1d94d22322bdd82673d0dd6;frontend/template/hire_purchase_direct_debit.tpl -e004668796b8fb423635a436abece655;frontend/template/instalment_info.tpl -d41d8cd98f00b204e9800998ecf8427e;frontend/template/webhook.tpl -42c8bff16bd9129f23fd0e7f06225185;frontend/template/partials/payment_info.tpl -b5cfea6ee2dd9b9572e3b7d07ec7b574;frontend/template/partials/change_payment.tpl -ca79740c158847ad33410b9f2d9746c0;frontend/template/partials/_threatMetrix.tpl -29c7b2500aa5666ef30f5de069af6d72;frontend/template/google_pay_button.tpl -280b9703c8fd488aebf961bd9a721cd0;frontend/sync-workflow.php -66af10bb7cc09c698e99036f9150a141;frontend/css/unzer.min.css.map -62b7dab13cc7cc1b754c02405345426d;frontend/css/unzer.min.css -3ed99e2491c35c9bd10085fbbf563db1;paymentmethod/HeidelpayPrzelewy24.php -c33ab12c2ff6b0a4be832b1fd5ccc258;paymentmethod/UnzerTwint.php -96b585ddc78e8c6441df7b160a012680;paymentmethod/UnzerBancontact.php -5a752d9eedf89529bb62131e515ade49;paymentmethod/UnzerApplePay.php -19e3cd123fae1aa360a07d1747e6ecf3;paymentmethod/HeidelpaySofort.php -ff265b66834c64de1f1508dfa15b5de7;paymentmethod/UnzerGooglePay.php -04f239d9194556e5a43ef6c6b6168f43;paymentmethod/HeidelpayGiropay.php -42c7ad35e8af3ad82382186c8298dab9;paymentmethod/images/BSW.svg -e9b9822db699305c6f9210f7a3296d99;paymentmethod/images/Bancontact.svg -fb784caff77782c7565f05dd9f7169c0;paymentmethod/images/GooglePay.svg -deffe706f4a891a574e7cee8de6b270a;paymentmethod/images/EPS.svg -a25d1f684f60c0372468352a886400d5;paymentmethod/images/DirectDebitSecuredWL.svg -9f1aab802b3871c63d4d09bd3da192c3;paymentmethod/images/DirectBankTransferWL.svg -e7fbc85757e1eb0871c754b2c9b58b53;paymentmethod/images/WERO.svg -83be4dbf852592b57ff1e09ec2322000;paymentmethod/images/Maestro.svg -f2e9bceec235785b045ec2425c2132ae;paymentmethod/images/Przelewy24.svg -2a6d8c8faa5efe529264d7ec1d647271;paymentmethod/images/Card.svg -105cc584857fda62a05e01bfc4720c25;paymentmethod/images/SEPA.svg -13ae581ecb97d1b433878157841e6b7b;paymentmethod/images/Unzer.svg -05c4980d25c03be54dbb3c9b9297f0af;paymentmethod/images/Postfinance.svg -a109a629e837814ec51e2fd779bebc74;paymentmethod/images/UnionPay.svg -0905c27f27902dd0e5bbe1c9ba398b83;paymentmethod/images/JCB.svg -021bc5a8d698a489260095fb8818efd3;paymentmethod/images/WeChatPay.svg -b9cdbc0eb6401b4ff48d586303496360;paymentmethod/images/InstalmentWL.svg -52a89f4db375db973578516d1cfb25b4;paymentmethod/images/Girocard.svg -ce4745a7e20bb3bd0ca39aa5b532eb94;paymentmethod/images/PayU.svg -1858e4911c102b5f7dab5abcf9da0daf;paymentmethod/images/Twint.svg -6a25cb09f7ed0d96cad7500bee57ad19;paymentmethod/images/Giropay.svg -36dc54e9a212afc559462b482399025c;paymentmethod/images/Ideal.svg -6be1e109a5d12de65d2c9ac3929d1569;paymentmethod/images/PrepaymentWL.svg -7e71060e52f4b304035ca502969ebe10;paymentmethod/images/Amex.svg -73915245a686ef8ab48e054c73d84d9f;paymentmethod/images/Vpay.svg -1857d98d3decde26435a4589aa934a64;paymentmethod/images/Visa.svg -02a2accc3b4c1e5dcca722a167065d55;paymentmethod/images/Sofort.svg -9b6862348700dd4fe0abe246eba85980;paymentmethod/images/InvoiceWL.svg -97301dfb7f296851b5c3d01f5f1459ce;paymentmethod/images/Discover.svg -8b82b6046395a8521d9a4fc0b32050cc;paymentmethod/images/AVS.svg -8c15e349d78dc6c274cccc4667ff31b2;paymentmethod/images/Paypal.svg -dfff929c0326e124533fd052032f4300;paymentmethod/images/ApplePay.svg -2a261e61b7f07518c8966fed02c263c2;paymentmethod/images/Mastercard.svg -7bad27c8e7b1fce0bc73a511b45cd133;paymentmethod/images/Diners.svg -1341038e6589ce645ddad4a4508e647c;paymentmethod/images/Alipay.svg -eba887c1728b645dd11069641d0f87f0;paymentmethod/images/Klarna.svg -405ab8956305746a8bfe2f10955d367a;paymentmethod/images/Default.svg -c54827f609af6413fd016ba0a734157b;paymentmethod/images/Cash.svg -5a0016ce6c3bee1d745985b077ef9601;paymentmethod/HeidelpayFlexiPayDirect.php -1230412f2ecb13ad6bdec7d5efb263f7;paymentmethod/UnzerApplePayV2.php -1ef765d0ee365680c13dc50356da8aa4;paymentmethod/HeidelpayPrepayment.php -ec0675d513fe14aa3766347ab3fe45ba;paymentmethod/UnzerDirectBankTransfer.php -dbcc0575277980988db941ad8c5119fb;paymentmethod/UnzerPaylaterInstallment.php -48bd0bd6ada6c60c68be29f98872022b;paymentmethod/UnzerPaylaterDirectDebit.php -b620607859a543b6b39a4dd0f8713d10;paymentmethod/HeidelpayInvoice.php -ef681dfaf1a3d16adb00a24d90c9c8f2;paymentmethod/UnzerPaylaterInvoice.php -b4e9f466cbc90886f8b05b52f0d656f3;paymentmethod/HeidelpayPayPal.php -cdb6414c94813a842353d8a5e249b9a6;paymentmethod/template/flexipay_direct_form.tpl -de71ef7ad1d74778d6aefa06353ea7c1;paymentmethod/template/ideal_form.tpl -d41d8cd98f00b204e9800998ecf8427e;paymentmethod/template/google_pay.tpl -8193c2cb2d5121a42e5e7c34f9ed8769;paymentmethod/template/invoice_guaranteed_form.tpl -92e09f450f3f3d14da0662ea07161033;paymentmethod/template/eps_form.tpl -1e4ed2dc988a36f86a57fd02ded6b66d;paymentmethod/template/paypal_form.tpl -90779b7efcb815a0bf66218facccb69a;paymentmethod/template/giropay_form.tpl -684dd20ae3d25753df30f267ca1e8c9e;paymentmethod/template/_footer.tpl -c76a097fc505f67507d64e8dff0a1b45;paymentmethod/template/hire_purchase_direct_debit_form.tpl -5839530871f6fbfd6e5861943c152f0e;paymentmethod/template/invoice_form.tpl -47896c9760ab6be45a8900b8fe2334a4;paymentmethod/template/przelewy24_form.tpl -9c3b804a567b03493dc279840765e8f8;paymentmethod/template/twint.tpl -4e6cef26fb9436237209743867a52c19;paymentmethod/template/applepay.tpl -3541e3aafa172d7fcb1574a64d8930f5;paymentmethod/template/dummy.tpl -ff7a3a7e0d3da675ee0499f5d6ec70d6;paymentmethod/template/sofort_form.tpl -b542a194e71d619c41751b0fdc47ac6f;paymentmethod/template/alipay_form.tpl -5eee7f9cfdd979b167348b081c6de014;paymentmethod/template/invoice_factoring_form.tpl -b95106f7bffc7555d8f14ab20d2280d8;paymentmethod/template/_includes.tpl -9a80a5090efe1774067e1ec2395b619b;paymentmethod/template/prepayment_form.tpl -d0429b27828d177d66fa8e60a6d35e23;paymentmethod/template/wechat_form.tpl -cbaf4ffca012a23d53641d51301bf4e6;paymentmethod/template/paylater_invoice_form.tpl -615c642c2888b93bcc09f8c8defda991;paymentmethod/template/paylater_direct_debit_form.tpl -d858925d3048740ab90330a67c2d687c;paymentmethod/template/bancontact_form.tpl -1d18efdf3f6bab9b18be95738bbf1db1;paymentmethod/template/paylater_installment_form.tpl -d1b3909de9a1c3f25e7f59ba2a00a6c3;paymentmethod/template/sepa_guaranteed_form.tpl -0fbe7ee9a22fcd9ba2711a843ff839b2;paymentmethod/template/credit_card_form.tpl -3b8bdde5974e6a00bcbe8a2c465e99af;paymentmethod/template/sepa_form.tpl -9685e3a81bdee6d28a24435462de42ee;paymentmethod/template/direct_bank_transfer.tpl -b350dcebcc08fd00d7e98673d378b11a;paymentmethod/HeidelpayEPS.php -b67477cee042851e2e5797c69653f459;paymentmethod/HeidelpayAlipay.php -953a8f0ea57476b1a419e92e65685f05;paymentmethod/HeidelpayWeChatPay.php -812e6f62b60227291392eac92a890128;paymentmethod/HeidelpayCreditCard.php -a095149969c4c43ddf150a394ed8df89;paymentmethod/HeidelpayInvoiceFactoring.php -06c7ca404f876cff4874a65d3155dae1;paymentmethod/HeidelpayHirePurchaseDirectDebit.php -d3c122c6611b3fac25a782e1b348c2d3;paymentmethod/HeidelpaySEPADirectDebit.php -c65a3c33c1ee600a39978def51d21510;paymentmethod/HeidelpayInvoiceGuaranteed.php -6e2fc01e330f5f5755e277cf59e274e2;paymentmethod/HeidelpayiDEAL.php -1f91db143a39995cc686619f6c4a882c;paymentmethod/HeidelpaySEPADirectDebitGuaranteed.php -e569da9af0bcb8225ff8f3d6c949f418;apple-developer-merchantid-domain-association -e73740baa8bcab9ac6d47b2a95daa826;jsconfig.json -a7e6375df510a55e0f6b1a4fc8b5d206;Bootstrap.php -c2405627e35992f208ba7281a6490256;adminmenu/scss/admin.scss -ef5d72b877de66653e21bf6cafd03bd5;adminmenu/js/keypairs.js -593e3e1024084fc1ee04e38a3a2e3ad7;adminmenu/js/admin.js -7710b3bcb89205a8fc1840d9be052fd2;adminmenu/js/ordermanagement.js -bd1dee2d300e99d194c69dfb1693075e;adminmenu/template/keypairs.tpl -ea5a5b2dc793ab305fe96a7822ba667d;adminmenu/template/applepay.tpl -dad4062692dbd99b16ae3233b36ec1ec;adminmenu/template/orders.tpl -9d4a1d1d23fa3d9ca1d844a87a2ce34c;adminmenu/template/settings.tpl -e0b9e6894421345360862d2571283a23;adminmenu/template/partials/_header.tpl -e68888b6874c60a42db48e2ead9dba40;adminmenu/template/partials/_keypair_item.tpl -94692a0334d6eeefe4b4806fc5832914;adminmenu/template/partials/_includes.tpl -7fce418366a4acd0f313f00ac2a48901;adminmenu/template/partials/_order_detail.tpl -b7e308e5ff89b5c6d00956183db19a2d;adminmenu/template/partials/_order_item.tpl -50329cc04d18170a2e8f086579a67366;adminmenu/template/partials/_keypair_list.tpl -746bd73bf157393d5d55f4b559a8c6e5;adminmenu/css/admin.css.map -7597a877c5a0775fbaddce1b2ab27eb8;adminmenu/css/admin.css -0803326e9f6e498531fc9e67cfe38303;composer.lock -30e621c301583a4e13928bd8b9a09a9d;.jshintrc -2c62fe5947e6614a783d78e29f531d00;phpmd-ruleset.xml -ea7aa4025fd765d650d31bf1c60e768f;LICENSE -3faed6c0507c6f399d352282db7c777b;Migrations/Migration20201027083900.php -c237fcf06c9da2f07028932e8eb8aa36;Migrations/Migration20230925100000.php -166d9346b496a3a2a2332586e8dcfa44;Migrations/Migration20221006103000.php -cd6d409b4fbd95d76bfe82ab4805a17b;Migrations/Migration20230919100000.php -55ccfd103771065e96f3e482ee49499e;Migrations/Migration20220511114913.php -3012f773b400715a955cffa18c8016e0;vendor/phpseclib/phpseclib/AUTHORS -dd08d7ce34d93812b90e0c83b0830e8e;vendor/phpseclib/phpseclib/composer.json -0b27e2a16f32135b23a3aff85dce4d48;vendor/phpseclib/phpseclib/phpseclib/Crypt/PublicKeyLoader.php -85da87aa04d087e7fd547519ce46719b;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC.php -c276111606c949e7e4fdf24109eefd7c;vendor/phpseclib/phpseclib/phpseclib/Crypt/RC2.php -2a53b02f538e9b20e8cfe9255a1e6db7;vendor/phpseclib/phpseclib/phpseclib/Crypt/DSA.php -56755b036e38082298a949e378e1fecf;vendor/phpseclib/phpseclib/phpseclib/Crypt/Hash.php -9f12631445db8c53b38d9fe6ea8e8b08;vendor/phpseclib/phpseclib/phpseclib/Crypt/RC4.php -ecbdbe82f05e29c0fbe0db2172b573a3;vendor/phpseclib/phpseclib/phpseclib/Crypt/DES.php -20841644093a890e427d544bce7f0085;vendor/phpseclib/phpseclib/phpseclib/Crypt/Salsa20.php -3df894620dc3a8b42945614c57395d1a;vendor/phpseclib/phpseclib/phpseclib/Crypt/Blowfish.php -644f1f0e112096e815bd68f6f71d5e7c;vendor/phpseclib/phpseclib/phpseclib/Crypt/DSA/PublicKey.php -d13d6b04ae692d02854d53176ed9dc3a;vendor/phpseclib/phpseclib/phpseclib/Crypt/DSA/PrivateKey.php -be41f929cc2e3f28ab1ced739e90dd83;vendor/phpseclib/phpseclib/phpseclib/Crypt/DSA/Parameters.php -1c460d71b64a6caa7b043b8b6dc35c74;vendor/phpseclib/phpseclib/phpseclib/Crypt/DSA/Formats/Keys/PuTTY.php -344f0386bf46c3a802d3c9dc77c7b71a;vendor/phpseclib/phpseclib/phpseclib/Crypt/DSA/Formats/Keys/PKCS1.php -3cb89b48d5d9cee6514ff83cfbec5c1d;vendor/phpseclib/phpseclib/phpseclib/Crypt/DSA/Formats/Keys/PKCS8.php -8c110f4548d8af291ef35910be41f42d;vendor/phpseclib/phpseclib/phpseclib/Crypt/DSA/Formats/Keys/OpenSSH.php -544d3076a0df77855ea438bd94495b05;vendor/phpseclib/phpseclib/phpseclib/Crypt/DSA/Formats/Keys/Raw.php -3f7cc67bf4baee83664bb5067d309790;vendor/phpseclib/phpseclib/phpseclib/Crypt/DSA/Formats/Keys/XML.php -ba891ccf588a243c05b78c918989c58b;vendor/phpseclib/phpseclib/phpseclib/Crypt/DSA/Formats/Signature/ASN1.php -d99fdeeb603fdfdaf88ac1ff319ee8bd;vendor/phpseclib/phpseclib/phpseclib/Crypt/DSA/Formats/Signature/SSH2.php -9d94fcf7c2c31ac144ecdcf399122454;vendor/phpseclib/phpseclib/phpseclib/Crypt/DSA/Formats/Signature/Raw.php -952ddccf99135bfda527a81ff7321db8;vendor/phpseclib/phpseclib/phpseclib/Crypt/Rijndael.php -38bb16dd513e0127896e008d861e149f;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/prime239v2.php -da8225ff8f61ea4fc723aefc82368c23;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/nistk163.php -f99b47e07072dbec9de6e1b9d612c129;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/nistp384.php -24284308da3c26af6d6fd576feddfeea;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/sect193r1.php -bbefe9f3455fbbe758ccae26f0939732;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/prime239v3.php -d625abf16a2d4c93f5502cef4fbeffa1;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/nistb233.php -87faeb4ff9edf6e442fb6c233d866b2c;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/secp384r1.php -5cae8b66c8b6c549e233d371f702af0f;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/secp521r1.php -da7dbaade8adfdff94d3012846b40fe0;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/nistp256.php -617693d0796bcdc00a0687b6e9a266a8;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/Curve25519.php -2e808c3ad853412ea67d11dc495ba179;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/Curve448.php -3e9a642ffccc5aba7e3b139ee02c1fa4;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/secp256k1.php -c3f1909add6aaa0b5dbae84ffc789ebc;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/brainpoolP512t1.php -0829218146b19bef32bf528866444b0f;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/secp160r1.php -cbc5b2ed355020727a357a93d5d67766;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/brainpoolP192r1.php -2d5cc3f9fc0c805cb7196ce21845f8b4;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/prime192v3.php -83b7013b8de8575c6939236a866ebb66;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/nistk283.php -75ed2679c72a374db1c411488e138fc6;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/secp128r1.php -3542a0925fc4446ddc94cd3b097a247f;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/brainpoolP160r1.php -6a872a8bf1eb0fa8870de4d326185d36;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/nistt571.php -44b9ff1e875f430237714e3a11fa21fc;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/brainpoolP256t1.php -b0f42b9383e05bee355b9836d68f84bc;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/secp192k1.php -1f9c07d32fe997ad6e880bb5e936c52f;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/prime192v2.php -203955d4495b242e33d26ef526627424;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/sect571r1.php -98b962609db730fc29aba06b8f2b7a3c;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/sect283k1.php -8f1392fd67bf9e910523c8ebd4f01ab3;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/Ed25519.php -7c49e3fccf9756903be0d48302196b5e;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/secp112r2.php -442b2fe179001f65ccf7143697a8ed3d;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/secp192r1.php -351072838aa7a4696e8e27d517773060;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/secp256r1.php -a4afc0f227d11b9fbe99cc28e38610f9;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/brainpoolP384r1.php -bf81a6374cd79a801400f6aae0d4cbbc;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/nistk409.php -0fb2a1f09ccde2a66e805e8e2ca4df32;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/sect571k1.php -f6fb7890cc2d544e5d438c9e34912a16;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/nistb409.php -1fcd67e0de877b8e8f004478eb00eda3;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/sect283r1.php -49cd6c2342d868b57a64e81f2ef24561;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/nistk233.php -3c309e19339b4bf23b2d0d620eb58306;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/sect113r1.php -080094920a7db400cae193fd514e0b53;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/sect131r2.php -e948f4a79170fb2d8fb3d3d1f2349cb9;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/secp160r2.php -e4f5443afa7520a442c70d0dc06897d0;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/sect239k1.php -5569f64fe641f01510994081c23b724e;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/nistp192.php -747fabd8969e686a8528d40258dba5de;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/sect233r1.php -8c2fe0179015ab6b00830dbc07c91b84;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/nistp521.php -7b666317b38a0ac7d32d86f4cb92a194;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/brainpoolP320t1.php -dbece4a6c174eca6fa98c08855c8a9b3;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/brainpoolP160t1.php -e99d7c70670820a38b271d734c961341;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/sect163r2.php -fde54d2b5d2cc88ef7ed182a307e9447;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/secp128r2.php -8a6c11c5330fe1577428ef173accd5c6;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/Ed448.php -487bc618d40e35490be1750b7fafe1a1;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/sect193r2.php -420fd97c6e6395dea3c41ea63a151503;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/sect163r1.php -29f5f9c48a9e19eb687fb8cab325c591;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/secp224k1.php -af1aafd7e929c39c243eab4db3f764a8;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/sect233k1.php -2982b9b3a7534834c313f10ff71e5b22;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/sect409k1.php -18d55ee9124467289008c85d0d6e15ab;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/secp160k1.php -7654b83eff2a8e616a19ed2304c0036a;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/sect113r2.php -abf12e93c8a5744520f0ec11615a3b9f;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/brainpoolP224r1.php -fcdcf6d46a29e9ef30a4ad19809e2bdc;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/sect409r1.php -209799bf9c7b6e2b9ca7037da44f9121;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/secp112r1.php -8519adac393dd5ac2c0654ac581c86cf;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/prime239v1.php -639ec2735668d4fe6afa419104f1516b;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/prime256v1.php -f79737664973102e8272ef2c11b7e974;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/sect131r1.php -f7c40494abfbc18d7918089bb492a3f8;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/brainpoolP512r1.php -3bbe42422c625bd09c2654d51a6c3dac;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/brainpoolP320r1.php -38637eafa4a763d7769835df2136778c;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/sect163k1.php -1355ede54f39a1c17438d44981f2eb88;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/nistp224.php -706c4f2d8efdbc0f83676ee608e56d96;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/brainpoolP384t1.php -828a3469e1645d813668af13ce87b8d3;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/brainpoolP192t1.php -5c5486d4b757d1cd512cdb9a8204ac76;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/brainpoolP256r1.php -0ef779ff43f27a189cb3bb68a5823f17;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/brainpoolP224t1.php -9a15efda0ba337785d71f9969f835474;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/prime192v1.php -25b328f08529a5d4b2b7bc2021d0cdcd;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/secp224r1.php -2d2d9357e4a746187945dcb9de8f1826;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/PublicKey.php -4df973a7460cb77df0b6b9ec2c458168;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/PrivateKey.php -5ef83b1b672f99a2149ff77c6de5874d;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/BaseCurves/KoblitzPrime.php -41ed9b9b949e95d36770d172501323af;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/BaseCurves/Base.php -2eaf938b58ba416921e773e2b34ede01;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/BaseCurves/TwistedEdwards.php -4a91b8a79e82dac19d832bf968476c9c;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/BaseCurves/Montgomery.php -4c46d6bd85850b43b523f0aee24c899a;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/BaseCurves/Prime.php -857030d72a730339bee1d71f16e0a840;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/BaseCurves/Binary.php -8c0d2120d75748c1877e858264ed2eed;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Parameters.php -6e0f3ae71aa2f4211949e8396c4378b8;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Formats/Keys/PuTTY.php -323faab72989033c47475e558f680dc7;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Formats/Keys/PKCS1.php -4cc7ff2b22efc1d251b589c270f31d82;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Formats/Keys/Common.php -156bf91d55de89d961a6755c53e6fa9c;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Formats/Keys/libsodium.php -0e4c5a8eaf9cc097a7c6ddf571d7eed3;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Formats/Keys/MontgomeryPrivate.php -68746f75dd0f9511fed627f2f63c54f3;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Formats/Keys/PKCS8.php -80c8c62adea3c913d884a75a74d3c42b;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Formats/Keys/OpenSSH.php -e627a2980cb53542b64b6d9a234ae083;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Formats/Keys/MontgomeryPublic.php -9c43bd7d84ea054a996736bf1e06439c;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Formats/Keys/JWK.php -147e8d28c7968ae4cab5276e05e029b6;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Formats/Keys/XML.php -c15814b88489f84bc7eeafdea9559978;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Formats/Signature/IEEE.php -90aa80abd2437b745c92e075750d86a1;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Formats/Signature/ASN1.php -c3d6cdb76651ffbc8162f66e0efb393b;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Formats/Signature/SSH2.php -243a88eea5b939ace6db9da70b3ebd6f;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Formats/Signature/Raw.php -af21a780fc59992b916b419d9e40b2db;vendor/phpseclib/phpseclib/phpseclib/Crypt/Random.php -69f80949b9a90d0cc5e0cf85a3cc6410;vendor/phpseclib/phpseclib/phpseclib/Crypt/DH/PublicKey.php -9088f575e0a162a7ea204b0096ba203d;vendor/phpseclib/phpseclib/phpseclib/Crypt/DH/PrivateKey.php -bf244e3a321ca4b5ff3a7fd6124d890f;vendor/phpseclib/phpseclib/phpseclib/Crypt/DH/Parameters.php -a65e06350f5c66ead4851267d6fe8691;vendor/phpseclib/phpseclib/phpseclib/Crypt/DH/Formats/Keys/PKCS1.php -543a0fad2f9537141cf01ea1e20bea7f;vendor/phpseclib/phpseclib/phpseclib/Crypt/DH/Formats/Keys/PKCS8.php -365e89f10135eb4e3f448e37418a7778;vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/SymmetricKey.php -13e51444d2a368f6f325cd1bc9daa75c;vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/Traits/PasswordProtected.php -448c1f9a32d7d769cc24abf4b906888f;vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/Traits/Fingerprint.php -9413e5062c393230ba5864b0e0c8c846;vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/AsymmetricKey.php -da0259ccb7425aab4d33c9c6dc3e8a8f;vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/StreamCipher.php -be5ec9615271e674d660a46dab540f31;vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/PublicKey.php -8e36169ff0be06f0fde8dcdaec6631ec;vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/PrivateKey.php -0ce1b5e4f8296fd1de88185604288aee;vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/BlockCipher.php -d33a575b78269a7b8ef4049c1fe419b4;vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/Formats/Keys/PuTTY.php -e2a29c354145d8d4a02f7fd90a9a51ec;vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/Formats/Keys/PKCS.php -fec521301d5d0c69fc1e507c13443437;vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/Formats/Keys/PKCS1.php -cdd3833add618c542dfa2b0b19e2ac0b;vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/Formats/Keys/PKCS8.php -dec9bf7e379ae4691a569535e30d2a2a;vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/Formats/Keys/OpenSSH.php -108feeeeb660685a14dbee68506d9ee6;vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/Formats/Keys/JWK.php -fd01c80ae620ff944ad224694f7929a1;vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/Formats/Signature/Raw.php -5194f725a2d76a7c5640c2be2ac80644;vendor/phpseclib/phpseclib/phpseclib/Crypt/TripleDES.php -a8f255a935d49125b9b5fd2203acadef;vendor/phpseclib/phpseclib/phpseclib/Crypt/ChaCha20.php -e4fc93bb39eccef0b46f706e7db14739;vendor/phpseclib/phpseclib/phpseclib/Crypt/Twofish.php -7945aeb4489900fd5e0fb8f10b2cd813;vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA.php -83ca72d0fc0877c6b83d4ef9012c081b;vendor/phpseclib/phpseclib/phpseclib/Crypt/DH.php -cc9c52e18a5bdd5accd3b0342688316a;vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA/PublicKey.php -573ebd3d7592f942607f0f863047a8ec;vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA/PrivateKey.php -6cbf92dad628c1ca3d4153570b61b1a5;vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA/Formats/Keys/PuTTY.php -ba61c7e4abc1508c84d1f67922de6bed;vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA/Formats/Keys/PKCS1.php -4ceeb99d0ec6988cf1e38b5677190eb0;vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA/Formats/Keys/PKCS8.php -bd1be69d327c3385d54fbb4be12a8c49;vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA/Formats/Keys/OpenSSH.php -35dd7d5ab9f357186aab27fa4b5adaec;vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA/Formats/Keys/PSS.php -300c092291bcb0f9810bdfcb03bca8ac;vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA/Formats/Keys/JWK.php -dce1fa9b37bace1cfea1e59fff413c07;vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA/Formats/Keys/Raw.php -5aee20c33f0c4e3152db822c0ff3ad19;vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA/Formats/Keys/XML.php -8828c48533b0ef57291abeffa0c4228f;vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA/Formats/Keys/MSBLOB.php -3fdd8c95b7cffb0e9985d338090b2ba0;vendor/phpseclib/phpseclib/phpseclib/Crypt/AES.php -042e8e610407b41b8a04e2872dedccbb;vendor/phpseclib/phpseclib/phpseclib/Math/BinaryField/Integer.php -61004a74c2489f984d70525830bfff02;vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger.php -341e8c48aa21fd0595325e36d280b026;vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/GMP/DefaultEngine.php -d47eb0d3141be93cd6922acb835490cd;vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/PHP/Base.php -767cf0757238eaeb02752a08d5a1cb5d;vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/PHP/Reductions/PowerOfTwo.php -174222e4a04798b30ef20e223a16bcc8;vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/PHP/Reductions/EvalBarrett.php -d8f32f01017420777ca33c5ab42d198d;vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/PHP/Reductions/Classic.php -3b424c43f0e14d4b955bf9f0a6ad0925;vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/PHP/Reductions/Montgomery.php -0165b2f1b85109d06cdd7a1c197d202e;vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/PHP/Reductions/MontgomeryMult.php -30c0a9dfdca537c3b9c6d34b391a110b;vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/PHP/Reductions/Barrett.php -494a5e2707ba8f688f4b566f9a24cbd7;vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/PHP/OpenSSL.php -b0bdb15defb90d6831c4fe93304b77f2;vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/PHP/DefaultEngine.php -4cbcdafb51c872cba4056acc5f6eac8b;vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/PHP/Montgomery.php -cbd9ba4467f0da947945995a321edd21;vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/OpenSSL.php -9740e434364646d0ae8d98cbbfb8f1d2;vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/GMP.php -2f85afb040a330914d1de0c9ae65487f;vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/PHP.php -a93ecbf32c182bc4cebd6a7b678ace49;vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/BCMath.php -f7b341f7c554b4e54f171e2422fa8b5e;vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/PHP64.php -cd487f310c02e392196943e546884f8e;vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/PHP32.php -5d71b22893fb33c49b293fb0990022db;vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/BCMath/Base.php -e6a1e203eae24d6b8f9ecb3bbe5db192;vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/BCMath/Reductions/EvalBarrett.php -b5ad9f072089673f8e6e9609c45490f8;vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/BCMath/Reductions/Barrett.php -ff90ba3a9f0c50437fb28123c299f54b;vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/BCMath/OpenSSL.php -015ff4bbf9f1f1a7ff93ce629d26e526;vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/BCMath/DefaultEngine.php -350d57aea9bab7a2dccfb00cd64b92d9;vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/BCMath/BuiltIn.php -e166d4fea4e82f30c931b3baecb52b5b;vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/Engine.php -36512abd6cdfe352f637cb76498735b8;vendor/phpseclib/phpseclib/phpseclib/Math/PrimeField.php -8e0f3772662114a3962313d5db474e6e;vendor/phpseclib/phpseclib/phpseclib/Math/Common/FiniteField.php -1fb9bc73e302ba9f215d86d67b3b5d73;vendor/phpseclib/phpseclib/phpseclib/Math/Common/FiniteField/Integer.php -c12b3b9ff2262cf2a61f845e8a05d0d4;vendor/phpseclib/phpseclib/phpseclib/Math/PrimeField/Integer.php -a719268e25333c08ad7353a381b3eeef;vendor/phpseclib/phpseclib/phpseclib/Math/BinaryField.php -1f54340ec38b2caa499aca013bddbc6f;vendor/phpseclib/phpseclib/phpseclib/Common/Functions/Strings.php -3c667b885886bf1f2e885be74fbeb8d2;vendor/phpseclib/phpseclib/phpseclib/Net/SFTP/Stream.php -5ef1d7cf20c235c6c2a172f739e3debc;vendor/phpseclib/phpseclib/phpseclib/Net/SSH2.php -43698fe1e5e2ea432879a1a206cc23f7;vendor/phpseclib/phpseclib/phpseclib/Net/SFTP.php -fa4bab04703bfcb560be4489526b0991;vendor/phpseclib/phpseclib/phpseclib/bootstrap.php -1acfeaf7aaedb9015059615b31774d57;vendor/phpseclib/phpseclib/phpseclib/Exception/TimeoutException.php -fb3bcd58ba318d74117a7c3e05edc63b;vendor/phpseclib/phpseclib/phpseclib/Exception/ConnectionClosedException.php -968f465458abbc8565b5ea43b22021a2;vendor/phpseclib/phpseclib/phpseclib/Exception/InvalidPacketLengthException.php -908d914dd59d848f51b6ef1277e1257b;vendor/phpseclib/phpseclib/phpseclib/Exception/NoKeyLoadedException.php -cf8e7671e5079a6774c35202ae5ff4b4;vendor/phpseclib/phpseclib/phpseclib/Exception/UnableToConnectException.php -0b7d8e736a24ddedf5ed00d3484c8975;vendor/phpseclib/phpseclib/phpseclib/Exception/UnsupportedOperationException.php -09f09eda418a4efb796417e66febbb7d;vendor/phpseclib/phpseclib/phpseclib/Exception/BadDecryptionException.php -e1e2e5e0b7e8cc03abe3ff1acabd24a3;vendor/phpseclib/phpseclib/phpseclib/Exception/UnsupportedCurveException.php -6601a8131d3fa88b4f1ecf2ae6f9a08b;vendor/phpseclib/phpseclib/phpseclib/Exception/InsufficientSetupException.php -272755d560cdec9f3b967cebe533b36d;vendor/phpseclib/phpseclib/phpseclib/Exception/UnsupportedFormatException.php -f4c5e01e7cb2909f26413f789ed81397;vendor/phpseclib/phpseclib/phpseclib/Exception/UnsupportedAlgorithmException.php -2e59658ef3494ba5e506d615e3ae2cf3;vendor/phpseclib/phpseclib/phpseclib/Exception/BadModeException.php -87189e47473849d93fabe1d4fd321afb;vendor/phpseclib/phpseclib/phpseclib/Exception/BadConfigurationException.php -16fede9bcb481f3672ebd0f589e3b1d5;vendor/phpseclib/phpseclib/phpseclib/Exception/InconsistentSetupException.php -49c6c1bac9cae29501299c78431adc3f;vendor/phpseclib/phpseclib/phpseclib/Exception/NoSupportedAlgorithmsException.php -c794ec901f93e22fafcca89bba0af9fa;vendor/phpseclib/phpseclib/phpseclib/Exception/FileNotFoundException.php -b4409823562c617107907cd04d67c8fa;vendor/phpseclib/phpseclib/phpseclib/openssl.cnf -64c983e5d1708fe24f8846e2ebbec7ed;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Element.php -0b3110ccfe3d413412e7351686f17928;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/PBKDF2params.php -0f209f3cef3d78eeaf52710d2cf3c01f;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/ExtensionAttribute.php -2524176ed4c7b37f5ed00fc88d3d6cd1;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/AttributeValue.php -aebe0974a2406e1b341b13c8f251fcfb;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/InvalidityDate.php -018bd58600c2545f967ada149fdc68ca;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/PolicyMappings.php -06f9406651d642326f5d1f3e0861bb9b;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/PostalAddress.php -486073be0641fabe2390132cd916ab6c;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/RSAPublicKey.php -13d1f23144be3bc417b9bd3be4fc2e49;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/PublicKeyAndChallenge.php -c5636595684c29859197d89c2f8acd38;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/PrivateKeyUsagePeriod.php -59d50d2dbc9b7c167e5d5b0aa4ebb1d8;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/PBMAC1params.php -a9b6181694e7da3dd5a178f41139bca9;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/KeyUsage.php -fb74c697dcd01e62cd59d408d99d88b5;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/PersonalName.php -dfa8b2acb19fddcf861319dce103ae43;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/netscape_ca_policy_url.php -8c6967130b0428d84e982a3e6b99b332;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/Certificate.php -8d70f23f39f2f3490cef398b643e5179;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/FieldElement.php -4cc35583e03f4228111c0677ec85cb9d;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/CPSuri.php -7a9daece61f228b192fa32ce3b9c635d;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/PolicyQualifierId.php -6130b35112bbbfea8f893a44a9deacc5;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/MaskGenAlgorithm.php -df2143e35916b93dc55e50c87dac814c;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/BuiltInStandardAttributes.php -4c2316cd41eb4ffab5ed7143cc80d29a;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/OrganizationalUnitNames.php -0b3866b3e071f81f9e73dffe955374d1;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/AccessDescription.php -6334885e2dddd36c0a9742602de292cd;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/PolicyQualifierInfo.php -f81cf8651a34662be8f91fe1e819d564;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/CertificateIssuer.php -b720f10d223e2897692823f96ada6cfe;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/Name.php -34056973bd648a244aaede99be4a1781;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/CRLReason.php -e124e64fcfc3edd8b9d48630d5c1e6b4;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/netscape_cert_type.php -1d88fbf48a13d2772c0ed794c5d70901;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/RC2CBCParameter.php -166dfc573923b7344b378c9206e740e3;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/EncryptedPrivateKeyInfo.php -cc705ea2116dddcccd59c0fd592a00f3;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/Pentanomial.php -0f5d06805a5251427323605150a3e36b;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/AttributeType.php -1b2257efda1e3fc29522aeafa12b29f6;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/Prime_p.php -24e0d5620d3fdf876a1c9653b9d74229;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/CertificationRequestInfo.php -1a5677476394cdef8d890ad22be77e3d;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/UniqueIdentifier.php -20983528c5bcb7605e57f9ffa2c612e1;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/HoldInstructionCode.php -aaa623fe6adda5c9a1152c6c1f30f366;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/NameConstraints.php -3f17f1fe26b4f61cad378f1ac928da0e;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/CertificateList.php -6b00dddf399d8f4548984a5f17dbed1c;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/PublicKeyInfo.php -a730a5f5efcaaaa52bc19d2419112a15;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/ECPoint.php -4e6b480609b060c84575c3370be444e2;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/Extension.php -0fc7102dc15ea0c19227c02fdf000d64;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/OrganizationName.php -580587eda7fe2f41047238949bc6e05f;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/GeneralSubtrees.php -f1560db645e1404815c8ac3ced9e06ae;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/EncryptedData.php -2b320233cd91cc500f36a721dfba572b;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/RevokedCertificate.php -d5b73495787cb21456000f0ef716be5f;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/HashAlgorithm.php -6e0073677464bdba73e44979e5ca2bfd;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/netscape_comment.php -8b5f3e6094ad69bcf27e3283e7162ebf;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/DistributionPoint.php -552d4c5f4d8ea3e84bf791c24a406821;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/RelativeDistinguishedName.php -79ee6ecd46fdb72f77b3cc1e0d8fdfdc;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/IssuingDistributionPoint.php -01f2574bc5b71ca1e18f45ab25c557db;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/Attributes.php -da1993023e9ced50784a9728d13cc137;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/AdministrationDomainName.php -038dbedb444218ebd27ba3a1dab22741;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/BasicConstraints.php -d5015f0e51482fbc08b01281b1ed8b67;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/NetworkAddress.php -544271d1b29585b3cb2c66e113f2b525;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/PBES2params.php -7397a698de460e96dba26b0c7d6432e8;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/EcdsaSigValue.php -32c6794acb00cc37b07253db2fb0d4db;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/SubjectDirectoryAttributes.php -092b154b77c1e9b80406d6599eac8424;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/TBSCertificate.php -3f7317e790640697bfb4bf94a90ab5af;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/ORAddress.php -0ed7e0943935fc1805bbd938490a390a;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/OtherPrimeInfo.php -d8e31637cf477a1a8af71a6cc5f30ec6;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/NoticeReference.php -4e480bb631091cb13c645d1e39c52a6b;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/Attribute.php -7f94cc64bfdb5afbdd863bf6dc13f9c9;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/AnotherName.php -06bcd53b348630f61cf655eb74f0543f;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/AuthorityKeyIdentifier.php -598276c649c38285f6e33c1fcf1d7ffe;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/PolicyInformation.php -bb997d92c99354c6b0996f7c8d9a7950;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/Trinomial.php -14b78d9e273bfc39385afb65e9355f4b;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/PublicKey.php -8da951d3513cc52569a85884e7b958b8;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/Validity.php -f2c29db9a81dd9fbefde1aa21d36c531;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/DistributionPointName.php -f148409b7c74951de6c4dfe31c6bae1a;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/DSAParams.php -8f1fcde461fc26c01de460e0d92d2daa;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/CertificateSerialNumber.php -730d71ae48811a00a6aa4028e72a924f;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/SpecifiedECDomain.php -b2accf0fead91437af70dfed36b84b37;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/ExtKeyUsageSyntax.php -ec3048ba05f543672fe10499b5a978d0;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/ECPrivateKey.php -41807fce28350e6833cc70544a347998;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/CertificatePolicies.php -df39e6a018bc274ecc09f25b31d97446;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/BaseDistance.php -b66027e585838293eb34d1528d6cc719;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/CountryName.php -dd94a9bd457caa1a7c414a299d8ca58d;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/ReasonFlags.php -46575fba05d601c423b578a885576f7d;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/RSAPrivateKey.php -d1bd2cced01e6b7e7ca3792657f2e3de;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/PrivateDomainName.php -12a592410efd7d2e4a2f25ee85bac965;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/AuthorityInfoAccessSyntax.php -c3465d3d54648ccbac2941c6cf30a5e7;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/ExtensionAttributes.php -d155ea666da601f140d6f934328441a7;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/IssuerAltName.php -c2add47fcbb7bb81dd904917b9bc2db5;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/PrivateKey.php -737b8e5362304d99643089716e087e20;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/DSAPrivateKey.php -14d23be22014a34690cd7b677fea089e;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/NumericUserIdentifier.php -44a23b7563e4ba1f17fa76350ba27752;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/GeneralNames.php -ff28b293ab3622864bca7d7fae32adc5;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/Extensions.php -61ca45ae815d87f452d548984999919f;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/OneAsymmetricKey.php -69b263152ed30995659f98a6b203dbaf;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/CRLNumber.php -fbfef4de6fa2670fff8b558d854012ff;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/CertificationRequest.php -3c181aba31ab92fa2c3194bb706087fd;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/DHParameter.php -054e04b127f11b286405a83a65ec5dca;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/Curve.php -9e74bec23c36f42a5405b8f062478e21;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/BuiltInDomainDefinedAttribute.php -4b557d18240b86b3c2cec7447b3a5194;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/TBSCertList.php -94ee316d5529f2806ea3c6fc4fff7008;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/OtherPrimeInfos.php -3a497e1c34ed7a69f1b7bc87f6c3b61a;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/CRLDistributionPoints.php -c17c93631098968e8546448d5dcd285e;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/PrivateKeyInfo.php -f6750ac4c79a8d1ef3b6c7df5a4e31b9;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/PKCS9String.php -0db88bcd574c715daac30f4cb028f6d2;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/DigestInfo.php -b92efe0ec5205532068e18570da2e538;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/SubjectAltName.php -325d537e0f46ce4e95f44c23f4df51bb;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/UserNotice.php -4f0962ccb6098cd124649ef8626ea594;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/SubjectPublicKeyInfo.php -79f7a32bc575189a7598d6bc06e2da27;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/DSAPublicKey.php -17151c82540d68f113d0d902920dd97f;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/KeyIdentifier.php -55c95352c8fb4886fa3ed65c9ec6a7d8;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/EDIPartyName.php -4eb03a107377e96cc1c6a8bdae1a0306;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/GeneralName.php -eaa517251d762963358c55bda2d9a53e;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/DirectoryString.php -d22516b4a40ec9b784326b634deeb773;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/RSASSA_PSS_params.php -fe8a2c96df5e0cf225719a3a294d29e3;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/TerminalIdentifier.php -4b08ba3bf0ffbd1efb1d9ec848dc5760;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/PBEParameter.php -45394f96ae7ab7941e7e28ae0d1ea117;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/DssSigValue.php -f27a741f4b0202e968cbc5429cfd1d3b;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/DisplayText.php -50b17702d1d1fe9e6fa58dd08b8268c1;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/BuiltInDomainDefinedAttributes.php -bd8fbbf8091246fc42b0895be9f6d86d;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/FieldID.php -02a9fd91fbe9461af26579c24c54d751;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/ECParameters.php -3aebecbe97d0928a6b7c2d30a8e9a539;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/SubjectInfoAccessSyntax.php -973075b722cd406311a3846b74fbfece;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/AlgorithmIdentifier.php -e903157db0864e0e9d0eb218fe7cee40;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/Characteristic_two.php -51f04927004170da330d20d3c74e3437;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/CertPolicyId.php -27d714c9c4171bf0f0394702dc94324d;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/RDNSequence.php -46e70358c1bfa408b937f209e5d914a6;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/Time.php -db8966ae3fe9ce8daf71c85f93156430;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/GeneralSubtree.php -c3be8b7ac5b69d9aadf0f06d120614f1;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/SignedPublicKeyAndChallenge.php -d7e9e0859e14bb9dda574364d45297f2;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/KeyPurposeId.php -caa6b08aa97b7bc1f8c3355c8e0646f7;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/AttributeTypeAndValue.php -be01c1e368e54acfcae749bb5adbec11;vendor/phpseclib/phpseclib/phpseclib/File/ANSI.php -5c743bf41012c9057dfcf29c0ce74bc7;vendor/phpseclib/phpseclib/phpseclib/File/X509.php -9c330e9177c634e14957fb126cd8323d;vendor/phpseclib/phpseclib/phpseclib/File/ASN1.php -36cc261390c51c0fa66f632955b0dab9;vendor/phpseclib/phpseclib/phpseclib/System/SSH/Agent.php -0c054287acdbdda2d6244fc5ade26b95;vendor/phpseclib/phpseclib/phpseclib/System/SSH/Common/Traits/ReadBytes.php -41b9b94bdfd534ab6ebfb7d0bf8a549a;vendor/phpseclib/phpseclib/phpseclib/System/SSH/Agent/Identity.php -af7368297e479652e6ef808a77702c02;vendor/phpseclib/phpseclib/LICENSE -7c4783c1028e43311e7cf8b23c24e04d;vendor/phpseclib/phpseclib/README.md -280193e7acc99cbd28d43ebacd2fd641;vendor/phpseclib/phpseclib/BACKERS.md 145536c4c9441cf9505709d27d9ace95;vendor/autoload.php -824e49753cf879aa756c9d6fbfe0c863;vendor/composer/autoload_real.php -631b00271668b14aee0447e8e8947507;vendor/composer/autoload_static.php -224007c97efb82c7b45b0e92f240af41;vendor/composer/autoload_namespaces.php -fc18aeec0d3cb369aa3e2b04bf772718;vendor/composer/installed.json -8dd932a7a65010dd3e49368bb2dea609;vendor/composer/platform_check.php -ab90ab9876b52e0fe15a5e5ec32e25b7;vendor/composer/autoload_files.php -182d5924ff0b528f008a83d1f5809d02;vendor/composer/InstalledVersions.php -3fd3dd67703dccf88a94a6216d5e6bad;vendor/composer/installed.php -79512e55245b2a8b64e60c3c1d05ab0e;vendor/composer/autoload_psr4.php -c02be6d96671f88d28aad3ffa134c8ae;vendor/composer/ClassLoader.php -955d5fe58c231244f6b49000f383b5e2;vendor/composer/LICENSE -5615b29a1f5688414d56a1515d954a91;vendor/composer/autoload_classmap.php -d045397c5fda276eb286c147ceb74ee4;vendor/unzerdev/php-sdk/.php-cs-fixer.php -5b3d8c5d8f58417864d61cd9724d18d1;vendor/unzerdev/php-sdk/CHANGELOG.md -cdbe7e4fb996b050423c7232a71bff67;vendor/unzerdev/php-sdk/NOTICE -417e6e42dee83ba2011090b70c0cd90c;vendor/unzerdev/php-sdk/.travis.yml +42215678dd84b72ae4592d6ff273a5a4;vendor/unzerdev/php-sdk/.gitignore 5b1d4c545c4730184ee6d31e1b62d6d9;vendor/unzerdev/php-sdk/composer.json -aaf5ac4b651d570ea067cd78ab596e96;vendor/unzerdev/php-sdk/src/Validators/ExpiryDateValidator.php -c62a9f0b3664502a49fd27f6cd6919b3;vendor/unzerdev/php-sdk/src/Validators/PublicKeyValidator.php -e648bfec127404941a0a104ac0320272;vendor/unzerdev/php-sdk/src/Validators/PrivateKeyValidator.php -5a1bb71894a0de59dc69baa4f8d2208c;vendor/unzerdev/php-sdk/src/Apis/ApiConfig.php -79d00715e454ca2ecd5cd1c40d00fedc;vendor/unzerdev/php-sdk/src/Apis/Constants/AuthorizationMethods.php +d045397c5fda276eb286c147ceb74ee4;vendor/unzerdev/php-sdk/.php-cs-fixer.php +2a835730131c1caf9963f59289b389bb;vendor/unzerdev/php-sdk/unzer_logo.svg +82e474803328bb1afbfaf2b535683353;vendor/unzerdev/php-sdk/README.md +a4af7012fda92d785800fc2b39554efa;vendor/unzerdev/php-sdk/src/Adapter/ApplepayAdapter.php +b3cc767aacbb53771524c28679417389;vendor/unzerdev/php-sdk/src/Adapter/CurlAdapter.php +88f296c8dfdf09a9458bb75157cc5c3d;vendor/unzerdev/php-sdk/src/Adapter/HttpAdapterInterface.php +aa58f837939ad64accce276415d6f06e;vendor/unzerdev/php-sdk/src/Apis/PaymentApiConfigBearerAuth.php 2cc971984b5e289b35fd1d0cf521d3ec;vendor/unzerdev/php-sdk/src/Apis/ApiRequest.php 30626969f60f4698d5f563f170049344;vendor/unzerdev/php-sdk/src/Apis/PaymentApiConfig.php +5a1bb71894a0de59dc69baa4f8d2208c;vendor/unzerdev/php-sdk/src/Apis/ApiConfig.php +79d00715e454ca2ecd5cd1c40d00fedc;vendor/unzerdev/php-sdk/src/Apis/Constants/AuthorizationMethods.php +a9e0cee672d89f960dd976da3c6ad9ee;vendor/unzerdev/php-sdk/src/Apis/PaypageAPIConfig.php 75c5a444fb0c4ab0a80aed8d2e2967bc;vendor/unzerdev/php-sdk/src/Apis/TokenApiConfig.php -d774026109c5a410f08cdcbad4871723;vendor/unzerdev/php-sdk/src/Apis/PaypageAPIConfig.php a4d2fcde4cc90b1e230d3a3297b5d6f8;vendor/unzerdev/php-sdk/src/Exceptions/ApplepayMerchantValidationException.php -2292ecd496e1e1884ce1049dc93738cf;vendor/unzerdev/php-sdk/src/Exceptions/UnzerApiException.php -fddc94cb2a266bf4733592dd0359ee94;vendor/unzerdev/php-sdk/src/Traits/HasTraceId.php -039b11be4a88698de499a282baa48b54;vendor/unzerdev/php-sdk/src/Traits/HasRecurrenceType.php -4756231c6d3fc773fab21c0696d05f5f;vendor/unzerdev/php-sdk/src/Traits/CanAuthorize.php -f96d68375a352be1afd3f388c81cfe0e;vendor/unzerdev/php-sdk/src/Traits/HasAdditionalTransactionData.php -6b21bc9b7da3645c328f33cd60c1bf91;vendor/unzerdev/php-sdk/src/Traits/HasDescriptor.php -40a0ac44bb2f6380e5ab490497cde811;vendor/unzerdev/php-sdk/src/Traits/CanPayoutWithCustomer.php -5e55edc6e3024a7630b6939e8329cf08;vendor/unzerdev/php-sdk/src/Traits/HasStates.php -0465ac737efc4aee909fa997920158d9;vendor/unzerdev/php-sdk/src/Traits/HasInvoiceId.php -3e64bef21123225e3d2cbfa2b305019d;vendor/unzerdev/php-sdk/src/Traits/CanPayout.php -a126137e7df6e905abc1a20bd09cdc9b;vendor/unzerdev/php-sdk/src/Traits/IsInvoiceType.php -7ef42b494e7e976b70b6125e4d2a10b2;vendor/unzerdev/php-sdk/src/Traits/HasDate.php -b8f5efd33a451f7d0e2c60043eadbe2d;vendor/unzerdev/php-sdk/src/Traits/CanDirectChargeWithCustomer.php -300bb9c3c5e1f3684f0ce4a692063d5e;vendor/unzerdev/php-sdk/src/Traits/CanDirectCharge.php -b0cfb3b5affe3e8ec580c9a3e1943ee3;vendor/unzerdev/php-sdk/src/Traits/CanAuthorizeWithCustomer.php -3f65cfbd0435d49d4f3aa8d3609db26c;vendor/unzerdev/php-sdk/src/Traits/HasChargebacks.php -21f69911399e99f35dd7d984de9a95d0;vendor/unzerdev/php-sdk/src/Traits/HasPaymentState.php -b1bcff35c6a8409b83567c48ebd9c090;vendor/unzerdev/php-sdk/src/Traits/HasOrderId.php -1bc1b86baf27a38f73200bd7a4064eb2;vendor/unzerdev/php-sdk/src/Traits/HasGeoLocation.php -58dccf5766f3619b338dd4f8803fae4c;vendor/unzerdev/php-sdk/src/Traits/HasUniqueAndShortId.php -84e1de89b2385e79556c2ec21ba086f3;vendor/unzerdev/php-sdk/src/Traits/HasCustomerMessage.php -f0a492f8bfbdff8718ae4c0c5571790b;vendor/unzerdev/php-sdk/src/Traits/HasAccountInformation.php -65256cd7797ae29b4e5df660671cb249;vendor/unzerdev/php-sdk/src/Traits/HasCancellations.php -716d2a9c70693408e2b1ac573971ec61;vendor/unzerdev/php-sdk/src/Traits/CanRecur.php -86812143071f5cf885cef4d0bb79309a;vendor/unzerdev/php-sdk/src/Constants/ExemptionType.php -afcfc9d1619fec0c54b2c3a208cdaa39;vendor/unzerdev/php-sdk/src/Constants/ApplepayValidationDomains.php -0e200a50be01534d35527c06939d1721;vendor/unzerdev/php-sdk/src/Constants/RecurrenceTypes.php -3bb37573a5339db9a5911ffeeb0e85cf;vendor/unzerdev/php-sdk/src/Constants/AdditionalTransactionDataKeys.php -65028456757718c9804212b65ee6bb6a;vendor/unzerdev/php-sdk/src/Constants/LiabilityShiftIndicator.php -2f146fe88f6e1fc021fd221e0520dbfc;vendor/unzerdev/php-sdk/src/Constants/TransactionTypes.php -d6ce87c1b1074bd214c33a699dda1ba4;vendor/unzerdev/php-sdk/src/Constants/PaypageCheckoutTypes.php -c8cd2db011dac68e7b0b34fbc2834cd3;vendor/unzerdev/php-sdk/src/Constants/CompanyCommercialSectorItems.php -dc551df19569c288082c989c2bbf3e85;vendor/unzerdev/php-sdk/src/Constants/ShippingTypes.php -fa20340ec1d1dd99c9645f2ad9e2bfe5;vendor/unzerdev/php-sdk/src/Constants/CompanyTypes.php -87e73ae8768ed9958034e17ddb08407f;vendor/unzerdev/php-sdk/src/Constants/CustomerTypes.php -36d1a80f7177ac150fc5762078ddb55e;vendor/unzerdev/php-sdk/src/Constants/PaymentState.php -1be9773bce45acc914194a978c7e7fba;vendor/unzerdev/php-sdk/src/Constants/CancelReasonCodes.php -e9f968341351755f055d926c21f05adc;vendor/unzerdev/php-sdk/src/Constants/Salutations.php -a7a24a70142f6697186f208cab804afe;vendor/unzerdev/php-sdk/src/Constants/CustomerRegistrationLevel.php -24fd3dfe4fb5793d8e18d49146c1aba2;vendor/unzerdev/php-sdk/src/Constants/CompanyRegistrationTypes.php -a67c8a544a6760a9f5e8a490dae004ca;vendor/unzerdev/php-sdk/src/Constants/AdditionalAttributes.php -e3d540435791c183ea9b85c4dfe068aa;vendor/unzerdev/php-sdk/src/Constants/ApiResponseCodes.php -98b1a747a7cf8967723484dc357435f3;vendor/unzerdev/php-sdk/src/Constants/BasketItemTypes.php -63cc3fe2075668bdd94d9b44ef117c0a;vendor/unzerdev/php-sdk/src/Constants/IdStrings.php -3566859c7e75857511595a9f0525bd45;vendor/unzerdev/php-sdk/src/Constants/TransactionStatus.php -60f0237069f601c8227f62bf0f800c78;vendor/unzerdev/php-sdk/src/Constants/WebhookEvents.php -5984d0444c09208017ef39cf46347aea;vendor/unzerdev/php-sdk/src/Constants/CustomerGroups.php -3b81604a940763fd3ddf7a3df2c67a8d;vendor/unzerdev/php-sdk/src/Unzer.php -7c24252a031e140d8e38cd6025991576;vendor/unzerdev/php-sdk/src/Adapter/ApplepayAdapter.php -8a1b67021d913d68fac94be8543740c1;vendor/unzerdev/php-sdk/src/Adapter/HttpAdapterInterface.php -ba69442aab37fb080d934907c59054f3;vendor/unzerdev/php-sdk/src/Adapter/CurlAdapter.php +5f5e379cbf764b6e85a55d4894b17741;vendor/unzerdev/php-sdk/src/Exceptions/UnzerApiException.php +4c2df74677faf75d3a102b4a29114152;vendor/unzerdev/php-sdk/src/Services/PaymentService.php +71d63712f7831a18ceb6285a4668c11a;vendor/unzerdev/php-sdk/src/Services/JwtService.php ce9878fd925c1e5e1569c27f121cf994;vendor/unzerdev/php-sdk/src/Services/ResourceNameService.php -920f43b23f6a54fab1243adb026bf9fc;vendor/unzerdev/php-sdk/src/Services/HttpService.php -4dc8957cf26214316b9dbf19e9624570;vendor/unzerdev/php-sdk/src/Services/EnvironmentService.php -4d514afbb72bfa892f91b2a32a2a15db;vendor/unzerdev/php-sdk/src/Services/ResourceService.php -589ab70b19b7c6dd426f3e8befaa33c4;vendor/unzerdev/php-sdk/src/Services/CancelService.php -fee46cf2aa323463d70a7a94b4cb55cb;vendor/unzerdev/php-sdk/src/Services/IdService.php -4ce4019e38ebe4df43d7d7795b2bfc9f;vendor/unzerdev/php-sdk/src/Services/PaymentService.php +852732451b4c657778f8b3a36b2106ce;vendor/unzerdev/php-sdk/src/Services/ResourceService.php +3125b48394c6d38da644ac8d39c95c13;vendor/unzerdev/php-sdk/src/Services/HttpService.php ae5f057b154780300a9d422e51267c47;vendor/unzerdev/php-sdk/src/Services/ValueService.php -7b29a8c2ee28d54f3351004148027f0f;vendor/unzerdev/php-sdk/src/Services/WebhookService.php -1a775c4544c0a51651a36d766d2730fc;vendor/unzerdev/php-sdk/src/Services/JwtService.php -f0729b1d6b60b4c9577b47b6be4afc58;vendor/unzerdev/php-sdk/src/Resources/Webhook.php +4dc8957cf26214316b9dbf19e9624570;vendor/unzerdev/php-sdk/src/Services/EnvironmentService.php +f49941ac10f5c4493af0711ad48ce056;vendor/unzerdev/php-sdk/src/Services/WebhookService.php +02ac7b5584ec8818253e56d2f37aa2c0;vendor/unzerdev/php-sdk/src/Services/CancelService.php +ef551bd65236c93d95854665fe9671f2;vendor/unzerdev/php-sdk/src/Services/IdService.php +786c59d4d1b6593716d9ae3914080177;vendor/unzerdev/php-sdk/src/Resources/V3/Basket.php +a7ca6bddd5964f87f73beaa4c48cb9e1;vendor/unzerdev/php-sdk/src/Resources/Webhooks.php +e8072c55c5894fe4cb8df5773da221be;vendor/unzerdev/php-sdk/src/Resources/PaylaterInstallmentPlans.php 595c41677b4b4e225d2af3e87fc5abe2;vendor/unzerdev/php-sdk/src/Resources/Config.php +e0a74d283a2169dbfeeb1143a44259d5;vendor/unzerdev/php-sdk/src/Resources/TransactionTypes/Authorization.php +b906ccbb36133becfb879319a254d1a9;vendor/unzerdev/php-sdk/src/Resources/TransactionTypes/Cancellation.php +7930009039dd07900eff065e29c246ee;vendor/unzerdev/php-sdk/src/Resources/TransactionTypes/AbstractTransactionType.php +a152d436db1db5a5c73f8e6a056b5ef0;vendor/unzerdev/php-sdk/src/Resources/TransactionTypes/Chargeback.php +0aae277cba417d984000ed45a632ec2d;vendor/unzerdev/php-sdk/src/Resources/TransactionTypes/Payout.php +c980f0dd8167b419e3b16f6a5f065de9;vendor/unzerdev/php-sdk/src/Resources/TransactionTypes/Shipment.php +838230dff07bf7f53ce1d1624e181ba4;vendor/unzerdev/php-sdk/src/Resources/TransactionTypes/PreAuthorization.php +b85f24ac5ffd4d18d3e7402c9b137ad4;vendor/unzerdev/php-sdk/src/Resources/TransactionTypes/Charge.php +80aba343a244782d1083deecceb47716;vendor/unzerdev/php-sdk/src/Resources/Keypair.php +c2d7dea4481042090695eb953609149b;vendor/unzerdev/php-sdk/src/Resources/CustomerFactory.php a7d177281187488e329194e8a03f3648;vendor/unzerdev/php-sdk/src/Resources/Recurring.php +f0729b1d6b60b4c9577b47b6be4afc58;vendor/unzerdev/php-sdk/src/Resources/Webhook.php +655b047020b1478ac8447b5ae02c9835;vendor/unzerdev/php-sdk/src/Resources/EmbeddedResources/ApplePayHeader.php 5b4ac247498e3d7cd778e718c6ce02eb;vendor/unzerdev/php-sdk/src/Resources/EmbeddedResources/Risk.php -8a44e7b39b46559b0a6a665ca64c50e0;vendor/unzerdev/php-sdk/src/Resources/EmbeddedResources/CardDetails.php -de825c3ea26fabbf13d067515d870fa9;vendor/unzerdev/php-sdk/src/Resources/EmbeddedResources/Paylater/InstallmentPlan.php +2ff364cc39fe31d90fbd3450898fabd4;vendor/unzerdev/php-sdk/src/Resources/EmbeddedResources/GooglePay/IntermediateSigningKey.php +e7f5326adeea1b6b609f78b6d9b7dfe8;vendor/unzerdev/php-sdk/src/Resources/EmbeddedResources/GooglePay/SignedKey.php +652a8e700c855e321b4b3c9dbde29302;vendor/unzerdev/php-sdk/src/Resources/EmbeddedResources/GooglePay/SignedMessage.php +4c2cb0a28dee5fc528cd6ac068bb7b37;vendor/unzerdev/php-sdk/src/Resources/EmbeddedResources/CompanyInfo.php +2c5e9cced25b61666e5fea7b99e81bd6;vendor/unzerdev/php-sdk/src/Resources/EmbeddedResources/BasketItem.php 4495eb8aac4b8813d63ae6693657dbfc;vendor/unzerdev/php-sdk/src/Resources/EmbeddedResources/Paylater/InstallmentPlansQuery.php +de825c3ea26fabbf13d067515d870fa9;vendor/unzerdev/php-sdk/src/Resources/EmbeddedResources/Paylater/InstallmentPlan.php 3b3caaf88208b087bb5c0f25007395c0;vendor/unzerdev/php-sdk/src/Resources/EmbeddedResources/Paylater/InstallmentRate.php e42a4d5de10fb6d3ffba642f42fe0720;vendor/unzerdev/php-sdk/src/Resources/EmbeddedResources/ShippingData.php -e640841cde29c0d4f41b39e0f49cdd9b;vendor/unzerdev/php-sdk/src/Resources/EmbeddedResources/Paypage/Urls.php -dad9c291355881099573d7d550407454;vendor/unzerdev/php-sdk/src/Resources/EmbeddedResources/Paypage/PaymentMethodsConfigs.php -817f0f9895c40818f33d68450acfb8dd;vendor/unzerdev/php-sdk/src/Resources/EmbeddedResources/Paypage/Payment.php +82328e02d18f11273aa5f07d11353eab;vendor/unzerdev/php-sdk/src/Resources/EmbeddedResources/GeoLocation.php +2c7b8dc8930b63fcab8d774a2e4a62c6;vendor/unzerdev/php-sdk/src/Resources/EmbeddedResources/Message.php +ae8d4a767083b09b1481c58e34c9775f;vendor/unzerdev/php-sdk/src/Resources/EmbeddedResources/CompanyOwner.php +306055dfb0f6d1a29b9a762d94a1c528;vendor/unzerdev/php-sdk/src/Resources/EmbeddedResources/Paypage/PaymentMethodsConfigs.php +a6707cb0803758888a636a27bda62484;vendor/unzerdev/php-sdk/src/Resources/EmbeddedResources/Paypage/Style.php 3e7494647c2bef02862a48cd86bf9d92;vendor/unzerdev/php-sdk/src/Resources/EmbeddedResources/Paypage/AmountSettings.php -2af8c7aab27933e3e4d0ba1b55baaaa4;vendor/unzerdev/php-sdk/src/Resources/EmbeddedResources/Paypage/PaymentMethodConfig.php +817f0f9895c40818f33d68450acfb8dd;vendor/unzerdev/php-sdk/src/Resources/EmbeddedResources/Paypage/Payment.php +6f87064d204f19090cea2a076047fc9c;vendor/unzerdev/php-sdk/src/Resources/EmbeddedResources/Paypage/PaymentMethodConfig.php f6fd7cc64eb7683f8c744d48c3624d2d;vendor/unzerdev/php-sdk/src/Resources/EmbeddedResources/Paypage/Resources.php -3496f75e2a923f1be32f9361ef8a025b;vendor/unzerdev/php-sdk/src/Resources/EmbeddedResources/Paypage/Style.php -655b047020b1478ac8447b5ae02c9835;vendor/unzerdev/php-sdk/src/Resources/EmbeddedResources/ApplePayHeader.php -4c5ae19b086aa7ba6487d9538b3d034e;vendor/unzerdev/php-sdk/src/Resources/EmbeddedResources/Address.php +e640841cde29c0d4f41b39e0f49cdd9b;vendor/unzerdev/php-sdk/src/Resources/EmbeddedResources/Paypage/Urls.php +abb9026bf13603593ef7ed6b36a20b6e;vendor/unzerdev/php-sdk/src/Resources/EmbeddedResources/WeroEventDependentPayment.php 991b1745a5e85730edd024799da8e016;vendor/unzerdev/php-sdk/src/Resources/EmbeddedResources/Amount.php -ae8d4a767083b09b1481c58e34c9775f;vendor/unzerdev/php-sdk/src/Resources/EmbeddedResources/CompanyOwner.php -82328e02d18f11273aa5f07d11353eab;vendor/unzerdev/php-sdk/src/Resources/EmbeddedResources/GeoLocation.php -e73f86ee372813fd11d856a18b6d9cd6;vendor/unzerdev/php-sdk/src/Resources/EmbeddedResources/BasketItem.php +4c5ae19b086aa7ba6487d9538b3d034e;vendor/unzerdev/php-sdk/src/Resources/EmbeddedResources/Address.php +d078edc8bc6f4252e14bb3ee1beeb7b7;vendor/unzerdev/php-sdk/src/Resources/EmbeddedResources/WeroTransactionData.php 49dbf6c8a912cc4f2038282435e4e953;vendor/unzerdev/php-sdk/src/Resources/EmbeddedResources/CardTransactionData.php -4c2cb0a28dee5fc528cd6ac068bb7b37;vendor/unzerdev/php-sdk/src/Resources/EmbeddedResources/CompanyInfo.php -cbf16109faff0b644e54275047af86a9;vendor/unzerdev/php-sdk/src/Resources/EmbeddedResources/RiskData.php -2ff364cc39fe31d90fbd3450898fabd4;vendor/unzerdev/php-sdk/src/Resources/EmbeddedResources/GooglePay/IntermediateSigningKey.php -e7f5326adeea1b6b609f78b6d9b7dfe8;vendor/unzerdev/php-sdk/src/Resources/EmbeddedResources/GooglePay/SignedKey.php -e64ab4eacee3495c2243e71b6aac2c5f;vendor/unzerdev/php-sdk/src/Resources/EmbeddedResources/GooglePay/SignedMessage.php -2c7b8dc8930b63fcab8d774a2e4a62c6;vendor/unzerdev/php-sdk/src/Resources/EmbeddedResources/Message.php -9572bbbe73f6ecdaf714cca9b222a4ff;vendor/unzerdev/php-sdk/src/Resources/PaymentTypes/EPS.php -ab3bcf66d4c5b8cc334f75a82ebd8683;vendor/unzerdev/php-sdk/src/Resources/PaymentTypes/Applepay.php -c6e0d53b77f9a2d9879754c57eb2cd26;vendor/unzerdev/php-sdk/src/Resources/PaymentTypes/Klarna.php +cbf16109faff0b644e54275047af86a9;vendor/unzerdev/php-sdk/src/Resources/EmbeddedResources/RiskData.php +8a44e7b39b46559b0a6a665ca64c50e0;vendor/unzerdev/php-sdk/src/Resources/EmbeddedResources/CardDetails.php +89e657fa872ca0c6a816fe7b78cf7947;vendor/unzerdev/php-sdk/src/Resources/InstalmentPlans.php +c39894f511400c81c0eab4137fdd9495;vendor/unzerdev/php-sdk/src/Resources/Payment.php +9882f597bd321facccdf64f059f3f00d;vendor/unzerdev/php-sdk/src/Resources/Authentication/Token.php +ddfd5bb7fd8a51627555ea5848042df9;vendor/unzerdev/php-sdk/src/Resources/Basket.php +dd622d8ec6f7c8e4dd46e9d546907d47;vendor/unzerdev/php-sdk/src/Resources/ExternalResources/ApplepaySession.php +ce689a0320b306e1ebe7aa6e96cb9c95;vendor/unzerdev/php-sdk/src/Resources/V2/BasketProperties.php +9e3c6ff2c6c25faf77b88c071c54174c;vendor/unzerdev/php-sdk/src/Resources/V2/Paypage.php +d4857d4621b859412e0dd7cddfdb23bf;vendor/unzerdev/php-sdk/src/Resources/V2/BasketItemProperties.php +8bd10a9590fac69429009ec5c153ce1d;vendor/unzerdev/php-sdk/src/Resources/V2/Customer.php +3581f01e2b3e07b6465d03454d6882fa;vendor/unzerdev/php-sdk/src/Resources/AbstractUnzerResource.php a266ba5d73c995682b1f4f5b0cead1f7;vendor/unzerdev/php-sdk/src/Resources/PaymentTypes/Invoice.php ee00ec838b2e0dd341a64f719a68615b;vendor/unzerdev/php-sdk/src/Resources/PaymentTypes/Alipay.php -75d966f428bb969fb8085859ecb236c5;vendor/unzerdev/php-sdk/src/Resources/PaymentTypes/PIS.php +9572bbbe73f6ecdaf714cca9b222a4ff;vendor/unzerdev/php-sdk/src/Resources/PaymentTypes/EPS.php +ab3bcf66d4c5b8cc334f75a82ebd8683;vendor/unzerdev/php-sdk/src/Resources/PaymentTypes/Applepay.php 4d6b113ab108ffd71664fd770501120b;vendor/unzerdev/php-sdk/src/Resources/PaymentTypes/SepaDirectDebit.php -3969c1660e11ad35f9725e6c0dd12ff1;vendor/unzerdev/php-sdk/src/Resources/PaymentTypes/Paypal.php -c24930d176f6feb44ebdd8667b78d2a9;vendor/unzerdev/php-sdk/src/Resources/PaymentTypes/Paypage.php -0c8870bce628eb3e970cf59ac88d61e6;vendor/unzerdev/php-sdk/src/Resources/PaymentTypes/Sofort.php -ec35b1c6ab2cea99cf1d2774c550405d;vendor/unzerdev/php-sdk/src/Resources/PaymentTypes/OpenbankingPis.php -f7c1c199cb4fac7526ff49a529d98719;vendor/unzerdev/php-sdk/src/Resources/PaymentTypes/Clicktopay.php -ef86892e52f66de6cee3d0f30fa9128a;vendor/unzerdev/php-sdk/src/Resources/PaymentTypes/Giropay.php -caeb3b948944a85c95b0484d8218c175;vendor/unzerdev/php-sdk/src/Resources/PaymentTypes/SepaDirectDebitSecured.php -4343144ca03d76edb98181cffed2eafe;vendor/unzerdev/php-sdk/src/Resources/PaymentTypes/Card.php +a6c87fec5a83254a94dfa8fab1690ba2;vendor/unzerdev/php-sdk/src/Resources/PaymentTypes/BasePaymentType.php +c6e0d53b77f9a2d9879754c57eb2cd26;vendor/unzerdev/php-sdk/src/Resources/PaymentTypes/Klarna.php +d08466636db1e1f028ca43487ba6686d;vendor/unzerdev/php-sdk/src/Resources/PaymentTypes/OpenbankingPis.php d2c3c6234e1e352bccba121ad10e7a24;vendor/unzerdev/php-sdk/src/Resources/PaymentTypes/PostFinanceEfinance.php -e2ce22946145de9b85e283c635d323e0;vendor/unzerdev/php-sdk/src/Resources/PaymentTypes/PostFinanceCard.php 392d37c4423367f754e24caecba32e06;vendor/unzerdev/php-sdk/src/Resources/PaymentTypes/PaylaterInvoice.php -1b55db74148163d947e8fd47fde31e82;vendor/unzerdev/php-sdk/src/Resources/PaymentTypes/InvoiceSecured.php -212342ab64c844ed009c3aaa0d5a0a1c;vendor/unzerdev/php-sdk/src/Resources/PaymentTypes/Twint.php +19b9a750da9f6e4e00cb5a5b0c4edad8;vendor/unzerdev/php-sdk/src/Resources/PaymentTypes/InstallmentSecured.php +caeb3b948944a85c95b0484d8218c175;vendor/unzerdev/php-sdk/src/Resources/PaymentTypes/SepaDirectDebitSecured.php +04aa677940d068649579dc0d64e4e197;vendor/unzerdev/php-sdk/src/Resources/PaymentTypes/Wero.php +202e427f0c83e6e1c07c2b88a63b9ffd;vendor/unzerdev/php-sdk/src/Resources/PaymentTypes/Prepayment.php +aeef0a128d084d193928963672d3c8c1;vendor/unzerdev/php-sdk/src/Resources/PaymentTypes/PayU.php +ef86892e52f66de6cee3d0f30fa9128a;vendor/unzerdev/php-sdk/src/Resources/PaymentTypes/Giropay.php +fc44edd342dfa869073c5046d0ad57ef;vendor/unzerdev/php-sdk/src/Resources/PaymentTypes/PaylaterInstallment.php +c24930d176f6feb44ebdd8667b78d2a9;vendor/unzerdev/php-sdk/src/Resources/PaymentTypes/Paypage.php +3969c1660e11ad35f9725e6c0dd12ff1;vendor/unzerdev/php-sdk/src/Resources/PaymentTypes/Paypal.php 63172a04cae62f1f354e58ead710195c;vendor/unzerdev/php-sdk/src/Resources/PaymentTypes/Przelewy24.php -ba97d11cee7cc8c5bef8e2c1454ee2fc;vendor/unzerdev/php-sdk/src/Resources/PaymentTypes/Wechatpay.php -37b66ad974c8a8801edd948542f6455c;vendor/unzerdev/php-sdk/src/Resources/PaymentTypes/InstallmentSecured.php -4bf74aa619be3440b8191f31a4cce12a;vendor/unzerdev/php-sdk/src/Resources/PaymentTypes/PaylaterDirectDebit.php a33c08a4259aaa5ec636926a3c2de75d;vendor/unzerdev/php-sdk/src/Resources/PaymentTypes/Bancontact.php -202e427f0c83e6e1c07c2b88a63b9ffd;vendor/unzerdev/php-sdk/src/Resources/PaymentTypes/Prepayment.php aca8b39a8b8b3f99b05f78cef7b526f8;vendor/unzerdev/php-sdk/src/Resources/PaymentTypes/Ideal.php -aeef0a128d084d193928963672d3c8c1;vendor/unzerdev/php-sdk/src/Resources/PaymentTypes/PayU.php +7b83bce9b695ee1e23f89eecc37abac6;vendor/unzerdev/php-sdk/src/Resources/PaymentTypes/Card.php +e2ce22946145de9b85e283c635d323e0;vendor/unzerdev/php-sdk/src/Resources/PaymentTypes/PostFinanceCard.php +ba97d11cee7cc8c5bef8e2c1454ee2fc;vendor/unzerdev/php-sdk/src/Resources/PaymentTypes/Wechatpay.php +f7c1c199cb4fac7526ff49a529d98719;vendor/unzerdev/php-sdk/src/Resources/PaymentTypes/Clicktopay.php 4c180ba257a9f8728c060795c4c8a658;vendor/unzerdev/php-sdk/src/Resources/PaymentTypes/Googlepay.php -a6c87fec5a83254a94dfa8fab1690ba2;vendor/unzerdev/php-sdk/src/Resources/PaymentTypes/BasePaymentType.php -fc44edd342dfa869073c5046d0ad57ef;vendor/unzerdev/php-sdk/src/Resources/PaymentTypes/PaylaterInstallment.php -c980f0dd8167b419e3b16f6a5f065de9;vendor/unzerdev/php-sdk/src/Resources/TransactionTypes/Shipment.php -f3136d43755b11de8b69b61d77f8267b;vendor/unzerdev/php-sdk/src/Resources/TransactionTypes/Payout.php -641ad5e7f2e04a7698a9b32d796bd972;vendor/unzerdev/php-sdk/src/Resources/TransactionTypes/Authorization.php -838230dff07bf7f53ce1d1624e181ba4;vendor/unzerdev/php-sdk/src/Resources/TransactionTypes/PreAuthorization.php -3e06b1c18ff454752a912ebdee766f6f;vendor/unzerdev/php-sdk/src/Resources/TransactionTypes/Cancellation.php -0a621d035991d05c5385e515c62d2824;vendor/unzerdev/php-sdk/src/Resources/TransactionTypes/Charge.php -8496cd275f9affb049ca5e38c0f55414;vendor/unzerdev/php-sdk/src/Resources/TransactionTypes/AbstractTransactionType.php -a0fa8bdf03c1a31440e8b0bf87a75ebf;vendor/unzerdev/php-sdk/src/Resources/TransactionTypes/Chargeback.php -e8072c55c5894fe4cb8df5773da221be;vendor/unzerdev/php-sdk/src/Resources/PaylaterInstallmentPlans.php -51471b1c4608d69f79948fd2479b2105;vendor/unzerdev/php-sdk/src/Resources/Basket.php -57f6d4973adbf7bff9631872bb87386e;vendor/unzerdev/php-sdk/src/Resources/Payment.php -c8bd4d4e5e3f902a29a3237bd3fc1d46;vendor/unzerdev/php-sdk/src/Resources/V2/Paypage.php -9882f597bd321facccdf64f059f3f00d;vendor/unzerdev/php-sdk/src/Resources/Authentication/Token.php -80aba343a244782d1083deecceb47716;vendor/unzerdev/php-sdk/src/Resources/Keypair.php -e0ea3d3be2c06e518d1838ec8d3f9117;vendor/unzerdev/php-sdk/src/Resources/CustomerFactory.php -89e657fa872ca0c6a816fe7b78cf7947;vendor/unzerdev/php-sdk/src/Resources/InstalmentPlans.php -a7ca6bddd5964f87f73beaa4c48cb9e1;vendor/unzerdev/php-sdk/src/Resources/Webhooks.php +212342ab64c844ed009c3aaa0d5a0a1c;vendor/unzerdev/php-sdk/src/Resources/PaymentTypes/Twint.php +9e31ea3cc03b3f244e39d04e7dca65a9;vendor/unzerdev/php-sdk/src/Resources/PaymentTypes/PaylaterDirectDebit.php +0c8870bce628eb3e970cf59ac88d61e6;vendor/unzerdev/php-sdk/src/Resources/PaymentTypes/Sofort.php +1b55db74148163d947e8fd47fde31e82;vendor/unzerdev/php-sdk/src/Resources/PaymentTypes/InvoiceSecured.php +75d966f428bb969fb8085859ecb236c5;vendor/unzerdev/php-sdk/src/Resources/PaymentTypes/PIS.php 371774372219514363a234fcc60bbb39;vendor/unzerdev/php-sdk/src/Resources/Customer.php +b6e5458b17987a6ed01c195ada3d42e4;vendor/unzerdev/php-sdk/src/Resources/InstalmentPlan.php ca90f98e9fe1b274bdeefd4c90faaf39;vendor/unzerdev/php-sdk/src/Resources/Metadata.php -41157f5eb51da95ecaf38a2ad86077f5;vendor/unzerdev/php-sdk/src/Resources/InstalmentPlan.php -dd622d8ec6f7c8e4dd46e9d546907d47;vendor/unzerdev/php-sdk/src/Resources/ExternalResources/ApplepaySession.php -3581f01e2b3e07b6465d03454d6882fa;vendor/unzerdev/php-sdk/src/Resources/AbstractUnzerResource.php -ba9fbd4f2392949e3d2113a4f7cbcacf;vendor/unzerdev/php-sdk/src/Interfaces/PaymentServiceInterface.php +1be9773bce45acc914194a978c7e7fba;vendor/unzerdev/php-sdk/src/Constants/CancelReasonCodes.php +a7a24a70142f6697186f208cab804afe;vendor/unzerdev/php-sdk/src/Constants/CustomerRegistrationLevel.php +87e73ae8768ed9958034e17ddb08407f;vendor/unzerdev/php-sdk/src/Constants/CustomerTypes.php +fa20340ec1d1dd99c9645f2ad9e2bfe5;vendor/unzerdev/php-sdk/src/Constants/CompanyTypes.php +60f0237069f601c8227f62bf0f800c78;vendor/unzerdev/php-sdk/src/Constants/WebhookEvents.php +f8404409d255be6044ca17101d30c3f1;vendor/unzerdev/php-sdk/src/Constants/WeroCaptureTriggers.php +d6ce87c1b1074bd214c33a699dda1ba4;vendor/unzerdev/php-sdk/src/Constants/PaypageCheckoutTypes.php +0e200a50be01534d35527c06939d1721;vendor/unzerdev/php-sdk/src/Constants/RecurrenceTypes.php +c8cd2db011dac68e7b0b34fbc2834cd3;vendor/unzerdev/php-sdk/src/Constants/CompanyCommercialSectorItems.php +e3d540435791c183ea9b85c4dfe068aa;vendor/unzerdev/php-sdk/src/Constants/ApiResponseCodes.php +48c8611e7a204fbcdc8305f7bd77fd94;vendor/unzerdev/php-sdk/src/Constants/ApiVersions.php +98b1a747a7cf8967723484dc357435f3;vendor/unzerdev/php-sdk/src/Constants/BasketItemTypes.php +24fd3dfe4fb5793d8e18d49146c1aba2;vendor/unzerdev/php-sdk/src/Constants/CompanyRegistrationTypes.php +2f146fe88f6e1fc021fd221e0520dbfc;vendor/unzerdev/php-sdk/src/Constants/TransactionTypes.php +1c9d020ce65ee798772ca615b738ef11;vendor/unzerdev/php-sdk/src/Constants/WeroAmountPaymentTypes.php +3566859c7e75857511595a9f0525bd45;vendor/unzerdev/php-sdk/src/Constants/TransactionStatus.php +86812143071f5cf885cef4d0bb79309a;vendor/unzerdev/php-sdk/src/Constants/ExemptionType.php +b40e0a2d6ee7c523c8e8f977c4964501;vendor/unzerdev/php-sdk/src/Constants/AdditionalTransactionDataKeys.php +65028456757718c9804212b65ee6bb6a;vendor/unzerdev/php-sdk/src/Constants/LiabilityShiftIndicator.php +afcfc9d1619fec0c54b2c3a208cdaa39;vendor/unzerdev/php-sdk/src/Constants/ApplepayValidationDomains.php +dc551df19569c288082c989c2bbf3e85;vendor/unzerdev/php-sdk/src/Constants/ShippingTypes.php +e9f968341351755f055d926c21f05adc;vendor/unzerdev/php-sdk/src/Constants/Salutations.php +5984d0444c09208017ef39cf46347aea;vendor/unzerdev/php-sdk/src/Constants/CustomerGroups.php +2d47ffdbaeeea41d28d88aa3695c5067;vendor/unzerdev/php-sdk/src/Constants/IdStrings.php +a67c8a544a6760a9f5e8a490dae004ca;vendor/unzerdev/php-sdk/src/Constants/AdditionalAttributes.php +36d1a80f7177ac150fc5762078ddb55e;vendor/unzerdev/php-sdk/src/Constants/PaymentState.php +e648bfec127404941a0a104ac0320272;vendor/unzerdev/php-sdk/src/Validators/PrivateKeyValidator.php +c62a9f0b3664502a49fd27f6cd6919b3;vendor/unzerdev/php-sdk/src/Validators/PublicKeyValidator.php +aaf5ac4b651d570ea067cd78ab596e96;vendor/unzerdev/php-sdk/src/Validators/ExpiryDateValidator.php +77fe01270009288a8ac9f84d89a503ad;vendor/unzerdev/php-sdk/src/Unzer.php +58dccf5766f3619b338dd4f8803fae4c;vendor/unzerdev/php-sdk/src/Traits/HasUniqueAndShortId.php +e032a9a2cc661550726c2f898f983682;vendor/unzerdev/php-sdk/src/Traits/HasAdditionalTransactionData.php +84e1de89b2385e79556c2ec21ba086f3;vendor/unzerdev/php-sdk/src/Traits/HasCustomerMessage.php +039b11be4a88698de499a282baa48b54;vendor/unzerdev/php-sdk/src/Traits/HasRecurrenceType.php +21f69911399e99f35dd7d984de9a95d0;vendor/unzerdev/php-sdk/src/Traits/HasPaymentState.php +0465ac737efc4aee909fa997920158d9;vendor/unzerdev/php-sdk/src/Traits/HasInvoiceId.php +4756231c6d3fc773fab21c0696d05f5f;vendor/unzerdev/php-sdk/src/Traits/CanAuthorize.php +65256cd7797ae29b4e5df660671cb249;vendor/unzerdev/php-sdk/src/Traits/HasCancellations.php +b0cfb3b5affe3e8ec580c9a3e1943ee3;vendor/unzerdev/php-sdk/src/Traits/CanAuthorizeWithCustomer.php +7f8c55100c30b91518e5f1a0e9cbdf71;vendor/unzerdev/php-sdk/src/Traits/CanPayoutWithCustomer.php +b8f5efd33a451f7d0e2c60043eadbe2d;vendor/unzerdev/php-sdk/src/Traits/CanDirectChargeWithCustomer.php +b1bcff35c6a8409b83567c48ebd9c090;vendor/unzerdev/php-sdk/src/Traits/HasOrderId.php +aeb6a5bcffa7f3864af1867862694eab;vendor/unzerdev/php-sdk/src/Traits/CanPayout.php +a126137e7df6e905abc1a20bd09cdc9b;vendor/unzerdev/php-sdk/src/Traits/IsInvoiceType.php +300bb9c3c5e1f3684f0ce4a692063d5e;vendor/unzerdev/php-sdk/src/Traits/CanDirectCharge.php +7ef42b494e7e976b70b6125e4d2a10b2;vendor/unzerdev/php-sdk/src/Traits/HasDate.php +3f65cfbd0435d49d4f3aa8d3609db26c;vendor/unzerdev/php-sdk/src/Traits/HasChargebacks.php +5e55edc6e3024a7630b6939e8329cf08;vendor/unzerdev/php-sdk/src/Traits/HasStates.php +1bc1b86baf27a38f73200bd7a4064eb2;vendor/unzerdev/php-sdk/src/Traits/HasGeoLocation.php +716d2a9c70693408e2b1ac573971ec61;vendor/unzerdev/php-sdk/src/Traits/CanRecur.php +6b21bc9b7da3645c328f33cd60c1bf91;vendor/unzerdev/php-sdk/src/Traits/HasDescriptor.php +fddc94cb2a266bf4733592dd0359ee94;vendor/unzerdev/php-sdk/src/Traits/HasTraceId.php +f0a492f8bfbdff8718ae4c0c5571790b;vendor/unzerdev/php-sdk/src/Traits/HasAccountInformation.php 143f303f2c68dfc01f13008e1c5ebeef;vendor/unzerdev/php-sdk/src/Interfaces/UnzerParentInterface.php -3b7b1aaba4b2118408105e1acaca6ef4;vendor/unzerdev/php-sdk/src/Interfaces/ResourceServiceInterface.php 454557a6a894225ddf5912e990e8f19e;vendor/unzerdev/php-sdk/src/Interfaces/DebugHandlerInterface.php -1025e786634efa8471c242d9c8bca645;vendor/unzerdev/php-sdk/src/Interfaces/WebhookServiceInterface.php -27241988bef92cb0535cf63af64e6bf0;vendor/unzerdev/php-sdk/src/Interfaces/CancelServiceInterface.php -bd3e22a03fa976e8abc398fec314b13f;vendor/unzerdev/php-sdk/examples/Wechatpay/index.php -dc6730dbb9341a83f105432420dd8154;vendor/unzerdev/php-sdk/examples/Wechatpay/Constants.php -0519e310b01f2b43e1ea1e5d9310fe09;vendor/unzerdev/php-sdk/examples/Wechatpay/Controller.php -a76d52b88652a09937d7038682050863;vendor/unzerdev/php-sdk/examples/InstallmentSecured/confirm.php -16a2494b120b3d450ddcecab28729761;vendor/unzerdev/php-sdk/examples/InstallmentSecured/index.php -ed8f8fbe9cd525b89e733de1bb853052;vendor/unzerdev/php-sdk/examples/InstallmentSecured/Constants.php -fe8e0845e778f184d3050a389f88e839;vendor/unzerdev/php-sdk/examples/InstallmentSecured/Controller.php -ae0cffc2c518bd23df023442836b1108;vendor/unzerdev/php-sdk/examples/InstallmentSecured/PlaceOrderController.php -0c9a618bbc11ca36be71a736a98f35f3;vendor/unzerdev/php-sdk/examples/PaylaterInstallment/index.php -37d1142cabbdf302cf9b3df1801c5460;vendor/unzerdev/php-sdk/examples/PaylaterInstallment/Constants.php -51e26c18002be4cd6189addabe91f72d;vendor/unzerdev/php-sdk/examples/PaylaterInstallment/Controller.php -8cb5ee78a02cba115a4fe35bc23475a6;vendor/unzerdev/php-sdk/examples/PayPal/index.php -a5c911ef89821b89e971d8a1d71b4fd6;vendor/unzerdev/php-sdk/examples/PayPal/Constants.php -2c51d4ca5425e986b47953d665dbb4d9;vendor/unzerdev/php-sdk/examples/PayPal/Controller.php -a3043ae9f18eb481437d7df8f4098a3b;vendor/unzerdev/php-sdk/examples/Create.php +90d968a7c087f103a1b627f1346622ed;vendor/unzerdev/php-sdk/src/Interfaces/WebhookServiceInterface.php +89d011fdc511aeb3f0b3dd3936f28d75;vendor/unzerdev/php-sdk/src/Interfaces/CancelServiceInterface.php +6c31c5fde8540d9e40a29590a4ea737f;vendor/unzerdev/php-sdk/src/Interfaces/PaymentServiceInterface.php +c05113458aca974c27fc8b748d7b7ef8;vendor/unzerdev/php-sdk/src/Interfaces/ResourceServiceInterface.php +86d3f3a95c324c9479bd8986968f4327;vendor/unzerdev/php-sdk/LICENSE +9e9f49ec809ad456b453410ef1785548;vendor/unzerdev/php-sdk/.codacy.yml 3acde2e3165b3bc005591d39f205b73d;vendor/unzerdev/php-sdk/examples/ExampleDebugHandler.php -01a437987aaf23d73245a42c41ca7e42;vendor/unzerdev/php-sdk/examples/Applepay/index.php +bd695aaaeff03021acb4366d9d7ca02d;vendor/unzerdev/php-sdk/examples/PaylaterInvoice/Controller.php +1368534a464a8258c8d850a74dc7a7f3;vendor/unzerdev/php-sdk/examples/PaylaterInvoice/Constants.php +c86d8b149608b06cfc857dfd48613fdd;vendor/unzerdev/php-sdk/examples/PaylaterInvoice/index.php +6846ae916716e15e1095b45c395b0224;vendor/unzerdev/php-sdk/examples/ReturnController.php +d419e69568b59117a9b385db52d5c21c;vendor/unzerdev/php-sdk/examples/HostedPayPage/Controller.php +f97464738f94449c899141cb4fe89494;vendor/unzerdev/php-sdk/examples/HostedPayPage/Constants.php +de0d52934aaabbd999c690c1ef85c3dc;vendor/unzerdev/php-sdk/examples/HostedPayPage/index.php +5bf2afe121d863f0c93bacc89ce61ac2;vendor/unzerdev/php-sdk/examples/PostFinanceCard/Controller.php +75b72c92b40aaa7271529d6e01a5ba30;vendor/unzerdev/php-sdk/examples/PostFinanceCard/Constants.php +1a41bd1362842418aa506abac208c0cf;vendor/unzerdev/php-sdk/examples/PostFinanceCard/index.php +acc79008f29098d63d49c84600108a9d;vendor/unzerdev/php-sdk/examples/PaylaterDirectDebit/Controller.php +c9f8958a9bd020098afbf501781f29dc;vendor/unzerdev/php-sdk/examples/PaylaterDirectDebit/Constants.php +4688c74534c6497900b8981d2b7391e7;vendor/unzerdev/php-sdk/examples/PaylaterDirectDebit/index.php +d338e238d9243e50414fc26d6d066363;vendor/unzerdev/php-sdk/examples/Applepay/Controller.php 9f641dae8fdb197f4f8fa29cfa0c9ec6;vendor/unzerdev/php-sdk/examples/Applepay/merchantvalidation.php 2d097a547e63d787e233cc4699e1d1ee;vendor/unzerdev/php-sdk/examples/Applepay/Constants.php -d338e238d9243e50414fc26d6d066363;vendor/unzerdev/php-sdk/examples/Applepay/Controller.php -0d38eee366774881698471ce1c0968b1;vendor/unzerdev/php-sdk/examples/Giropay/index.php -aa45b9810c40e3639d904332ba4bdb65;vendor/unzerdev/php-sdk/examples/Giropay/Constants.php -6621d3b4e6aaf38ee58f63722743fe3a;vendor/unzerdev/php-sdk/examples/Giropay/Controller.php -307d6073de7dc22baabf85ecc477e825;vendor/unzerdev/php-sdk/examples/EmbeddedPayPage/index.php -73dea87f72ff2c6310f2df12e35b6e40;vendor/unzerdev/php-sdk/examples/EmbeddedPayPage/Constants.php +01a437987aaf23d73245a42c41ca7e42;vendor/unzerdev/php-sdk/examples/Applepay/index.php +fe8e0845e778f184d3050a389f88e839;vendor/unzerdev/php-sdk/examples/InstallmentSecured/Controller.php +ed8f8fbe9cd525b89e733de1bb853052;vendor/unzerdev/php-sdk/examples/InstallmentSecured/Constants.php +16a2494b120b3d450ddcecab28729761;vendor/unzerdev/php-sdk/examples/InstallmentSecured/index.php +ae0cffc2c518bd23df023442836b1108;vendor/unzerdev/php-sdk/examples/InstallmentSecured/PlaceOrderController.php +a76d52b88652a09937d7038682050863;vendor/unzerdev/php-sdk/examples/InstallmentSecured/confirm.php 5c94a721e33bda216147c924318ef93e;vendor/unzerdev/php-sdk/examples/EmbeddedPayPage/Controller.php -950fca3a056e91ef629ddb2c0c3c114c;vendor/unzerdev/php-sdk/examples/Prepayment/index.php -ffa16e6d2c4fa921fc6622925cf41cd2;vendor/unzerdev/php-sdk/examples/Prepayment/Constants.php -0e9388fc82612bf283e0e8532bc037fa;vendor/unzerdev/php-sdk/examples/Prepayment/Controller.php -9d131ce33d213adfb5b0004e5c70037f;vendor/unzerdev/php-sdk/examples/CardExtended/index.php -8adf35a77d7af1dec397dd7dc76d8697;vendor/unzerdev/php-sdk/examples/CardExtended/Constants.php -3aab93801e52c0ea4114903e3556db09;vendor/unzerdev/php-sdk/examples/CardExtended/Controller.php -906646d73c1d692a92b0cb76914c857a;vendor/unzerdev/php-sdk/examples/IDeal/index.php -ddfb86c5e675c3a8013bc28d57bd3638;vendor/unzerdev/php-sdk/examples/IDeal/Constants.php +73dea87f72ff2c6310f2df12e35b6e40;vendor/unzerdev/php-sdk/examples/EmbeddedPayPage/Constants.php +307d6073de7dc22baabf85ecc477e825;vendor/unzerdev/php-sdk/examples/EmbeddedPayPage/index.php +6b67a3dc5c7127d49a8710e15c6a62f9;vendor/unzerdev/php-sdk/examples/Alipay/Controller.php +51a8a0e0810cac44c5f80d0b74921dbd;vendor/unzerdev/php-sdk/examples/Alipay/Constants.php +1b79e1322891467beccfac24cb51cc7d;vendor/unzerdev/php-sdk/examples/Alipay/index.php +87171c57ae02ef67558a56cec38f2585;vendor/unzerdev/php-sdk/examples/_enableExamples.php a7cc72fc4de836db8b9bdf1fee32faa2;vendor/unzerdev/php-sdk/examples/IDeal/Controller.php -d41d8cd98f00b204e9800998ecf8427e;vendor/unzerdev/php-sdk/examples/log/.gitkeep -6846ae916716e15e1095b45c395b0224;vendor/unzerdev/php-sdk/examples/ReturnController.php -4688c74534c6497900b8981d2b7391e7;vendor/unzerdev/php-sdk/examples/PaylaterDirectDebit/index.php -c9f8958a9bd020098afbf501781f29dc;vendor/unzerdev/php-sdk/examples/PaylaterDirectDebit/Constants.php -acc79008f29098d63d49c84600108a9d;vendor/unzerdev/php-sdk/examples/PaylaterDirectDebit/Controller.php -7b2380c16c55a5e5ac85497e09a387b4;vendor/unzerdev/php-sdk/examples/index.php -814aee0d4e746323eaf9bb52d530da10;vendor/unzerdev/php-sdk/examples/Failure.php -2037adfa9efe5006dfaec7351f100898;vendor/unzerdev/php-sdk/examples/Bancontact/index.php -55db0d1190e5a4fa0832b958e72d55ec;vendor/unzerdev/php-sdk/examples/Bancontact/Constants.php -40845a3153b77c54c9603440ed2bc776;vendor/unzerdev/php-sdk/examples/Bancontact/Controller.php -3a654f081c286b8e5614f66981ee9dff;vendor/unzerdev/php-sdk/examples/Googlepay/index.php -2f24628b28793c9ee3abbbd1150025e6;vendor/unzerdev/php-sdk/examples/Googlepay/Constants.php +ddfb86c5e675c3a8013bc28d57bd3638;vendor/unzerdev/php-sdk/examples/IDeal/Constants.php +906646d73c1d692a92b0cb76914c857a;vendor/unzerdev/php-sdk/examples/IDeal/index.php +3aab93801e52c0ea4114903e3556db09;vendor/unzerdev/php-sdk/examples/CardExtended/Controller.php +8adf35a77d7af1dec397dd7dc76d8697;vendor/unzerdev/php-sdk/examples/CardExtended/Constants.php +9d131ce33d213adfb5b0004e5c70037f;vendor/unzerdev/php-sdk/examples/CardExtended/index.php +e62240de2dcf93a444667736066c7c2b;vendor/unzerdev/php-sdk/examples/Success.php e4f2fab83d6fed0c0b6c7eeaeaaa42d2;vendor/unzerdev/php-sdk/examples/Googlepay/Controller.php -affc37b5b216155e42f7ca6bdfa6b3e8;vendor/unzerdev/php-sdk/examples/Przelewy24/index.php -d5b35b6c4ed8e1466ac0747a0556dd12;vendor/unzerdev/php-sdk/examples/Przelewy24/Constants.php +2f24628b28793c9ee3abbbd1150025e6;vendor/unzerdev/php-sdk/examples/Googlepay/Constants.php +3a654f081c286b8e5614f66981ee9dff;vendor/unzerdev/php-sdk/examples/Googlepay/index.php bf407ce3fbd763b8def2fdd6a008f5b0;vendor/unzerdev/php-sdk/examples/Przelewy24/Controller.php -e1a7707b65327d243a1b96cecf6c7ad8;vendor/unzerdev/php-sdk/examples/Backend/CancelPaymentController.php -52bd2bc8fac297ed4f38dde5ceef84b7;vendor/unzerdev/php-sdk/examples/Backend/UpdateTransactionController.php -0693dfa199a79cddf2c2738ca89a8e26;vendor/unzerdev/php-sdk/examples/Backend/Failure.php -45d52eab17bf58b4284cfcbf24b98a48;vendor/unzerdev/php-sdk/examples/Backend/ChargePaymentController.php -e5e3981b9ec8b12cb7a9b3648cf50610;vendor/unzerdev/php-sdk/examples/Backend/ManagePayment.php -192aac5c868941e1344437329fab4e78;vendor/unzerdev/php-sdk/examples/BankTransfer/index.php -4e22cfbc9a5a4eaa76afad1b1742f9ac;vendor/unzerdev/php-sdk/examples/BankTransfer/Constants.php -27c2c76cf1045d487471224e55acd7f9;vendor/unzerdev/php-sdk/examples/BankTransfer/Controller.php -3bc481abda430ecf82d65e315965c9e2;vendor/unzerdev/php-sdk/examples/CardRecurring/RecurringPaymentController.php +d5b35b6c4ed8e1466ac0747a0556dd12;vendor/unzerdev/php-sdk/examples/Przelewy24/Constants.php +affc37b5b216155e42f7ca6bdfa6b3e8;vendor/unzerdev/php-sdk/examples/Przelewy24/index.php +40845a3153b77c54c9603440ed2bc776;vendor/unzerdev/php-sdk/examples/Bancontact/Controller.php +55db0d1190e5a4fa0832b958e72d55ec;vendor/unzerdev/php-sdk/examples/Bancontact/Constants.php +2037adfa9efe5006dfaec7351f100898;vendor/unzerdev/php-sdk/examples/Bancontact/index.php 1474888045f9d7fa285d25b710987991;vendor/unzerdev/php-sdk/examples/CardRecurring/ReturnController.php -3510be35274448e2330a26a6974857a6;vendor/unzerdev/php-sdk/examples/CardRecurring/index.php -48970422c013e1c96b0149d2ecca781d;vendor/unzerdev/php-sdk/examples/CardRecurring/Constants.php be6cbec7a2b7bb5befd34cfb350d9864;vendor/unzerdev/php-sdk/examples/CardRecurring/Controller.php -2cb33442bbaed73002a0c423b2ed30c0;vendor/unzerdev/php-sdk/examples/Klarna/index.php -5a55d0966f5f5b87179611226e73b7cc;vendor/unzerdev/php-sdk/examples/Klarna/Constants.php +48970422c013e1c96b0149d2ecca781d;vendor/unzerdev/php-sdk/examples/CardRecurring/Constants.php +3510be35274448e2330a26a6974857a6;vendor/unzerdev/php-sdk/examples/CardRecurring/index.php +3bc481abda430ecf82d65e315965c9e2;vendor/unzerdev/php-sdk/examples/CardRecurring/RecurringPaymentController.php +6621d3b4e6aaf38ee58f63722743fe3a;vendor/unzerdev/php-sdk/examples/Giropay/Controller.php +aa45b9810c40e3639d904332ba4bdb65;vendor/unzerdev/php-sdk/examples/Giropay/Constants.php +0d38eee366774881698471ce1c0968b1;vendor/unzerdev/php-sdk/examples/Giropay/index.php +c335a1c516e59f60d54681fb2725d209;vendor/unzerdev/php-sdk/examples/Constants.php 1b4d0411a0aa88d9ffe7eb76b733967a;vendor/unzerdev/php-sdk/examples/Klarna/Controller.php -4a03f03080b4c42e66111dd0d47e590f;vendor/unzerdev/php-sdk/examples/EPSCharge/index.php -29a32449df2a240cad460522a386570b;vendor/unzerdev/php-sdk/examples/EPSCharge/Constants.php -91c640a180c6a402db48711a0c99aed4;vendor/unzerdev/php-sdk/examples/EPSCharge/Controller.php -de0d52934aaabbd999c690c1ef85c3dc;vendor/unzerdev/php-sdk/examples/HostedPayPage/index.php -f97464738f94449c899141cb4fe89494;vendor/unzerdev/php-sdk/examples/HostedPayPage/Constants.php -d419e69568b59117a9b385db52d5c21c;vendor/unzerdev/php-sdk/examples/HostedPayPage/Controller.php -8214c72f055e115b9ccdadfd2dc45cf8;vendor/unzerdev/php-sdk/examples/Webhooks/index.php -6aa45d3e2e2f7f32cb36f1d6b83b5ff0;vendor/unzerdev/php-sdk/examples/Webhooks/removeAll.php -0853634d5236f403cfafd43b64136b43;vendor/unzerdev/php-sdk/examples/Webhooks/Constants.php +5a55d0966f5f5b87179611226e73b7cc;vendor/unzerdev/php-sdk/examples/Klarna/Constants.php +2cb33442bbaed73002a0c423b2ed30c0;vendor/unzerdev/php-sdk/examples/Klarna/index.php +52bd2bc8fac297ed4f38dde5ceef84b7;vendor/unzerdev/php-sdk/examples/Backend/UpdateTransactionController.php +e5e3981b9ec8b12cb7a9b3648cf50610;vendor/unzerdev/php-sdk/examples/Backend/ManagePayment.php +0693dfa199a79cddf2c2738ca89a8e26;vendor/unzerdev/php-sdk/examples/Backend/Failure.php +e1a7707b65327d243a1b96cecf6c7ad8;vendor/unzerdev/php-sdk/examples/Backend/CancelPaymentController.php +45d52eab17bf58b4284cfcbf24b98a48;vendor/unzerdev/php-sdk/examples/Backend/ChargePaymentController.php +a3043ae9f18eb481437d7df8f4098a3b;vendor/unzerdev/php-sdk/examples/Create.php +e722f85ab4896350b7d3e6b11e016a61;vendor/unzerdev/php-sdk/examples/Pending.php +24f46fdd6328284b16d6722bf66f7edc;vendor/unzerdev/php-sdk/examples/InvoiceSecured/Controller.php +63290e8bac8bb80a0d023dd7db6f4b86;vendor/unzerdev/php-sdk/examples/InvoiceSecured/Constants.php +69f87f36973f62a9fa90368c7c03ca2e;vendor/unzerdev/php-sdk/examples/InvoiceSecured/index.php +51e26c18002be4cd6189addabe91f72d;vendor/unzerdev/php-sdk/examples/PaylaterInstallment/Controller.php +37d1142cabbdf302cf9b3df1801c5460;vendor/unzerdev/php-sdk/examples/PaylaterInstallment/Constants.php +0c9a618bbc11ca36be71a736a98f35f3;vendor/unzerdev/php-sdk/examples/PaylaterInstallment/index.php +814aee0d4e746323eaf9bb52d530da10;vendor/unzerdev/php-sdk/examples/Failure.php +83bee2a56f9ec61960049122404e6da7;vendor/unzerdev/php-sdk/examples/PayU/Controller.php +96bbe1b21f8d2ffd5abe4d121d6211bf;vendor/unzerdev/php-sdk/examples/PayU/Constants.php +48470c89a5af7c0c39b3075d1b72f7b7;vendor/unzerdev/php-sdk/examples/PayU/index.php +2c51d4ca5425e986b47953d665dbb4d9;vendor/unzerdev/php-sdk/examples/PayPal/Controller.php +a5c911ef89821b89e971d8a1d71b4fd6;vendor/unzerdev/php-sdk/examples/PayPal/Constants.php +8cb5ee78a02cba115a4fe35bc23475a6;vendor/unzerdev/php-sdk/examples/PayPal/index.php 774708b66b18445ddbfa6fce083d56b0;vendor/unzerdev/php-sdk/examples/Webhooks/Controller.php +0853634d5236f403cfafd43b64136b43;vendor/unzerdev/php-sdk/examples/Webhooks/Constants.php +6aa45d3e2e2f7f32cb36f1d6b83b5ff0;vendor/unzerdev/php-sdk/examples/Webhooks/removeAll.php +8214c72f055e115b9ccdadfd2dc45cf8;vendor/unzerdev/php-sdk/examples/Webhooks/index.php cdab17c99967ca858d885500e697f475;vendor/unzerdev/php-sdk/examples/Webhooks/fetchAll.php -c1c5a14b36b9d911f5a0e978556dc71c;vendor/unzerdev/php-sdk/examples/Card/index.php -1c8bd6167194fe61e892cefc91be110c;vendor/unzerdev/php-sdk/examples/Card/Constants.php -4955ecabe104487668bfca42231656fc;vendor/unzerdev/php-sdk/examples/Card/Controller.php -53f9d1e23eb9392aa48f106dc5b7a710;vendor/unzerdev/php-sdk/examples/PayPalRecurring/ReturnController.php -5379ca5f7588b0d9b3a112ffa2a4f029;vendor/unzerdev/php-sdk/examples/PayPalRecurring/index.php -b9ce34ef5b92f4e348a954255c78d0cd;vendor/unzerdev/php-sdk/examples/PayPalRecurring/Constants.php -4fd3e937b7202a679b6e16f6928f33e0;vendor/unzerdev/php-sdk/examples/PayPalRecurring/Controller.php -1a41bd1362842418aa506abac208c0cf;vendor/unzerdev/php-sdk/examples/PostFinanceCard/index.php -75b72c92b40aaa7271529d6e01a5ba30;vendor/unzerdev/php-sdk/examples/PostFinanceCard/Constants.php -5bf2afe121d863f0c93bacc89ce61ac2;vendor/unzerdev/php-sdk/examples/PostFinanceCard/Controller.php -1b79e1322891467beccfac24cb51cc7d;vendor/unzerdev/php-sdk/examples/Alipay/index.php -51a8a0e0810cac44c5f80d0b74921dbd;vendor/unzerdev/php-sdk/examples/Alipay/Constants.php -6b67a3dc5c7127d49a8710e15c6a62f9;vendor/unzerdev/php-sdk/examples/Alipay/Controller.php -861bbeca98eda8ed34df0eb9fc8bb8fd;vendor/unzerdev/php-sdk/examples/Invoice/index.php -5f6008cfdb1d32df410370768cdfff70;vendor/unzerdev/php-sdk/examples/Invoice/Constants.php -5b26cd823a668c580ae640024fe47310;vendor/unzerdev/php-sdk/examples/Invoice/Controller.php -19eaf1eca97c7470db192d30d800f5f0;vendor/unzerdev/php-sdk/examples/Sofort/index.php -278e7cafc5662e39d9f8c2c0aef31cc3;vendor/unzerdev/php-sdk/examples/Sofort/Constants.php -324bcbbcfcc571061ff6e9642db62db9;vendor/unzerdev/php-sdk/examples/Sofort/Controller.php -e62240de2dcf93a444667736066c7c2b;vendor/unzerdev/php-sdk/examples/Success.php -9a99064bb07fdec470e6ee441ca7ae1c;vendor/unzerdev/php-sdk/examples/PostFinanceEfinance/index.php -a3adb9f3e4779e48d3cb666e50478c7f;vendor/unzerdev/php-sdk/examples/PostFinanceEfinance/Constants.php +27c2c76cf1045d487471224e55acd7f9;vendor/unzerdev/php-sdk/examples/BankTransfer/Controller.php +4e22cfbc9a5a4eaa76afad1b1742f9ac;vendor/unzerdev/php-sdk/examples/BankTransfer/Constants.php +192aac5c868941e1344437329fab4e78;vendor/unzerdev/php-sdk/examples/BankTransfer/index.php +0e9388fc82612bf283e0e8532bc037fa;vendor/unzerdev/php-sdk/examples/Prepayment/Controller.php +ffa16e6d2c4fa921fc6622925cf41cd2;vendor/unzerdev/php-sdk/examples/Prepayment/Constants.php +950fca3a056e91ef629ddb2c0c3c114c;vendor/unzerdev/php-sdk/examples/Prepayment/index.php +7b2380c16c55a5e5ac85497e09a387b4;vendor/unzerdev/php-sdk/examples/index.php 8794e4e62f08f5b63d84e8fbbba23492;vendor/unzerdev/php-sdk/examples/PostFinanceEfinance/Controller.php -c335a1c516e59f60d54681fb2725d209;vendor/unzerdev/php-sdk/examples/Constants.php -87171c57ae02ef67558a56cec38f2585;vendor/unzerdev/php-sdk/examples/_enableExamples.php -c86d8b149608b06cfc857dfd48613fdd;vendor/unzerdev/php-sdk/examples/PaylaterInvoice/index.php -1368534a464a8258c8d850a74dc7a7f3;vendor/unzerdev/php-sdk/examples/PaylaterInvoice/Constants.php -bd695aaaeff03021acb4366d9d7ca02d;vendor/unzerdev/php-sdk/examples/PaylaterInvoice/Controller.php -e722f85ab4896350b7d3e6b11e016a61;vendor/unzerdev/php-sdk/examples/Pending.php -ba787a69bd974095081b723e82bb00bd;vendor/unzerdev/php-sdk/examples/SepaDirectDebitSecured/index.php -ad6099549a5a5184f955a0d759a71fe3;vendor/unzerdev/php-sdk/examples/SepaDirectDebitSecured/Constants.php +a3adb9f3e4779e48d3cb666e50478c7f;vendor/unzerdev/php-sdk/examples/PostFinanceEfinance/Constants.php +9a99064bb07fdec470e6ee441ca7ae1c;vendor/unzerdev/php-sdk/examples/PostFinanceEfinance/index.php +324bcbbcfcc571061ff6e9642db62db9;vendor/unzerdev/php-sdk/examples/Sofort/Controller.php +278e7cafc5662e39d9f8c2c0aef31cc3;vendor/unzerdev/php-sdk/examples/Sofort/Constants.php +19eaf1eca97c7470db192d30d800f5f0;vendor/unzerdev/php-sdk/examples/Sofort/index.php +5b26cd823a668c580ae640024fe47310;vendor/unzerdev/php-sdk/examples/Invoice/Controller.php +5f6008cfdb1d32df410370768cdfff70;vendor/unzerdev/php-sdk/examples/Invoice/Constants.php +861bbeca98eda8ed34df0eb9fc8bb8fd;vendor/unzerdev/php-sdk/examples/Invoice/index.php b592a73724b26b9f1b31130e8b39ecfe;vendor/unzerdev/php-sdk/examples/SepaDirectDebitSecured/Controller.php -69f87f36973f62a9fa90368c7c03ca2e;vendor/unzerdev/php-sdk/examples/InvoiceSecured/index.php -63290e8bac8bb80a0d023dd7db6f4b86;vendor/unzerdev/php-sdk/examples/InvoiceSecured/Constants.php -24f46fdd6328284b16d6722bf66f7edc;vendor/unzerdev/php-sdk/examples/InvoiceSecured/Controller.php -48470c89a5af7c0c39b3075d1b72f7b7;vendor/unzerdev/php-sdk/examples/PayU/index.php -96bbe1b21f8d2ffd5abe4d121d6211bf;vendor/unzerdev/php-sdk/examples/PayU/Constants.php -83bee2a56f9ec61960049122404e6da7;vendor/unzerdev/php-sdk/examples/PayU/Controller.php -42215678dd84b72ae4592d6ff273a5a4;vendor/unzerdev/php-sdk/.gitignore -9e9f49ec809ad456b453410ef1785548;vendor/unzerdev/php-sdk/.codacy.yml -285a85e6e41f2280105391b2c2eb419a;vendor/unzerdev/php-sdk/.github/CODEOWNERS -334bdebaaac275bb9e6d71b7fec6ffd6;vendor/unzerdev/php-sdk/.github/workflows/integration-tests.yml -e774a6ac03dc87705a34dd6d7f3c12a5;vendor/unzerdev/php-sdk/.github/workflows/release.yml -fcaa877ac215df25e0d42b84944bebfb;vendor/unzerdev/php-sdk/.github/workflows/test-group.yml -0799824a1dc8b58b5b2386c1908c5384;vendor/unzerdev/php-sdk/.github/workflows/security-scan.yaml -fa04e71dfaaf414b6cfb5346dfa90dbe;vendor/unzerdev/php-sdk/.github/workflows/unit-tests.yml -d51675285e38b187ec6501184c62e639;vendor/unzerdev/php-sdk/.github/workflows/validate-pull-request.yaml -46d029825edf473241d92ecac3c3c99f;vendor/unzerdev/php-sdk/.github/workflows/pre-release.yml -30f2e8cb9ff544ae1b23029783424b16;vendor/unzerdev/php-sdk/test/TestDebugHandler.php -314bb6cbc91ae0faaf02ff1b2821bfb8;vendor/unzerdev/php-sdk/test/script/travis_script.sh -70ef6a7fad822e87e32cdfe683f62ac3;vendor/unzerdev/php-sdk/test/script/travis_install.sh -e6009559810422621dcb5e66dd13246a;vendor/unzerdev/php-sdk/test/script/travis_before_install.sh +ad6099549a5a5184f955a0d759a71fe3;vendor/unzerdev/php-sdk/examples/SepaDirectDebitSecured/Constants.php +ba787a69bd974095081b723e82bb00bd;vendor/unzerdev/php-sdk/examples/SepaDirectDebitSecured/index.php +0519e310b01f2b43e1ea1e5d9310fe09;vendor/unzerdev/php-sdk/examples/Wechatpay/Controller.php +dc6730dbb9341a83f105432420dd8154;vendor/unzerdev/php-sdk/examples/Wechatpay/Constants.php +bd3e22a03fa976e8abc398fec314b13f;vendor/unzerdev/php-sdk/examples/Wechatpay/index.php +53f9d1e23eb9392aa48f106dc5b7a710;vendor/unzerdev/php-sdk/examples/PayPalRecurring/ReturnController.php +4fd3e937b7202a679b6e16f6928f33e0;vendor/unzerdev/php-sdk/examples/PayPalRecurring/Controller.php +b9ce34ef5b92f4e348a954255c78d0cd;vendor/unzerdev/php-sdk/examples/PayPalRecurring/Constants.php +5379ca5f7588b0d9b3a112ffa2a4f029;vendor/unzerdev/php-sdk/examples/PayPalRecurring/index.php +d41d8cd98f00b204e9800998ecf8427e;vendor/unzerdev/php-sdk/examples/log/.gitkeep +4955ecabe104487668bfca42231656fc;vendor/unzerdev/php-sdk/examples/Card/Controller.php +1c8bd6167194fe61e892cefc91be110c;vendor/unzerdev/php-sdk/examples/Card/Constants.php +c1c5a14b36b9d911f5a0e978556dc71c;vendor/unzerdev/php-sdk/examples/Card/index.php +91c640a180c6a402db48711a0c99aed4;vendor/unzerdev/php-sdk/examples/EPSCharge/Controller.php +29a32449df2a240cad460522a386570b;vendor/unzerdev/php-sdk/examples/EPSCharge/Constants.php +4a03f03080b4c42e66111dd0d47e590f;vendor/unzerdev/php-sdk/examples/EPSCharge/index.php +89ebe697baeeb27174bdca3648ef1f3f;vendor/unzerdev/php-sdk/phpunit.xml +417e6e42dee83ba2011090b70c0cd90c;vendor/unzerdev/php-sdk/.travis.yml +cdbe7e4fb996b050423c7232a71bff67;vendor/unzerdev/php-sdk/NOTICE +6758028fe0caf5928bd44c405aa08596;vendor/unzerdev/php-sdk/CHANGELOG.md 4d30b8fd445b436492aa726177b2f3be;vendor/unzerdev/php-sdk/test/BaseIntegrationTest.php -f8f15b6e3f16a292aec754dd2f758ae7;vendor/unzerdev/php-sdk/test/Helper/TestEnvironmentService.php -6388bc18267e56c86dbf3d5e2c573eef;vendor/unzerdev/php-sdk/test/unit/Validators/PrivateKeyValidatorTest.php -77b39e3628586ecb233716c71ff7a9b2;vendor/unzerdev/php-sdk/test/unit/Validators/PublicKeyValidatorTest.php -ac839c86ae72500cc78d6b746c841d27;vendor/unzerdev/php-sdk/test/unit/Exceptions/UnzerApiExceptionTest.php -d34504e9be1f5229ef580ae8854d624a;vendor/unzerdev/php-sdk/test/unit/Traits/TraitDummyHasInvoiceId.php -29c7077b007e8cad8ba42de17450c095;vendor/unzerdev/php-sdk/test/unit/Traits/HasRecurrenceTypeTest.php -bc01d18c0445c158a8d314d2187d1e9f;vendor/unzerdev/php-sdk/test/unit/Traits/HasInvoiceIdTest.php -12849dcb66fa88212cd51dfe7cddeca6;vendor/unzerdev/php-sdk/test/unit/Traits/CanAuthorizeWithCustomerTest.php -0410e941df4dd48bbc29f22fe02637b2;vendor/unzerdev/php-sdk/test/unit/Traits/CanPayoutWithCustomerTest.php -92a315089935822096a78d7cc94c7bee;vendor/unzerdev/php-sdk/test/unit/Traits/TraitDummyWithCustomerWithoutParentIF.php -4a6b10450b3ee2d20665dfc81fff411c;vendor/unzerdev/php-sdk/test/unit/Traits/TraitDummyHasCancellationsHasPaymentState.php -98956121a6e13a0a3759200518b55096;vendor/unzerdev/php-sdk/test/unit/Traits/TraitDummyWithCustomerWithParentIF.php -3724e8453a135d67a318f794aff70683;vendor/unzerdev/php-sdk/test/unit/Traits/CanPayoutTest.php -f9fe107a4fdf8b3b9bf284d3c74933d5;vendor/unzerdev/php-sdk/test/unit/Traits/HasCancellationsTest.php -807744ecd5089cea9a21fdea76a05e6c;vendor/unzerdev/php-sdk/test/unit/Traits/HasPaymentStateTest.php -95344d933655b2271d44488feb2e4334;vendor/unzerdev/php-sdk/test/unit/Traits/CanDirectChargeTest.php -5af33f72f2a7e42dfc004994c1175281;vendor/unzerdev/php-sdk/test/unit/Traits/CanRecurTest.php -40d14a45bebd8533063e9eaa7dabe1c3;vendor/unzerdev/php-sdk/test/unit/Traits/CanDirectChargeWithCustomerTest.php -30809c49ef6d01af19fd84d36069188d;vendor/unzerdev/php-sdk/test/unit/Traits/TraitDummyCanRecur.php -a19ff095975b417955aec986134b7fda;vendor/unzerdev/php-sdk/test/unit/Traits/TraitDummyWithoutCustomerWithParentIF.php -f581b544c8f3acfef8c57cdb13d4a20c;vendor/unzerdev/php-sdk/test/unit/Traits/TraitDummyHasAdditionalTransactionData.php -b21b9052e61a51fa63c3445bd073e507;vendor/unzerdev/php-sdk/test/unit/Traits/TraitDummyWithoutCustomerWithoutParentIF.php -8e7e28f0baadc6eac2e35410cda2f7d7;vendor/unzerdev/php-sdk/test/unit/Traits/HasAdditionalTransactionDataTest.php -0b741be068256b38c9e0db38c2fe07c0;vendor/unzerdev/php-sdk/test/unit/Traits/TraitDummyCanRecurNonResource.php -c93744473a49c75ea8c66782f1f5eb64;vendor/unzerdev/php-sdk/test/unit/Traits/CanAuthorizeTest.php -2fa39e3f3394da5860a88ec23c586553;vendor/unzerdev/php-sdk/test/unit/Constants/PaymentStateTest.php -3506ff4007bb51bf218ac7fd08160564;vendor/unzerdev/php-sdk/test/unit/UnzerTest.php +500708d41b270db56199238ec7a678ff;vendor/unzerdev/php-sdk/test/unit/DummyResource.php 2326f4bd5d26ead1710d780114fe9ffb;vendor/unzerdev/php-sdk/test/unit/Adapter/ApplepaySessionTest.php -9e016f02a1b73683f1efbb7a8bbbb0bb;vendor/unzerdev/php-sdk/test/unit/Services/ResourceServiceTest.php +ac839c86ae72500cc78d6b746c841d27;vendor/unzerdev/php-sdk/test/unit/Exceptions/UnzerApiExceptionTest.php +71a1f7bcda720fa61ef63a88e05bcf95;vendor/unzerdev/php-sdk/test/unit/Services/EnvironmentServiceTest.php 9b86dd7a5798109211e4bba3eb70c5e7;vendor/unzerdev/php-sdk/test/unit/Services/DummyDebugHandler.php -4d8a94a1783075d3193ef964874711dd;vendor/unzerdev/php-sdk/test/unit/Services/CancelServiceTest.php 828450cf3e68bc204d592b1b41dd2246;vendor/unzerdev/php-sdk/test/unit/Services/PaymentServiceTest.php +3c6fab6f8e2b1ba3e056779a8e8278a5;vendor/unzerdev/php-sdk/test/unit/Services/JwtServiceTest.php +19faed6f4d6d88ab787808229a7a0d7e;vendor/unzerdev/php-sdk/test/unit/Services/WebhooksServiceTest.php +1eff3cfce97848172d9e7666ce75aba5;vendor/unzerdev/php-sdk/test/unit/Services/DummyAdapter.php +4d8a94a1783075d3193ef964874711dd;vendor/unzerdev/php-sdk/test/unit/Services/CancelServiceTest.php +dc0ccf9224c7cbfd6256cd902e8a7014;vendor/unzerdev/php-sdk/test/unit/Services/ResourceServiceTest.php 66acfe236eb7dcb1b2fa73c70b3d7ca5;vendor/unzerdev/php-sdk/test/unit/Services/ResourceNameServiceTest.php 5fb399f6993314066a7fb99bd6158b03;vendor/unzerdev/php-sdk/test/unit/Services/HttpServiceTest.php -71a1f7bcda720fa61ef63a88e05bcf95;vendor/unzerdev/php-sdk/test/unit/Services/EnvironmentServiceTest.php -65bc804cb1f02fa28b5deb2e1502be02;vendor/unzerdev/php-sdk/test/unit/Services/DummyAdapter.php -19faed6f4d6d88ab787808229a7a0d7e;vendor/unzerdev/php-sdk/test/unit/Services/WebhooksServiceTest.php +04033672568687db6ff4937d891caa9f;vendor/unzerdev/php-sdk/test/unit/Services/IdServiceTest.php +3506ff4007bb51bf218ac7fd08160564;vendor/unzerdev/php-sdk/test/unit/UnzerTest.php +9305a2c9ec330ae8e730116239710828;vendor/unzerdev/php-sdk/test/unit/Resources/KeypairTest.php +55c8f63568b8a95322e9f8c62c2c80d9;vendor/unzerdev/php-sdk/test/unit/Resources/InstalmentPlanTest.php db440982ec14bd99d4ba4a746fd7e554;vendor/unzerdev/php-sdk/test/unit/Resources/PaymentTest.php +8e1b69587751e684d738b537f3b9f4c7;vendor/unzerdev/php-sdk/test/unit/Resources/CustomerTest.php +fac208735ce2184117af0cbf4c677215;vendor/unzerdev/php-sdk/test/unit/Resources/TransactionTypes/ShipmentTest.php +036e99aad2e09e82c96c9d2de1183535;vendor/unzerdev/php-sdk/test/unit/Resources/TransactionTypes/PayoutTest.php +5f9b74b9a50978fc421f62ed6177e98d;vendor/unzerdev/php-sdk/test/unit/Resources/TransactionTypes/AbstractTransactionTypeTest.php +c95c7d800a8d15fb66277cbfeb21b220;vendor/unzerdev/php-sdk/test/unit/Resources/TransactionTypes/ChargebackTest.php +0d6708b71d9c8575ba182a054d76f2d7;vendor/unzerdev/php-sdk/test/unit/Resources/TransactionTypes/ChargeTest.php +45cd24b6560bc2f4e403c2cc5dbd9473;vendor/unzerdev/php-sdk/test/unit/Resources/TransactionTypes/DummyTransactionType.php +fcaa8b37f1a82ceb6dba3d6b58b01a41;vendor/unzerdev/php-sdk/test/unit/Resources/TransactionTypes/AuthorizationTest.php +855505d7d60059ccae8ce92062bcd9a5;vendor/unzerdev/php-sdk/test/unit/Resources/TransactionTypes/CancellationTest.php +8e49881a9046c585465771123c43de0f;vendor/unzerdev/php-sdk/test/unit/Resources/PaylaterInstallmentPlansTest.php +64764b6899b8aa3780df619a670f3a42;vendor/unzerdev/php-sdk/test/unit/Resources/WebhookTest.php +a0b0d29c653fd67f040477f6c9377090;vendor/unzerdev/php-sdk/test/unit/Resources/CustomerFactoryTest.php +0551c8fa87a6f32bdc3b6d424a7730c9;vendor/unzerdev/php-sdk/test/unit/Resources/DummyUnzerResource.php +a857cc7a7b287b99aa683dbd02433030;vendor/unzerdev/php-sdk/test/unit/Resources/RecurringTest.php +4c105264588a0bc8714119445c23ed79;vendor/unzerdev/php-sdk/test/unit/Resources/PaypageV2Test.php 8cc83f9a6a17f59e78e3543d06cdc281;vendor/unzerdev/php-sdk/test/unit/Resources/EmbeddedResources/AmountTest.php -bd84f592f09277ac484916baad34f707;vendor/unzerdev/php-sdk/test/unit/Resources/EmbeddedResources/RiskDataTest.php -0eacfdc419922d3631fe1b8b782ab66d;vendor/unzerdev/php-sdk/test/unit/Resources/EmbeddedResources/ShippingDataTest.php +c4e359dfd0f69695c897d06176ef102f;vendor/unzerdev/php-sdk/test/unit/Resources/EmbeddedResources/CompanyOwnerTest.php +0ea1a21aae64289e1e15b8e40541d199;vendor/unzerdev/php-sdk/test/unit/Resources/EmbeddedResources/WeroTransactionDataTest.php +1ef19adc7d170b6c2491f4b3d2bae499;vendor/unzerdev/php-sdk/test/unit/Resources/EmbeddedResources/GeoLocationTest.php 6559cc82a56bd78a5a9c5879f3d2e52a;vendor/unzerdev/php-sdk/test/unit/Resources/EmbeddedResources/ApplePayHeaderTest.php a7044892756617ae8f3fff91bb4ed725;vendor/unzerdev/php-sdk/test/unit/Resources/EmbeddedResources/BasketItemTest.php -1ef19adc7d170b6c2491f4b3d2bae499;vendor/unzerdev/php-sdk/test/unit/Resources/EmbeddedResources/GeoLocationTest.php -c4e359dfd0f69695c897d06176ef102f;vendor/unzerdev/php-sdk/test/unit/Resources/EmbeddedResources/CompanyOwnerTest.php +bd84f592f09277ac484916baad34f707;vendor/unzerdev/php-sdk/test/unit/Resources/EmbeddedResources/RiskDataTest.php +0eacfdc419922d3631fe1b8b782ab66d;vendor/unzerdev/php-sdk/test/unit/Resources/EmbeddedResources/ShippingDataTest.php +28d798c2f54806a04b34fdbf60165325;vendor/unzerdev/php-sdk/test/unit/Resources/WebhooksTest.php +3b38be198af93d332b4f5fdb5c69db9f;vendor/unzerdev/php-sdk/test/unit/Resources/MetadataTest.php +05e5c019ef6349e5dd1b1ea8d02e6179;vendor/unzerdev/php-sdk/test/unit/Resources/ConfigTest.php 83b1e65dc83b3d78903c558557257a4b;vendor/unzerdev/php-sdk/test/unit/Resources/PaymentTypes/PayPalTest.php +de4c232e22e965ad192d625162b3b76c;vendor/unzerdev/php-sdk/test/unit/Resources/PaymentTypes/BancontactTest.php 06f1752d64930c552c3a451cc4a57251;vendor/unzerdev/php-sdk/test/unit/Resources/PaymentTypes/InstallmentSecuredTest.php -ccfdad0c2495239e954efdbe97fc1b59;vendor/unzerdev/php-sdk/test/unit/Resources/PaymentTypes/SofortTest.php -1d00a3f368a262cdf975837a6ddb60e8;vendor/unzerdev/php-sdk/test/unit/Resources/PaymentTypes/EPSTest.php +bb586fb50cb8a6484109994a645b93b4;vendor/unzerdev/php-sdk/test/unit/Resources/PaymentTypes/PaylaterDirectDebitTest.php +a686a67c3d2c0a3aefe45c4f3007dc4d;vendor/unzerdev/php-sdk/test/unit/Resources/PaymentTypes/PayPageTest.php +4dea550f16a5bdfc1eb0a75a64fd3849;vendor/unzerdev/php-sdk/test/unit/Resources/PaymentTypes/ClickToPayTest.php e41eddfcc7b808bdd200ddc16127459b;vendor/unzerdev/php-sdk/test/unit/Resources/PaymentTypes/CardTest.php c44c5a6a4546a2b1dbbc14539092674e;vendor/unzerdev/php-sdk/test/unit/Resources/PaymentTypes/PaylaterInstallmentTest.php -eff9f9980bc26f1d9c5ec0e19443904b;vendor/unzerdev/php-sdk/test/unit/Resources/PaymentTypes/IdealTest.php +c52f3ba3c29359f7dbc806619a92b04c;vendor/unzerdev/php-sdk/test/unit/Resources/PaymentTypes/OpenBankingTest.php 7ba5fa9e749fbbcacdf8d30cfba7210c;vendor/unzerdev/php-sdk/test/unit/Resources/PaymentTypes/SepaDirectDebitTest.php -e0efa778991fd3809dbb0a132956f5fe;vendor/unzerdev/php-sdk/test/unit/Resources/PaymentTypes/GooglePayTest.php -de4c232e22e965ad192d625162b3b76c;vendor/unzerdev/php-sdk/test/unit/Resources/PaymentTypes/BancontactTest.php 0da756d46ed49ffef0a5b4da7452a6fa;vendor/unzerdev/php-sdk/test/unit/Resources/PaymentTypes/SepaDirectDebitSecuredTest.php -bb586fb50cb8a6484109994a645b93b4;vendor/unzerdev/php-sdk/test/unit/Resources/PaymentTypes/PaylaterDirectDebitTest.php -a686a67c3d2c0a3aefe45c4f3007dc4d;vendor/unzerdev/php-sdk/test/unit/Resources/PaymentTypes/PayPageTest.php -c52f3ba3c29359f7dbc806619a92b04c;vendor/unzerdev/php-sdk/test/unit/Resources/PaymentTypes/OpenBankingTest.php -4dea550f16a5bdfc1eb0a75a64fd3849;vendor/unzerdev/php-sdk/test/unit/Resources/PaymentTypes/ClickToPayTest.php +1d00a3f368a262cdf975837a6ddb60e8;vendor/unzerdev/php-sdk/test/unit/Resources/PaymentTypes/EPSTest.php +eff9f9980bc26f1d9c5ec0e19443904b;vendor/unzerdev/php-sdk/test/unit/Resources/PaymentTypes/IdealTest.php 991e67d34caeaf4a02cd2eb1d3969f21;vendor/unzerdev/php-sdk/test/unit/Resources/PaymentTypes/ApplePayTest.php -6eace4b958db3596599532557f5e1a33;vendor/unzerdev/php-sdk/test/unit/Resources/AbstractUnzerResourceTest.php -c95c7d800a8d15fb66277cbfeb21b220;vendor/unzerdev/php-sdk/test/unit/Resources/TransactionTypes/ChargebackTest.php -036e99aad2e09e82c96c9d2de1183535;vendor/unzerdev/php-sdk/test/unit/Resources/TransactionTypes/PayoutTest.php -fac208735ce2184117af0cbf4c677215;vendor/unzerdev/php-sdk/test/unit/Resources/TransactionTypes/ShipmentTest.php -45cd24b6560bc2f4e403c2cc5dbd9473;vendor/unzerdev/php-sdk/test/unit/Resources/TransactionTypes/DummyTransactionType.php -fcaa8b37f1a82ceb6dba3d6b58b01a41;vendor/unzerdev/php-sdk/test/unit/Resources/TransactionTypes/AuthorizationTest.php -855505d7d60059ccae8ce92062bcd9a5;vendor/unzerdev/php-sdk/test/unit/Resources/TransactionTypes/CancellationTest.php -5f9b74b9a50978fc421f62ed6177e98d;vendor/unzerdev/php-sdk/test/unit/Resources/TransactionTypes/AbstractTransactionTypeTest.php -0d6708b71d9c8575ba182a054d76f2d7;vendor/unzerdev/php-sdk/test/unit/Resources/TransactionTypes/ChargeTest.php +ccfdad0c2495239e954efdbe97fc1b59;vendor/unzerdev/php-sdk/test/unit/Resources/PaymentTypes/SofortTest.php +e0efa778991fd3809dbb0a132956f5fe;vendor/unzerdev/php-sdk/test/unit/Resources/PaymentTypes/GooglePayTest.php 863a56e41d7f340ef31bf6fc5308853e;vendor/unzerdev/php-sdk/test/unit/Resources/BasketTest.php -3b38be198af93d332b4f5fdb5c69db9f;vendor/unzerdev/php-sdk/test/unit/Resources/MetadataTest.php -8e49881a9046c585465771123c43de0f;vendor/unzerdev/php-sdk/test/unit/Resources/PaylaterInstallmentPlansTest.php -a857cc7a7b287b99aa683dbd02433030;vendor/unzerdev/php-sdk/test/unit/Resources/RecurringTest.php -28d798c2f54806a04b34fdbf60165325;vendor/unzerdev/php-sdk/test/unit/Resources/WebhooksTest.php -55c8f63568b8a95322e9f8c62c2c80d9;vendor/unzerdev/php-sdk/test/unit/Resources/InstalmentPlanTest.php -a0b0d29c653fd67f040477f6c9377090;vendor/unzerdev/php-sdk/test/unit/Resources/CustomerFactoryTest.php -64764b6899b8aa3780df619a670f3a42;vendor/unzerdev/php-sdk/test/unit/Resources/WebhookTest.php -9305a2c9ec330ae8e730116239710828;vendor/unzerdev/php-sdk/test/unit/Resources/KeypairTest.php -8e1b69587751e684d738b537f3b9f4c7;vendor/unzerdev/php-sdk/test/unit/Resources/CustomerTest.php -05e5c019ef6349e5dd1b1ea8d02e6179;vendor/unzerdev/php-sdk/test/unit/Resources/ConfigTest.php -4c105264588a0bc8714119445c23ed79;vendor/unzerdev/php-sdk/test/unit/Resources/PaypageV2Test.php -0551c8fa87a6f32bdc3b6d424a7730c9;vendor/unzerdev/php-sdk/test/unit/Resources/DummyUnzerResource.php -500708d41b270db56199238ec7a678ff;vendor/unzerdev/php-sdk/test/unit/DummyResource.php -fe7e73d44aee61689e1a087f1ff27732;vendor/unzerdev/php-sdk/test/bootstrap.php -f4c2cf091b80809d015d69bb78f0844f;vendor/unzerdev/php-sdk/test/integration/PaymentTest.php -d86edb8e8a771902b0f0a5cc027a8c24;vendor/unzerdev/php-sdk/test/integration/PaymentTypes/AlipayTest.php -60d3d5e29202eca1be8c96e132bb89c7;vendor/unzerdev/php-sdk/test/integration/PaymentTypes/InstallmentSecuredTest.php -14a544b8438c3ed62ebdfe2f5523eb26;vendor/unzerdev/php-sdk/test/integration/PaymentTypes/SofortTest.php -ff882a5902f3f2c45b4a711c673b2d1c;vendor/unzerdev/php-sdk/test/integration/PaymentTypes/EPSTest.php -c579a34b18cb399d3dc245510033ae4f;vendor/unzerdev/php-sdk/test/integration/PaymentTypes/GiropayTest.php -c7b76e5bb76f092d28414526cff6296f;vendor/unzerdev/php-sdk/test/integration/PaymentTypes/CardTest.php -2abe3f5b7ec5516c405ba65484fbf354;vendor/unzerdev/php-sdk/test/integration/PaymentTypes/PaylaterInvoiceTest.php -5e8d35d03fa64b8a09d543634a31c617;vendor/unzerdev/php-sdk/test/integration/PaymentTypes/PaylaterInstallmentTest.php -e05854b48b714df0bdc0cf23f4933e39;vendor/unzerdev/php-sdk/test/integration/PaymentTypes/Przelewy24Test.php -638bdf6131a384b6c71ef74a237f5009;vendor/unzerdev/php-sdk/test/integration/PaymentTypes/PayUTest.php -93d22c69af95bb02bffcacd22153e3d3;vendor/unzerdev/php-sdk/test/integration/PaymentTypes/IdealTest.php -c313889561db37bb58b1e12f8e5a2d5c;vendor/unzerdev/php-sdk/test/integration/PaymentTypes/PostFinanceEfinanceTest.php -47d8db22481353a28ebc8b86fb2f0270;vendor/unzerdev/php-sdk/test/integration/PaymentTypes/PaypalTest.php -188732747962e47cc11d1fd088bed3cc;vendor/unzerdev/php-sdk/test/integration/PaymentTypes/PostFinanceCardTest.php -8b2be94c21b7588fa168c0c7ec47dedd;vendor/unzerdev/php-sdk/test/integration/PaymentTypes/InvoiceSecuredTest.php -32f07cd5dd649448e750cfeb87b3a115;vendor/unzerdev/php-sdk/test/integration/PaymentTypes/SepaDirectDebitTest.php -be8d81d889f66425c9b3df8aaa308aab;vendor/unzerdev/php-sdk/test/integration/PaymentTypes/TwintTest.php -96e5f5e9589caac8708a8d9245ec136f;vendor/unzerdev/php-sdk/test/integration/PaymentTypes/GooglePayTest.php -e2f0c2ad81537efe30f3b980b839edc8;vendor/unzerdev/php-sdk/test/integration/PaymentTypes/BancontactTest.php -4d0568fc244daf8c175c51843823a24d;vendor/unzerdev/php-sdk/test/integration/PaymentTypes/WechatpayTest.php -c56b45988630951dcfc0c8a69fe46983;vendor/unzerdev/php-sdk/test/integration/PaymentTypes/SepaDirectDebitSecuredTest.php -ce36b22f68ea27e9060e4a51a71936a1;vendor/unzerdev/php-sdk/test/integration/PaymentTypes/PaylaterDirectDebitTest.php -5e421139755d576e650a37361892044b;vendor/unzerdev/php-sdk/test/integration/PaymentTypes/PISTest.php -4100075bdef99a5493886f3cd071bab1;vendor/unzerdev/php-sdk/test/integration/PaymentTypes/PrepaymentTest.php -1172ad9384eff8055a0b0b4bf6befa74;vendor/unzerdev/php-sdk/test/integration/PaymentTypes/PaypageTest.php -7ed7be9352cee1e99ac581d75203062a;vendor/unzerdev/php-sdk/test/integration/PaymentTypes/ApplepayTest.php -3e33484f5d4a6ceeee0e9e2fdcf33f6e;vendor/unzerdev/php-sdk/test/integration/PaymentTypes/OpenBankingTest.php -e7feed1a254e5333b1a8469750dd8a55;vendor/unzerdev/php-sdk/test/integration/PaymentTypes/InvoiceTest.php -3df540dde80d7f2872b6166f06f552cc;vendor/unzerdev/php-sdk/test/integration/PaymentTypes/ClickToPayTest.php -005c48bc4c921b4a2b695e2f8310c451;vendor/unzerdev/php-sdk/test/integration/PaymentTypes/InvoiceGuaranteedTest.php -d5bd5b607c5da56c61dda951a1c1faa8;vendor/unzerdev/php-sdk/test/integration/PaymentTypes/KlarnaTest.php -68e14fbe9ec515539fc605fe7f0301c5;vendor/unzerdev/php-sdk/test/integration/PaymentTypes/HirePurchaseTest.php +6eace4b958db3596599532557f5e1a33;vendor/unzerdev/php-sdk/test/unit/Resources/AbstractUnzerResourceTest.php +2fa39e3f3394da5860a88ec23c586553;vendor/unzerdev/php-sdk/test/unit/Constants/PaymentStateTest.php +6388bc18267e56c86dbf3d5e2c573eef;vendor/unzerdev/php-sdk/test/unit/Validators/PrivateKeyValidatorTest.php +77b39e3628586ecb233716c71ff7a9b2;vendor/unzerdev/php-sdk/test/unit/Validators/PublicKeyValidatorTest.php +94356c811e8cf2310cf6ecb342455c79;vendor/unzerdev/php-sdk/test/unit/Traits/HasAdditionalTransactionDataTest.php +12849dcb66fa88212cd51dfe7cddeca6;vendor/unzerdev/php-sdk/test/unit/Traits/CanAuthorizeWithCustomerTest.php +98956121a6e13a0a3759200518b55096;vendor/unzerdev/php-sdk/test/unit/Traits/TraitDummyWithCustomerWithParentIF.php +d34504e9be1f5229ef580ae8854d624a;vendor/unzerdev/php-sdk/test/unit/Traits/TraitDummyHasInvoiceId.php +3724e8453a135d67a318f794aff70683;vendor/unzerdev/php-sdk/test/unit/Traits/CanPayoutTest.php +5af33f72f2a7e42dfc004994c1175281;vendor/unzerdev/php-sdk/test/unit/Traits/CanRecurTest.php +95344d933655b2271d44488feb2e4334;vendor/unzerdev/php-sdk/test/unit/Traits/CanDirectChargeTest.php +29c7077b007e8cad8ba42de17450c095;vendor/unzerdev/php-sdk/test/unit/Traits/HasRecurrenceTypeTest.php +bc01d18c0445c158a8d314d2187d1e9f;vendor/unzerdev/php-sdk/test/unit/Traits/HasInvoiceIdTest.php +0410e941df4dd48bbc29f22fe02637b2;vendor/unzerdev/php-sdk/test/unit/Traits/CanPayoutWithCustomerTest.php +40d14a45bebd8533063e9eaa7dabe1c3;vendor/unzerdev/php-sdk/test/unit/Traits/CanDirectChargeWithCustomerTest.php +f9fe107a4fdf8b3b9bf284d3c74933d5;vendor/unzerdev/php-sdk/test/unit/Traits/HasCancellationsTest.php +f581b544c8f3acfef8c57cdb13d4a20c;vendor/unzerdev/php-sdk/test/unit/Traits/TraitDummyHasAdditionalTransactionData.php +30809c49ef6d01af19fd84d36069188d;vendor/unzerdev/php-sdk/test/unit/Traits/TraitDummyCanRecur.php +b21b9052e61a51fa63c3445bd073e507;vendor/unzerdev/php-sdk/test/unit/Traits/TraitDummyWithoutCustomerWithoutParentIF.php +0b741be068256b38c9e0db38c2fe07c0;vendor/unzerdev/php-sdk/test/unit/Traits/TraitDummyCanRecurNonResource.php +4a6b10450b3ee2d20665dfc81fff411c;vendor/unzerdev/php-sdk/test/unit/Traits/TraitDummyHasCancellationsHasPaymentState.php +a19ff095975b417955aec986134b7fda;vendor/unzerdev/php-sdk/test/unit/Traits/TraitDummyWithoutCustomerWithParentIF.php +807744ecd5089cea9a21fdea76a05e6c;vendor/unzerdev/php-sdk/test/unit/Traits/HasPaymentStateTest.php +92a315089935822096a78d7cc94c7bee;vendor/unzerdev/php-sdk/test/unit/Traits/TraitDummyWithCustomerWithoutParentIF.php +c93744473a49c75ea8c66782f1f5eb64;vendor/unzerdev/php-sdk/test/unit/Traits/CanAuthorizeTest.php +e6009559810422621dcb5e66dd13246a;vendor/unzerdev/php-sdk/test/script/travis_before_install.sh +70ef6a7fad822e87e32cdfe683f62ac3;vendor/unzerdev/php-sdk/test/script/travis_install.sh +314bb6cbc91ae0faaf02ff1b2821bfb8;vendor/unzerdev/php-sdk/test/script/travis_script.sh +69aee4491c612d6590fb5caaaed10117;vendor/unzerdev/php-sdk/test/BasePaymentTest.php +f10a54b8a5e79e1986be44f2cf90032c;vendor/unzerdev/php-sdk/test/integration/DummyResource.php bd23de11a72f5c9f925ff800ef5d2b96;vendor/unzerdev/php-sdk/test/integration/PaymentCancelTest.php +8a45065fd09d3e9c230fec75308d6656;vendor/unzerdev/php-sdk/test/integration/ApplepayAdapterTest.php +40d75f3e330e339861e8b05bee0155d6;vendor/unzerdev/php-sdk/test/integration/SetMetadataTest.php +f4c2cf091b80809d015d69bb78f0844f;vendor/unzerdev/php-sdk/test/integration/PaymentTest.php +8b1c86b679a8918913fdf37164c850fd;vendor/unzerdev/php-sdk/test/integration/TransactionTypes/ShipmentTest.php 5d9b3c09969ea0752f3d982ff21897ab;vendor/unzerdev/php-sdk/test/integration/TransactionTypes/PayoutTest.php 7445b358c24a528598bd9363ce60af0a;vendor/unzerdev/php-sdk/test/integration/TransactionTypes/PaylaterCancelTest.php -8b1c86b679a8918913fdf37164c850fd;vendor/unzerdev/php-sdk/test/integration/TransactionTypes/ShipmentTest.php -a95799f26594e269182ddea7e3c084b5;vendor/unzerdev/php-sdk/test/integration/TransactionTypes/CancelAfterChargeTest.php a22ba36e4a3c45c54bc36df62dd4a636;vendor/unzerdev/php-sdk/test/integration/TransactionTypes/ChargeAfterAuthorizationTest.php -a82ed165d0b3ee08c60f73be0a3cdea2;vendor/unzerdev/php-sdk/test/integration/TransactionTypes/AuthorizationTest.php -40893d16f3c3cda0d1d4dc10ecce933b;vendor/unzerdev/php-sdk/test/integration/TransactionTypes/CancelTest.php -d7a1322927ca7755d0f5e49540540e13;vendor/unzerdev/php-sdk/test/integration/TransactionTypes/PreAuthorizationTest.php +a95799f26594e269182ddea7e3c084b5;vendor/unzerdev/php-sdk/test/integration/TransactionTypes/CancelAfterChargeTest.php 0660a6710e59ae9cfbd61be984ba6543;vendor/unzerdev/php-sdk/test/integration/TransactionTypes/CancelAfterAuthorizationTest.php +40893d16f3c3cda0d1d4dc10ecce933b;vendor/unzerdev/php-sdk/test/integration/TransactionTypes/CancelTest.php 2f64cf368a9b25f7a40300359aa69087;vendor/unzerdev/php-sdk/test/integration/TransactionTypes/ChargeTest.php -8a45065fd09d3e9c230fec75308d6656;vendor/unzerdev/php-sdk/test/integration/ApplepayAdapterTest.php -cc55344a57936d40df02f7b04fee3760;vendor/unzerdev/php-sdk/test/integration/RecurringPaymentTest.php +a82ed165d0b3ee08c60f73be0a3cdea2;vendor/unzerdev/php-sdk/test/integration/TransactionTypes/AuthorizationTest.php +d7a1322927ca7755d0f5e49540540e13;vendor/unzerdev/php-sdk/test/integration/TransactionTypes/PreAuthorizationTest.php ec49c19bbe0ac1c76444f14a39ce91f3;vendor/unzerdev/php-sdk/test/integration/WebhookTest.php -40d75f3e330e339861e8b05bee0155d6;vendor/unzerdev/php-sdk/test/integration/SetMetadataTest.php -bf138b467e6d2731b0aca2e66092b50d;vendor/unzerdev/php-sdk/test/integration/Resources/LinkpayV2Test.php -2f61e94cd276a0e8134f180240b394c5;vendor/unzerdev/php-sdk/test/integration/Resources/BasketTest.php +c05be2f170488399917d1163f7b320e2;vendor/unzerdev/php-sdk/test/integration/Resources/BasketV2Test.php 85c232a1b8a7ef9ddb25ff8486d58f97;vendor/unzerdev/php-sdk/test/integration/Resources/KeypairTest.php +ee8dd89cf6b958dfb375a12de69d585a;vendor/unzerdev/php-sdk/test/integration/Resources/BasketV3Test.php +281b8567daa5fb185052501ea191bdac;vendor/unzerdev/php-sdk/test/integration/Resources/AuthTokenTest.php c316f310519ecb2042832a8c9b1ceb45;vendor/unzerdev/php-sdk/test/integration/Resources/CustomerTest.php +a66a6f07314de8a6963cf0dc6546d49a;vendor/unzerdev/php-sdk/test/integration/Resources/LinkpayV2Test.php +944338aacaf487be6f86c66e720ffc3d;vendor/unzerdev/php-sdk/test/integration/Resources/PaypageV2Test.php +939f400632308f5bc47403c704c74dfb;vendor/unzerdev/php-sdk/test/integration/Resources/CustomerV2Test.php 1d3f9ae6c57d57fff67ad8e665a48fe6;vendor/unzerdev/php-sdk/test/integration/Resources/ConfigTest.php -c54043c61762d58d122029ba321e2791;vendor/unzerdev/php-sdk/test/integration/Resources/PaypageV2Test.php -810bded21e7931fcd421332b56e0ac35;vendor/unzerdev/php-sdk/test/integration/Resources/BasketV2Test.php -281b8567daa5fb185052501ea191bdac;vendor/unzerdev/php-sdk/test/integration/Resources/AuthTokenTest.php -f10a54b8a5e79e1986be44f2cf90032c;vendor/unzerdev/php-sdk/test/integration/DummyResource.php +2f61e94cd276a0e8134f180240b394c5;vendor/unzerdev/php-sdk/test/integration/Resources/BasketTest.php +cc55344a57936d40df02f7b04fee3760;vendor/unzerdev/php-sdk/test/integration/RecurringPaymentTest.php +e7feed1a254e5333b1a8469750dd8a55;vendor/unzerdev/php-sdk/test/integration/PaymentTypes/InvoiceTest.php +e2f0c2ad81537efe30f3b980b839edc8;vendor/unzerdev/php-sdk/test/integration/PaymentTypes/BancontactTest.php +60d3d5e29202eca1be8c96e132bb89c7;vendor/unzerdev/php-sdk/test/integration/PaymentTypes/InstallmentSecuredTest.php +7deb4ee9c55a9be13c6bed69099756b6;vendor/unzerdev/php-sdk/test/integration/PaymentTypes/WeroTest.php +ce36b22f68ea27e9060e4a51a71936a1;vendor/unzerdev/php-sdk/test/integration/PaymentTypes/PaylaterDirectDebitTest.php +47d8db22481353a28ebc8b86fb2f0270;vendor/unzerdev/php-sdk/test/integration/PaymentTypes/PaypalTest.php +1172ad9384eff8055a0b0b4bf6befa74;vendor/unzerdev/php-sdk/test/integration/PaymentTypes/PaypageTest.php +d86edb8e8a771902b0f0a5cc027a8c24;vendor/unzerdev/php-sdk/test/integration/PaymentTypes/AlipayTest.php +d5bd5b607c5da56c61dda951a1c1faa8;vendor/unzerdev/php-sdk/test/integration/PaymentTypes/KlarnaTest.php +4100075bdef99a5493886f3cd071bab1;vendor/unzerdev/php-sdk/test/integration/PaymentTypes/PrepaymentTest.php +3df540dde80d7f2872b6166f06f552cc;vendor/unzerdev/php-sdk/test/integration/PaymentTypes/ClickToPayTest.php +8b2be94c21b7588fa168c0c7ec47dedd;vendor/unzerdev/php-sdk/test/integration/PaymentTypes/InvoiceSecuredTest.php +c7b76e5bb76f092d28414526cff6296f;vendor/unzerdev/php-sdk/test/integration/PaymentTypes/CardTest.php +4753951f6fcc705b59b2dc0b55157c70;vendor/unzerdev/php-sdk/test/integration/PaymentTypes/PaylaterInstallmentTest.php +68e14fbe9ec515539fc605fe7f0301c5;vendor/unzerdev/php-sdk/test/integration/PaymentTypes/HirePurchaseTest.php +c313889561db37bb58b1e12f8e5a2d5c;vendor/unzerdev/php-sdk/test/integration/PaymentTypes/PostFinanceEfinanceTest.php +e05854b48b714df0bdc0cf23f4933e39;vendor/unzerdev/php-sdk/test/integration/PaymentTypes/Przelewy24Test.php +c579a34b18cb399d3dc245510033ae4f;vendor/unzerdev/php-sdk/test/integration/PaymentTypes/GiropayTest.php +3e33484f5d4a6ceeee0e9e2fdcf33f6e;vendor/unzerdev/php-sdk/test/integration/PaymentTypes/OpenBankingTest.php +32f07cd5dd649448e750cfeb87b3a115;vendor/unzerdev/php-sdk/test/integration/PaymentTypes/SepaDirectDebitTest.php +c56b45988630951dcfc0c8a69fe46983;vendor/unzerdev/php-sdk/test/integration/PaymentTypes/SepaDirectDebitSecuredTest.php +ff882a5902f3f2c45b4a711c673b2d1c;vendor/unzerdev/php-sdk/test/integration/PaymentTypes/EPSTest.php +638bdf6131a384b6c71ef74a237f5009;vendor/unzerdev/php-sdk/test/integration/PaymentTypes/PayUTest.php +93d22c69af95bb02bffcacd22153e3d3;vendor/unzerdev/php-sdk/test/integration/PaymentTypes/IdealTest.php +005c48bc4c921b4a2b695e2f8310c451;vendor/unzerdev/php-sdk/test/integration/PaymentTypes/InvoiceGuaranteedTest.php +be8d81d889f66425c9b3df8aaa308aab;vendor/unzerdev/php-sdk/test/integration/PaymentTypes/TwintTest.php +2abe3f5b7ec5516c405ba65484fbf354;vendor/unzerdev/php-sdk/test/integration/PaymentTypes/PaylaterInvoiceTest.php +14a544b8438c3ed62ebdfe2f5523eb26;vendor/unzerdev/php-sdk/test/integration/PaymentTypes/SofortTest.php +7ed7be9352cee1e99ac581d75203062a;vendor/unzerdev/php-sdk/test/integration/PaymentTypes/ApplepayTest.php +96e5f5e9589caac8708a8d9245ec136f;vendor/unzerdev/php-sdk/test/integration/PaymentTypes/GooglePayTest.php +5e421139755d576e650a37361892044b;vendor/unzerdev/php-sdk/test/integration/PaymentTypes/PISTest.php +188732747962e47cc11d1fd088bed3cc;vendor/unzerdev/php-sdk/test/integration/PaymentTypes/PostFinanceCardTest.php +4d0568fc244daf8c175c51843823a24d;vendor/unzerdev/php-sdk/test/integration/PaymentTypes/WechatpayTest.php b5cd4812669a03576f47293ff8c93208;vendor/unzerdev/php-sdk/test/integration/ExceptionTest.php +30f2e8cb9ff544ae1b23029783424b16;vendor/unzerdev/php-sdk/test/TestDebugHandler.php +f8f15b6e3f16a292aec754dd2f758ae7;vendor/unzerdev/php-sdk/test/Helper/TestEnvironmentService.php 7e38b5a3118a4d3c48875bdd5951e9f1;vendor/unzerdev/php-sdk/test/Fixtures/DummyPaypageResource.php -dd56c7e88804f2352c1dcdd889e024e3;vendor/unzerdev/php-sdk/test/Fixtures/jsonData/googlePay/createRequest.json -d41d8cd98f00b204e9800998ecf8427e;vendor/unzerdev/php-sdk/test/Fixtures/jsonData/googlePay/googlepayToken.json +f3f5137c2d3e4e8e67a64cd049628d4f;vendor/unzerdev/php-sdk/test/Fixtures/CustomerFixtureTrait.php +a345f9cd02ebbed4a0389b6e7f0e3423;vendor/unzerdev/php-sdk/test/Fixtures/jsonData/paymentWithMultipleChargebacks.json +a8441a121efba5227555da6e57398674;vendor/unzerdev/php-sdk/test/Fixtures/jsonData/sofortResponseWithIban.json bc03ca4a157c1385fbb2beb0479866db;vendor/unzerdev/php-sdk/test/Fixtures/jsonData/googlePay/fetchResponse.json +d41d8cd98f00b204e9800998ecf8427e;vendor/unzerdev/php-sdk/test/Fixtures/jsonData/googlePay/googlepayToken.json +dd56c7e88804f2352c1dcdd889e024e3;vendor/unzerdev/php-sdk/test/Fixtures/jsonData/googlePay/createRequest.json 0b13de4b63f5cbcc258f65201874860d;vendor/unzerdev/php-sdk/test/Fixtures/jsonData/paymentWithDirectChargeback.json -a345f9cd02ebbed4a0389b6e7f0e3423;vendor/unzerdev/php-sdk/test/Fixtures/jsonData/paymentWithMultipleChargebacks.json -479257fe263661437ba83428b5eacea4;vendor/unzerdev/php-sdk/test/Fixtures/jsonData/paylaterPlansResponse.json -ac2e9e419384b726bad7428cc133ef96;vendor/unzerdev/php-sdk/test/Fixtures/jsonData/openBanking/createRequest.json 76a1641ff2bef335125ca6d8e38e4565;vendor/unzerdev/php-sdk/test/Fixtures/jsonData/openBanking/fetchResponse.json -a8441a121efba5227555da6e57398674;vendor/unzerdev/php-sdk/test/Fixtures/jsonData/sofortResponseWithIban.json +ac2e9e419384b726bad7428cc133ef96;vendor/unzerdev/php-sdk/test/Fixtures/jsonData/openBanking/createRequest.json b0833d74dd2e9cf65ef75fb25be5d638;vendor/unzerdev/php-sdk/test/Fixtures/jsonData/chargeback.json -d8d2ff76607f6fa78edab721ebd3d30d;vendor/unzerdev/php-sdk/test/Fixtures/jsonData/clicktopay/createRequest.json +479257fe263661437ba83428b5eacea4;vendor/unzerdev/php-sdk/test/Fixtures/jsonData/paylaterPlansResponse.json 5d8230cbfdfba058282fb1dbfbb1671c;vendor/unzerdev/php-sdk/test/Fixtures/jsonData/clicktopay/fetchResponse.json +d8d2ff76607f6fa78edab721ebd3d30d;vendor/unzerdev/php-sdk/test/Fixtures/jsonData/clicktopay/createRequest.json f099aeeaaa60c81b21631f15fcd71b06;vendor/unzerdev/php-sdk/test/Fixtures/jsonData/paypage/getResponse.json 9a931127b2eae3c3b8a56a27c6c63570;vendor/unzerdev/php-sdk/test/Fixtures/JsonProvider.php -f3f5137c2d3e4e8e67a64cd049628d4f;vendor/unzerdev/php-sdk/test/Fixtures/CustomerFixtureTrait.php -05d3fb1c1ed6fd901c90b7b6a3dcd4a5;vendor/unzerdev/php-sdk/test/BasePaymentTest.php -89ebe697baeeb27174bdca3648ef1f3f;vendor/unzerdev/php-sdk/phpunit.xml -2a835730131c1caf9963f59289b389bb;vendor/unzerdev/php-sdk/unzer_logo.svg -86d3f3a95c324c9479bd8986968f4327;vendor/unzerdev/php-sdk/LICENSE -82e474803328bb1afbfaf2b535683353;vendor/unzerdev/php-sdk/README.md -4b4c74a4a3408a1fdd1a24092b436037;vendor/paragonie/constant_time_encoding/composer.json -8ef32f214fafd313ef1bd698e18981fa;vendor/paragonie/constant_time_encoding/src/Encoding.php -a263605a07963ec9baf31e5c44be716e;vendor/paragonie/constant_time_encoding/src/RFC4648.php -e61f8952e15e26765bd1f9ccada507d2;vendor/paragonie/constant_time_encoding/src/Base64UrlSafe.php -204b8f234a2b5e219a229970ab000551;vendor/paragonie/constant_time_encoding/src/Base64DotSlash.php -b60e098e49449cd584fcf9a9d758588a;vendor/paragonie/constant_time_encoding/src/EncoderInterface.php -dc2c9d45e0d5c83548de6b5bd5551265;vendor/paragonie/constant_time_encoding/src/Base32Hex.php -582e3553b50b491f524ab6826454aa49;vendor/paragonie/constant_time_encoding/src/Base32.php -e61596a54de1eb767d2c21f6a97feb2c;vendor/paragonie/constant_time_encoding/src/Hex.php -a1b2639f5038f75a2dbbb0a3dcf30fee;vendor/paragonie/constant_time_encoding/src/Base64DotSlashOrdered.php -4f5eec2a49dc48ca28a6202426780669;vendor/paragonie/constant_time_encoding/src/Binary.php -892a130c20b6f3825113ad18b1910d4b;vendor/paragonie/constant_time_encoding/src/Base64.php -7d6c7f3dd70c24f9542a3b5585f90e3e;vendor/paragonie/constant_time_encoding/LICENSE.txt -e59c9475cc52f37643e31569efba9c23;vendor/paragonie/constant_time_encoding/README.md +fe7e73d44aee61689e1a087f1ff27732;vendor/unzerdev/php-sdk/test/bootstrap.php +e774a6ac03dc87705a34dd6d7f3c12a5;vendor/unzerdev/php-sdk/.github/workflows/release.yml +0799824a1dc8b58b5b2386c1908c5384;vendor/unzerdev/php-sdk/.github/workflows/security-scan.yaml +fcaa877ac215df25e0d42b84944bebfb;vendor/unzerdev/php-sdk/.github/workflows/test-group.yml +d51675285e38b187ec6501184c62e639;vendor/unzerdev/php-sdk/.github/workflows/validate-pull-request.yaml +46d029825edf473241d92ecac3c3c99f;vendor/unzerdev/php-sdk/.github/workflows/pre-release.yml +334bdebaaac275bb9e6d71b7fec6ffd6;vendor/unzerdev/php-sdk/.github/workflows/integration-tests.yml +fa04e71dfaaf414b6cfb5346dfa90dbe;vendor/unzerdev/php-sdk/.github/workflows/unit-tests.yml +285a85e6e41f2280105391b2c2eb419a;vendor/unzerdev/php-sdk/.github/CODEOWNERS +dd08d7ce34d93812b90e0c83b0830e8e;vendor/phpseclib/phpseclib/composer.json +7c4783c1028e43311e7cf8b23c24e04d;vendor/phpseclib/phpseclib/README.md +af7368297e479652e6ef808a77702c02;vendor/phpseclib/phpseclib/LICENSE +280193e7acc99cbd28d43ebacd2fd641;vendor/phpseclib/phpseclib/BACKERS.md +1fb9bc73e302ba9f215d86d67b3b5d73;vendor/phpseclib/phpseclib/phpseclib/Math/Common/FiniteField/Integer.php +8e0f3772662114a3962313d5db474e6e;vendor/phpseclib/phpseclib/phpseclib/Math/Common/FiniteField.php +042e8e610407b41b8a04e2872dedccbb;vendor/phpseclib/phpseclib/phpseclib/Math/BinaryField/Integer.php +27a3600691f0e2400666f35457325271;vendor/phpseclib/phpseclib/phpseclib/Math/PrimeField/Integer.php +a719268e25333c08ad7353a381b3eeef;vendor/phpseclib/phpseclib/phpseclib/Math/BinaryField.php +341e8c48aa21fd0595325e36d280b026;vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/GMP/DefaultEngine.php +d8f32f01017420777ca33c5ab42d198d;vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/PHP/Reductions/Classic.php +174222e4a04798b30ef20e223a16bcc8;vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/PHP/Reductions/EvalBarrett.php +3b424c43f0e14d4b955bf9f0a6ad0925;vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/PHP/Reductions/Montgomery.php +767cf0757238eaeb02752a08d5a1cb5d;vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/PHP/Reductions/PowerOfTwo.php +0165b2f1b85109d06cdd7a1c197d202e;vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/PHP/Reductions/MontgomeryMult.php +908a73468558bf517e153841975dc2c1;vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/PHP/Reductions/Barrett.php +494a5e2707ba8f688f4b566f9a24cbd7;vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/PHP/OpenSSL.php +b0bdb15defb90d6831c4fe93304b77f2;vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/PHP/DefaultEngine.php +d47eb0d3141be93cd6922acb835490cd;vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/PHP/Base.php +4cbcdafb51c872cba4056acc5f6eac8b;vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/PHP/Montgomery.php +6332016312d1d3953c80fb455f58f408;vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/Engine.php +49b1796260911082f7161693e98f85dd;vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/BCMath/BuiltIn.php +1c15632b86b84f479562355f5bd64508;vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/BCMath/Reductions/EvalBarrett.php +c9d1fa5d368cb1c02419385af1f53682;vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/BCMath/Reductions/Barrett.php +ff90ba3a9f0c50437fb28123c299f54b;vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/BCMath/OpenSSL.php +015ff4bbf9f1f1a7ff93ce629d26e526;vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/BCMath/DefaultEngine.php +069ab262e56cb04c8e98f984990c0c33;vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/BCMath/Base.php +e631a19bb6a96bdc18adf2403a2d56eb;vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/BCMath.php +cbd9ba4467f0da947945995a321edd21;vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/OpenSSL.php +0aa26e7824ba2a16a70c86b75c841457;vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/GMP.php +f7b341f7c554b4e54f171e2422fa8b5e;vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/PHP64.php +cd487f310c02e392196943e546884f8e;vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/PHP32.php +4c97fb94f7ece153860c64e23ab23a4c;vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/PHP.php +62f752aa06fad549c4d1cb42f867615e;vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger.php +36512abd6cdfe352f637cb76498735b8;vendor/phpseclib/phpseclib/phpseclib/Math/PrimeField.php +198e01f56568a15f8974b3a6b6f0ccd9;vendor/phpseclib/phpseclib/phpseclib/Net/SFTP.php +c539ce0c2ace26e54f815dc528ad2d11;vendor/phpseclib/phpseclib/phpseclib/Net/SFTP/Stream.php +94ee2a235b1662100d5a2304d8996ebf;vendor/phpseclib/phpseclib/phpseclib/Net/SSH2.php +e210be3ac52737cd128b7b3a06b01eb5;vendor/phpseclib/phpseclib/phpseclib/Common/Functions/Strings.php +0c054287acdbdda2d6244fc5ade26b95;vendor/phpseclib/phpseclib/phpseclib/System/SSH/Common/Traits/ReadBytes.php +36cc261390c51c0fa66f632955b0dab9;vendor/phpseclib/phpseclib/phpseclib/System/SSH/Agent.php +41b9b94bdfd534ab6ebfb7d0bf8a549a;vendor/phpseclib/phpseclib/phpseclib/System/SSH/Agent/Identity.php +61bbb04b8162a956e98bb7ccc1fe0586;vendor/phpseclib/phpseclib/phpseclib/File/X509.php +018bd58600c2545f967ada149fdc68ca;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/PolicyMappings.php +166dfc573923b7344b378c9206e740e3;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/EncryptedPrivateKeyInfo.php +13d1f23144be3bc417b9bd3be4fc2e49;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/PublicKeyAndChallenge.php +4c2316cd41eb4ffab5ed7143cc80d29a;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/OrganizationalUnitNames.php +f148409b7c74951de6c4dfe31c6bae1a;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/DSAParams.php +544271d1b29585b3cb2c66e113f2b525;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/PBES2params.php +6e0073677464bdba73e44979e5ca2bfd;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/netscape_comment.php +2524176ed4c7b37f5ed00fc88d3d6cd1;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/AttributeValue.php +ff28b293ab3622864bca7d7fae32adc5;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/Extensions.php +d22516b4a40ec9b784326b634deeb773;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/RSASSA_PSS_params.php +d5b73495787cb21456000f0ef716be5f;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/HashAlgorithm.php +8d70f23f39f2f3490cef398b643e5179;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/FieldElement.php +46575fba05d601c423b578a885576f7d;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/RSAPrivateKey.php +e124e64fcfc3edd8b9d48630d5c1e6b4;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/netscape_cert_type.php +b720f10d223e2897692823f96ada6cfe;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/Name.php +4e480bb631091cb13c645d1e39c52a6b;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/Attribute.php +4b08ba3bf0ffbd1efb1d9ec848dc5760;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/PBEParameter.php +737b8e5362304d99643089716e087e20;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/DSAPrivateKey.php +4cc35583e03f4228111c0677ec85cb9d;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/CPSuri.php +b92efe0ec5205532068e18570da2e538;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/SubjectAltName.php +cc705ea2116dddcccd59c0fd592a00f3;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/Pentanomial.php +12a592410efd7d2e4a2f25ee85bac965;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/AuthorityInfoAccessSyntax.php +1a5677476394cdef8d890ad22be77e3d;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/UniqueIdentifier.php +df2143e35916b93dc55e50c87dac814c;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/BuiltInStandardAttributes.php +092b154b77c1e9b80406d6599eac8424;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/TBSCertificate.php +6334885e2dddd36c0a9742602de292cd;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/PolicyQualifierInfo.php +d8e31637cf477a1a8af71a6cc5f30ec6;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/NoticeReference.php +0db88bcd574c715daac30f4cb028f6d2;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/DigestInfo.php +bb997d92c99354c6b0996f7c8d9a7950;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/Trinomial.php +02a9fd91fbe9461af26579c24c54d751;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/ECParameters.php +4e6b480609b060c84575c3370be444e2;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/Extension.php +34056973bd648a244aaede99be4a1781;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/CRLReason.php +0fc7102dc15ea0c19227c02fdf000d64;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/OrganizationName.php +598276c649c38285f6e33c1fcf1d7ffe;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/PolicyInformation.php +486073be0641fabe2390132cd916ab6c;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/RSAPublicKey.php +55c95352c8fb4886fa3ed65c9ec6a7d8;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/EDIPartyName.php +45394f96ae7ab7941e7e28ae0d1ea117;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/DssSigValue.php +d5015f0e51482fbc08b01281b1ed8b67;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/NetworkAddress.php +c17c93631098968e8546448d5dcd285e;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/PrivateKeyInfo.php +da1993023e9ced50784a9728d13cc137;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/AdministrationDomainName.php +3f17f1fe26b4f61cad378f1ac928da0e;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/CertificateList.php +7a9daece61f228b192fa32ce3b9c635d;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/PolicyQualifierId.php +20983528c5bcb7605e57f9ffa2c612e1;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/HoldInstructionCode.php +c2add47fcbb7bb81dd904917b9bc2db5;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/PrivateKey.php +b2accf0fead91437af70dfed36b84b37;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/ExtKeyUsageSyntax.php +c5636595684c29859197d89c2f8acd38;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/PrivateKeyUsagePeriod.php +a730a5f5efcaaaa52bc19d2419112a15;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/ECPoint.php +8c6967130b0428d84e982a3e6b99b332;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/Certificate.php +caa6b08aa97b7bc1f8c3355c8e0646f7;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/AttributeTypeAndValue.php +4b557d18240b86b3c2cec7447b3a5194;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/TBSCertList.php +7397a698de460e96dba26b0c7d6432e8;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/EcdsaSigValue.php +3a497e1c34ed7a69f1b7bc87f6c3b61a;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/CRLDistributionPoints.php +0f5d06805a5251427323605150a3e36b;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/AttributeType.php +f81cf8651a34662be8f91fe1e819d564;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/CertificateIssuer.php +8da951d3513cc52569a85884e7b958b8;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/Validity.php +01f2574bc5b71ca1e18f45ab25c557db;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/Attributes.php +1b2257efda1e3fc29522aeafa12b29f6;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/Prime_p.php +aaa623fe6adda5c9a1152c6c1f30f366;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/NameConstraints.php +f27a741f4b0202e968cbc5429cfd1d3b;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/DisplayText.php +69b263152ed30995659f98a6b203dbaf;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/CRLNumber.php +552d4c5f4d8ea3e84bf791c24a406821;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/RelativeDistinguishedName.php +ec3048ba05f543672fe10499b5a978d0;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/ECPrivateKey.php +14b78d9e273bfc39385afb65e9355f4b;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/PublicKey.php +fbfef4de6fa2670fff8b558d854012ff;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/CertificationRequest.php +c3465d3d54648ccbac2941c6cf30a5e7;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/ExtensionAttributes.php +14d23be22014a34690cd7b677fea089e;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/NumericUserIdentifier.php +f6750ac4c79a8d1ef3b6c7df5a4e31b9;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/PKCS9String.php +038dbedb444218ebd27ba3a1dab22741;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/BasicConstraints.php +dd94a9bd457caa1a7c414a299d8ca58d;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/ReasonFlags.php +06bcd53b348630f61cf655eb74f0543f;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/AuthorityKeyIdentifier.php +f1560db645e1404815c8ac3ced9e06ae;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/EncryptedData.php +eaa517251d762963358c55bda2d9a53e;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/DirectoryString.php +730d71ae48811a00a6aa4028e72a924f;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/SpecifiedECDomain.php +2b320233cd91cc500f36a721dfba572b;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/RevokedCertificate.php +d1bd2cced01e6b7e7ca3792657f2e3de;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/PrivateDomainName.php +61ca45ae815d87f452d548984999919f;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/OneAsymmetricKey.php +db8966ae3fe9ce8daf71c85f93156430;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/GeneralSubtree.php +0b3110ccfe3d413412e7351686f17928;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/PBKDF2params.php +41807fce28350e6833cc70544a347998;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/CertificatePolicies.php +7f94cc64bfdb5afbdd863bf6dc13f9c9;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/AnotherName.php +9e74bec23c36f42a5405b8f062478e21;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/BuiltInDomainDefinedAttribute.php +a9b6181694e7da3dd5a178f41139bca9;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/KeyUsage.php +06f9406651d642326f5d1f3e0861bb9b;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/PostalAddress.php +df39e6a018bc274ecc09f25b31d97446;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/BaseDistance.php +79f7a32bc575189a7598d6bc06e2da27;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/DSAPublicKey.php +fe8a2c96df5e0cf225719a3a294d29e3;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/TerminalIdentifier.php +59d50d2dbc9b7c167e5d5b0aa4ebb1d8;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/PBMAC1params.php +8b5f3e6094ad69bcf27e3283e7162ebf;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/DistributionPoint.php +d7e9e0859e14bb9dda574364d45297f2;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/KeyPurposeId.php +6130b35112bbbfea8f893a44a9deacc5;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/MaskGenAlgorithm.php +8f1fcde461fc26c01de460e0d92d2daa;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/CertificateSerialNumber.php +3c181aba31ab92fa2c3194bb706087fd;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/DHParameter.php +bd8fbbf8091246fc42b0895be9f6d86d;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/FieldID.php +c3be8b7ac5b69d9aadf0f06d120614f1;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/SignedPublicKeyAndChallenge.php +79ee6ecd46fdb72f77b3cc1e0d8fdfdc;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/IssuingDistributionPoint.php +f2c29db9a81dd9fbefde1aa21d36c531;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/DistributionPointName.php +4f0962ccb6098cd124649ef8626ea594;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/SubjectPublicKeyInfo.php +44a23b7563e4ba1f17fa76350ba27752;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/GeneralNames.php +4eb03a107377e96cc1c6a8bdae1a0306;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/GeneralName.php +3aebecbe97d0928a6b7c2d30a8e9a539;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/SubjectInfoAccessSyntax.php +24e0d5620d3fdf876a1c9653b9d74229;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/CertificationRequestInfo.php +17151c82540d68f113d0d902920dd97f;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/KeyIdentifier.php +51f04927004170da330d20d3c74e3437;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/CertPolicyId.php +d155ea666da601f140d6f934328441a7;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/IssuerAltName.php +0ed7e0943935fc1805bbd938490a390a;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/OtherPrimeInfo.php +054e04b127f11b286405a83a65ec5dca;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/Curve.php +580587eda7fe2f41047238949bc6e05f;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/GeneralSubtrees.php +0f209f3cef3d78eeaf52710d2cf3c01f;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/ExtensionAttribute.php +dfa8b2acb19fddcf861319dce103ae43;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/netscape_ca_policy_url.php +0b3866b3e071f81f9e73dffe955374d1;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/AccessDescription.php +b66027e585838293eb34d1528d6cc719;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/CountryName.php +aebe0974a2406e1b341b13c8f251fcfb;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/InvalidityDate.php +32c6794acb00cc37b07253db2fb0d4db;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/SubjectDirectoryAttributes.php +325d537e0f46ce4e95f44c23f4df51bb;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/UserNotice.php +973075b722cd406311a3846b74fbfece;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/AlgorithmIdentifier.php +6b00dddf399d8f4548984a5f17dbed1c;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/PublicKeyInfo.php +94ee316d5529f2806ea3c6fc4fff7008;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/OtherPrimeInfos.php +fb74c697dcd01e62cd59d408d99d88b5;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/PersonalName.php +46e70358c1bfa408b937f209e5d914a6;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/Time.php +e903157db0864e0e9d0eb218fe7cee40;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/Characteristic_two.php +27d714c9c4171bf0f0394702dc94324d;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/RDNSequence.php +1d88fbf48a13d2772c0ed794c5d70901;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/RC2CBCParameter.php +50b17702d1d1fe9e6fa58dd08b8268c1;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/BuiltInDomainDefinedAttributes.php +3f7317e790640697bfb4bf94a90ab5af;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Maps/ORAddress.php +64c983e5d1708fe24f8846e2ebbec7ed;vendor/phpseclib/phpseclib/phpseclib/File/ASN1/Element.php +be01c1e368e54acfcae749bb5adbec11;vendor/phpseclib/phpseclib/phpseclib/File/ANSI.php +bb23f25797936751ad5a0bafbca14e72;vendor/phpseclib/phpseclib/phpseclib/File/ASN1.php +f4c5e01e7cb2909f26413f789ed81397;vendor/phpseclib/phpseclib/phpseclib/Exception/UnsupportedAlgorithmException.php +e1e2e5e0b7e8cc03abe3ff1acabd24a3;vendor/phpseclib/phpseclib/phpseclib/Exception/UnsupportedCurveException.php +fb3bcd58ba318d74117a7c3e05edc63b;vendor/phpseclib/phpseclib/phpseclib/Exception/ConnectionClosedException.php +c794ec901f93e22fafcca89bba0af9fa;vendor/phpseclib/phpseclib/phpseclib/Exception/FileNotFoundException.php +49c6c1bac9cae29501299c78431adc3f;vendor/phpseclib/phpseclib/phpseclib/Exception/NoSupportedAlgorithmsException.php +16fede9bcb481f3672ebd0f589e3b1d5;vendor/phpseclib/phpseclib/phpseclib/Exception/InconsistentSetupException.php +272755d560cdec9f3b967cebe533b36d;vendor/phpseclib/phpseclib/phpseclib/Exception/UnsupportedFormatException.php +09f09eda418a4efb796417e66febbb7d;vendor/phpseclib/phpseclib/phpseclib/Exception/BadDecryptionException.php +2e59658ef3494ba5e506d615e3ae2cf3;vendor/phpseclib/phpseclib/phpseclib/Exception/BadModeException.php +968f465458abbc8565b5ea43b22021a2;vendor/phpseclib/phpseclib/phpseclib/Exception/InvalidPacketLengthException.php +908d914dd59d848f51b6ef1277e1257b;vendor/phpseclib/phpseclib/phpseclib/Exception/NoKeyLoadedException.php +cf8e7671e5079a6774c35202ae5ff4b4;vendor/phpseclib/phpseclib/phpseclib/Exception/UnableToConnectException.php +1acfeaf7aaedb9015059615b31774d57;vendor/phpseclib/phpseclib/phpseclib/Exception/TimeoutException.php +0b7d8e736a24ddedf5ed00d3484c8975;vendor/phpseclib/phpseclib/phpseclib/Exception/UnsupportedOperationException.php +6601a8131d3fa88b4f1ecf2ae6f9a08b;vendor/phpseclib/phpseclib/phpseclib/Exception/InsufficientSetupException.php +87189e47473849d93fabe1d4fd321afb;vendor/phpseclib/phpseclib/phpseclib/Exception/BadConfigurationException.php +08f1c224f83cb895ccfcbf19fb533d77;vendor/phpseclib/phpseclib/phpseclib/Crypt/Rijndael.php +83ca72d0fc0877c6b83d4ef9012c081b;vendor/phpseclib/phpseclib/phpseclib/Crypt/DH.php +63ad81d212055e6f7cb2a7b4fd3dec45;vendor/phpseclib/phpseclib/phpseclib/Crypt/TripleDES.php +94de83bbcb9b5dc37a31dc88601f2a61;vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA.php +a8f255a935d49125b9b5fd2203acadef;vendor/phpseclib/phpseclib/phpseclib/Crypt/ChaCha20.php +bf244e3a321ca4b5ff3a7fd6124d890f;vendor/phpseclib/phpseclib/phpseclib/Crypt/DH/Parameters.php +543a0fad2f9537141cf01ea1e20bea7f;vendor/phpseclib/phpseclib/phpseclib/Crypt/DH/Formats/Keys/PKCS8.php +a65e06350f5c66ead4851267d6fe8691;vendor/phpseclib/phpseclib/phpseclib/Crypt/DH/Formats/Keys/PKCS1.php +9088f575e0a162a7ea204b0096ba203d;vendor/phpseclib/phpseclib/phpseclib/Crypt/DH/PrivateKey.php +69f80949b9a90d0cc5e0cf85a3cc6410;vendor/phpseclib/phpseclib/phpseclib/Crypt/DH/PublicKey.php +9413e5062c393230ba5864b0e0c8c846;vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/AsymmetricKey.php +fd01c80ae620ff944ad224694f7929a1;vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/Formats/Signature/Raw.php +e2a29c354145d8d4a02f7fd90a9a51ec;vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/Formats/Keys/PKCS.php +28c57580625b4396514c8b6fd6afda6a;vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/Formats/Keys/PuTTY.php +1cd0dcbf16bd2e409de781bada186d38;vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/Formats/Keys/JWK.php +dec9bf7e379ae4691a569535e30d2a2a;vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/Formats/Keys/OpenSSH.php +00a43339931458efdcf9b0f35aca57b8;vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/Formats/Keys/PKCS8.php +fec521301d5d0c69fc1e507c13443437;vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/Formats/Keys/PKCS1.php +8e36169ff0be06f0fde8dcdaec6631ec;vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/PrivateKey.php +0ce1b5e4f8296fd1de88185604288aee;vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/BlockCipher.php +be5ec9615271e674d660a46dab540f31;vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/PublicKey.php +448c1f9a32d7d769cc24abf4b906888f;vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/Traits/Fingerprint.php +13e51444d2a368f6f325cd1bc9daa75c;vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/Traits/PasswordProtected.php +cdf03f8e50e4baf4dde4d86f80b8cf08;vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/StreamCipher.php +365e89f10135eb4e3f448e37418a7778;vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/SymmetricKey.php +3fdd8c95b7cffb0e9985d338090b2ba0;vendor/phpseclib/phpseclib/phpseclib/Crypt/AES.php +2523c7f8b512e8cbf08806f4afcd33be;vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA/Formats/Keys/PuTTY.php +300c092291bcb0f9810bdfcb03bca8ac;vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA/Formats/Keys/JWK.php +bd1be69d327c3385d54fbb4be12a8c49;vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA/Formats/Keys/OpenSSH.php +35dd7d5ab9f357186aab27fa4b5adaec;vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA/Formats/Keys/PSS.php +5aee20c33f0c4e3152db822c0ff3ad19;vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA/Formats/Keys/XML.php +4ceeb99d0ec6988cf1e38b5677190eb0;vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA/Formats/Keys/PKCS8.php +83aeef91fc41a7d310184a2f6f3dc00a;vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA/Formats/Keys/MSBLOB.php +dce1fa9b37bace1cfea1e59fff413c07;vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA/Formats/Keys/Raw.php +e6b34e419e1f9c283afed8e127186177;vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA/Formats/Keys/PKCS1.php +573ebd3d7592f942607f0f863047a8ec;vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA/PrivateKey.php +cc9c52e18a5bdd5accd3b0342688316a;vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA/PublicKey.php +faae4fd5334a06dd045f5ea9f24c4a82;vendor/phpseclib/phpseclib/phpseclib/Crypt/DES.php +be41f929cc2e3f28ab1ced739e90dd83;vendor/phpseclib/phpseclib/phpseclib/Crypt/DSA/Parameters.php +9d94fcf7c2c31ac144ecdcf399122454;vendor/phpseclib/phpseclib/phpseclib/Crypt/DSA/Formats/Signature/Raw.php +d99fdeeb603fdfdaf88ac1ff319ee8bd;vendor/phpseclib/phpseclib/phpseclib/Crypt/DSA/Formats/Signature/SSH2.php +ba891ccf588a243c05b78c918989c58b;vendor/phpseclib/phpseclib/phpseclib/Crypt/DSA/Formats/Signature/ASN1.php +cef2fcfeacae8f8b58037115d3596960;vendor/phpseclib/phpseclib/phpseclib/Crypt/DSA/Formats/Keys/PuTTY.php +8c110f4548d8af291ef35910be41f42d;vendor/phpseclib/phpseclib/phpseclib/Crypt/DSA/Formats/Keys/OpenSSH.php +3f7cc67bf4baee83664bb5067d309790;vendor/phpseclib/phpseclib/phpseclib/Crypt/DSA/Formats/Keys/XML.php +3cb89b48d5d9cee6514ff83cfbec5c1d;vendor/phpseclib/phpseclib/phpseclib/Crypt/DSA/Formats/Keys/PKCS8.php +544d3076a0df77855ea438bd94495b05;vendor/phpseclib/phpseclib/phpseclib/Crypt/DSA/Formats/Keys/Raw.php +344f0386bf46c3a802d3c9dc77c7b71a;vendor/phpseclib/phpseclib/phpseclib/Crypt/DSA/Formats/Keys/PKCS1.php +62858ce67a39c0f860f65e1745ea7945;vendor/phpseclib/phpseclib/phpseclib/Crypt/DSA/PrivateKey.php +4d357430f1fbfa1a94da864bf86e7c7b;vendor/phpseclib/phpseclib/phpseclib/Crypt/DSA/PublicKey.php +20841644093a890e427d544bce7f0085;vendor/phpseclib/phpseclib/phpseclib/Crypt/Salsa20.php +6700600289fca3163991c7c720be22f0;vendor/phpseclib/phpseclib/phpseclib/Crypt/Twofish.php +aadf4bea69438b0df5df383db2bf7edd;vendor/phpseclib/phpseclib/phpseclib/Crypt/Hash.php +85da87aa04d087e7fd547519ce46719b;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC.php +8c0d2120d75748c1877e858264ed2eed;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Parameters.php +c15814b88489f84bc7eeafdea9559978;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Formats/Signature/IEEE.php +243a88eea5b939ace6db9da70b3ebd6f;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Formats/Signature/Raw.php +c3d6cdb76651ffbc8162f66e0efb393b;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Formats/Signature/SSH2.php +90aa80abd2437b745c92e075750d86a1;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Formats/Signature/ASN1.php +156bf91d55de89d961a6755c53e6fa9c;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Formats/Keys/libsodium.php +6e0f3ae71aa2f4211949e8396c4378b8;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Formats/Keys/PuTTY.php +9c43bd7d84ea054a996736bf1e06439c;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Formats/Keys/JWK.php +e627a2980cb53542b64b6d9a234ae083;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Formats/Keys/MontgomeryPublic.php +4cc7ff2b22efc1d251b589c270f31d82;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Formats/Keys/Common.php +80c8c62adea3c913d884a75a74d3c42b;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Formats/Keys/OpenSSH.php +3f209c71eca69afcf9f2eef5bc13eaf8;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Formats/Keys/XML.php +68746f75dd0f9511fed627f2f63c54f3;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Formats/Keys/PKCS8.php +323faab72989033c47475e558f680dc7;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Formats/Keys/PKCS1.php +0e4c5a8eaf9cc097a7c6ddf571d7eed3;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Formats/Keys/MontgomeryPrivate.php +6697227426fca966edc9500319899eac;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/PrivateKey.php +1fcd67e0de877b8e8f004478eb00eda3;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/sect283r1.php +9a15efda0ba337785d71f9969f835474;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/prime192v1.php +e948f4a79170fb2d8fb3d3d1f2349cb9;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/secp160r2.php +3542a0925fc4446ddc94cd3b097a247f;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/brainpoolP160r1.php +7654b83eff2a8e616a19ed2304c0036a;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/sect113r2.php +6a872a8bf1eb0fa8870de4d326185d36;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/nistt571.php +98b962609db730fc29aba06b8f2b7a3c;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/sect283k1.php +da7dbaade8adfdff94d3012846b40fe0;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/nistp256.php +38637eafa4a763d7769835df2136778c;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/sect163k1.php +0ef779ff43f27a189cb3bb68a5823f17;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/brainpoolP224t1.php +a4afc0f227d11b9fbe99cc28e38610f9;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/brainpoolP384r1.php +d625abf16a2d4c93f5502cef4fbeffa1;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/nistb233.php +18d55ee9124467289008c85d0d6e15ab;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/secp160k1.php +29f5f9c48a9e19eb687fb8cab325c591;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/secp224k1.php +fcdcf6d46a29e9ef30a4ad19809e2bdc;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/sect409r1.php +bbefe9f3455fbbe758ccae26f0939732;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/prime239v3.php +abf12e93c8a5744520f0ec11615a3b9f;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/brainpoolP224r1.php +639ec2735668d4fe6afa419104f1516b;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/prime256v1.php +87faeb4ff9edf6e442fb6c233d866b2c;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/secp384r1.php +1f9c07d32fe997ad6e880bb5e936c52f;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/prime192v2.php +83b7013b8de8575c6939236a866ebb66;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/nistk283.php +f7c40494abfbc18d7918089bb492a3f8;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/brainpoolP512r1.php +3bbe42422c625bd09c2654d51a6c3dac;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/brainpoolP320r1.php +420fd97c6e6395dea3c41ea63a151503;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/sect163r1.php +8f1392fd67bf9e910523c8ebd4f01ab3;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/Ed25519.php +24284308da3c26af6d6fd576feddfeea;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/sect193r1.php +f79737664973102e8272ef2c11b7e974;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/sect131r1.php +706c4f2d8efdbc0f83676ee608e56d96;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/brainpoolP384t1.php +2e808c3ad853412ea67d11dc495ba179;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/Curve448.php +f99b47e07072dbec9de6e1b9d612c129;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/nistp384.php +44b9ff1e875f430237714e3a11fa21fc;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/brainpoolP256t1.php +2982b9b3a7534834c313f10ff71e5b22;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/sect409k1.php +442b2fe179001f65ccf7143697a8ed3d;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/secp192r1.php +f6fb7890cc2d544e5d438c9e34912a16;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/nistb409.php +747fabd8969e686a8528d40258dba5de;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/sect233r1.php +8c2fe0179015ab6b00830dbc07c91b84;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/nistp521.php +8a6c11c5330fe1577428ef173accd5c6;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/Ed448.php +828a3469e1645d813668af13ce87b8d3;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/brainpoolP192t1.php +0fb2a1f09ccde2a66e805e8e2ca4df32;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/sect571k1.php +3e9a642ffccc5aba7e3b139ee02c1fa4;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/secp256k1.php +dbece4a6c174eca6fa98c08855c8a9b3;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/brainpoolP160t1.php +e99d7c70670820a38b271d734c961341;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/sect163r2.php +617693d0796bcdc00a0687b6e9a266a8;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/Curve25519.php +203955d4495b242e33d26ef526627424;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/sect571r1.php +8519adac393dd5ac2c0654ac581c86cf;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/prime239v1.php +351072838aa7a4696e8e27d517773060;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/secp256r1.php +5cae8b66c8b6c549e233d371f702af0f;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/secp521r1.php +7b666317b38a0ac7d32d86f4cb92a194;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/brainpoolP320t1.php +25b328f08529a5d4b2b7bc2021d0cdcd;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/secp224r1.php +e4f5443afa7520a442c70d0dc06897d0;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/sect239k1.php +cbc5b2ed355020727a357a93d5d67766;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/brainpoolP192r1.php +c3f1909add6aaa0b5dbae84ffc789ebc;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/brainpoolP512t1.php +5c5486d4b757d1cd512cdb9a8204ac76;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/brainpoolP256r1.php +3c309e19339b4bf23b2d0d620eb58306;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/sect113r1.php +b0f42b9383e05bee355b9836d68f84bc;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/secp192k1.php +0829218146b19bef32bf528866444b0f;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/secp160r1.php +080094920a7db400cae193fd514e0b53;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/sect131r2.php +487bc618d40e35490be1750b7fafe1a1;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/sect193r2.php +7c49e3fccf9756903be0d48302196b5e;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/secp112r2.php +209799bf9c7b6e2b9ca7037da44f9121;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/secp112r1.php +bf81a6374cd79a801400f6aae0d4cbbc;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/nistk409.php +49cd6c2342d868b57a64e81f2ef24561;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/nistk233.php +1355ede54f39a1c17438d44981f2eb88;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/nistp224.php +fde54d2b5d2cc88ef7ed182a307e9447;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/secp128r2.php +38bb16dd513e0127896e008d861e149f;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/prime239v2.php +da8225ff8f61ea4fc723aefc82368c23;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/nistk163.php +2d5cc3f9fc0c805cb7196ce21845f8b4;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/prime192v3.php +af1aafd7e929c39c243eab4db3f764a8;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/sect233k1.php +5569f64fe641f01510994081c23b724e;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/nistp192.php +75ed2679c72a374db1c411488e138fc6;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/secp128r1.php +5ef83b1b672f99a2149ff77c6de5874d;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/BaseCurves/KoblitzPrime.php +29c68aa72de6c76f39861a9654da68b7;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/BaseCurves/Prime.php +41ed9b9b949e95d36770d172501323af;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/BaseCurves/Base.php +857030d72a730339bee1d71f16e0a840;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/BaseCurves/Binary.php +3a98aff9b0e7c041d9f50a957d3d2620;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/BaseCurves/TwistedEdwards.php +d359cd5abfdd829af67316589817ec49;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/BaseCurves/Montgomery.php +fafe0bc6b12ba296e5d5fe11a4f0183c;vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/PublicKey.php +af21a780fc59992b916b419d9e40b2db;vendor/phpseclib/phpseclib/phpseclib/Crypt/Random.php +2a53b02f538e9b20e8cfe9255a1e6db7;vendor/phpseclib/phpseclib/phpseclib/Crypt/DSA.php +8edfbdc34195bbc3645b0ec19f828646;vendor/phpseclib/phpseclib/phpseclib/Crypt/Blowfish.php +daaf4a58012b688e8550ffa25ba9c8b0;vendor/phpseclib/phpseclib/phpseclib/Crypt/RC2.php +8150e3db849c87d46626a8ba78de6076;vendor/phpseclib/phpseclib/phpseclib/Crypt/RC4.php +242ed95eb90447e56daaa42c7d23ff9b;vendor/phpseclib/phpseclib/phpseclib/Crypt/PublicKeyLoader.php +b4409823562c617107907cd04d67c8fa;vendor/phpseclib/phpseclib/phpseclib/openssl.cnf +fa4bab04703bfcb560be4489526b0991;vendor/phpseclib/phpseclib/phpseclib/bootstrap.php +3012f773b400715a955cffa18c8016e0;vendor/phpseclib/phpseclib/AUTHORS +182d5924ff0b528f008a83d1f5809d02;vendor/composer/InstalledVersions.php +8dd932a7a65010dd3e49368bb2dea609;vendor/composer/platform_check.php +ab90ab9876b52e0fe15a5e5ec32e25b7;vendor/composer/autoload_files.php +955d5fe58c231244f6b49000f383b5e2;vendor/composer/LICENSE +c8b92c5114ddd48a1451674cbf3c2081;vendor/composer/installed.php +631b00271668b14aee0447e8e8947507;vendor/composer/autoload_static.php +5615b29a1f5688414d56a1515d954a91;vendor/composer/autoload_classmap.php +79512e55245b2a8b64e60c3c1d05ab0e;vendor/composer/autoload_psr4.php +224007c97efb82c7b45b0e92f240af41;vendor/composer/autoload_namespaces.php +824e49753cf879aa756c9d6fbfe0c863;vendor/composer/autoload_real.php +c02be6d96671f88d28aad3ffa134c8ae;vendor/composer/ClassLoader.php +778f43e9d652a98ae4dbbce0f4d4c81c;vendor/composer/installed.json 784efccde8a58c8491c20ef0eca6bf87;vendor/paragonie/random_compat/composer.json 4b54cbf6ccb77afb7ade42183affc554;vendor/paragonie/random_compat/lib/random.php -854df6f8851cae85add168c7a682a24a;vendor/paragonie/random_compat/psalm-autoload.php 8eb7e9dc637fb48d8bddfb470e370f42;vendor/paragonie/random_compat/build-phar.sh -938323773ab0732a3d3ce0a6f3df8493;vendor/paragonie/random_compat/other/build_phar.php -3ec788adbb0519a92243e569789cfcb9;vendor/paragonie/random_compat/dist/random_compat.phar.pubkey.asc -36dae3cf3fd10ae5093aaec29b7b5125;vendor/paragonie/random_compat/dist/random_compat.phar.pubkey 5c1048c9d62123819aa63e62e1578be6;vendor/paragonie/random_compat/LICENSE +36dae3cf3fd10ae5093aaec29b7b5125;vendor/paragonie/random_compat/dist/random_compat.phar.pubkey +3ec788adbb0519a92243e569789cfcb9;vendor/paragonie/random_compat/dist/random_compat.phar.pubkey.asc +854df6f8851cae85add168c7a682a24a;vendor/paragonie/random_compat/psalm-autoload.php 473b1cfcc838b577dc9c9e08680e6704;vendor/paragonie/random_compat/psalm.xml -367b887d4d8d95956bd7ef1abf1dffb4;README.md +938323773ab0732a3d3ce0a6f3df8493;vendor/paragonie/random_compat/other/build_phar.php +ad413ce8496cc8ade57dc006efb44ac1;vendor/paragonie/constant_time_encoding/composer.json +7d6c7f3dd70c24f9542a3b5585f90e3e;vendor/paragonie/constant_time_encoding/LICENSE.txt +e59c9475cc52f37643e31569efba9c23;vendor/paragonie/constant_time_encoding/README.md +765c1068458f5aaeb53333609af60b90;vendor/paragonie/constant_time_encoding/src/Encoding.php +98764572f4b21a52a0896cbd3d9f9864;vendor/paragonie/constant_time_encoding/src/Base64DotSlashOrdered.php +3aec084cad158b5678fee33f293535a4;vendor/paragonie/constant_time_encoding/src/Base32Hex.php +8753b69468ba7931e0cd1c8a2b143755;vendor/paragonie/constant_time_encoding/src/Base64DotSlash.php +74ac921e8603a714d3ca9b254af181ef;vendor/paragonie/constant_time_encoding/src/EncoderInterface.php +da843e4f4457b78fb3c7dc3832e5235c;vendor/paragonie/constant_time_encoding/src/Binary.php +832323858f87eb9fad6909f9dfc4f35e;vendor/paragonie/constant_time_encoding/src/Base64.php +c979337b7229f44f958eeb7ecdc43f52;vendor/paragonie/constant_time_encoding/src/RFC4648.php +70ca37cf7170c539a0d65bd2e4591b91;vendor/paragonie/constant_time_encoding/src/Base64UrlSafe.php +d74ee339a9008b6c184705dcf20536ee;vendor/paragonie/constant_time_encoding/src/Hex.php +71cf58b32ec1818382729a499503af82;vendor/paragonie/constant_time_encoding/src/Base32.php +a761dc4a6a7338866116567ae11c4368;composer.lock +0a7ea3bc84eaecb910b6cb1b6f474db5;apple-developer-merchantid-domain-association +c466bfceae7a1c850f00a4bd2c8400db;composer.json +28c2a67cf953f30927161c19c676d686;frontend/js/unzer-ui-components.js +b567a57e25a1c34331e0d0df4f6d0102;frontend/js/unzer-ui-components.min.js.map +24031a46f8a2ee9aaf19337961ad735a;frontend/js/unzer-ui-components.js.map +2445a0eb171fe7593516fea5ed9ec428;frontend/js/unzer-ui-components.min.js +13c1593de90ae1a978dff1f3f40fc272;frontend/src/js/components/applepay.js +f7d1244b78a5567f379329b383f76ffb;frontend/src/js/components/googlepay.js +d1e7bb32208035988d5734be00b5df38;frontend/src/js/components/klarna.js +d5de3c2637eb45440c212d9a0824ee18;frontend/src/js/components/index.js +10020844bd04af57fffb4cbd6c198ad9;frontend/src/js/components/base.js +15112aab51c1133c80096c05759e4008;frontend/src/js/utils/errors.js +cf44e5fa2ae44e1a9756651963bfe755;frontend/src/js/utils/debugging.js +280b9703c8fd488aebf961bd9a721cd0;frontend/sync-workflow.php +780b2b8990e8dba5534b2d1fa468c6f3;frontend/webhook.php +824c7c0e6cf814a4e52b7a45d26a657e;frontend/template/google_pay_button.tpl +3e34c443a1d94d22322bdd82673d0dd6;frontend/template/hire_purchase_direct_debit.tpl +ca79740c158847ad33410b9f2d9746c0;frontend/template/partials/_threatMetrix.tpl +b5cfea6ee2dd9b9572e3b7d07ec7b574;frontend/template/partials/change_payment.tpl +911c39040a1e67886cc82c515a47c939;frontend/template/partials/payment_info.tpl +d41d8cd98f00b204e9800998ecf8427e;frontend/template/webhook.tpl +d20c173f40be25a94bd0fa83bfc3f6fd;frontend/template/instalment_info.tpl +301773358c8ef8acee71423346b08a97;frontend/template/apple_pay_button.tpl +69e55611331387e2c73e9562b7491fe3;frontend/template/dummy.tpl +e1b9ba833fa2eae5ce86ea735f13d3ad;.babelrc +593e3e1024084fc1ee04e38a3a2e3ad7;adminmenu/js/admin.js +ef5d72b877de66653e21bf6cafd03bd5;adminmenu/js/keypairs.js +7710b3bcb89205a8fc1840d9be052fd2;adminmenu/js/ordermanagement.js +c2405627e35992f208ba7281a6490256;adminmenu/scss/admin.scss +7597a877c5a0775fbaddce1b2ab27eb8;adminmenu/css/admin.css +746bd73bf157393d5d55f4b559a8c6e5;adminmenu/css/admin.css.map +ea5a5b2dc793ab305fe96a7822ba667d;adminmenu/template/applepay.tpl +bd1dee2d300e99d194c69dfb1693075e;adminmenu/template/keypairs.tpl +0d2524e782110921f643c386fc5098f2;adminmenu/template/settings.tpl +34e0beaa04e4bef9d55c15dc6b4a1f0d;adminmenu/template/partials/_order_item.tpl +c973e777d822dfcc69c48771aee4ab72;adminmenu/template/partials/_order_detail.tpl +94692a0334d6eeefe4b4806fc5832914;adminmenu/template/partials/_includes.tpl +50329cc04d18170a2e8f086579a67366;adminmenu/template/partials/_keypair_list.tpl +e68888b6874c60a42db48e2ead9dba40;adminmenu/template/partials/_keypair_item.tpl +e0b9e6894421345360862d2571283a23;adminmenu/template/partials/_header.tpl +dad4062692dbd99b16ae3233b36ec1ec;adminmenu/template/orders.tpl +30e621c301583a4e13928bd8b9a09a9d;.jshintrc +2c62fe5947e6614a783d78e29f531d00;phpmd-ruleset.xml +d5a6f78c1d199bf994fa8340868dadc2;README.md +767ba442de91503e5b6245c2d114a5c7;src/ApplePay/CertificatesResource.php +6703c52f0190cd22bfa1f72d7930fce1;src/ApplePay/CertificationService.php +4ad80bac1bc3c0c244426c6dd6279a96;src/ApplePay/CertificateException.php +1c8b2fa06b94c2fd1fd098791cb30b60;src/ApplePay/PrivateKeysResource.php +a3255fc904b7509e171553ea009c9c82;src/ApplePay/ActivateCertificateResource.php +4ba10c90d08b3f639e188c332647e1c5;src/Payments/PaymentMethodModuleFactory.php +bc9b1a4143127ff23236afb65e788a89;src/Payments/HeidelpayApiAdapter.php +f32c6ae7116a1c23d6bdd1d594acf20c;src/Payments/HeidelpayPaymentMethod.php +85dadc4e055384cf11546247308921f5;src/Payments/Traits/PriceCurrencyConverter.php +54f0fff5386a4145ce981a2c4e24d576;src/Payments/Traits/SupportsB2B.php +d78c74c0918be9b079a8cf4655446589;src/Payments/Traits/HasState.php +c8a85612f77eb4552e34989d0d184b9a;src/Payments/Traits/HasAuthorization.php +5aefd466eee6fd9307f5a4226fc9a4ec;src/Payments/Traits/HasBasket.php +aa1212a34a1c3b4f1475e6b439603404;src/Payments/Traits/HasMetadata.php +9f5c6070edc5f2c82560e28fd47a66ac;src/Payments/Traits/CancelPaymentTransaction.php +b6caa8eb1f7c702dda9b3e0b9b038178;src/Payments/Traits/HasCustomer.php +eafbb3fd550ede774e80f963759e71ea;src/Payments/Traits/HasPayStatus.php +3edfe6c9da5790a2164bf4d22d775cab;src/Payments/Traits/HasDirectCharge.php +d5e45aaa6141dfe97e0d2e0efb8715ee;src/Payments/PaymentHandler.php +36e5aa72d873a51ef1c3bd79a32acade;src/Payments/Interfaces/HandleStepAdditionalInterface.php +ac4adca913172393fba84fda8c388a10;src/Payments/Interfaces/PaymentStatusInterface.php +b40a39212fa05718f866b4326766043c;src/Payments/Interfaces/RedirectPaymentInterface.php +5a17589c176c45aedb1879dc120fcf86;src/Payments/Interfaces/CancelableInterface.php +d98195f0c1485f6412b599b3f1581902;src/Payments/Interfaces/HasPayButton.php +04525b7293527904b5c527dd5aecbd9b;src/Payments/Interfaces/HandleStepReviewOrderInterface.php +ab1b1e5c0f257e793786fd8f49b3a9b7;src/Payments/Interfaces/NotificationInterface.php +24bea0a602bf575ea6c7d432587c4fba;src/Charges/ChargeMappingModel.php +a73ea5c19bab6939e41d81018eb6c8e4;src/Charges/ChargeHandler.php +20db0d8770933362b0b8b7fa32c18494;src/Charges/ChargeMappingEntity.php +cc1c780662e1a85826bafc4dbfef25fc;src/Controllers/Controller.php +6b557d2f5af216698fad3cbb233f211e;src/Controllers/AjaxResponse.php +f510097b40df90505b40042b0e9b0c07;src/Controllers/HasAjaxResponse.php +6a4f5378cbdae8a8b90a56a9db41aef9;src/Controllers/FrontendOutputController.php +dd581e104187683d8fec2efa4ecd770b;src/Controllers/WebhookController.php +23ef8c7578da322e16a14f6fd67f825b;src/Controllers/SyncController.php +fa5a691923e7f21ba2ddcd5b5822706b;src/Controllers/ApplePayController.php +21ebbe688e1c2d78e8589131491bd361;src/Controllers/SyncWorkflowController.php +ac4c5cefb686188aaf1b69f99f3ba4ae;src/Controllers/PaymentController.php +e990705d5e8da7895d4460e98f516ec3;src/Controllers/Admin/AdminController.php +1902987773d5d5f5582f0c90198628fd;src/Controllers/Admin/AdminApplePayController.php +47d5c9582887c2d15265d9ef572b9b8d;src/Controllers/Admin/AdminKeyPairsController.php +5827d6899028ef0919847b0fdaafcee0;src/Controllers/Admin/AdminOrdersController.php +8a9dc40409220ffb905b588d056d2427;src/Controllers/Admin/AdminSettingsController.php +bcc814dcdea7b1904456777943f2b18f;src/Orders/OrderMappingModel.php +3da45aa29a08f869b95627a6e46e5f9a;src/Orders/OrderViewStruct.php +c1f8da0ce57d62d455c5e259c24685d0;src/Orders/OrderMappingEntity.php +521e61755ca1485bfe834b40a50ac426;src/Utils/Logger.php +ff2e8ea1952f33020fe432ab359624d6;src/Utils/JtlLinkHelper.php +4e1879d90f1a57b9c526919337e0de85;src/Utils/SessionHelper.php +dcdeac17d651b1ec66d15b927d9a797b;src/Utils/Config.php +d5d5d79ab6d86b5a965cf17240ff601e;src/Utils/JtlLoggerTrait.php +45d77592d5be177698832b19d2f84b78;src/Utils/Compatibility.php +48830baed39f5710178337ad6d6f8444;src/Utils/TranslatorTrait.php +8670bbececd78c3c6a8e52dd9105dc1d;src/Webhooks/PaymentEventSubscriber.php +4a6bd5f25d0487b44b664403d6b0315c;src/KeyPairs/KeyPairModel.php +8e0682ac5c506aa7ed6bc23a06970633;src/KeyPairs/KeyPairService.php +02ead16397ed114e97dc4a017cf2b30e;src/KeyPairs/KeyPairEntity.php +07e542740aeb10d40b387b86ff17ca15;src/Foundation/Struct.php +b93684508161f05d1e5ab245170921cf;src/Foundation/EventSubscriber.php +a78e5bba0c2635642ab607fbf73b0cea;src/Foundation/EventPayload.php +666e75baf5eddfcf0c50e83a5386bb5d;src/Foundation/ServiceProvider.php +fda45f203428056c6676cf83a15b4387;src/Foundation/Seeder.php +65ac9f0dfaadd308128767bb5c0553a3;src/Foundation/JsonSerializableTrait.php +a09b4b6da00f1cd498ddbac5b8c4d051;src/Foundation/Entity.php +97287cd9117f7b341aefb53cfe00ac64;src/Foundation/Model.php +ea7aa4025fd765d650d31bf1c60e768f;LICENSE +eb925bcc8e525c0151338006a2c34ac7;paymentmethod/UnzerPaylaterDirectDebit.php +1ef765d0ee365680c13dc50356da8aa4;paymentmethod/HeidelpayPrepayment.php +ec0675d513fe14aa3766347ab3fe45ba;paymentmethod/UnzerDirectBankTransfer.php +5a480160473e2dbf7ee0e5a373d16794;paymentmethod/UnzerWero.php +4704fb5d3c5b2581977682c705979bf0;paymentmethod/HeidelpayInvoiceGuaranteed.php +9e34f11f989a7ec68c9e4cc9c8a380d2;paymentmethod/UnzerKlarna.php +96b585ddc78e8c6441df7b160a012680;paymentmethod/UnzerBancontact.php +b4e9f466cbc90886f8b05b52f0d656f3;paymentmethod/HeidelpayPayPal.php +c33ab12c2ff6b0a4be832b1fd5ccc258;paymentmethod/UnzerTwint.php +bc6a8299df4b8de3e0b2743ed860d61f;paymentmethod/UnzerApplePay.php +953a8f0ea57476b1a419e92e65685f05;paymentmethod/HeidelpayWeChatPay.php +2cde4fb87f7ba1ccd21abbac226d75eb;paymentmethod/UnzerApplePayV2.php +b350dcebcc08fd00d7e98673d378b11a;paymentmethod/HeidelpayEPS.php +d3c122c6611b3fac25a782e1b348c2d3;paymentmethod/HeidelpaySEPADirectDebit.php +04f239d9194556e5a43ef6c6b6168f43;paymentmethod/HeidelpayGiropay.php +3aea69ee54494a9981058e8f84be502e;paymentmethod/HeidelpayFlexiPayDirect.php +b80ab88d008319b39cba524bf2bd1b11;paymentmethod/HeidelpayInvoiceFactoring.php +58dae7c0526e2464e276aba8f326a7e0;paymentmethod/HeidelpaySEPADirectDebitGuaranteed.php +6e2fc01e330f5f5755e277cf59e274e2;paymentmethod/HeidelpayiDEAL.php +91aff68f9cc80451feb3b05f9f435d20;paymentmethod/UnzerPaylaterInstallment.php +76aac63ba26683b03f88e06311db677e;paymentmethod/HeidelpayInvoice.php +c20ff94ea7e43b658b7b0c7fbd5e9186;paymentmethod/UnzerPaylaterInvoice.php +b2b5981cdb3060854934a7a4ddd86352;paymentmethod/HeidelpaySofort.php +405ab8956305746a8bfe2f10955d367a;paymentmethod/images/Default.svg +e9b9822db699305c6f9210f7a3296d99;paymentmethod/images/Bancontact.svg +2a261e61b7f07518c8966fed02c263c2;paymentmethod/images/Mastercard.svg +a109a629e837814ec51e2fd779bebc74;paymentmethod/images/UnionPay.svg +9f1aab802b3871c63d4d09bd3da192c3;paymentmethod/images/DirectBankTransferWL.svg +ce4745a7e20bb3bd0ca39aa5b532eb94;paymentmethod/images/PayU.svg +13ae581ecb97d1b433878157841e6b7b;paymentmethod/images/Unzer.svg +42c7ad35e8af3ad82382186c8298dab9;paymentmethod/images/BSW.svg +73915245a686ef8ab48e054c73d84d9f;paymentmethod/images/Vpay.svg +8b82b6046395a8521d9a4fc0b32050cc;paymentmethod/images/AVS.svg +1858e4911c102b5f7dab5abcf9da0daf;paymentmethod/images/Twint.svg +05c4980d25c03be54dbb3c9b9297f0af;paymentmethod/images/Postfinance.svg +83be4dbf852592b57ff1e09ec2322000;paymentmethod/images/Maestro.svg +b9cdbc0eb6401b4ff48d586303496360;paymentmethod/images/InstalmentWL.svg +6be1e109a5d12de65d2c9ac3929d1569;paymentmethod/images/PrepaymentWL.svg +1341038e6589ce645ddad4a4508e647c;paymentmethod/images/Alipay.svg +7bad27c8e7b1fce0bc73a511b45cd133;paymentmethod/images/Diners.svg +021bc5a8d698a489260095fb8818efd3;paymentmethod/images/WeChatPay.svg +e7fbc85757e1eb0871c754b2c9b58b53;paymentmethod/images/WERO.svg +dfff929c0326e124533fd052032f4300;paymentmethod/images/ApplePay.svg +2a6d8c8faa5efe529264d7ec1d647271;paymentmethod/images/Card.svg +9b6862348700dd4fe0abe246eba85980;paymentmethod/images/InvoiceWL.svg +8c15e349d78dc6c274cccc4667ff31b2;paymentmethod/images/Paypal.svg +1857d98d3decde26435a4589aa934a64;paymentmethod/images/Visa.svg +6a25cb09f7ed0d96cad7500bee57ad19;paymentmethod/images/Giropay.svg +fb784caff77782c7565f05dd9f7169c0;paymentmethod/images/GooglePay.svg +c54827f609af6413fd016ba0a734157b;paymentmethod/images/Cash.svg +0905c27f27902dd0e5bbe1c9ba398b83;paymentmethod/images/JCB.svg +7e71060e52f4b304035ca502969ebe10;paymentmethod/images/Amex.svg +02a2accc3b4c1e5dcca722a167065d55;paymentmethod/images/Sofort.svg +52a89f4db375db973578516d1cfb25b4;paymentmethod/images/Girocard.svg +f2e9bceec235785b045ec2425c2132ae;paymentmethod/images/Przelewy24.svg +eba887c1728b645dd11069641d0f87f0;paymentmethod/images/Klarna.svg +105cc584857fda62a05e01bfc4720c25;paymentmethod/images/SEPA.svg +deffe706f4a891a574e7cee8de6b270a;paymentmethod/images/EPS.svg +a25d1f684f60c0372468352a886400d5;paymentmethod/images/DirectDebitSecuredWL.svg +36dc54e9a212afc559462b482399025c;paymentmethod/images/Ideal.svg +97301dfb7f296851b5c3d01f5f1459ce;paymentmethod/images/Discover.svg +3ed99e2491c35c9bd10085fbbf563db1;paymentmethod/HeidelpayPrzelewy24.php +4c63e15cb4148ac8d76fead03e93f5e1;paymentmethod/HeidelpayHirePurchaseDirectDebit.php +b67477cee042851e2e5797c69653f459;paymentmethod/HeidelpayAlipay.php +608e304f236b8f85fca13d8cf4069077;paymentmethod/UnzerGooglePay.php +43aa1ac4c28b351cdb5c54656b0586b5;paymentmethod/template/hire_purchase_direct_debit_form.tpl +2b159d6ce8467ebf9681650448686803;paymentmethod/template/sepa_form.tpl +43aa1ac4c28b351cdb5c54656b0586b5;paymentmethod/template/sepa_guaranteed_form.tpl +b9d6e186e710ffdb6ea598a13479db43;paymentmethod/template/bancontact_form.tpl +65f91fe9b9c5a02b7c577418adf9885d;paymentmethod/template/klarna.tpl +43aa1ac4c28b351cdb5c54656b0586b5;paymentmethod/template/giropay_form.tpl +ea53191e42719b703b8e7f2e534c266d;paymentmethod/template/paylater_direct_debit_form.tpl +70efaea3c58931579a69dbaed9aa49a3;paymentmethod/template/wechat_form.tpl +43aa1ac4c28b351cdb5c54656b0586b5;paymentmethod/template/applepay.tpl +8bda4afc0f78011c68c31b63021f149b;paymentmethod/template/paylater_invoice_form.tpl +f32f1dbd661d5f51e7f9785d6cb4948a;paymentmethod/template/twint.tpl +43aa1ac4c28b351cdb5c54656b0586b5;paymentmethod/template/invoice_form.tpl +926dccacd84b03519451d863136de992;paymentmethod/template/paylater_installment_form.tpl +4cab797ac9e3a33aaaf19070b7e96575;paymentmethod/template/przelewy24_form.tpl +43aa1ac4c28b351cdb5c54656b0586b5;paymentmethod/template/sofort_form.tpl +43aa1ac4c28b351cdb5c54656b0586b5;paymentmethod/template/flexipay_direct_form.tpl +d41d8cd98f00b204e9800998ecf8427e;paymentmethod/template/google_pay.tpl +37a525c363261a7be5c758cfd53b5c7c;paymentmethod/template/eps_form.tpl +b95106f7bffc7555d8f14ab20d2280d8;paymentmethod/template/_includes.tpl +684dd20ae3d25753df30f267ca1e8c9e;paymentmethod/template/_footer.tpl +fb2098163ee1ea4b71832307f9782cb2;paymentmethod/template/_components_v2.tpl +a60e1531064c14507ae0429e123a1112;paymentmethod/template/ideal_form.tpl +3fa929316c2b3961c4ca5e32fc52cc20;paymentmethod/template/direct_bank_transfer.tpl +b0da8f398cc756806aeb2863b64b7904;paymentmethod/template/paypal_form.tpl +bf65191e3e917f6b2cb611fb7c132684;paymentmethod/template/credit_card_form.tpl +43aa1ac4c28b351cdb5c54656b0586b5;paymentmethod/template/invoice_factoring_form.tpl +2cf802a644ae51b1d780f7032f37d463;paymentmethod/template/wero.tpl +3541e3aafa172d7fcb1574a64d8930f5;paymentmethod/template/dummy.tpl +ddaaceadd4366b7aa7aaa82ae405c821;paymentmethod/template/alipay_form.tpl +43aa1ac4c28b351cdb5c54656b0586b5;paymentmethod/template/invoice_guaranteed_form.tpl +54fd30a2872c9c7223da7c93d746029b;paymentmethod/template/prepayment_form.tpl +da1763f3cb4977cbf05e81cad338293c;paymentmethod/HeidelpayCreditCard.php +0d63ba0e32e3fd96d6e667d2d9450776;info.xml +c237fcf06c9da2f07028932e8eb8aa36;Migrations/Migration20230925100000.php +55ccfd103771065e96f3e482ee49499e;Migrations/Migration20220511114913.php +cd6d409b4fbd95d76bfe82ab4805a17b;Migrations/Migration20230919100000.php +166d9346b496a3a2a2332586e8dcfa44;Migrations/Migration20221006103000.php +3faed6c0507c6f399d352282db7c777b;Migrations/Migration20201027083900.php +079b44de2e017a797d944e83bde215f7;Bootstrap.php +c9f6e33220cf462393c7070cffcfff1a;NOTICE +4db0ef5803b943bc62cf9a6e0f7b40b5;Seeders/Shop4PluginMigrationSeeder.php +9cd6264e498cee75cca04be54e74951e;locale/de-DE/base.po +d889ba5a35fd2ce7293e876f80ada24b;locale/de-DE/base.mo +a91aa01032b7966bc4af5b4ab78f9184;locale/en-GB/base.po +4cd18640657e259941c4fbcdba4c5b3d;locale/en-GB/base.mo +e73740baa8bcab9ac6d47b2a95daa826;jsconfig.json +e8e2cdb77aa3e392df8c46948b55d107;CHANGELOG.md diff --git a/composer.lock b/composer.lock index e668e80..71c9713 100644 --- a/composer.lock +++ b/composer.lock @@ -8,24 +8,26 @@ "packages": [ { "name": "paragonie/constant_time_encoding", - "version": "v3.0.0", + "version": "v3.1.3", "source": { "type": "git", "url": "https://github.com/paragonie/constant_time_encoding.git", - "reference": "df1e7fde177501eee2037dd159cf04f5f301a512" + "reference": "d5b01a39b3415c2cd581d3bd3a3575c1ebbd8e77" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/df1e7fde177501eee2037dd159cf04f5f301a512", - "reference": "df1e7fde177501eee2037dd159cf04f5f301a512", + "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/d5b01a39b3415c2cd581d3bd3a3575c1ebbd8e77", + "reference": "d5b01a39b3415c2cd581d3bd3a3575c1ebbd8e77", "shasum": "" }, "require": { "php": "^8" }, "require-dev": { - "phpunit/phpunit": "^9", - "vimeo/psalm": "^4|^5" + "infection/infection": "^0", + "nikic/php-fuzzer": "^0", + "phpunit/phpunit": "^9|^10|^11", + "vimeo/psalm": "^4|^5|^6" }, "type": "library", "autoload": { @@ -71,7 +73,7 @@ "issues": "https://github.com/paragonie/constant_time_encoding/issues", "source": "https://github.com/paragonie/constant_time_encoding" }, - "time": "2024-05-08T12:36:18+00:00" + "time": "2025-09-24T15:06:41+00:00" }, { "name": "paragonie/random_compat", @@ -125,16 +127,16 @@ }, { "name": "phpseclib/phpseclib", - "version": "3.0.43", + "version": "3.0.46", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "709ec107af3cb2f385b9617be72af8cf62441d02" + "reference": "56483a7de62a6c2a6635e42e93b8a9e25d4f0ec6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/709ec107af3cb2f385b9617be72af8cf62441d02", - "reference": "709ec107af3cb2f385b9617be72af8cf62441d02", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/56483a7de62a6c2a6635e42e93b8a9e25d4f0ec6", + "reference": "56483a7de62a6c2a6635e42e93b8a9e25d4f0ec6", "shasum": "" }, "require": { @@ -215,7 +217,7 @@ ], "support": { "issues": "https://github.com/phpseclib/phpseclib/issues", - "source": "https://github.com/phpseclib/phpseclib/tree/3.0.43" + "source": "https://github.com/phpseclib/phpseclib/tree/3.0.46" }, "funding": [ { @@ -231,20 +233,20 @@ "type": "tidelift" } ], - "time": "2024-12-14T21:12:59+00:00" + "time": "2025-06-26T16:29:55+00:00" }, { "name": "unzerdev/php-sdk", - "version": "3.11.0", + "version": "3.13.1", "source": { "type": "git", "url": "https://github.com/unzerdev/php-sdk.git", - "reference": "274650b6120b8665c8867627210cd8adab65406b" + "reference": "0a26d70b33185d52e49b06cb500a6e01bb6f1087" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/unzerdev/php-sdk/zipball/274650b6120b8665c8867627210cd8adab65406b", - "reference": "274650b6120b8665c8867627210cd8adab65406b", + "url": "https://api.github.com/repos/unzerdev/php-sdk/zipball/0a26d70b33185d52e49b06cb500a6e01bb6f1087", + "reference": "0a26d70b33185d52e49b06cb500a6e01bb6f1087", "shasum": "" }, "require": { @@ -272,9 +274,9 @@ "description": "This is the php sdk to connect to the Unzer rest API.", "support": { "email": "support@unzer.com", - "source": "https://github.com/unzerdev/php-sdk/tree/3.11.0" + "source": "https://github.com/unzerdev/php-sdk/tree/3.13.1" }, - "time": "2024-12-04T08:14:47+00:00" + "time": "2025-09-23T14:21:50+00:00" } ], "packages-dev": [], diff --git a/frontend/css/heidelpay.min.css b/frontend/css/heidelpay.min.css deleted file mode 100644 index 29a2e4d..0000000 --- a/frontend/css/heidelpay.min.css +++ /dev/null @@ -1 +0,0 @@ -.unzerUI .field{position:relative}.label-slide .form-group:not(.exclude-from-label-slide):not(.checkbox) .unzerUI.form label{position:relative;top:initial;left:initial;font-size:1rem;margin:0 0 .28571429rem;padding:0;transform:none;line-height:30px;pointer-events:all;text-overflow:initial;white-space:normal;overflow:initial;max-width:none}.label-slide .form-group:not(.exclude-from-label-slide):not(.checkbox) .unzerUI.checkbox .box,.label-slide .form-group:not(.exclude-from-label-slide):not(.checkbox) .unzerUI.checkbox label{cursor:pointer;padding-left:2.5em} diff --git a/frontend/css/heidelpay.min.css.map b/frontend/css/heidelpay.min.css.map deleted file mode 100644 index 6978714..0000000 --- a/frontend/css/heidelpay.min.css.map +++ /dev/null @@ -1,7 +0,0 @@ -{ -"version": 3, -"mappings": "AAEI,eAAO,CACH,QAAQ,CAAE,QAAQ,CAOlB,0FAAM,CACF,QAAQ,CAAE,QAAQ,CAClB,GAAG,CAAE,OAAO,CACZ,IAAI,CAAE,OAAO,CACb,SAAS,CAAE,IAAI,CACf,MAAM,CAAE,gBAAgB,CACxB,OAAO,CAAE,CAAC,CACV,SAAS,CAAE,IAAI,CACf,WAAW,CAAE,IAAI,CACjB,cAAc,CAAE,GAAG,CACnB,aAAa,CAAE,OAAO,CACtB,WAAW,CAAE,MAAM,CACnB,QAAQ,CAAE,OAAO,CACjB,SAAS,CAAE,IAAI,CAKnB,4LAAY,CACR,MAAM,CAAE,OAAO,CACf,YAAY,CAAE,KAAK", -"sources": ["../scss/heidelpay.scss"], -"names": [], -"file": "heidelpay.min.css" -} diff --git a/frontend/css/unzer.min.css b/frontend/css/unzer.min.css deleted file mode 100644 index df8b1f4..0000000 --- a/frontend/css/unzer.min.css +++ /dev/null @@ -1 +0,0 @@ -.unzerUI .field{position:relative}#googlepay-holder{text-align:right}.et-widget #googlepay-holder{margin-top:10px}.label-slide .form-group:not(.exclude-from-label-slide):not(.checkbox) .unzerUI.form label{position:relative;top:initial;left:initial;font-size:1rem;margin:0 0 .28571429rem;padding:0;transform:none;line-height:30px;pointer-events:all;text-overflow:initial;white-space:normal;overflow:initial;max-width:none}.label-slide .form-group:not(.exclude-from-label-slide):not(.checkbox) .unzerUI.checkbox .box,.label-slide .form-group:not(.exclude-from-label-slide):not(.checkbox) .unzerUI.checkbox label{cursor:pointer;padding-left:2.5em} diff --git a/frontend/css/unzer.min.css.map b/frontend/css/unzer.min.css.map deleted file mode 100644 index 78480df..0000000 --- a/frontend/css/unzer.min.css.map +++ /dev/null @@ -1,7 +0,0 @@ -{ -"version": 3, -"mappings": "AAEI,eAAO,CACH,QAAQ,CAAE,QAAQ,CAI1B,iBAAkB,CACd,UAAU,CAAE,KAAK,CAKjB,4BAAkB,CACd,UAAU,CAAE,IAAI,CAOhB,0FAAM,CACF,QAAQ,CAAE,QAAQ,CAClB,GAAG,CAAE,OAAO,CACZ,IAAI,CAAE,OAAO,CACb,SAAS,CAAE,IAAI,CACf,MAAM,CAAE,gBAAgB,CACxB,OAAO,CAAE,CAAC,CACV,SAAS,CAAE,IAAI,CACf,WAAW,CAAE,IAAI,CACjB,cAAc,CAAE,GAAG,CACnB,aAAa,CAAE,OAAO,CACtB,WAAW,CAAE,MAAM,CACnB,QAAQ,CAAE,OAAO,CACjB,SAAS,CAAE,IAAI,CAKnB,4LAAY,CACR,MAAM,CAAE,OAAO,CACf,YAAY,CAAE,KAAK", -"sources": ["../src/scss/unzer.scss"], -"names": [], -"file": "unzer.min.css" -} diff --git a/frontend/js/heidelpay.js b/frontend/js/heidelpay.js deleted file mode 100644 index aeed2d4..0000000 --- a/frontend/js/heidelpay.js +++ /dev/null @@ -1,597 +0,0 @@ -(function ($, window, document, undefined) { - /** - * Heidelpay Payment Class - * - * @class - * @constructor - * @param {string} pubKey Public Key - * @param {string} type Payment Type - * @param {{ - $errorHolder: ?jQuery, - $form: ?jQuery, - submitButton: ?HTMLElement, - locale: ?string, - customerId: ?string, - customer: ?object, - autoSubmit: ?boolean, - amount: null|string|number, - currency: ?string, - effectiveInterest: null|string|number, - orderDate: ?string, - styling: {fontSize: string, fontFamily: string, fontColor: string}, - isB2B: ?boolean - }} settings Settings - */ - function HeidelpayPayment(pubKey, type, settings) { - this.settings = settings || {}; - - var options = { - locale: this.settings.locale || 'de-DE' - }; - - /** @type {unzer} unzerInstance */ - this.unzerInstance = new unzer(pubKey, options); - - /** @type {?string} customerId */ - this.customerId = settings.customerId || null; - - /** @type {{createCustomer: Function, updateCustomer: Function}|null} customerResource */ - this.customerResource = null; - - /** @type {{createResource: Function}} paymentType */ - this.paymentType = this.initPaymentType(type); - - /** @type {jQuery} $errorContainer Wrapper for Container to display error messages in */ - this.$errorContainer = this.settings.$errorContainer || $('#error-container'); - - /** @type {jQuery} $errorMessage Container to display error messages in */ - this.$errorMessage = this.settings.$errorMessage || this.$errorContainer.find('.alert'); - - /** @type {HTMLElement} form Form in which the customer enters additional details */ - this.form = this.settings.form || document.getElementById('form_payment_extra'); - - // Register Events - this.handleFormSubmit = this.handleFormSubmit.bind(this); // it's a trick! needed in order to overcome the remove event listener - this.form.addEventListener('submit', this.handleFormSubmit); - - if (this.settings.autoSubmit) { - // this.form.dispatchEvent(new Event('submit')); // Causes endless redirects in some browsers like FF, so we call the callback directly... - this.handleFormSubmit(new Event('submit')); - } - } - - /** - * Payment Type Constants - * @constant - */ - HeidelpayPayment.PAYMENT_TYPES = { - ALIPAY: 'Alipay', - CARD: 'Card', - EPS: 'EPS', - FLEXIPAY_DIRECT: 'FlexiPay Direct', - HIRE_PURCHASE: 'Hire Purchase', - PAYPAL: 'Paypal', - INVOICE: 'Invoice', - INVOICE_FACTORING: 'Invoice Factoring', - INVOICE_GUARANTEED: 'Invoice Guaranteed', - SEPA: 'SEPA', - SEPA_GUARANTEED: 'SEPA (guaranteed)', - SOFORT: 'SOFORT', - GIROPAY: 'Giropay', - PRZELEWY24: 'Przelewy24', - IDEAL: 'iDEAL', - PREPAYMENT: 'Prepayment', - WECHAT_PAY: 'WeChat Pay' - }; - - /** - * Init Payment Type - * - * @param {string} type - * @returns {object} payment type - * @throws Error if there is an unkown payment type - */ - HeidelpayPayment.prototype.initPaymentType = function (type) { - switch (type) { - case HeidelpayPayment.PAYMENT_TYPES.CARD: - return this.createCard(); - - case HeidelpayPayment.PAYMENT_TYPES.INVOICE: - return this.createInvoice(); - - case HeidelpayPayment.PAYMENT_TYPES.INVOICE_GUARANTEED: - return this.createInvoiceGuaranteed(); - - case HeidelpayPayment.PAYMENT_TYPES.INVOICE_FACTORING: - return this.createInvoiceFactoring(); - - case HeidelpayPayment.PAYMENT_TYPES.SEPA: - return this.createSepa(); - - case HeidelpayPayment.PAYMENT_TYPES.SEPA_GUARANTEED: - return this.createSepaGuaranteed(); - - case HeidelpayPayment.PAYMENT_TYPES.PAYPAL: - return this.createPaypal(); - - case HeidelpayPayment.PAYMENT_TYPES.SOFORT: - return this.createSofort(); - - case HeidelpayPayment.PAYMENT_TYPES.GIROPAY: - return this.createGiropay(); - - case HeidelpayPayment.PAYMENT_TYPES.PRZELEWY24: - return this.createPrzelewy24(); - - case HeidelpayPayment.PAYMENT_TYPES.IDEAL: - return this.createIdeal(); - - case HeidelpayPayment.PAYMENT_TYPES.PREPAYMENT: - return this.createPrepayment(); - - case HeidelpayPayment.PAYMENT_TYPES.EPS: - return this.createEPS(); - - case HeidelpayPayment.PAYMENT_TYPES.FLEXIPAY_DIRECT: - return this.createFlexiPayDirect(); - - case HeidelpayPayment.PAYMENT_TYPES.ALIPAY: - return this.createAlipay(); - - case HeidelpayPayment.PAYMENT_TYPES.WECHAT_PAY: - return this.createWeChatPay(); - - case HeidelpayPayment.PAYMENT_TYPES.HIRE_PURCHASE: - return this.createHirePurchase(); - - default: - throw new Error('Unkown Payment Type: ' + type); - } - }; - - /** - * Handle the form submit - * - * @this {HeidelpayPayment} - * @param {Event} event Submit Event - */ - HeidelpayPayment.prototype.handleFormSubmit = function(event) { - var self = this; - event.preventDefault(); - - // Creating a Payment resource and (optional) Customer Resource - var resources = [this.paymentType.createResource()]; - - if (this.customerResource) { - resources.push(this.customerId ? this.customerResource.updateCustomer() : this.customerResource.createCustomer()); - } - - Promise.all(resources).then(function (result) { - // Append Payment Resource Id - var hiddenInput = document.createElement('input'); - hiddenInput.setAttribute('type', 'hidden'); - hiddenInput.setAttribute('name', 'paymentData[resourceId]'); - hiddenInput.setAttribute('value', result[0].id); - self.form.appendChild(hiddenInput); - - // Append Customer Id - if (result.length >= 2) { - var hiddenCstInput = document.createElement('input'); - hiddenCstInput.setAttribute('type', 'hidden'); - hiddenCstInput.setAttribute('name', 'paymentData[customerId]'); - hiddenCstInput.setAttribute('value', result[1].id); - self.form.appendChild(hiddenCstInput); - } - - // Submitting the form - self.form.removeEventListener('submit', self.handleFormSubmit); - self.form.submit(); - }) - .catch(function (error) { - self.$errorContainer.show(); - self.$errorMessage.html(error.message); - }); - }; - - /** - * Create (or update) customer resource. - * - * @see https://docs.heidelpay.com/docs/customer-ui-integration - * @returns {{createCustomer: Function, updateCustomer: Function}} Customer Resource - */ - HeidelpayPayment.prototype.createCustomer = function() { - var Customer = this.settings.isB2B ? this.unzerInstance.B2BCustomer() : this.unzerInstance.Customer(); - var customerObj = this.settings.customer || {}; - var continueButton = this.settings.submitButton || document.getElementById("submit-button"); - - - if (this.settings.isB2B) { - // customerObj.firstname = null; - // customerObj.lastname = null; - } - Customer.initFormFields(customerObj); - - Customer.addEventListener('validate', function(e) { - if (e.success) { - continueButton.removeAttribute('disabled'); - return; - } - - continueButton.setAttribute('disabled', true); - }); - - if (this.customerId) { - var options = { - containerId: 'customer', - fields: ['birthdate'], // at least one string required ('birthdate' || 'name' || 'address') - showInfoBox: false, - showHeader: false - }; - - if (this.settings.isB2B) { - options = {containerId: 'customer'}; - } - - Customer.update(this.customerId, options); - - return Customer; - } - - Customer.create({ - containerId: 'customer', - showInfoBox: false, - showHeader: false - }); - - return Customer; - }; - - /** - * Create a new Card Payment Type. - * - * @see https://docs.heidelpay.com/docs/credit-card-ui-integration - * @returns {{createResource: Function}} Card Payment Type - */ - HeidelpayPayment.prototype.createCard = function () { - var Card = this.unzerInstance.Card(); - var styling = {fontSize: null, fontColor: null, fontFamily: null}; - - if (this.settings.styling) { - styling.fontColor = this.settings.styling.fontColor || null; - styling.fontSize = this.settings.styling.fontSize || null; - styling.fontFamily = this.settings.styling.fontFamily || null; - } - - Card.create('number', { - containerId: 'card-element-id-number', - onlyIframe: false, - fontSize: styling.fontSize, - fontColor: styling.fontColor, - fontFamily: styling.fontFamily - }); - Card.create('expiry', { - containerId: 'card-element-id-expiry', - onlyIframe: false, - fontSize: styling.fontSize, - fontColor: styling.fontColor, - fontFamily: styling.fontFamily - }); - Card.create('cvc', { - containerId: 'card-element-id-cvc', - onlyIframe: false, - fontSize: styling.fontSize, - fontColor: styling.fontColor, - // fontFamily: styling.fontFamily // messes with hidden font in firefox - }); - - // Enable pay button initially - var self = this; - var formFieldValid = {}; - - /** @type {HTMLElement} continueButton */ - var continueButton = self.settings.submitButton || document.getElementById("submit-button"); - continueButton.setAttribute('disabled', true); - - var eventHandlerCardInput = function (e) { - if (e.success) { - formFieldValid[e.type] = true; - self.$errorContainer.hide(); - self.$errorMessage.html(); - } - - if (e.error) { - formFieldValid[e.type] = false; - self.$errorContainer.show(); - self.$errorMessage.html(e.error); - } - - if (formFieldValid.number && formFieldValid.expiry && formFieldValid.cvc) { - continueButton.removeAttribute('disabled'); - return; - } - - continueButton.setAttribute('disabled', true); - }; - - Card.addEventListener('change', eventHandlerCardInput); - - return Card; - }; - - /** - * Create a new Invoice Payment Type. - * - * @see https://docs.heidelpay.com/docs/invoice-ui-integration - * @returns {{createResource: Function}} Invoice Payment Type - */ - HeidelpayPayment.prototype.createInvoice = function () { - return this.unzerInstance.Invoice(); - }; - - /** - * Create a new Invoice Guaranteed Payment Type. - * - * @see https://docs.heidelpay.com/docs/invoice-ui-integration - * @returns {{createResource: Function}} Invoice Payment Type - */ - HeidelpayPayment.prototype.createInvoiceGuaranteed = function () { - this.customerResource = this.createCustomer(); - - return this.unzerInstance.InvoiceSecured(); - }; - - /** - * Create a new Invoice Factoring Payment Type. - * - * @see https://docs.heidelpay.com/docs/invoice-ui-integration - * @returns {{createResource: Function}} Invoice Payment Type - */ - HeidelpayPayment.prototype.createInvoiceFactoring = function () { - this.customerResource = this.createCustomer(); - - return this.unzerInstance.InvoiceSecured(); - }; - - /** - * Create a new SEPA Direct Debit Payment Type. - * - * @see https://docs.heidelpay.com/docs/sepa-direct-debit-ui-integration - * @returns {{createResource: Function}} SEPA Direct Debit Payment Type - */ - HeidelpayPayment.prototype.createSepa = function () { - var Sepa = this.unzerInstance.SepaDirectDebit(); - Sepa.create('sepa-direct-debit', { - containerId: 'sepa-IBAN' - }); - - return Sepa; - }; - - /** - * Create a new SEPA Direct Debit (guaranteed) Payment Type. - * - * @see https://docs.heidelpay.com/docs/sepa-direct-debit-ui-integration - * @returns {{createResource: Function}} SEPA Direct Debit (guaranteed) Payment Type - */ - HeidelpayPayment.prototype.createSepaGuaranteed = function () { - var SepaGuaranteed = this.unzerInstance.SepaDirectDebitSecured(); - SepaGuaranteed.create('sepa-direct-debit-guaranteed', { - containerId: 'sepa-guaranteed-IBAN' - }); - - this.customerResource = this.createCustomer(); - - return SepaGuaranteed; - }; - - /** - * Create a new PayPal Payment Type. - * - * @see https://docs.heidelpay.com/docs/paypal-ui-integration - * @returns {{createResource: Function}} Papal Payment Type - */ - HeidelpayPayment.prototype.createPaypal = function () { - var Paypal = this.unzerInstance.Paypal(); - Paypal.create('email', { - containerId: 'paypal-element-email' - }); - - return Paypal; - }; - - /** - * Create a new SOFORT Payment Type. - * - * @see https://docs.heidelpay.com/docs/redirect-ui-integration#sofort - * @returns {{createResource: Function}} Sofort Payment Type - */ - HeidelpayPayment.prototype.createSofort = function () { - return this.unzerInstance.Sofort(); - }; - - /** - * Create a new Giropay Payment Type. - * - * @see https://docs.heidelpay.com/docs/redirect-ui-integration#giropay - * @returns {{createResource: Function}} Giropay Payment Type - */ - HeidelpayPayment.prototype.createGiropay = function () { - return this.unzerInstance.Giropay(); - }; - - /** - * Create a new Przelewy24 Payment Type. - * - * @see https://docs.heidelpay.com/docs/redirect-ui-integration#przelewy24 - * @returns {{createResource: Function}} Przelewy24 Payment Type - */ - HeidelpayPayment.prototype.createPrzelewy24 = function () { - return this.unzerInstance.Przelewy24(); - }; - - /** - * Create a new iDEAL Payment Type. - * - * @see https://docs.heidelpay.com/docs/ideal-ui-integration - * @returns {{createResource: Function}} iDEAL Payment Type - */ - HeidelpayPayment.prototype.createIdeal = function () { - var Ideal = this.unzerInstance.Ideal(); - - Ideal.create('ideal', { - containerId: 'ideal-element' - }); - - return Ideal; - }; - - /** - * Create a new Prepayment Payment Type. - * - * @see https://docs.heidelpay.com/docs/prepayment-ui-integration - * @returns {{createResource: Function}} Prepayment Payment Type - */ - HeidelpayPayment.prototype.createPrepayment = function () { - return this.unzerInstance.Prepayment(); - }; - - /** - * Create a new EPS Payment Type. - * - * @see https://docs.heidelpay.com/docs/eps-ui-integration - * @returns {{createResource: Function}} EPS Payment Type - */ - HeidelpayPayment.prototype.createEPS = function () { - var EPS = this.unzerInstance.EPS(); - - EPS.create('eps', { - containerId: 'eps-element' - }); - - return EPS; - }; - - /** - * Create a new FlexiPay Direct Payment Type. - * - * @see https://docs.heidelpay.com/docs/redirect-ui-integration#flexipay-direct - * @returns {{createResource: Function}} Alipay Payment Type - */ - HeidelpayPayment.prototype.createFlexiPayDirect = function () { - return this.unzerInstance.FlexiPayDirect(); - }; - - /** - * Create a new Alipay Payment Type. - * - * @see https://docs.heidelpay.com/docs/redirect-ui-integration#alipay - * @returns {{createResource: Function}} Alipay Payment Type - */ - HeidelpayPayment.prototype.createAlipay = function () { - return this.unzerInstance.Alipay(); - }; - - /** - * Create an new WeChat Pay Payment Type. - * - * @see https://docs.heidelpay.com/docs/redirect-ui-integration#wechat-pay - * @returns {{createResource: Function}} WeChat Pay Payment Type - */ - HeidelpayPayment.prototype.createWeChatPay = function () { - return this.unzerInstance.Wechatpay(); - }; - - /** - * Create a new Hire Purchase Payment Type. - * - * @see https:://docs.heidelpay.com/docs/hire-purchase-ui-integration - * @returns {{createResource: Function}} Hire Purchase Payment Type - */ - HeidelpayPayment.prototype.createHirePurchase = function () { - var InstallmentSecured = this.unzerInstance.InstallmentSecured(); - var self = this; - this.customerResource = this.createCustomer(); - - /** @type {HTMLElement} continueButton */ - var continueButton = self.settings.submitButton || document.getElementById("submit-button"); - continueButton.setAttribute('style', 'display: none'); - continueButton.setAttribute('disabled', true); - - InstallmentSecured.create({ - containerId: 'hire-purchase-element', - amount: this.settings.amount || null, - currency: this.settings.currency || null, - effectiveInterest: this.settings.effectiveInterest || null, - orderDate: this.settings.orderDate || null - }).then(function (data) { - // if successful, notify the user that the list of installments was fetched successfully - // in case you were using a loading element during the fetching process, - // you can remove it inside this callback function - }) - .catch(function (response) { - // sent an error message to the user (fetching installment list failed) - var msg = ''; - console.error(response.message); - - response.error.details.forEach(function(err) { - console.error('API-Error: ' + err.code); - msg += err.customerMessage; - }); - - self.$errorContainer.show(); - self.$errorMessage.html(msg); - }); - - - // Listen to UI events - InstallmentSecured.addEventListener('installmentSecuredEvent', function (e) { - if (e.action === 'validate') { - if (e.success) { - continueButton.removeAttribute('disabled'); - return; - } - - continueButton.setAttribute('disabled', true); - } - - if (e.action === 'change-step') { - if (e.currentSteep === 'plan-list') { - continueButton.setAttribute('style', 'display: none'); - continueButton.setAttribute('disabled', true); - return; - } - - continueButton.setAttribute('style', 'display: inline-block'); - } - }); - - return InstallmentSecured; - }; - - window.HpPayment = HeidelpayPayment; - - /** - * Heidelpay Installment Modal Window Handler - * - * @param {string} modalSelector - * @param {HTMLElement} btn Submit Trigger - * @param {JQuery} $form - */ - window.HpInstalment = function(modalSelector, btn, $form) { - var modal = $(modalSelector); - - btn.addEventListener('click', function() { - $form.trigger('submit'); - }); - - $form.on('submit', function(e) { - if (!modal.is(':visible')) { - e.preventDefault(); - modal.modal('show'); - return false; - } - - return true; - }); - }; -})(jQuery, window, window.document); \ No newline at end of file diff --git a/frontend/js/heidelpay.min.js b/frontend/js/heidelpay.min.js deleted file mode 100644 index a78b501..0000000 --- a/frontend/js/heidelpay.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(e,t,r,n){function i(t,n,i){this.settings=i||{};var s={locale:this.settings.locale||"de-DE"};this.unzerInstance=new unzer(t,s),this.customerId=i.customerId||null,this.customerResource=null,this.paymentType=this.initPaymentType(n),this.$errorContainer=this.settings.$errorContainer||e("#error-container"),this.$errorMessage=this.settings.$errorMessage||this.$errorContainer.find(".alert"),this.form=this.settings.form||r.getElementById("form_payment_extra"),this.handleFormSubmit=this.handleFormSubmit.bind(this),this.form.addEventListener("submit",this.handleFormSubmit),this.settings.autoSubmit&&this.handleFormSubmit(new Event("submit"))}i.PAYMENT_TYPES={ALIPAY:"Alipay",CARD:"Card",EPS:"EPS",FLEXIPAY_DIRECT:"FlexiPay Direct",HIRE_PURCHASE:"Hire Purchase",PAYPAL:"Paypal",INVOICE:"Invoice",INVOICE_FACTORING:"Invoice Factoring",INVOICE_GUARANTEED:"Invoice Guaranteed",SEPA:"SEPA",SEPA_GUARANTEED:"SEPA (guaranteed)",SOFORT:"SOFORT",GIROPAY:"Giropay",PRZELEWY24:"Przelewy24",IDEAL:"iDEAL",PREPAYMENT:"Prepayment",WECHAT_PAY:"WeChat Pay"},i.prototype.initPaymentType=function(e){switch(e){case i.PAYMENT_TYPES.CARD:return this.createCard();case i.PAYMENT_TYPES.INVOICE:return this.createInvoice();case i.PAYMENT_TYPES.INVOICE_GUARANTEED:return this.createInvoiceGuaranteed();case i.PAYMENT_TYPES.INVOICE_FACTORING:return this.createInvoiceFactoring();case i.PAYMENT_TYPES.SEPA:return this.createSepa();case i.PAYMENT_TYPES.SEPA_GUARANTEED:return this.createSepaGuaranteed();case i.PAYMENT_TYPES.PAYPAL:return this.createPaypal();case i.PAYMENT_TYPES.SOFORT:return this.createSofort();case i.PAYMENT_TYPES.GIROPAY:return this.createGiropay();case i.PAYMENT_TYPES.PRZELEWY24:return this.createPrzelewy24();case i.PAYMENT_TYPES.IDEAL:return this.createIdeal();case i.PAYMENT_TYPES.PREPAYMENT:return this.createPrepayment();case i.PAYMENT_TYPES.EPS:return this.createEPS();case i.PAYMENT_TYPES.FLEXIPAY_DIRECT:return this.createFlexiPayDirect();case i.PAYMENT_TYPES.ALIPAY:return this.createAlipay();case i.PAYMENT_TYPES.WECHAT_PAY:return this.createWeChatPay();case i.PAYMENT_TYPES.HIRE_PURCHASE:return this.createHirePurchase();default:throw new Error("Unkown Payment Type: "+e)}},i.prototype.handleFormSubmit=function(e){var t=this;e.preventDefault();var n=[this.paymentType.createResource()];this.customerResource&&n.push(this.customerId?this.customerResource.updateCustomer():this.customerResource.createCustomer()),Promise.all(n).then(function(e){var n=r.createElement("input");if(n.setAttribute("type","hidden"),n.setAttribute("name","paymentData[resourceId]"),n.setAttribute("value",e[0].id),t.form.appendChild(n),e.length>=2){var i=r.createElement("input");i.setAttribute("type","hidden"),i.setAttribute("name","paymentData[customerId]"),i.setAttribute("value",e[1].id),t.form.appendChild(i)}t.form.removeEventListener("submit",t.handleFormSubmit),t.form.submit()}).catch(function(e){t.$errorContainer.show(),t.$errorMessage.html(e.message)})},i.prototype.createCustomer=function(){var e=this.settings.isB2B?this.unzerInstance.B2BCustomer():this.unzerInstance.Customer(),t=this.settings.customer||{},n=this.settings.submitButton||r.getElementById("submit-button");if(this.settings.isB2B,e.initFormFields(t),e.addEventListener("validate",function(e){e.success?n.removeAttribute("disabled"):n.setAttribute("disabled",!0)}),this.customerId){var i={containerId:"customer",fields:["birthdate"],showInfoBox:!1,showHeader:!1};return this.settings.isB2B&&(i={containerId:"customer"}),e.update(this.customerId,i),e}return e.create({containerId:"customer",showInfoBox:!1,showHeader:!1}),e},i.prototype.createCard=function(){var e=this.unzerInstance.Card(),t={fontSize:null,fontColor:null,fontFamily:null};this.settings.styling&&(t.fontColor=this.settings.styling.fontColor||null,t.fontSize=this.settings.styling.fontSize||null,t.fontFamily=this.settings.styling.fontFamily||null),e.create("number",{containerId:"card-element-id-number",onlyIframe:!1,fontSize:t.fontSize,fontColor:t.fontColor,fontFamily:t.fontFamily}),e.create("expiry",{containerId:"card-element-id-expiry",onlyIframe:!1,fontSize:t.fontSize,fontColor:t.fontColor,fontFamily:t.fontFamily}),e.create("cvc",{containerId:"card-element-id-cvc",onlyIframe:!1,fontSize:t.fontSize,fontColor:t.fontColor});var n=this,i={},s=n.settings.submitButton||r.getElementById("submit-button");s.setAttribute("disabled",!0);return e.addEventListener("change",function(e){e.success&&(i[e.type]=!0,n.$errorContainer.hide(),n.$errorMessage.html()),e.error&&(i[e.type]=!1,n.$errorContainer.show(),n.$errorMessage.html(e.error)),i.number&&i.expiry&&i.cvc?s.removeAttribute("disabled"):s.setAttribute("disabled",!0)}),e},i.prototype.createInvoice=function(){return this.unzerInstance.Invoice()},i.prototype.createInvoiceGuaranteed=function(){return this.customerResource=this.createCustomer(),this.unzerInstance.InvoiceSecured()},i.prototype.createInvoiceFactoring=function(){return this.customerResource=this.createCustomer(),this.unzerInstance.InvoiceSecured()},i.prototype.createSepa=function(){var e=this.unzerInstance.SepaDirectDebit();return e.create("sepa-direct-debit",{containerId:"sepa-IBAN"}),e},i.prototype.createSepaGuaranteed=function(){var e=this.unzerInstance.SepaDirectDebitSecured();return e.create("sepa-direct-debit-guaranteed",{containerId:"sepa-guaranteed-IBAN"}),this.customerResource=this.createCustomer(),e},i.prototype.createPaypal=function(){var e=this.unzerInstance.Paypal();return e.create("email",{containerId:"paypal-element-email"}),e},i.prototype.createSofort=function(){return this.unzerInstance.Sofort()},i.prototype.createGiropay=function(){return this.unzerInstance.Giropay()},i.prototype.createPrzelewy24=function(){return this.unzerInstance.Przelewy24()},i.prototype.createIdeal=function(){var e=this.unzerInstance.Ideal();return e.create("ideal",{containerId:"ideal-element"}),e},i.prototype.createPrepayment=function(){return this.unzerInstance.Prepayment()},i.prototype.createEPS=function(){var e=this.unzerInstance.EPS();return e.create("eps",{containerId:"eps-element"}),e},i.prototype.createFlexiPayDirect=function(){return this.unzerInstance.FlexiPayDirect()},i.prototype.createAlipay=function(){return this.unzerInstance.Alipay()},i.prototype.createWeChatPay=function(){return this.unzerInstance.Wechatpay()},i.prototype.createHirePurchase=function(){var e=this.unzerInstance.InstallmentSecured(),t=this;this.customerResource=this.createCustomer();var n=t.settings.submitButton||r.getElementById("submit-button");return n.setAttribute("style","display: none"),n.setAttribute("disabled",!0),e.create({containerId:"hire-purchase-element",amount:this.settings.amount||null,currency:this.settings.currency||null,effectiveInterest:this.settings.effectiveInterest||null,orderDate:this.settings.orderDate||null}).then(function(e){}).catch(function(e){var r="";console.error(e.message),e.error.details.forEach(function(e){console.error("API-Error: "+e.code),r+=e.customerMessage}),t.$errorContainer.show(),t.$errorMessage.html(r)}),e.addEventListener("installmentSecuredEvent",function(e){if("validate"===e.action){if(e.success)return void n.removeAttribute("disabled");n.setAttribute("disabled",!0)}if("change-step"===e.action){if("plan-list"===e.currentSteep)return n.setAttribute("style","display: none"),void n.setAttribute("disabled",!0);n.setAttribute("style","display: inline-block")}}),e},t.HpPayment=i,t.HpInstalment=function(t,r,n){var i=e(t);r.addEventListener("click",function(){n.trigger("submit")}),n.on("submit",function(e){return!!i.is(":visible")||(e.preventDefault(),i.modal("show"),!1)})}}(jQuery,window,window.document); \ No newline at end of file diff --git a/frontend/js/unzer-ui-components.js b/frontend/js/unzer-ui-components.js new file mode 100644 index 0000000..e48187d --- /dev/null +++ b/frontend/js/unzer-ui-components.js @@ -0,0 +1,635 @@ +(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i { + // return await this.unzerPayment?.submit() + // .then(response => this.onPaymentSubmit(response)) + // .catch(err => this.logError(err)); + // }; + + this.unzerPayment.setApplePayData(applePayData); + } + }]); + return _default; +}(_base["default"]); + +exports["default"] = _default; + +},{"./base":2,"@babel/runtime/helpers/classCallCheck":8,"@babel/runtime/helpers/createClass":9,"@babel/runtime/helpers/get":11,"@babel/runtime/helpers/getPrototypeOf":12,"@babel/runtime/helpers/inherits":13,"@babel/runtime/helpers/interopRequireDefault":14,"@babel/runtime/helpers/possibleConstructorReturn":15}],2:[function(require,module,exports){ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports["default"] = void 0; + +var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); + +var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); + +var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); + +var _errors = _interopRequireDefault(require("../utils/errors")); + +var _default = /*#__PURE__*/function () { + /** + *@param {HTMLElement} el + * @param {{component: string, autoSubmit: boolean, ?customer: object, ?basket:object, ?submitButton: string, ?isB2B: boolean}} settings + */ + function _default(el, settings) { + (0, _classCallCheck2["default"])(this, _default); + (0, _defineProperty2["default"])(this, "inputNames", { + 'resourceId': 'paymentData[resourceId]', + 'customerId': 'paymentData[customerId]', + 'threatMetrixId': 'paymentData[threatMetrixId]' + }); + (0, _defineProperty2["default"])(this, "unzerCheckout", null); + (0, _defineProperty2["default"])(this, "unzerPayment", null); + this.el = el; + this.settings = settings; + this.customElement = "unzer-" + settings.component; + this.submitButton = document.querySelector(settings.submitButton); + this.errorHandler = new _errors["default"](); + this.boot(); + this.register(); + } + + (0, _createClass2["default"])(_default, [{ + key: "boot", + value: function boot() { + var wrapper = document.createElement('unzer-checkout'); + + if (this.submitButton) { + // Wrap Submit Button with for + // "automatic handling for enabling/disabling the submit button depending on the current status, + // and showing/hiding of brand icons." + wrapper.id = "unzer-checkout-wrapper"; + this.submitButton.parentNode.insertBefore(wrapper, this.submitButton); + wrapper.appendChild(this.submitButton); + this.submitButton.id = 'unzerUiComponentCheckoutBtn'; + } else { + this.el.appendChild(wrapper); + } + } + }, { + key: "register", + value: function register() { + var _this$submitButton, + _this = this; + + // form + (_this$submitButton = this.submitButton) === null || _this$submitButton === void 0 ? void 0 : _this$submitButton.addEventListener('click', function (e) { + e.preventDefault(); // this.el.closest('form').submit(); + }); // this.#el.closest('form').addEventListener('submit', (e) => { + // console.log('on submit'); + // e.preventDefault(); + // document.querySelector('unzer-checkout > button[type="submit"]').click(); + // }) + // Wait for ui components to be loaded + + Promise.all([customElements.whenDefined("unzer-payment"), customElements.whenDefined("unzer-checkout"), customElements.whenDefined(this.customElement)]).then(function () { + _this.unzerPayment = document.querySelector('unzer-payment'); + _this.unzerCheckout = document.querySelector('unzer-checkout'); + + _this.mounted(); + })["catch"](function (err) { + return _this.logError(err); + }); + } + }, { + key: "mounted", + value: function mounted() { + // this.unzerCheckout.autoDisable = true; + this.unzerCheckout.onPaymentSubmit = this.onPaymentSubmit.bind(this); // Small style fix if needed + + if (this.unzerCheckout.shadowRoot.querySelector('.unzer-checkout')) { + this.unzerCheckout.shadowRoot.querySelector('.unzer-checkout').style.width = '100%'; + } // Set customer data if available + + + if (this.settings.customer) { + if (this.settings.isB2B) { + this.settings.customer.customerSettings = { + 'type': 'B2B' + }; + } + + this.unzerPayment.setCustomerData(this.settings.customer); + } // Set basket data if available + + + if (this.settings.basket) { + this.unzerPayment.setBasketData(this.settings.basket); + } // Autosubmit form + + + if (this.settings.autoSubmit) { + var _this$submitButton2; + + // document.querySelector('unzer-checkout > button[type="submit"]').click(); + (_this$submitButton2 = this.submitButton) === null || _this$submitButton2 === void 0 ? void 0 : _this$submitButton2.click(); + } + } + }, { + key: "onPaymentSubmit", + value: function onPaymentSubmit(response) { + try { + var _response$submitRespo; + + if (this.settings.component === 'card' && ((_response$submitRespo = response.submitResponse) === null || _response$submitRespo === void 0 ? void 0 : _response$submitRespo.success) !== true) { + if (!response.submitResponse || response.submitResponse.status !== 'SUCCESS') { + var _response$submitRespo2; + + throw new Error((_response$submitRespo2 = response.submitResponse.message) !== null && _response$submitRespo2 !== void 0 ? _response$submitRespo2 : 'Failed payment response: ' + JSON.stringify(response, null, 2)); + } + } else { + if (!response.submitResponse || !response.submitResponse.success) { + var _response$submitRespo3; + + throw new Error((_response$submitRespo3 = response.submitResponse.message) !== null && _response$submitRespo3 !== void 0 ? _response$submitRespo3 : 'Failed payment response: ' + JSON.stringify(response, null, 2)); + } + } + + console.log({ + response: response + }); // Append payment resource id + + var resourceIdInput = document.createElement('input'); + resourceIdInput.setAttribute('type', 'hidden'); + resourceIdInput.setAttribute('name', this.inputNames.resourceId); + resourceIdInput.setAttribute('value', response.submitResponse.data.id); + this.el.appendChild(resourceIdInput); // append customer id + + if (response.customerResponse && response.customerResponse.success) { + var customerIdInput = document.createElement('input'); + customerIdInput.setAttribute('type', 'hidden'); + customerIdInput.setAttribute('name', this.inputNames.customerId); + customerIdInput.setAttribute('value', response.customerResponse.data.id); + this.el.appendChild(customerIdInput); + } // append threatmetrix id + + + if (response.threatMetrixId) { + var threatmetrixIdInput = document.createElement('input'); + threatmetrixIdInput.setAttribute('type', 'hidden'); + threatmetrixIdInput.setAttribute('name', this.inputNames.threatMetrixId); + threatmetrixIdInput.setAttribute('value', response.threatMetrixId); + this.el.appendChild(threatmetrixIdInput); + } // submit ids to server side intergration to perform payment transaction + + + this.el.closest('form').submit(); + } catch (err) { + this.logError(err); + } + } + }, { + key: "logError", + value: function logError(err) { + this.errorHandler.show(err); + console.error('Unzer UI Component Error', { + err: err + }); + } + }]); + return _default; +}(); + +exports["default"] = _default; + +},{"../utils/errors":6,"@babel/runtime/helpers/classCallCheck":8,"@babel/runtime/helpers/createClass":9,"@babel/runtime/helpers/defineProperty":10,"@babel/runtime/helpers/interopRequireDefault":14}],3:[function(require,module,exports){ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports["default"] = void 0; + +var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); + +var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); + +var _get2 = _interopRequireDefault(require("@babel/runtime/helpers/get")); + +var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits")); + +var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn")); + +var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf")); + +var _base = _interopRequireDefault(require("./base")); + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } + +var _default = /*#__PURE__*/function (_BaseComponent) { + (0, _inherits2["default"])(_default, _BaseComponent); + + var _super = _createSuper(_default); + + function _default() { + (0, _classCallCheck2["default"])(this, _default); + return _super.apply(this, arguments); + } + + (0, _createClass2["default"])(_default, [{ + key: "mounted", + value: function mounted() { + (0, _get2["default"])((0, _getPrototypeOf2["default"])(_default.prototype), "mounted", this).call(this); + this.inputNames.resourceId = 'unzer-payment-type-id'; + var settings = JSON.parse(this.el.dataset.paymentDataRequest) || {}; + var googlePayData = { + gatewayMerchantId: settings.gatewayMerchantId, + merchantInfo: settings.merchantInfo, + transactionInfo: settings.transactionInfo, + allowedCardNetworks: settings.allowedCardNetworks, + allowCreditCards: settings.allowCreditCards, + allowPrepaidCards: settings.allowPrepaidCards, + buttonOptions: { + buttonColor: settings.buttonOptions.buttonColor, + buttonSizeMode: settings.buttonOptions.buttonSize + } // onPaymentAuthorizedCallback: async (paymentData) => { + // return await this.unzerPayment?.submit() + // .then(response => this.onPaymentSubmit(response)) + // .catch(err => this.logError(err)); + // } + + }; + this.unzerPayment.setGooglePayData(googlePayData); + } + }]); + return _default; +}(_base["default"]); + +exports["default"] = _default; + +},{"./base":2,"@babel/runtime/helpers/classCallCheck":8,"@babel/runtime/helpers/createClass":9,"@babel/runtime/helpers/get":11,"@babel/runtime/helpers/getPrototypeOf":12,"@babel/runtime/helpers/inherits":13,"@babel/runtime/helpers/interopRequireDefault":14,"@babel/runtime/helpers/possibleConstructorReturn":15}],4:[function(require,module,exports){ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); + +var _base = _interopRequireDefault(require("./base")); + +var _errors = _interopRequireDefault(require("../utils/errors")); + +var _googlepay = _interopRequireDefault(require("./googlepay")); + +var _applepay = _interopRequireDefault(require("./applepay")); + +var _klarna = _interopRequireDefault(require("./klarna")); + +/** + * Unzer UI Components V2 + * @see https://docs.unzer.com/online-payments/ui-component-v2/ + */ +// Init component +document.addEventListener('DOMContentLoaded', function () { + /** @type {NodeListOf} */ + var components = document.querySelectorAll('[data-unzer-ui-component]'); + + if (!components || components.length === 0) { + return; + } + + components.forEach(function (el) { + try { + var settings = JSON.parse(el.dataset.unzerUiComponent) || {}; + + if (settings.component === 'google-pay') { + new _googlepay["default"](el, settings); + } else if (settings.component === 'apple-pay') { + new _applepay["default"](el, settings); + } else if (settings.component === 'klarna') { + new _klarna["default"](el, settings); + } else { + new _base["default"](el, settings); + } + } catch (err) { + new _errors["default"]().show(err); + console.error(err); + } + }); +}); + +},{"../utils/errors":6,"./applepay":1,"./base":2,"./googlepay":3,"./klarna":5,"@babel/runtime/helpers/interopRequireDefault":14}],5:[function(require,module,exports){ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports["default"] = void 0; + +var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); + +var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); + +var _get2 = _interopRequireDefault(require("@babel/runtime/helpers/get")); + +var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits")); + +var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn")); + +var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf")); + +var _base = _interopRequireDefault(require("./base")); + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } + +var _default = /*#__PURE__*/function (_BaseComponent) { + (0, _inherits2["default"])(_default, _BaseComponent); + + var _super = _createSuper(_default); + + function _default() { + (0, _classCallCheck2["default"])(this, _default); + return _super.apply(this, arguments); + } + + (0, _createClass2["default"])(_default, [{ + key: "mounted", + value: function mounted() { + (0, _get2["default"])((0, _getPrototypeOf2["default"])(_default.prototype), "mounted", this).call(this); + var locale = new Intl.Locale(navigator.language || navigator.userLanguage || 'en-GB'); + this.unzerPayment.updateCustomerData({ + "language": locale.language + }); + } + }]); + return _default; +}(_base["default"]); + +exports["default"] = _default; + +},{"./base":2,"@babel/runtime/helpers/classCallCheck":8,"@babel/runtime/helpers/createClass":9,"@babel/runtime/helpers/get":11,"@babel/runtime/helpers/getPrototypeOf":12,"@babel/runtime/helpers/inherits":13,"@babel/runtime/helpers/interopRequireDefault":14,"@babel/runtime/helpers/possibleConstructorReturn":15}],6:[function(require,module,exports){ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports["default"] = void 0; + +var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); + +var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); + +var ErrorHandler = /*#__PURE__*/function () { + /** + * @param {JQuery|null} $wrapper Wrapper for Container to display error messages in + * @param {JQuery|null} $holder Container to display error messages in + */ + function ErrorHandler($wrapper, $holder) { + (0, _classCallCheck2["default"])(this, ErrorHandler); + this.$wrapper = $wrapper || $('#error-container'); + this.$holder = $holder || this.$wrapper.find('.alert'); + } + /** + * Show Error message + * @param {String} message + */ + + + (0, _createClass2["default"])(ErrorHandler, [{ + key: "show", + value: function show(message) { + this.$wrapper.show(); + this.$holder.html(message); + } + /** + * Hide error message + */ + + }, { + key: "hide", + value: function hide() { + this.$wrapper.hide(); + this.$holder.html(); + } + }]); + return ErrorHandler; +}(); + +exports["default"] = ErrorHandler; + +},{"@babel/runtime/helpers/classCallCheck":8,"@babel/runtime/helpers/createClass":9,"@babel/runtime/helpers/interopRequireDefault":14}],7:[function(require,module,exports){ +function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return self; +} + +module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports; +},{}],8:[function(require,module,exports){ +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} + +module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports; +},{}],9:[function(require,module,exports){ +function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } +} + +function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + Object.defineProperty(Constructor, "prototype", { + writable: false + }); + return Constructor; +} + +module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports; +},{}],10:[function(require,module,exports){ +function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + + return obj; +} + +module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports; +},{}],11:[function(require,module,exports){ +var superPropBase = require("./superPropBase.js"); + +function _get() { + if (typeof Reflect !== "undefined" && Reflect.get) { + module.exports = _get = Reflect.get.bind(), module.exports.__esModule = true, module.exports["default"] = module.exports; + } else { + module.exports = _get = function _get(target, property, receiver) { + var base = superPropBase(target, property); + if (!base) return; + var desc = Object.getOwnPropertyDescriptor(base, property); + + if (desc.get) { + return desc.get.call(arguments.length < 3 ? target : receiver); + } + + return desc.value; + }, module.exports.__esModule = true, module.exports["default"] = module.exports; + } + + return _get.apply(this, arguments); +} + +module.exports = _get, module.exports.__esModule = true, module.exports["default"] = module.exports; +},{"./superPropBase.js":17}],12:[function(require,module,exports){ +function _getPrototypeOf(o) { + module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }, module.exports.__esModule = true, module.exports["default"] = module.exports; + return _getPrototypeOf(o); +} + +module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports; +},{}],13:[function(require,module,exports){ +var setPrototypeOf = require("./setPrototypeOf.js"); + +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function"); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + writable: true, + configurable: true + } + }); + Object.defineProperty(subClass, "prototype", { + writable: false + }); + if (superClass) setPrototypeOf(subClass, superClass); +} + +module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports; +},{"./setPrototypeOf.js":16}],14:[function(require,module,exports){ +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; +} + +module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports; +},{}],15:[function(require,module,exports){ +var _typeof = require("./typeof.js")["default"]; + +var assertThisInitialized = require("./assertThisInitialized.js"); + +function _possibleConstructorReturn(self, call) { + if (call && (_typeof(call) === "object" || typeof call === "function")) { + return call; + } else if (call !== void 0) { + throw new TypeError("Derived constructors may only return object or undefined"); + } + + return assertThisInitialized(self); +} + +module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports; +},{"./assertThisInitialized.js":7,"./typeof.js":18}],16:[function(require,module,exports){ +function _setPrototypeOf(o, p) { + module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }, module.exports.__esModule = true, module.exports["default"] = module.exports; + return _setPrototypeOf(o, p); +} + +module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports; +},{}],17:[function(require,module,exports){ +var getPrototypeOf = require("./getPrototypeOf.js"); + +function _superPropBase(object, property) { + while (!Object.prototype.hasOwnProperty.call(object, property)) { + object = getPrototypeOf(object); + if (object === null) break; + } + + return object; +} + +module.exports = _superPropBase, module.exports.__esModule = true, module.exports["default"] = module.exports; +},{"./getPrototypeOf.js":12}],18:[function(require,module,exports){ +function _typeof(obj) { + "@babel/helpers - typeof"; + + return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { + return typeof obj; + } : function (obj) { + return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj); +} + +module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports; +},{}]},{},[4]) +//# sourceMappingURL=unzer-ui-components.js.map diff --git a/frontend/js/unzer-ui-components.js.map b/frontend/js/unzer-ui-components.js.map new file mode 100644 index 0000000..0a55bcf --- /dev/null +++ b/frontend/js/unzer-ui-components.js.map @@ -0,0 +1,49 @@ +{ + "version": 3, + "sources": [ + "node_modules/browser-pack/_prelude.js", + "frontend/src/js/components/applepay.js", + "frontend/src/js/components/base.js", + "frontend/src/js/components/googlepay.js", + "frontend/src/js/components/index.js", + "frontend/src/js/components/klarna.js", + "frontend/src/js/utils/errors.js", + "node_modules/@babel/runtime/helpers/assertThisInitialized.js", + "node_modules/@babel/runtime/helpers/classCallCheck.js", + "node_modules/@babel/runtime/helpers/createClass.js", + "node_modules/@babel/runtime/helpers/defineProperty.js", + "node_modules/@babel/runtime/helpers/get.js", + "node_modules/@babel/runtime/helpers/getPrototypeOf.js", + "node_modules/@babel/runtime/helpers/inherits.js", + "node_modules/@babel/runtime/helpers/interopRequireDefault.js", + "node_modules/@babel/runtime/helpers/possibleConstructorReturn.js", + "node_modules/@babel/runtime/helpers/setPrototypeOf.js", + "node_modules/@babel/runtime/helpers/superPropBase.js", + "node_modules/@babel/runtime/helpers/typeof.js" + ], + "names": [], + "mappings": "AAAA;;;;;;;;;;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;;;;;;WAGI,mBAAU;MACN;MACA,KAAK,UAAL,CAAgB,UAAhB,GAA6B,uBAA7B;MAEA,IAAM,YAAY,GAAG,IAAI,CAAC,KAAL,CAAW,KAAK,EAAL,CAAQ,OAAR,CAAgB,kBAA3B,KAAkD,EAAvE,CAJM,CAKN;MACA;MACA;MACA;MACA;;MAEA,KAAK,YAAL,CAAkB,eAAlB,CAAkC,YAAlC;IACH;;;EAbwB,gB;;;;;;;;;;;;;;;;;;;;ACF7B;;;EAaI;AACJ;AACA;AACA;EACI,kBAAY,EAAZ,EAAgB,QAAhB,EAA0B;IAAA;IAAA,qDAbb;MACT,cAAc,yBADL;MAET,cAAc,yBAFL;MAGT,kBAAkB;IAHT,CAaa;IAAA,wDAPV,IAOU;IAAA,uDANX,IAMW;IACtB,KAAK,EAAL,GAAU,EAAV;IACA,KAAK,QAAL,GAAgB,QAAhB;IACA,KAAK,aAAL,GAAqB,WAAW,QAAQ,CAAC,SAAzC;IACA,KAAK,YAAL,GAAoB,QAAQ,CAAC,aAAT,CAAuB,QAAQ,CAAC,YAAhC,CAApB;IACA,KAAK,YAAL,GAAoB,IAAI,kBAAJ,EAApB;IAEA,KAAK,IAAL;IACA,KAAK,QAAL;EACH;;;;WAED,gBAAO;MACH,IAAM,OAAO,GAAG,QAAQ,CAAC,aAAT,CAAuB,gBAAvB,CAAhB;;MAEA,IAAI,KAAK,YAAT,EAAuB;QACnB;QACA;QACA;QACA,OAAO,CAAC,EAAR,GAAa,wBAAb;QACA,KAAK,YAAL,CAAkB,UAAlB,CAA6B,YAA7B,CAA0C,OAA1C,EAAmD,KAAK,YAAxD;QACA,OAAO,CAAC,WAAR,CAAoB,KAAK,YAAzB;QACA,KAAK,YAAL,CAAkB,EAAlB,GAAuB,6BAAvB;MACH,CARD,MAQO;QACH,KAAK,EAAL,CAAQ,WAAR,CAAoB,OAApB;MACH;IACJ;;;WAED,oBAAW;MAAA;MAAA;;MACP;MACA,2BAAK,YAAL,0EAAmB,gBAAnB,CAAoC,OAApC,EAA6C,UAAA,CAAC,EAAI;QAC9C,CAAC,CAAC,cAAF,GAD8C,CAE9C;MACH,CAHD,EAFO,CAOP;MACA;MACA;MACA;MACA;MAEA;;MACA,OAAO,CAAC,GAAR,CAAY,CACR,cAAc,CAAC,WAAf,CAA2B,eAA3B,CADQ,EAER,cAAc,CAAC,WAAf,CAA2B,gBAA3B,CAFQ,EAGR,cAAc,CAAC,WAAf,CAA2B,KAAK,aAAhC,CAHQ,CAAZ,EAIG,IAJH,CAIQ,YAAM;QACV,KAAI,CAAC,YAAL,GAAoB,QAAQ,CAAC,aAAT,CAAuB,eAAvB,CAApB;QACA,KAAI,CAAC,aAAL,GAAqB,QAAQ,CAAC,aAAT,CAAuB,gBAAvB,CAArB;;QACA,KAAI,CAAC,OAAL;MACH,CARD,WASO,UAAC,GAAD;QAAA,OAAS,KAAI,CAAC,QAAL,CAAc,GAAd,CAAT;MAAA,CATP;IAUH;;;WAED,mBAAU;MACN;MACA,KAAK,aAAL,CAAmB,eAAnB,GAAqC,KAAK,eAAL,CAAqB,IAArB,CAA0B,IAA1B,CAArC,CAFM,CAIN;;MACA,IAAI,KAAK,aAAL,CAAmB,UAAnB,CAA8B,aAA9B,CAA4C,iBAA5C,CAAJ,EAAoE;QAChE,KAAK,aAAL,CAAmB,UAAnB,CAA8B,aAA9B,CAA4C,iBAA5C,EAA+D,KAA/D,CAAqE,KAArE,GAA6E,MAA7E;MACH,CAPK,CASN;;;MACA,IAAI,KAAK,QAAL,CAAc,QAAlB,EAA4B;QACxB,IAAI,KAAK,QAAL,CAAc,KAAlB,EAAyB;UACrB,KAAK,QAAL,CAAc,QAAd,CAAuB,gBAAvB,GAA0C;YAAC,QAAQ;UAAT,CAA1C;QACH;;QAED,KAAK,YAAL,CAAkB,eAAlB,CAAkC,KAAK,QAAL,CAAc,QAAhD;MACH,CAhBK,CAkBN;;;MACA,IAAI,KAAK,QAAL,CAAc,MAAlB,EAA0B;QACtB,KAAK,YAAL,CAAkB,aAAlB,CAAgC,KAAK,QAAL,CAAc,MAA9C;MACH,CArBK,CAuBN;;;MACA,IAAI,KAAK,QAAL,CAAc,UAAlB,EAA8B;QAAA;;QAC1B;QACA,4BAAK,YAAL,4EAAmB,KAAnB;MACH;IACJ;;;WAED,yBAAgB,QAAhB,EAA0B;MACtB,IAAI;QAAA;;QACA,IAAI,KAAK,QAAL,CAAc,SAAd,KAA4B,MAA5B,IAAsC,0BAAA,QAAQ,CAAC,cAAT,gFAAyB,OAAzB,MAAqC,IAA/E,EAAqF;UACjF,IAAI,CAAC,QAAQ,CAAC,cAAV,IAA4B,QAAQ,CAAC,cAAT,CAAwB,MAAxB,KAAmC,SAAnE,EAA8E;YAAA;;YAC1E,MAAM,IAAI,KAAJ,2BAAU,QAAQ,CAAC,cAAT,CAAwB,OAAlC,2EAA6C,8BAA8B,IAAI,CAAC,SAAL,CAAe,QAAf,EAAyB,IAAzB,EAA+B,CAA/B,CAA3E,CAAN;UACH;QACJ,CAJD,MAIO;UACH,IAAI,CAAC,QAAQ,CAAC,cAAV,IAA4B,CAAC,QAAQ,CAAC,cAAT,CAAwB,OAAzD,EAAkE;YAAA;;YAC9D,MAAM,IAAI,KAAJ,2BAAU,QAAQ,CAAC,cAAT,CAAwB,OAAlC,2EAA6C,8BAA8B,IAAI,CAAC,SAAL,CAAe,QAAf,EAAyB,IAAzB,EAA+B,CAA/B,CAA3E,CAAN;UACH;QACJ;;QAED,OAAO,CAAC,GAAR,CAAY;UAAE,QAAQ,EAAR;QAAF,CAAZ,EAXA,CAaA;;QACA,IAAM,eAAe,GAAG,QAAQ,CAAC,aAAT,CAAuB,OAAvB,CAAxB;QACA,eAAe,CAAC,YAAhB,CAA6B,MAA7B,EAAqC,QAArC;QACA,eAAe,CAAC,YAAhB,CAA6B,MAA7B,EAAqC,KAAK,UAAL,CAAgB,UAArD;QACA,eAAe,CAAC,YAAhB,CAA6B,OAA7B,EAAsC,QAAQ,CAAC,cAAT,CAAwB,IAAxB,CAA6B,EAAnE;QACA,KAAK,EAAL,CAAQ,WAAR,CAAoB,eAApB,EAlBA,CAoBA;;QACA,IAAI,QAAQ,CAAC,gBAAT,IAA6B,QAAQ,CAAC,gBAAT,CAA0B,OAA3D,EAAoE;UAChE,IAAM,eAAe,GAAG,QAAQ,CAAC,aAAT,CAAuB,OAAvB,CAAxB;UACA,eAAe,CAAC,YAAhB,CAA6B,MAA7B,EAAqC,QAArC;UACA,eAAe,CAAC,YAAhB,CAA6B,MAA7B,EAAqC,KAAK,UAAL,CAAgB,UAArD;UACA,eAAe,CAAC,YAAhB,CAA6B,OAA7B,EAAsC,QAAQ,CAAC,gBAAT,CAA0B,IAA1B,CAA+B,EAArE;UACA,KAAK,EAAL,CAAQ,WAAR,CAAoB,eAApB;QACH,CA3BD,CA6BA;;;QACA,IAAI,QAAQ,CAAC,cAAb,EAA6B;UACzB,IAAM,mBAAmB,GAAG,QAAQ,CAAC,aAAT,CAAuB,OAAvB,CAA5B;UACA,mBAAmB,CAAC,YAApB,CAAiC,MAAjC,EAAyC,QAAzC;UACA,mBAAmB,CAAC,YAApB,CAAiC,MAAjC,EAAyC,KAAK,UAAL,CAAgB,cAAzD;UACA,mBAAmB,CAAC,YAApB,CAAiC,OAAjC,EAA0C,QAAQ,CAAC,cAAnD;UACA,KAAK,EAAL,CAAQ,WAAR,CAAoB,mBAApB;QACH,CApCD,CAsCA;;;QACA,KAAK,EAAL,CAAQ,OAAR,CAAgB,MAAhB,EAAwB,MAAxB;MACH,CAxCD,CAwCE,OAAM,GAAN,EAAW;QACT,KAAK,QAAL,CAAc,GAAd;MACH;IACJ;;;WAED,kBAAS,GAAT,EAAc;MACV,KAAK,YAAL,CAAkB,IAAlB,CAAuB,GAAvB;MACA,OAAO,CAAC,KAAR,CAAc,0BAAd,EAA0C;QAAC,GAAG,EAAH;MAAD,CAA1C;IACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACrJL;;;;;;;;;;;;;;;;;;WAGI,mBAAU;MACN;MAEA,KAAK,UAAL,CAAgB,UAAhB,GAA6B,uBAA7B;MAEA,IAAM,QAAQ,GAAG,IAAI,CAAC,KAAL,CAAW,KAAK,EAAL,CAAQ,OAAR,CAAgB,kBAA3B,KAAkD,EAAnE;MACA,IAAM,aAAa,GAAG;QAClB,iBAAiB,EAAE,QAAQ,CAAC,iBADV;QAElB,YAAY,EAAE,QAAQ,CAAC,YAFL;QAGlB,eAAe,EAAE,QAAQ,CAAC,eAHR;QAIlB,mBAAmB,EAAE,QAAQ,CAAC,mBAJZ;QAKlB,gBAAgB,EAAE,QAAQ,CAAC,gBALT;QAMlB,iBAAiB,EAAE,QAAQ,CAAC,iBANV;QAOlB,aAAa,EAAE;UACX,WAAW,EAAE,QAAQ,CAAC,aAAT,CAAuB,WADzB;UAEX,cAAc,EAAE,QAAQ,CAAC,aAAT,CAAuB;QAF5B,CAPG,CAWlB;QACA;QACA;QACA;QACA;;MAfkB,CAAtB;MAkBA,KAAK,YAAL,CAAkB,gBAAlB,CAAmC,aAAnC;IACH;;;EA1BwB,gB;;;;;;;;;ACE7B;;AACA;;AACA;;AACA;;AACA;;AARA;AACA;AACA;AACA;AAOA;AACA,QAAQ,CAAC,gBAAT,CAA0B,kBAA1B,EAA8C,YAAW;EACrD;EACA,IAAM,UAAU,GAAG,QAAQ,CAAC,gBAAT,CAA0B,2BAA1B,CAAnB;;EAEA,IAAI,CAAC,UAAD,IAAe,UAAU,CAAC,MAAX,KAAsB,CAAzC,EAA4C;IACxC;EACH;;EAED,UAAU,CAAC,OAAX,CAAmB,UAAA,EAAE,EAAI;IACrB,IAAI;MACA,IAAM,QAAQ,GAAG,IAAI,CAAC,KAAL,CAAW,EAAE,CAAC,OAAH,CAAW,gBAAtB,KAA2C,EAA5D;;MAEA,IAAI,QAAQ,CAAC,SAAT,KAAuB,YAA3B,EAAyC;QACrC,IAAI,qBAAJ,CAAuB,EAAvB,EAA2B,QAA3B;MACH,CAFD,MAEO,IAAI,QAAQ,CAAC,SAAT,KAAuB,WAA3B,EAAwC;QAC3C,IAAI,oBAAJ,CAAsB,EAAtB,EAA0B,QAA1B;MACH,CAFM,MAEA,IAAI,QAAQ,CAAC,SAAT,KAAuB,QAA3B,EAAqC;QACxC,IAAI,kBAAJ,CAAoB,EAApB,EAAwB,QAAxB;MACH,CAFM,MAEA;QACH,IAAI,gBAAJ,CAAkB,EAAlB,EAAsB,QAAtB;MACH;IACJ,CAZD,CAYE,OAAM,GAAN,EAAW;MACR,IAAI,kBAAJ,EAAD,CAAmB,IAAnB,CAAwB,GAAxB;MACA,OAAO,CAAC,KAAR,CAAc,GAAd;IACH;EACJ,CAjBD;AAkBH,CA1BD;;;;;;;;;;;;;;;;;;;;;;;;ACXA;;;;;;;;;;;;;;;;;;WAGI,mBAAU;MACN;MAEA,IAAM,MAAM,GAAG,IAAI,IAAI,CAAC,MAAT,CAAgB,SAAS,CAAC,QAAV,IAAsB,SAAS,CAAC,YAAhC,IAAgD,OAAhE,CAAf;MAEA,KAAK,YAAL,CAAkB,kBAAlB,CAAqC;QACjC,YAAY,MAAM,CAAC;MADc,CAArC;IAGH;;;EATwB,gB;;;;;;;;;;;;;;;;;;ICFR,Y;EACjB;AACJ;AACA;AACA;EACI,sBAAY,QAAZ,EAAsB,OAAtB,EAA+B;IAAA;IAC3B,KAAK,QAAL,GAAgB,QAAQ,IAAI,CAAC,CAAC,kBAAD,CAA7B;IACA,KAAK,OAAL,GAAe,OAAO,IAAI,KAAK,QAAL,CAAc,IAAd,CAAmB,QAAnB,CAA1B;EACH;EAED;AACJ;AACA;AACA;;;;;WACI,cAAK,OAAL,EAAc;MACV,KAAK,QAAL,CAAc,IAAd;MACA,KAAK,OAAL,CAAa,IAAb,CAAkB,OAAlB;IACH;IAED;AACJ;AACA;;;;WACI,gBAAO;MACH,KAAK,QAAL,CAAc,IAAd;MACA,KAAK,OAAL,CAAa,IAAb;IACH;;;;;;;;ACzBL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA", + "file": "unzer-ui-components.js", + "sourceRoot": "", + "sourcesContent": [ + "(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c=\"function\"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error(\"Cannot find module '\"+i+\"'\");throw a.code=\"MODULE_NOT_FOUND\",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u=\"function\"==typeof require&&require,i=0;i {\n // return await this.unzerPayment?.submit()\n // .then(response => this.onPaymentSubmit(response))\n // .catch(err => this.logError(err));\n // };\n\n this.unzerPayment.setApplePayData(applePayData);\n }\n}", + "import ErrorHandler from \"../utils/errors\";\n\nexport default class\n{\n inputNames = {\n 'resourceId': 'paymentData[resourceId]',\n 'customerId': 'paymentData[customerId]',\n 'threatMetrixId': 'paymentData[threatMetrixId]'\n };\n\n unzerCheckout = null;\n unzerPayment = null;\n\n /**\n *@param {HTMLElement} el\n * @param {{component: string, autoSubmit: boolean, ?customer: object, ?basket:object, ?submitButton: string, ?isB2B: boolean}} settings\n */\n constructor(el, settings) {\n this.el = el;\n this.settings = settings;\n this.customElement = \"unzer-\" + settings.component;\n this.submitButton = document.querySelector(settings.submitButton);\n this.errorHandler = new ErrorHandler();\n\n this.boot();\n this.register();\n }\n\n boot() {\n const wrapper = document.createElement('unzer-checkout');\n\n if (this.submitButton) {\n // Wrap Submit Button with for\n // \"automatic handling for enabling/disabling the submit button depending on the current status,\n // and showing/hiding of brand icons.\"\n wrapper.id = \"unzer-checkout-wrapper\"\n this.submitButton.parentNode.insertBefore(wrapper, this.submitButton);\n wrapper.appendChild(this.submitButton);\n this.submitButton.id = 'unzerUiComponentCheckoutBtn';\n } else {\n this.el.appendChild(wrapper);\n }\n }\n\n register() {\n // form\n this.submitButton?.addEventListener('click', e => {\n e.preventDefault();\n // this.el.closest('form').submit();\n });\n\n // this.#el.closest('form').addEventListener('submit', (e) => {\n // console.log('on submit');\n // e.preventDefault();\n // document.querySelector('unzer-checkout > button[type=\"submit\"]').click();\n // })\n\n // Wait for ui components to be loaded\n Promise.all([\n customElements.whenDefined(\"unzer-payment\"),\n customElements.whenDefined(\"unzer-checkout\"),\n customElements.whenDefined(this.customElement)\n ]).then(() => {\n this.unzerPayment = document.querySelector('unzer-payment');\n this.unzerCheckout = document.querySelector('unzer-checkout');\n this.mounted();\n })\n .catch((err) => this.logError(err));\n }\n\n mounted() {\n // this.unzerCheckout.autoDisable = true;\n this.unzerCheckout.onPaymentSubmit = this.onPaymentSubmit.bind(this);\n\n // Small style fix if needed\n if (this.unzerCheckout.shadowRoot.querySelector('.unzer-checkout')) {\n this.unzerCheckout.shadowRoot.querySelector('.unzer-checkout').style.width = '100%';\n }\n\n // Set customer data if available\n if (this.settings.customer) {\n if (this.settings.isB2B) {\n this.settings.customer.customerSettings = {'type': 'B2B'};\n }\n\n this.unzerPayment.setCustomerData(this.settings.customer);\n }\n\n // Set basket data if available\n if (this.settings.basket) {\n this.unzerPayment.setBasketData(this.settings.basket);\n }\n\n // Autosubmit form\n if (this.settings.autoSubmit) {\n // document.querySelector('unzer-checkout > button[type=\"submit\"]').click();\n this.submitButton?.click();\n }\n }\n\n onPaymentSubmit(response) {\n try {\n if (this.settings.component === 'card' && response.submitResponse?.success !== true) {\n if (!response.submitResponse || response.submitResponse.status !== 'SUCCESS') {\n throw new Error(response.submitResponse.message ?? 'Failed payment response: ' + JSON.stringify(response, null, 2));\n }\n } else {\n if (!response.submitResponse || !response.submitResponse.success) {\n throw new Error(response.submitResponse.message ?? 'Failed payment response: ' + JSON.stringify(response, null, 2));\n }\n }\n\n console.log({ response });\n\n // Append payment resource id\n const resourceIdInput = document.createElement('input');\n resourceIdInput.setAttribute('type', 'hidden');\n resourceIdInput.setAttribute('name', this.inputNames.resourceId);\n resourceIdInput.setAttribute('value', response.submitResponse.data.id);\n this.el.appendChild(resourceIdInput);\n\n // append customer id\n if (response.customerResponse && response.customerResponse.success) {\n const customerIdInput = document.createElement('input');\n customerIdInput.setAttribute('type', 'hidden');\n customerIdInput.setAttribute('name', this.inputNames.customerId);\n customerIdInput.setAttribute('value', response.customerResponse.data.id);\n this.el.appendChild(customerIdInput);\n }\n\n // append threatmetrix id\n if (response.threatMetrixId) {\n const threatmetrixIdInput = document.createElement('input');\n threatmetrixIdInput.setAttribute('type', 'hidden');\n threatmetrixIdInput.setAttribute('name', this.inputNames.threatMetrixId);\n threatmetrixIdInput.setAttribute('value', response.threatMetrixId);\n this.el.appendChild(threatmetrixIdInput);\n }\n\n // submit ids to server side intergration to perform payment transaction\n this.el.closest('form').submit();\n } catch(err) {\n this.logError(err);\n }\n }\n\n logError(err) {\n this.errorHandler.show(err);\n console.error('Unzer UI Component Error', {err})\n }\n}", + "import BaseComponent from './base';\n\nexport default class extends BaseComponent {\n mounted() {\n super.mounted();\n\n this.inputNames.resourceId = 'unzer-payment-type-id';\n\n const settings = JSON.parse(this.el.dataset.paymentDataRequest) || {};\n const googlePayData = {\n gatewayMerchantId: settings.gatewayMerchantId,\n merchantInfo: settings.merchantInfo,\n transactionInfo: settings.transactionInfo,\n allowedCardNetworks: settings.allowedCardNetworks,\n allowCreditCards: settings.allowCreditCards,\n allowPrepaidCards: settings.allowPrepaidCards,\n buttonOptions: {\n buttonColor: settings.buttonOptions.buttonColor,\n buttonSizeMode: settings.buttonOptions.buttonSize,\n },\n // onPaymentAuthorizedCallback: async (paymentData) => {\n // return await this.unzerPayment?.submit()\n // .then(response => this.onPaymentSubmit(response))\n // .catch(err => this.logError(err));\n // }\n };\n\n this.unzerPayment.setGooglePayData(googlePayData);\n }\n}", + "/**\n * Unzer UI Components V2\n * @see https://docs.unzer.com/online-payments/ui-component-v2/\n */\nimport BaseComponent from \"./base\";\nimport ErrorHandler from \"../utils/errors\";\nimport GooglePayComponent from \"./googlepay\";\nimport ApplePayComponent from \"./applepay\";\nimport KlarnaComponent from \"./klarna\";\n\n// Init component\ndocument.addEventListener('DOMContentLoaded', function() {\n /** @type {NodeListOf} */\n const components = document.querySelectorAll('[data-unzer-ui-component]');\n\n if (!components || components.length === 0) {\n return;\n }\n\n components.forEach(el => {\n try {\n const settings = JSON.parse(el.dataset.unzerUiComponent) || {};\n\n if (settings.component === 'google-pay') {\n new GooglePayComponent(el, settings);\n } else if (settings.component === 'apple-pay') {\n new ApplePayComponent(el, settings);\n } else if (settings.component === 'klarna') {\n new KlarnaComponent(el, settings);\n } else {\n new BaseComponent(el, settings);\n }\n } catch(err) {\n (new ErrorHandler).show(err);\n console.error(err);\n }\n });\n});\n", + "import BaseComponent from './base';\n\nexport default class extends BaseComponent {\n mounted() {\n super.mounted();\n\n const locale = new Intl.Locale(navigator.language || navigator.userLanguage || 'en-GB');\n\n this.unzerPayment.updateCustomerData({\n \"language\": locale.language\n });\n }\n}", + "export default class ErrorHandler {\n /**\n * @param {JQuery|null} $wrapper Wrapper for Container to display error messages in\n * @param {JQuery|null} $holder Container to display error messages in\n */\n constructor($wrapper, $holder) {\n this.$wrapper = $wrapper || $('#error-container');\n this.$holder = $holder || this.$wrapper.find('.alert');\n }\n\n /**\n * Show Error message\n * @param {String} message\n */\n show(message) {\n this.$wrapper.show();\n this.$holder.html(message);\n }\n\n /**\n * Hide error message\n */\n hide() {\n this.$wrapper.hide();\n this.$holder.html();\n }\n}\n", + "function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nmodule.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", + "function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nmodule.exports = _classCallCheck, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", + "function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}\n\nmodule.exports = _createClass, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", + "function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nmodule.exports = _defineProperty, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", + "var superPropBase = require(\"./superPropBase.js\");\n\nfunction _get() {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n module.exports = _get = Reflect.get.bind(), module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n } else {\n module.exports = _get = function _get(target, property, receiver) {\n var base = superPropBase(target, property);\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(arguments.length < 3 ? target : receiver);\n }\n\n return desc.value;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n }\n\n return _get.apply(this, arguments);\n}\n\nmodule.exports = _get, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", + "function _getPrototypeOf(o) {\n module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n return _getPrototypeOf(o);\n}\n\nmodule.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", + "var setPrototypeOf = require(\"./setPrototypeOf.js\");\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n Object.defineProperty(subClass, \"prototype\", {\n writable: false\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}\n\nmodule.exports = _inherits, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", + "function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n}\n\nmodule.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", + "var _typeof = require(\"./typeof.js\")[\"default\"];\n\nvar assertThisInitialized = require(\"./assertThisInitialized.js\");\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n } else if (call !== void 0) {\n throw new TypeError(\"Derived constructors may only return object or undefined\");\n }\n\n return assertThisInitialized(self);\n}\n\nmodule.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", + "function _setPrototypeOf(o, p) {\n module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n return _setPrototypeOf(o, p);\n}\n\nmodule.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", + "var getPrototypeOf = require(\"./getPrototypeOf.js\");\n\nfunction _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}\n\nmodule.exports = _superPropBase, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", + "function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(obj);\n}\n\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;" + ] +} \ No newline at end of file diff --git a/frontend/js/unzer-ui-components.min.js b/frontend/js/unzer-ui-components.min.js new file mode 100644 index 0000000..b8b73f5 --- /dev/null +++ b/frontend/js/unzer-ui-components.min.js @@ -0,0 +1,2 @@ +!function(){function e(t,r,n){function o(s,a){if(!r[s]){if(!t[s]){var l="function"==typeof require&&require;if(!a&&l)return l(s,!0);if(u)return u(s,!0);var i=new Error("Cannot find module '"+s+"'");throw i.code="MODULE_NOT_FOUND",i}var p=r[s]={exports:{}};t[s][0].call(p.exports,function(e){return o(t[s][1][e]||e)},p,p.exports,e,t,r,n)}return r[s].exports}for(var u="function"==typeof require&&require,s=0;s {\n // return await this.unzerPayment?.submit()\n // .then(response => this.onPaymentSubmit(response))\n // .catch(err => this.logError(err));\n // };\n\n this.unzerPayment.setApplePayData(applePayData);\n }\n}","import ErrorHandler from \"../utils/errors\";\n\nexport default class\n{\n inputNames = {\n 'resourceId': 'paymentData[resourceId]',\n 'customerId': 'paymentData[customerId]',\n 'threatMetrixId': 'paymentData[threatMetrixId]'\n };\n\n unzerCheckout = null;\n unzerPayment = null;\n\n /**\n *@param {HTMLElement} el\n * @param {{component: string, autoSubmit: boolean, ?customer: object, ?basket:object, ?submitButton: string, ?isB2B: boolean}} settings\n */\n constructor(el, settings) {\n this.el = el;\n this.settings = settings;\n this.customElement = \"unzer-\" + settings.component;\n this.submitButton = document.querySelector(settings.submitButton);\n this.errorHandler = new ErrorHandler();\n\n this.boot();\n this.register();\n }\n\n boot() {\n const wrapper = document.createElement('unzer-checkout');\n\n if (this.submitButton) {\n // Wrap Submit Button with for\n // \"automatic handling for enabling/disabling the submit button depending on the current status,\n // and showing/hiding of brand icons.\"\n wrapper.id = \"unzer-checkout-wrapper\"\n this.submitButton.parentNode.insertBefore(wrapper, this.submitButton);\n wrapper.appendChild(this.submitButton);\n this.submitButton.id = 'unzerUiComponentCheckoutBtn';\n } else {\n this.el.appendChild(wrapper);\n }\n }\n\n register() {\n // form\n this.submitButton?.addEventListener('click', e => {\n e.preventDefault();\n // this.el.closest('form').submit();\n });\n\n // this.#el.closest('form').addEventListener('submit', (e) => {\n // console.log('on submit');\n // e.preventDefault();\n // document.querySelector('unzer-checkout > button[type=\"submit\"]').click();\n // })\n\n // Wait for ui components to be loaded\n Promise.all([\n customElements.whenDefined(\"unzer-payment\"),\n customElements.whenDefined(\"unzer-checkout\"),\n customElements.whenDefined(this.customElement)\n ]).then(() => {\n this.unzerPayment = document.querySelector('unzer-payment');\n this.unzerCheckout = document.querySelector('unzer-checkout');\n this.mounted();\n })\n .catch((err) => this.logError(err));\n }\n\n mounted() {\n // this.unzerCheckout.autoDisable = true;\n this.unzerCheckout.onPaymentSubmit = this.onPaymentSubmit.bind(this);\n\n // Small style fix if needed\n if (this.unzerCheckout.shadowRoot.querySelector('.unzer-checkout')) {\n this.unzerCheckout.shadowRoot.querySelector('.unzer-checkout').style.width = '100%';\n }\n\n // Set customer data if available\n if (this.settings.customer) {\n if (this.settings.isB2B) {\n this.settings.customer.customerSettings = {'type': 'B2B'};\n }\n\n this.unzerPayment.setCustomerData(this.settings.customer);\n }\n\n // Set basket data if available\n if (this.settings.basket) {\n this.unzerPayment.setBasketData(this.settings.basket);\n }\n\n // Autosubmit form\n if (this.settings.autoSubmit) {\n // document.querySelector('unzer-checkout > button[type=\"submit\"]').click();\n this.submitButton?.click();\n }\n }\n\n onPaymentSubmit(response) {\n try {\n if (this.settings.component === 'card' && response.submitResponse?.success !== true) {\n if (!response.submitResponse || response.submitResponse.status !== 'SUCCESS') {\n throw new Error(response.submitResponse.message ?? 'Failed payment response: ' + JSON.stringify(response, null, 2));\n }\n } else {\n if (!response.submitResponse || !response.submitResponse.success) {\n throw new Error(response.submitResponse.message ?? 'Failed payment response: ' + JSON.stringify(response, null, 2));\n }\n }\n\n console.log({ response });\n\n // Append payment resource id\n const resourceIdInput = document.createElement('input');\n resourceIdInput.setAttribute('type', 'hidden');\n resourceIdInput.setAttribute('name', this.inputNames.resourceId);\n resourceIdInput.setAttribute('value', response.submitResponse.data.id);\n this.el.appendChild(resourceIdInput);\n\n // append customer id\n if (response.customerResponse && response.customerResponse.success) {\n const customerIdInput = document.createElement('input');\n customerIdInput.setAttribute('type', 'hidden');\n customerIdInput.setAttribute('name', this.inputNames.customerId);\n customerIdInput.setAttribute('value', response.customerResponse.data.id);\n this.el.appendChild(customerIdInput);\n }\n\n // append threatmetrix id\n if (response.threatMetrixId) {\n const threatmetrixIdInput = document.createElement('input');\n threatmetrixIdInput.setAttribute('type', 'hidden');\n threatmetrixIdInput.setAttribute('name', this.inputNames.threatMetrixId);\n threatmetrixIdInput.setAttribute('value', response.threatMetrixId);\n this.el.appendChild(threatmetrixIdInput);\n }\n\n // submit ids to server side intergration to perform payment transaction\n this.el.closest('form').submit();\n } catch(err) {\n this.logError(err);\n }\n }\n\n logError(err) {\n this.errorHandler.show(err);\n console.error('Unzer UI Component Error', {err})\n }\n}","import BaseComponent from './base';\n\nexport default class extends BaseComponent {\n mounted() {\n super.mounted();\n\n this.inputNames.resourceId = 'unzer-payment-type-id';\n\n const settings = JSON.parse(this.el.dataset.paymentDataRequest) || {};\n const googlePayData = {\n gatewayMerchantId: settings.gatewayMerchantId,\n merchantInfo: settings.merchantInfo,\n transactionInfo: settings.transactionInfo,\n allowedCardNetworks: settings.allowedCardNetworks,\n allowCreditCards: settings.allowCreditCards,\n allowPrepaidCards: settings.allowPrepaidCards,\n buttonOptions: {\n buttonColor: settings.buttonOptions.buttonColor,\n buttonSizeMode: settings.buttonOptions.buttonSize,\n },\n // onPaymentAuthorizedCallback: async (paymentData) => {\n // return await this.unzerPayment?.submit()\n // .then(response => this.onPaymentSubmit(response))\n // .catch(err => this.logError(err));\n // }\n };\n\n this.unzerPayment.setGooglePayData(googlePayData);\n }\n}","/**\n * Unzer UI Components V2\n * @see https://docs.unzer.com/online-payments/ui-component-v2/\n */\nimport BaseComponent from \"./base\";\nimport ErrorHandler from \"../utils/errors\";\nimport GooglePayComponent from \"./googlepay\";\nimport ApplePayComponent from \"./applepay\";\nimport KlarnaComponent from \"./klarna\";\n\n// Init component\ndocument.addEventListener('DOMContentLoaded', function() {\n /** @type {NodeListOf} */\n const components = document.querySelectorAll('[data-unzer-ui-component]');\n\n if (!components || components.length === 0) {\n return;\n }\n\n components.forEach(el => {\n try {\n const settings = JSON.parse(el.dataset.unzerUiComponent) || {};\n\n if (settings.component === 'google-pay') {\n new GooglePayComponent(el, settings);\n } else if (settings.component === 'apple-pay') {\n new ApplePayComponent(el, settings);\n } else if (settings.component === 'klarna') {\n new KlarnaComponent(el, settings);\n } else {\n new BaseComponent(el, settings);\n }\n } catch(err) {\n (new ErrorHandler).show(err);\n console.error(err);\n }\n });\n});\n","import BaseComponent from './base';\n\nexport default class extends BaseComponent {\n mounted() {\n super.mounted();\n\n const locale = new Intl.Locale(navigator.language || navigator.userLanguage || 'en-GB');\n\n this.unzerPayment.updateCustomerData({\n \"language\": locale.language\n });\n }\n}","export default class ErrorHandler {\n /**\n * @param {JQuery|null} $wrapper Wrapper for Container to display error messages in\n * @param {JQuery|null} $holder Container to display error messages in\n */\n constructor($wrapper, $holder) {\n this.$wrapper = $wrapper || $('#error-container');\n this.$holder = $holder || this.$wrapper.find('.alert');\n }\n\n /**\n * Show Error message\n * @param {String} message\n */\n show(message) {\n this.$wrapper.show();\n this.$holder.html(message);\n }\n\n /**\n * Hide error message\n */\n hide() {\n this.$wrapper.hide();\n this.$holder.html();\n }\n}\n","function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nmodule.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nmodule.exports = _classCallCheck, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}\n\nmodule.exports = _createClass, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nmodule.exports = _defineProperty, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var superPropBase = require(\"./superPropBase.js\");\n\nfunction _get() {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n module.exports = _get = Reflect.get.bind(), module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n } else {\n module.exports = _get = function _get(target, property, receiver) {\n var base = superPropBase(target, property);\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(arguments.length < 3 ? target : receiver);\n }\n\n return desc.value;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n }\n\n return _get.apply(this, arguments);\n}\n\nmodule.exports = _get, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _getPrototypeOf(o) {\n module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n return _getPrototypeOf(o);\n}\n\nmodule.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var setPrototypeOf = require(\"./setPrototypeOf.js\");\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n Object.defineProperty(subClass, \"prototype\", {\n writable: false\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}\n\nmodule.exports = _inherits, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n}\n\nmodule.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\n\nvar assertThisInitialized = require(\"./assertThisInitialized.js\");\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n } else if (call !== void 0) {\n throw new TypeError(\"Derived constructors may only return object or undefined\");\n }\n\n return assertThisInitialized(self);\n}\n\nmodule.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _setPrototypeOf(o, p) {\n module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n return _setPrototypeOf(o, p);\n}\n\nmodule.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var getPrototypeOf = require(\"./getPrototypeOf.js\");\n\nfunction _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}\n\nmodule.exports = _superPropBase, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(obj);\n}\n\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;"]} \ No newline at end of file diff --git a/frontend/js/unzer.js b/frontend/js/unzer.js deleted file mode 100644 index 659a540..0000000 --- a/frontend/js/unzer.js +++ /dev/null @@ -1,1724 +0,0 @@ -(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i Init Payment Type]', { - paymentRequest: this.applePayPaymentRequest - }); - - session.onvalidatemerchant = function (event) { - _this.merchantValidationCallback(event, session); - }; - - session.onpaymentauthorized = function (event) { - _this.applePayAuthorizedCallback(event, session); - }; - - session.oncancel = function (event) { - _this.debugging.log('[> Cancel]', { - event: event - }); - - _this.errorHandler.show(_this.snippets.CANCEL_BY_USER); - }; - - session.begin(); - } - /** - * Call the merchant validation in the server-side integration (apple_pay_merchantvalidation) - * @param {Event} event - * @param {ApplePaySession} session - */ - - }, { - key: "merchantValidationCallback", - value: function merchantValidationCallback(event, session) { - var _this2 = this; - - var validationUrl = JSON.stringify(event.validationURL); - this.debugging.log('[> Merchant Validation]', { - event: event - }); - $.ajax({ - 'url': $.evo.io().options.ioUrl, - 'method': 'POST', - 'dataType': 'json', - 'data': 'io={"name":"apple_pay_merchantvalidation", "params":[' + validationUrl + ']}' - }).done(function (validationResponse) { - _this2.debugging.log('[> Merchant Validation Response]', validationResponse); - - try { - session.completeMerchantValidation(validationResponse); - } catch (e) { - alert(e.message); - } - }).fail(function (error) { - _this2.debugging.log('[> Merchant Validation Error]', error); - - _this2.errorHandler.show(JSON.stringify(error.statusText)); - - session.abort(); - }); - } - /** - * Create Apple Pay resource with unzer and save the resource id to charge it later. - * - * We do this here via AJAX instead of the validateAdditional method in the payment method to set the apple pay - * session state accordingly. - * - * @param {Event} event - * @param {ApplePaySession} session - */ - - }, { - key: "applePayAuthorizedCallback", - value: function applePayAuthorizedCallback(event, session) { - // Get payment data from event. - // "event.payment" also contains contact information, if they were set via Apple Pay. - var self = this; - var unzerApplePayInstance = this.unzerInstance.ApplePay(); - var paymentData = event.payment.token.paymentData; - this.debugging.log('[> Payment Authorization]', { - unzerApplePayInstance: unzerApplePayInstance, - event: event, - paymentData: paymentData - }); // Create an Unzer instance with your public key - - unzerApplePayInstance.createResource(paymentData).then(function (createdResource) { - // Hand over the type ID to your backend. - var typeId = JSON.stringify(createdResource.id); - $.ajax({ - 'url': $.evo.io().options.ioUrl, - 'method': 'POST', - 'dataType': 'json', - 'data': 'io={"name":"apple_pay_payment_authorized", "params":[' + typeId + ']}' - }).done(function (result) { - // Handle the transaction respone from backend. - self.debugging.log('[> Payment Authorization Response]', { - result: result, - typeId: typeId - }); - var status = result.transactionStatus; - - if (status === 'success' || status === 'pending') { - session.completePayment({ - status: window.ApplePaySession.STATUS_SUCCESS - }); // Append Payment Resource Id - - var hiddenInput = document.createElement('input'); - hiddenInput.setAttribute('type', 'hidden'); - hiddenInput.setAttribute('name', 'paymentData[resourceId]'); - hiddenInput.setAttribute('value', typeId); - self.form.appendChild(hiddenInput); // Submitting the form - - self.form.removeEventListener('submit', self.initPaymentType); - self.form.submit(); - } else { - self.abortPaymentSession(session); - } - }).fail(function (error) { - self.errorHandler.show(error.statusText); - self.abortPaymentSession(session); - }); - })["catch"](function (error) { - self.debugging.log('[> Payment Authorization Error]', error); - self.errorHandler.show(error.message); - self.abortPaymentSession(session); - }); - } - /** - * Handle Unsupported devices - */ - - }, { - key: "unsupportedDevice", - value: function unsupportedDevice() { - this.settings.submitButton.disabled = true; - this.settings.submitButton.ariaDisabled = true; - this.errorHandler.show(this.snippets.NOT_SUPPORTED); - } - /** - * abort current payment session. - * @param {ApplePaySession} session - */ - - }, { - key: "abortPaymentSession", - value: function abortPaymentSession(session) { - this.debugging.log('[> Abort Payment Session]', { - status: window.ApplePaySession.STATUS_FAILURE - }); - session.completePayment({ - status: window.ApplePaySession.STATUS_FAILURE - }); - session.abort(); - } - }]); - return ApplePay; -}(); - -exports["default"] = ApplePay; - -},{"../utils/debugging":7,"../utils/errors":8,"@babel/runtime/helpers/classCallCheck":10,"@babel/runtime/helpers/createClass":13,"@babel/runtime/helpers/interopRequireDefault":15}],3:[function(require,module,exports){ -"use strict"; - -var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; - -var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); - -var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); - -var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); - -var _classPrivateFieldGet2 = _interopRequireDefault(require("@babel/runtime/helpers/classPrivateFieldGet")); - -var _errors = _interopRequireDefault(require("../utils/errors")); - -var _debugging2 = _interopRequireDefault(require("../utils/debugging")); - -function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); } - -function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); } - -function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } } - -function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; } - -/** @type {ApplePaySnippets} */ -var ApplePaySnippetsDefaults = { - NOT_SUPPORTED: "This device does not support Apple Pay!", - CANCEL_BY_USER: "Canceled payment process by user!" -}; - -var _errorHandler = /*#__PURE__*/new WeakMap(); - -var _debugging = /*#__PURE__*/new WeakMap(); - -var _applePayAuthorizedCallback = /*#__PURE__*/new WeakSet(); - -var _abortPaymentSession = /*#__PURE__*/new WeakSet(); - -var _unsupportedDevice = /*#__PURE__*/new WeakSet(); - -var ApplePayV2 = /*#__PURE__*/function () { - /** @type {ApplePaySettings} */ - - /** @type {ApplePaySnippets} */ - - /** @type {HTMLFormElement} */ - - /** @type {ApplePayPaymentRequest} */ - - /** - * @class - * @param {String} pubKey - * @param {ApplePayPaymentRequest} applePayPaymentRequest - * @param {ApplePaySnippets} snippets - * @param {ApplePaySettings} settings - */ - function ApplePayV2(pubKey, applePayPaymentRequest, snippets, settings) { - (0, _classCallCheck2["default"])(this, ApplePayV2); - - _classPrivateMethodInitSpec(this, _unsupportedDevice); - - _classPrivateMethodInitSpec(this, _abortPaymentSession); - - _classPrivateMethodInitSpec(this, _applePayAuthorizedCallback); - - (0, _defineProperty2["default"])(this, "settings", void 0); - (0, _defineProperty2["default"])(this, "snippets", void 0); - (0, _defineProperty2["default"])(this, "form", void 0); - (0, _defineProperty2["default"])(this, "applePayPaymentRequest", void 0); - - _classPrivateFieldInitSpec(this, _errorHandler, { - writable: true, - value: new _errors["default"]() - }); - - _classPrivateFieldInitSpec(this, _debugging, { - writable: true, - value: new _debugging2["default"]($('.unzerUI')) - }); - - this.settings = settings; - this.snippets = Object.assign(ApplePaySnippetsDefaults, snippets); - this.form = this.settings.form || document.getElementById('complete_order'); - this.applePayPaymentRequest = applePayPaymentRequest; - this.unzerInstance = new unzer(pubKey, { - locale: this.settings.locale || 'de-DE' - }); - window.UNZER_DEBUG = !!this.unzerInstance._isSandbox || this.unzerInstance.config.hasSandboxKey; // Enable Debugging in sandbox mode - - if (!window.ApplePaySession || !window.ApplePaySession.canMakePayments()) { - _classPrivateMethodGet(this, _unsupportedDevice, _unsupportedDevice2).call(this); - - return; - } // Register Events - - - this.initPaymentType = this.initPaymentType.bind(this); // it's a trick! needed in order to overcome the remove event listener - - this.form.addEventListener('submit', this.initPaymentType); - $('.apple-pay-button').on('click', this.initPaymentType.bind(this)); - } - /** - * @param {Event} event - */ - - - (0, _createClass2["default"])(ApplePayV2, [{ - key: "initPaymentType", - value: function initPaymentType(event) { - var _this = this; - - event.preventDefault(); - var applePayInstance = this.unzerInstance.ApplePay(); - var session = applePayInstance.initApplePaySession(this.applePayPaymentRequest); // setup session with default merchant validation - - (0, _classPrivateFieldGet2["default"])(this, _debugging).log('[> Init Payment Type]', { - paymentRequest: this.applePayPaymentRequest - }); - - if (!window.ApplePaySession || !window.ApplePaySession.canMakePayments()) { - _classPrivateMethodGet(this, _unsupportedDevice, _unsupportedDevice2).call(this); - - return; - } - /** @param {Event} event */ - - - session.onpaymentauthorized = function (event) { - _classPrivateMethodGet(_this, _applePayAuthorizedCallback, _applePayAuthorizedCallback2).call(_this, event, applePayInstance, session); - }; - /** @param {Event} event */ - - - session.oncancel = function (event) { - (0, _classPrivateFieldGet2["default"])(_this, _debugging).log('[> Cancel]', { - event: event - }); - (0, _classPrivateFieldGet2["default"])(_this, _errorHandler).show(_this.snippets.CANCEL_BY_USER); - }; - - session.begin(); - } - /** - * Create Apple Pay resource with unzer and save the resource id to charge it later. - * - * @param {Event & {payment: {token: {paymentData: object}}}} event - * @param {Object} applePayInstance - * @param {ApplePaySession} session - */ - - }]); - return ApplePayV2; -}(); - -exports["default"] = ApplePayV2; - -function _applePayAuthorizedCallback2(event, applePayInstance, session) { - var _this2 = this; - - var paymentData = event.payment.token.paymentData; - (0, _classPrivateFieldGet2["default"])(this, _debugging).log('[> Payment Authorization]', { - applePayInstance: applePayInstance, - event: event, - paymentData: paymentData - }); // Create an Unzer instance with your public key - - applePayInstance.createResource(paymentData).then(function (createdResource) { - (0, _classPrivateFieldGet2["default"])(_this2, _debugging).log('[> Payment Authorization Resource]', { - createdResource: createdResource - }); - session.completePayment({ - status: window.ApplePaySession.STATUS_SUCCESS - }); // Hand over the payment type ID (createdResource.id) - - var typeId = JSON.stringify(createdResource.id); - var hiddenInput = document.createElement('input'); - hiddenInput.setAttribute('type', 'hidden'); - hiddenInput.setAttribute('name', 'unzer-payment-type-id'); - hiddenInput.setAttribute('value', typeId); - - _this2.form.appendChild(hiddenInput); - - _this2.form.removeEventListener('submit', _this2.initPaymentType); - - _this2.form.submit(); - })["catch"](function (error) { - (0, _classPrivateFieldGet2["default"])(_this2, _debugging).log('[> Payment Authorization Error]', error); - (0, _classPrivateFieldGet2["default"])(_this2, _errorHandler).show(error.message); - - _classPrivateMethodGet(_this2, _abortPaymentSession, _abortPaymentSession2).call(_this2, session); - }); -} - -function _abortPaymentSession2(session) { - (0, _classPrivateFieldGet2["default"])(this, _debugging).log('[> Abort Payment Session]', { - status: window.ApplePaySession.STATUS_FAILURE - }); - session.completePayment({ - status: window.ApplePaySession.STATUS_FAILURE - }); - session.abort(); -} - -function _unsupportedDevice2() { - (0, _classPrivateFieldGet2["default"])(this, _errorHandler).show(this.snippets.NOT_SUPPORTED); - console.error(this.snippets.NOT_SUPPORTED); -} - -},{"../utils/debugging":7,"../utils/errors":8,"@babel/runtime/helpers/classCallCheck":10,"@babel/runtime/helpers/classPrivateFieldGet":12,"@babel/runtime/helpers/createClass":13,"@babel/runtime/helpers/defineProperty":14,"@babel/runtime/helpers/interopRequireDefault":15}],4:[function(require,module,exports){ -"use strict"; - -var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; - -var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); - -var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); - -var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); - -var _errors = _interopRequireDefault(require("../utils/errors")); - -var UnzerPayment = /*#__PURE__*/function () { - /** - * Heidelpay Payment Class - * - * @param {string} pubKey Public Key - * @param {string} type Payment Type - * @param {PaymentSettings} settings - */ - function UnzerPayment(pubKey, type, settings) { - (0, _classCallCheck2["default"])(this, UnzerPayment); - - /** @type {PaymentSettings} */ - this.settings = settings || {}; - var options = { - locale: this.settings.locale || 'de-DE' - }; - this.unzerInstance = new unzer(pubKey, options); - this.errorHandler = new _errors["default"](this.settings.$errorContainer, this.settings.$errorMessage); - /** @type {?string} customerId */ - - this.customerId = settings.customerId || null; - /** @type {{createCustomer: Function, updateCustomer: Function}|null} customerResource */ - - this.customerResource = null; - /** @type {{createResource: Function}} paymentType */ - - this.paymentType = this.initPaymentType(type); - /** @type {HTMLElement} form Form in which the customer enters additional details */ - - this.form = this.settings.form || document.getElementById('form_payment_extra'); // Register Events - - this.handleFormSubmit = this.handleFormSubmit.bind(this); // it's a trick! needed in order to overcome the remove event listener - - this.form.addEventListener('submit', this.handleFormSubmit); - - if (this.settings.autoSubmit) { - // this.form.dispatchEvent(new Event('submit')); // Causes endless redirects in some browsers like FF, so we call the callback directly... - this.handleFormSubmit(new Event('submit')); - } - } - /** - * Init Payment Type - * - * @param {string} type - * @returns {object} payment type - * @throws Error if there is an unkown payment type - */ - - - (0, _createClass2["default"])(UnzerPayment, [{ - key: "initPaymentType", - value: function initPaymentType(type) { - switch (type) { - case UnzerPayment.PAYMENT_TYPES.CARD: - return this.createCard(); - - case UnzerPayment.PAYMENT_TYPES.INVOICE: - return this.createInvoice(); - - case UnzerPayment.PAYMENT_TYPES.INVOICE_GUARANTEED: - return this.createInvoiceGuaranteed(); - - case UnzerPayment.PAYMENT_TYPES.INVOICE_FACTORING: - return this.createInvoiceFactoring(); - - case UnzerPayment.PAYMENT_TYPES.SEPA: - return this.createSepa(); - - case UnzerPayment.PAYMENT_TYPES.SEPA_GUARANTEED: - return this.createSepaGuaranteed(); - - case UnzerPayment.PAYMENT_TYPES.PAYPAL: - return this.createPaypal(); - - case UnzerPayment.PAYMENT_TYPES.SOFORT: - return this.createSofort(); - - case UnzerPayment.PAYMENT_TYPES.GIROPAY: - return this.createGiropay(); - - case UnzerPayment.PAYMENT_TYPES.PRZELEWY24: - return this.createPrzelewy24(); - - case UnzerPayment.PAYMENT_TYPES.IDEAL: - return this.createIdeal(); - - case UnzerPayment.PAYMENT_TYPES.PREPAYMENT: - return this.createPrepayment(); - - case UnzerPayment.PAYMENT_TYPES.EPS: - return this.createEPS(); - - case UnzerPayment.PAYMENT_TYPES.FLEXIPAY_DIRECT: - return this.createFlexiPayDirect(); - - case UnzerPayment.PAYMENT_TYPES.ALIPAY: - return this.createAlipay(); - - case UnzerPayment.PAYMENT_TYPES.TWINT: - return this.createTwint(); - - case UnzerPayment.PAYMENT_TYPES.WECHAT_PAY: - return this.createWeChatPay(); - - case UnzerPayment.PAYMENT_TYPES.HIRE_PURCHASE: - return this.createHirePurchase(); - - case UnzerPayment.PAYMENT_TYPES.PAYLATER_INVOICE: - return this.createPaylaterInvoice(); - - case UnzerPayment.PAYMENT_TYPES.BANCONTACT: - return this.createBancontact(); - - case UnzerPayment.PAYMENT_TYPES.PAYLATER_INSTALLMENT: - return this.createPaylaterInstallment(); - - case UnzerPayment.PAYMENT_TYPES.PAYLATER_DIRECT_DEBIT: - return this.createPaylaterDirectDebit(); - - case UnzerPayment.PAYMENT_TYPES.OPEN_BANKING: - return this.createOpenBanking(); - - default: - throw new Error('Unkown Payment Type: ' + type); - } - } - /** - * Handle the form submit - * - * @param {Event} event Submit Event - */ - - }, { - key: "handleFormSubmit", - value: function handleFormSubmit(event) { - var self = this; - event.preventDefault(); // Creating a Payment resource and (optional) Customer Resource - - var resources = [this.paymentType.createResource()]; - - if (this.customerResource) { - resources.push(this.customerId ? this.customerResource.updateCustomer() : this.customerResource.createCustomer()); - } - - Promise.all(resources).then(function (result) { - // Append Payment Resource Id - var hiddenInput = document.createElement('input'); - hiddenInput.setAttribute('type', 'hidden'); - hiddenInput.setAttribute('name', 'paymentData[resourceId]'); - hiddenInput.setAttribute('value', result[0].id); - self.form.appendChild(hiddenInput); // Append Customer Id - - if (result.length >= 2) { - var hiddenCstInput = document.createElement('input'); - hiddenCstInput.setAttribute('type', 'hidden'); - hiddenCstInput.setAttribute('name', 'paymentData[customerId]'); - hiddenCstInput.setAttribute('value', result[1].id); - self.form.appendChild(hiddenCstInput); - } // Submitting the form - - - self.form.removeEventListener('submit', self.handleFormSubmit); - self.form.submit(); - })["catch"](function (error) { - self.errorHandler.show(error.message); - }); - } - /** - * Handle Paylater Input Validation - * @param {Event} event - * @param {boolean} isValid - * @param {String} paymentMethodName - * @param {HTMLElement} continueButton - * @returns - */ - - }, { - key: "onPaylaterInputValidation", - value: function onPaylaterInputValidation(event, isValid, paymentMethodName, continueButton) { - // console.log(paymentMethodName, { event, isValid, continueButton, 's360-valid': continueButton.getAttribute('data-s360-valid') }); - if (isValid) { - // everything is still valid - if (continueButton.getAttribute('data-s360-valid') == 'all') { - continueButton.removeAttribute('disabled'); - return; - } // Customer is already valid -> everything is valid - - - if (continueButton.getAttribute('data-s360-valid') == 'customer') { - continueButton.setAttribute('data-s360-valid', 'all'); - continueButton.removeAttribute('disabled'); - return; - } // mark payment method as valid - - - continueButton.setAttribute('data-s360-valid', paymentMethodName); - return; - } - - continueButton.setAttribute('disabled', true); // only invalidate if the paymentMethodName was valid before - - if (continueButton.getAttribute('data-s360-valid') == paymentMethodName) { - continueButton.setAttribute('data-s360-valid', 0); - } else if (continueButton.getAttribute('data-s360-valid') == 'all') { - continueButton.setAttribute('data-s360-valid', 'customer'); - } - } - /** - * Create (or update) customer resource. - * - * @param {?String} paymentTypeName - * @param {?String} multipleValidation - * @see https://docs.heidelpay.com/docs/customer-ui-integration - * @returns {{createCustomer: Function, updateCustomer: Function}} Customer Resource - */ - - }, { - key: "createCustomer", - value: function createCustomer() { - var paymentTypeName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; - var multipleValidation = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; - var Customer = this.settings.isB2B ? this.unzerInstance.B2BCustomer() : this.unzerInstance.Customer(); - var customerObj = this.settings.customer || {}; - var continueButton = this.settings.submitButton || document.getElementById("submit-button"); - var options = { - containerId: 'customer', - showInfoBox: false, - showHeader: false, - fields: ['name', 'birthdate'] - }; - - if (paymentTypeName) { - options.paymentTypeName = paymentTypeName; - } - - Customer.initFormFields(customerObj); - - if (multipleValidation) { - continueButton.setAttribute('data-s360-valid', 0); - Customer.addEventListener('validate', function (e) { - // console.log('customer validate', e, continueButton, continueButton.getAttribute('data-s360-valid')); - continueButton.setAttribute('disabled', true); - - if (e.success) { - // everything is still valid - if (continueButton.getAttribute('data-s360-valid') == 'all') { - continueButton.removeAttribute('disabled'); - return; - } // payment method is already valid -> everything is valid - - - if (continueButton.getAttribute('data-s360-valid') == paymentTypeName) { - continueButton.setAttribute('data-s360-valid', 'all'); - continueButton.removeAttribute('disabled'); - return; - } - - continueButton.setAttribute('data-s360-valid', 'customer'); - return; - } // only invalidate if the customer was valid before - - - if (continueButton.getAttribute('data-s360-valid') == 'customer') { - continueButton.setAttribute('data-s360-valid', 0); - } else if (continueButton.getAttribute('data-s360-valid') == 'all') { - continueButton.setAttribute('data-s360-valid', paymentTypeName); - } - }); - } else { - Customer.addEventListener('validate', function (e) { - if (e.success) { - continueButton.removeAttribute('disabled'); - return; - } - - continueButton.setAttribute('disabled', true); - }); - } - - if (this.settings.isB2B) { - options.fields = ['companyInfo']; // options = {containerId: 'customer'}; - } - - if (this.customerId) { - Customer.update(this.customerId, options); - return Customer; - } - - Customer.create(options); - return Customer; - } - /** - * Hide form fields from unzer ui component because they are already filled by the shop - * @param {string} paymentMethodName - */ - - }, { - key: "hideFormFields", - value: function hideFormFields(paymentMethodName) { - var _this = this; - - var field = $('#customer'); - field.find('.field').filter('.city, .company, :has(.country), .street, .zip, .firstname, .lastname').hide(); - field.find('.salutation-customer').hide(); - field.find('.firstname, .lastname').parent('.fields').hide(); - field.find('.unzerUI.divider-horizontal:eq(0)').hide(); - field.find('.unzerUI.message.downArrow').hide(); - - if (paymentMethodName) { - field.find('.field').filter('.checkbox-billingAddress, .email').hide(); - field.find('.field').filter('.billing-name, .billing-street, .billing-zip, .billing-city, :has(.billing-country)').hide(); - field.find('.unzerUI.form>.checkboxLabel').hide(); - field.find('.unzerUI.form>.salutation-unzer-' + paymentMethodName + '-customer').hide(); - } - - field.find('.companyType').on('change', function (e) { - return _this.hideFormFields(paymentMethodName); - }); - } - /** - * Create Paylayter Installment Payment Type - * - * @see https://docs.unzer.com/payment-methods/unzer-installment-upl/accept-unzer-installment-ui-component/ - * @returns {{createResource: Function}} - */ - - }, { - key: "createPaylaterInstallment", - value: function createPaylaterInstallment() { - var _this2 = this; - - this.customerResource = this.createCustomer('paylater-installment', true); - var continueButton = this.settings.submitButton || document.getElementById("submit-button"); - var paylaterInstallment = this.unzerInstance.PaylaterInstallment(); - this.hideFormFields('paylater-installment'); - paylaterInstallment.create({ - containerId: 'paylater-installment', - amount: this.settings.amount, - currency: this.settings.currency, - country: this.settings.country - }); - paylaterInstallment.addEventListener('paylaterInstallmentEvent', function (e) { - switch (e.currentStep) { - case 'plan-list': - continueButton.setAttribute('disabled', true); - break; - - case 'plan-detail': - continueButton.setAttribute('disabled', false); - break; - - default: - break; - } - - var isValid = e.action === 'validate' && e.success; - - _this2.onPaylaterInputValidation(e, isValid, 'paylater-installment', continueButton); - }); - return paylaterInstallment; - } - /** - * Create Paylayter Invoice Payment Type - * - * @see https://docs.unzer.com/payment-methods/unzer-invoice-upl/accept-unzer-invoice-upl-ui-component/ - * @returns {{createResource: Function}} - */ - - }, { - key: "createPaylaterInvoice", - value: function createPaylaterInvoice() { - var _this3 = this; - - this.customerResource = this.createCustomer('paylater-invoice', true); - var continueButton = this.settings.submitButton || document.getElementById("submit-button"); - var paylaterInvoice = this.unzerInstance.PaylaterInvoice(); - this.hideFormFields('paylater-invoice'); - paylaterInvoice.create({ - containerId: 'paylater-invoice', - customerType: this.settings.isB2B ? 'B2B' : 'B2C' - }); - paylaterInvoice.addEventListener('change', function (e) { - return _this3.onPaylaterInputValidation(e, e.success, 'paylater-invoice', continueButton); - }); - return paylaterInvoice; - } - /** - * Create Paylayter Invoice Payment Type - * - * @see https://docs.unzer.com/payment-methods/direct-debit-secured/accept-direct-debit-secured-ui-component/ - * @returns {{createResource: Function}} - */ - - }, { - key: "createPaylaterDirectDebit", - value: function createPaylaterDirectDebit() { - var _this4 = this; - - this.customerResource = this.createCustomer('paylater-direct-debit', true); - var continueButton = this.settings.submitButton || document.getElementById("submit-button"); - var paylaterDirectDebit = this.unzerInstance.PaylaterDirectDebit(); - this.hideFormFields('paylater-direct-debit'); - paylaterDirectDebit.create('paylater-direct-debit', { - containerId: 'paylater-direct-debit', - customerType: this.settings.isB2B ? 'B2B' : 'B2C' - }); - paylaterDirectDebit.addEventListener('change', function (e) { - return _this4.onPaylaterInputValidation(e, e.success, 'paylater-direct-debit', continueButton); - }); - return paylaterDirectDebit; - } - /** - * Create Bancontact Payment Type - * - * @see https://docs.unzer.com/payment-methods/bancontact/accept-bancontact-ui-component/ - * @returns {{createResource: Function}} - */ - - }, { - key: "createBancontact", - value: function createBancontact() { - var bancontact = this.unzerInstance.Bancontact(); - var styling = { - fontSize: null, - fontColor: null, - fontFamily: null - }; - - if (this.settings.styling) { - styling.fontColor = this.settings.styling.fontColor || null; - styling.fontSize = this.settings.styling.fontSize || null; - styling.fontFamily = this.settings.styling.fontFamily || null; - } - - bancontact.create('holder', { - containerId: 'bancontact-holder', - fontSize: styling.fontSize, - fontColor: styling.fontColor, - fontFamily: styling.fontFamily - }); - return bancontact; - } - /** - * Create a new Card Payment Type. - * - * @see https://docs.heidelpay.com/docs/credit-card-ui-integration - * @returns {{createResource: Function}} Card Payment Type - */ - - }, { - key: "createCard", - value: function createCard() { - var _this5 = this; - - var Card = this.unzerInstance.Card(); - var styling = { - fontSize: null, - fontColor: null, - fontFamily: null - }; - - if (this.settings.styling) { - styling.fontColor = this.settings.styling.fontColor || null; - styling.fontSize = this.settings.styling.fontSize || null; - styling.fontFamily = this.settings.styling.fontFamily || null; - } - - Card.create('number', { - containerId: 'card-element-id-number', - onlyIframe: false, - fontSize: styling.fontSize, - fontColor: styling.fontColor, - fontFamily: styling.fontFamily - }); - Card.create('expiry', { - containerId: 'card-element-id-expiry', - onlyIframe: false, - fontSize: styling.fontSize, - fontColor: styling.fontColor, - fontFamily: styling.fontFamily - }); - Card.create('cvc', { - containerId: 'card-element-id-cvc', - onlyIframe: false, - fontSize: styling.fontSize, - fontColor: styling.fontColor // fontFamily: styling.fontFamily // messes with hidden font in firefox - - }); - Card.create('holder', { - containerId: 'card-element-id-holder', - onlyIframe: false, - fontSize: styling.fontSize, - fontColor: styling.fontColor, - fontFamily: styling.fontFamily - }); // Enable pay button initially - - var formFieldValid = {}; - /** @type {HTMLElement} continueButton */ - - var continueButton = this.settings.submitButton || document.getElementById("submit-button"); - continueButton.setAttribute('disabled', true); - Card.addEventListener('change', function (e) { - if (e.success) { - formFieldValid[e.type] = true; - - _this5.errorHandler.hide(); - } - - if (e.error) { - formFieldValid[e.type] = false; - - _this5.errorHandler.show(e.error); - } - - if (e.reset) { - formFieldValid[e.type] = false; - } - - if (formFieldValid.number && formFieldValid.expiry && formFieldValid.cvc && formFieldValid.holder) { - continueButton.removeAttribute('disabled'); - return; - } - - continueButton.setAttribute('disabled', true); - }); - return Card; - } - /** - * Create a new Invoice Payment Type. - * - * @see https://docs.heidelpay.com/docs/invoice-ui-integration - * @returns {{createResource: Function}} Invoice Payment Type - */ - - }, { - key: "createInvoice", - value: function createInvoice() { - return this.unzerInstance.Invoice(); - } - /** - * Create a new Invoice Guaranteed Payment Type. - * - * @see https://docs.heidelpay.com/docs/invoice-ui-integration - * @returns {{createResource: Function}} Invoice Payment Type - */ - - }, { - key: "createInvoiceGuaranteed", - value: function createInvoiceGuaranteed() { - this.customerResource = this.createCustomer(); - return this.unzerInstance.InvoiceSecured(); - } - /** - * Create a new Invoice Factoring Payment Type. - * - * @see https://docs.heidelpay.com/docs/invoice-ui-integration - * @returns {{createResource: Function}} Invoice Payment Type - */ - - }, { - key: "createInvoiceFactoring", - value: function createInvoiceFactoring() { - this.customerResource = this.createCustomer(); - return this.unzerInstance.InvoiceSecured(); - } - /** - * Create a new SEPA Direct Debit Payment Type. - * - * @see https://docs.heidelpay.com/docs/sepa-direct-debit-ui-integration - * @returns {{createResource: Function}} SEPA Direct Debit Payment Type - */ - - }, { - key: "createSepa", - value: function createSepa() { - var _this6 = this; - - var Sepa = this.unzerInstance.SepaDirectDebit(); - Sepa.create('sepa-direct-debit', { - containerId: 'sepa-IBAN' - }); - /** @type {HTMLElement} continueButton */ - - var continueButton = this.settings.submitButton || document.getElementById("submit-button"); - continueButton.setAttribute('disabled', true); - Sepa.addEventListener('change', function (e) { - if (e.success) { - continueButton.removeAttribute('disabled'); - - _this6.errorHandler.hide(); - - return; - } - - continueButton.setAttribute('disabled', true); - }); - return Sepa; - } - /** - * Create a new SEPA Direct Debit (guaranteed) Payment Type. - * - * @see https://docs.heidelpay.com/docs/sepa-direct-debit-ui-integration - * @returns {{createResource: Function}} SEPA Direct Debit (guaranteed) Payment Type - */ - - }, { - key: "createSepaGuaranteed", - value: function createSepaGuaranteed() { - var _this7 = this; - - var SepaGuaranteed = this.unzerInstance.SepaDirectDebitSecured(); - SepaGuaranteed.create('sepa-direct-debit-guaranteed', { - containerId: 'sepa-guaranteed-IBAN' - }); - /** @type {HTMLElement} continueButton */ - - var continueButton = this.settings.submitButton || document.getElementById("submit-button"); - continueButton.setAttribute('disabled', true); - SepaGuaranteed.addEventListener('change', function (e) { - if (e.success) { - continueButton.removeAttribute('disabled'); - - _this7.errorHandler.hide(); - - return; - } - - continueButton.setAttribute('disabled', true); - }); - this.customerResource = this.createCustomer(); - return SepaGuaranteed; - } - /** - * Create a new PayPal Payment Type. - * - * @see https://docs.heidelpay.com/docs/paypal-ui-integration - * @returns {{createResource: Function}} Papal Payment Type - */ - - }, { - key: "createPaypal", - value: function createPaypal() { - var Paypal = this.unzerInstance.Paypal(); - Paypal.create('email', { - containerId: 'paypal-element-email' - }); - return Paypal; - } - /** - * Create a new SOFORT Payment Type. - * - * @see https://docs.heidelpay.com/docs/redirect-ui-integration#sofort - * @returns {{createResource: Function}} Sofort Payment Type - */ - - }, { - key: "createSofort", - value: function createSofort() { - return this.unzerInstance.Sofort(); - } - /** - * Create a new Giropay Payment Type. - * - * @see https://docs.heidelpay.com/docs/redirect-ui-integration#giropay - * @returns {{createResource: Function}} Giropay Payment Type - */ - - }, { - key: "createGiropay", - value: function createGiropay() { - return this.unzerInstance.Giropay(); - } - /** - * Create a new Przelewy24 Payment Type. - * - * @see https://docs.heidelpay.com/docs/redirect-ui-integration#przelewy24 - * @returns {{createResource: Function}} Przelewy24 Payment Type - */ - - }, { - key: "createPrzelewy24", - value: function createPrzelewy24() { - return this.unzerInstance.Przelewy24(); - } - /** - * Create a new iDEAL Payment Type. - * - * @see https://docs.heidelpay.com/docs/ideal-ui-integration - * @returns {{createResource: Function}} iDEAL Payment Type - */ - - }, { - key: "createIdeal", - value: function createIdeal() { - var _this8 = this; - - var Ideal = this.unzerInstance.Ideal(); - Ideal.create('ideal', { - containerId: 'ideal-element' - }); - /** @type {HTMLElement} continueButton */ - - var continueButton = this.settings.submitButton || document.getElementById("submit-button"); - continueButton.setAttribute('disabled', true); - Ideal.addEventListener('change', function (e) { - if (e.value) { - continueButton.removeAttribute('disabled'); - - _this8.errorHandler.hide(); - - return; - } - - continueButton.setAttribute('disabled', true); - }); - return Ideal; - } - /** - * Create a new Prepayment Payment Type. - * - * @see https://docs.heidelpay.com/docs/prepayment-ui-integration - * @returns {{createResource: Function}} Prepayment Payment Type - */ - - }, { - key: "createPrepayment", - value: function createPrepayment() { - return this.unzerInstance.Prepayment(); - } - /** - * Create a new EPS Payment Type. - * - * @see https://docs.heidelpay.com/docs/eps-ui-integration - * @returns {{createResource: Function}} EPS Payment Type - */ - - }, { - key: "createEPS", - value: function createEPS() { - return this.unzerInstance.EPS(); - } - /** - * Create a new FlexiPay Direct Payment Type. - * - * @see https://docs.heidelpay.com/docs/redirect-ui-integration#flexipay-direct - * @returns {{createResource: Function}} Alipay Payment Type - */ - - }, { - key: "createFlexiPayDirect", - value: function createFlexiPayDirect() { - return this.unzerInstance.FlexiPayDirect(); - } - /** - * Create a new Alipay Payment Type. - * - * @see https://docs.heidelpay.com/docs/redirect-ui-integration#alipay - * @returns {{createResource: Function}} Alipay Payment Type - */ - - }, { - key: "createAlipay", - value: function createAlipay() { - return this.unzerInstance.Alipay(); - } - /** - * Create a new TWINT Payment Type. - * - * @see https://docs.unzer.com/payment-methods/twint/accept-twint-ui-component/ - * @returns {{createResource: Function}} Twint Payment Type - */ - - }, { - key: "createTwint", - value: function createTwint() { - return this.unzerInstance.Twint(); - } - /** - * Create a new Open Banking Payment Type. - * - * @returns {{createResource: Function}} Twint Payment Type - */ - - }, { - key: "createOpenBanking", - value: function createOpenBanking() { - return this.unzerInstance.OpenBanking(); - } - /** - * Create an new WeChat Pay Payment Type. - * - * @see https://docs.heidelpay.com/docs/redirect-ui-integration#wechat-pay - * @returns {{createResource: Function}} WeChat Pay Payment Type - */ - - }, { - key: "createWeChatPay", - value: function createWeChatPay() { - return this.unzerInstance.Wechatpay(); - } - /** - * Create a new Hire Purchase Payment Type. - * - * @see https:://docs.heidelpay.com/docs/hire-purchase-ui-integration - * @returns {{createResource: Function}} Hire Purchase Payment Type - */ - - }, { - key: "createHirePurchase", - value: function createHirePurchase() { - var InstallmentSecured = this.unzerInstance.InstallmentSecured(); - var self = this; - this.customerResource = this.createCustomer(); - /** @type {HTMLElement} continueButton */ - - var continueButton = self.settings.submitButton || document.getElementById("submit-button"); - continueButton.setAttribute('style', 'display: none'); - continueButton.setAttribute('disabled', true); - InstallmentSecured.create({ - containerId: 'hire-purchase-element', - amount: this.settings.amount || null, - currency: this.settings.currency || null, - effectiveInterest: this.settings.effectiveInterest || null, - orderDate: this.settings.orderDate || null - }).then(function (data) {// if successful, notify the user that the list of installments was fetched successfully - // in case you were using a loading element during the fetching process, - // you can remove it inside this callback function - })["catch"](function (response) { - // sent an error message to the user (fetching installment list failed) - var msg = ''; - console.error(response.message); - response.error.details.forEach(function (err) { - console.error('API-Error: ' + err.code); - msg += err.customerMessage; - }); - self.errorHandler.show(msg); - }); // Listen to UI events - - InstallmentSecured.addEventListener('installmentSecuredEvent', function (e) { - if (e.action === 'validate') { - if (e.success) { - continueButton.removeAttribute('disabled'); - return; - } - - continueButton.setAttribute('disabled', true); - } - - if (e.action === 'change-step') { - if (e.currentSteep === 'plan-list') { - continueButton.setAttribute('style', 'display: none'); - continueButton.setAttribute('disabled', true); - return; - } - - continueButton.setAttribute('style', 'display: inline-block'); - } - }); - return InstallmentSecured; - } - }]); - return UnzerPayment; -}(); - -exports["default"] = UnzerPayment; -(0, _defineProperty2["default"])(UnzerPayment, "PAYMENT_TYPES", { - ALIPAY: 'Alipay', - CARD: 'Card', - EPS: 'EPS', - FLEXIPAY_DIRECT: 'FlexiPay Direct', - HIRE_PURCHASE: 'Hire Purchase', - PAYPAL: 'Paypal', - INVOICE: 'Invoice', - INVOICE_FACTORING: 'Invoice Factoring', - INVOICE_GUARANTEED: 'Invoice Guaranteed', - SEPA: 'SEPA', - SEPA_GUARANTEED: 'SEPA (guaranteed)', - SOFORT: 'SOFORT', - GIROPAY: 'Giropay', - PRZELEWY24: 'Przelewy24', - IDEAL: 'iDEAL', - PREPAYMENT: 'Prepayment', - WECHAT_PAY: 'WeChat Pay', - PAYLATER_INVOICE: 'Paylater Invoice', - BANCONTACT: 'Bancontact', - PAYLATER_INSTALLMENT: 'Paylater Installment', - PAYLATER_DIRECT_DEBIT: 'Paylater Direct Debit', - TWINT: 'Twint', - OPEN_BANKING: 'Open Banking' -}); - -},{"../utils/errors":8,"@babel/runtime/helpers/classCallCheck":10,"@babel/runtime/helpers/createClass":13,"@babel/runtime/helpers/defineProperty":14,"@babel/runtime/helpers/interopRequireDefault":15}],5:[function(require,module,exports){ -"use strict"; - -var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; - -var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); - -var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); - -var _errors = _interopRequireDefault(require("../utils/errors")); - -var GooglePay = /*#__PURE__*/function () { - /** - * @param {string} pubKey - * @param {GooglePaySettings} settings - */ - function GooglePay(pubKey, settings) { - (0, _classCallCheck2["default"])(this, GooglePay); - - /** @type {GooglePaySettings} */ - this.settings = settings || {}; - /** @type {HTMLFormElement} */ - - this.form = this.settings.form || document.getElementById('complete_order'); - var options = { - locale: this.settings.locale || 'de-DE' - }; - this.unzerInstance = new unzer(pubKey, options); - this.errorHandler = new _errors["default"](this.settings.$errorContainer, this.settings.$errorMessage); - this.createPaymentTypeResource(); - } - - (0, _createClass2["default"])(GooglePay, [{ - key: "createPaymentTypeResource", - value: function createPaymentTypeResource() { - var _this = this; - - // Creating a Google Pay instance - var googlepayInstance = this.unzerInstance.Googlepay(); - var paymentData = googlepayInstance.initPaymentDataRequestObject({ - gatewayMerchantId: this.settings.googlepay.gatewayMerchantId, - merchantInfo: this.settings.googlepay.merchantInfo, - transactionInfo: this.settings.googlepay.transactionInfo, - allowedCardNetworks: this.settings.googlepay.allowedCardNetworks, - allowCreditCards: this.settings.googlepay.allowCreditCards, - allowPrepaidCards: this.settings.googlepay.allowPrepaidCards, - buttonOptions: { - buttonColor: this.settings.googlepay.buttonOptions.buttonColor, - buttonSizeMode: this.settings.googlepay.buttonOptions.buttonSize - }, - onPaymentAuthorizedCallback: function onPaymentAuthorizedCallback(paymentData) { - return googlepayInstance.createResource(paymentData).then(_this.onAuthorizedSuccess.bind(_this))["catch"](_this.onAuthorizedFailed.bind(_this)); - } - }); - googlepayInstance.create({ - containerId: 'googlepay-holder' - }, paymentData); - } - /** - * @param {{id: string}} result - * @returns {{ status: string }} - */ - - }, { - key: "onAuthorizedSuccess", - value: function onAuthorizedSuccess(result) { - // Submit the ID to your server-side integration - var hiddenInput = document.createElement('input'); - hiddenInput.setAttribute('type', 'hidden'); - hiddenInput.setAttribute('name', 'unzer-payment-type-id'); - hiddenInput.setAttribute('value', result.id); - this.form.appendChild(hiddenInput); - this.form.submit(); - return { - status: 'success' - }; - } - /** - * @param {{customerMessage?: string, message?: string, data?: {errors?: Array<{customerMessage?: string}>}}} error - * @returns {{ status: string, message: string }} - */ - - }, { - key: "onAuthorizedFailed", - value: function onAuthorizedFailed(error) { - var errorMessage = error.customerMessage || error.message || 'Error'; - - if (error.data && Array.isArray(error.data.errors) && error.data.errors[0]) { - errorMessage = error.data.errors[0].customerMessage || 'Error'; - } - - this.errorHandler.show(errorMessage); - return { - status: 'error', - message: errorMessage || 'Unexpected error' - }; - } - }]); - return GooglePay; -}(); - -exports["default"] = GooglePay; - -},{"../utils/errors":8,"@babel/runtime/helpers/classCallCheck":10,"@babel/runtime/helpers/createClass":13,"@babel/runtime/helpers/interopRequireDefault":15}],6:[function(require,module,exports){ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; - -/** - * Heidelpay Installment Modal Window Handler - * - * @param {string} modalSelector - * @param {HTMLElement} btn Submit Trigger - * @param {JQuery} $form - */ -var Installment = function Installment(modalSelector, btn, $form) { - var modal = $(modalSelector); - btn.addEventListener('click', function () { - $form.trigger('submit'); - }); - $form.on('submit', function (e) { - if (!modal.is(':visible')) { - e.preventDefault(); - modal.modal('show'); - return false; - } - - return true; - }); -}; - -var _default = Installment; -exports["default"] = _default; - -},{}],7:[function(require,module,exports){ -"use strict"; - -var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; - -var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); - -var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); - -var Debugging = /*#__PURE__*/function () { - function Debugging($container) { - (0, _classCallCheck2["default"])(this, Debugging); - this.$container = $container; - this.$log = null; - - if (!window.UNZER_DEBUG) { - return; - } - - this.createLogTemplate(); - } - - (0, _createClass2["default"])(Debugging, [{ - key: "log", - value: function log(context) { - var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - - if (!window.UNZER_DEBUG) { - return; - } - - if (!this.$log) { - this.createLogTemplate(); - } - - this.$log.append('
  • ' + context + '
    ' + JSON.stringify(data, null, '  ') + '
  • '); - } - }, { - key: "createLogTemplate", - value: function createLogTemplate() { - this.$container.append($('
      ')); - this.$log = this.$container.find('.debug-log > ul'); - } - }]); - return Debugging; -}(); - -exports["default"] = Debugging; - -},{"@babel/runtime/helpers/classCallCheck":10,"@babel/runtime/helpers/createClass":13,"@babel/runtime/helpers/interopRequireDefault":15}],8:[function(require,module,exports){ -"use strict"; - -var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; - -var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); - -var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); - -var ErrorHandler = /*#__PURE__*/function () { - /** - * @param {JQuery|null} $wrapper Wrapper for Container to display error messages in - * @param {JQuery|null} $holder Container to display error messages in - */ - function ErrorHandler($wrapper, $holder) { - (0, _classCallCheck2["default"])(this, ErrorHandler); - this.$wrapper = $wrapper || $('#error-container'); - this.$holder = $holder || this.$wrapper.find('.alert'); - } - /** - * Show Error message - * @param {String} message - */ - - - (0, _createClass2["default"])(ErrorHandler, [{ - key: "show", - value: function show(message) { - this.$wrapper.show(); - this.$holder.html(message); - } - /** - * Hide error message - */ - - }, { - key: "hide", - value: function hide() { - this.$wrapper.hide(); - this.$holder.html(); - } - }]); - return ErrorHandler; -}(); - -exports["default"] = ErrorHandler; - -},{"@babel/runtime/helpers/classCallCheck":10,"@babel/runtime/helpers/createClass":13,"@babel/runtime/helpers/interopRequireDefault":15}],9:[function(require,module,exports){ -function _classApplyDescriptorGet(receiver, descriptor) { - if (descriptor.get) { - return descriptor.get.call(receiver); - } - - return descriptor.value; -} - -module.exports = _classApplyDescriptorGet, module.exports.__esModule = true, module.exports["default"] = module.exports; -},{}],10:[function(require,module,exports){ -function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } -} - -module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports; -},{}],11:[function(require,module,exports){ -function _classExtractFieldDescriptor(receiver, privateMap, action) { - if (!privateMap.has(receiver)) { - throw new TypeError("attempted to " + action + " private field on non-instance"); - } - - return privateMap.get(receiver); -} - -module.exports = _classExtractFieldDescriptor, module.exports.__esModule = true, module.exports["default"] = module.exports; -},{}],12:[function(require,module,exports){ -var classApplyDescriptorGet = require("./classApplyDescriptorGet.js"); - -var classExtractFieldDescriptor = require("./classExtractFieldDescriptor.js"); - -function _classPrivateFieldGet(receiver, privateMap) { - var descriptor = classExtractFieldDescriptor(receiver, privateMap, "get"); - return classApplyDescriptorGet(receiver, descriptor); -} - -module.exports = _classPrivateFieldGet, module.exports.__esModule = true, module.exports["default"] = module.exports; -},{"./classApplyDescriptorGet.js":9,"./classExtractFieldDescriptor.js":11}],13:[function(require,module,exports){ -function _defineProperties(target, props) { - for (var i = 0; i < props.length; i++) { - var descriptor = props[i]; - descriptor.enumerable = descriptor.enumerable || false; - descriptor.configurable = true; - if ("value" in descriptor) descriptor.writable = true; - Object.defineProperty(target, descriptor.key, descriptor); - } -} - -function _createClass(Constructor, protoProps, staticProps) { - if (protoProps) _defineProperties(Constructor.prototype, protoProps); - if (staticProps) _defineProperties(Constructor, staticProps); - Object.defineProperty(Constructor, "prototype", { - writable: false - }); - return Constructor; -} - -module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports; -},{}],14:[function(require,module,exports){ -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - - return obj; -} - -module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports; -},{}],15:[function(require,module,exports){ -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { - "default": obj - }; -} - -module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports; -},{}]},{},[1]) -//# sourceMappingURL=unzer.js.map diff --git a/frontend/js/unzer.js.map b/frontend/js/unzer.js.map deleted file mode 100644 index aef1b0d..0000000 --- a/frontend/js/unzer.js.map +++ /dev/null @@ -1,43 +0,0 @@ -{ - "version": 3, - "sources": [ - "node_modules/browser-pack/_prelude.js", - "frontend/src/js/app.js", - "frontend/src/js/payments/applepay.js", - "frontend/src/js/payments/applepay_v2.js", - "frontend/src/js/payments/general.js", - "frontend/src/js/payments/googlepay.js", - "frontend/src/js/payments/instalment.js", - "frontend/src/js/utils/debugging.js", - "frontend/src/js/utils/errors.js", - "node_modules/@babel/runtime/helpers/classApplyDescriptorGet.js", - "node_modules/@babel/runtime/helpers/classCallCheck.js", - "node_modules/@babel/runtime/helpers/classExtractFieldDescriptor.js", - "node_modules/@babel/runtime/helpers/classPrivateFieldGet.js", - "node_modules/@babel/runtime/helpers/createClass.js", - "node_modules/@babel/runtime/helpers/defineProperty.js", - "node_modules/@babel/runtime/helpers/interopRequireDefault.js" - ], - "names": [], - "mappings": "AAAA;;;;;ACAA;;AACA;;AACA;;AACA;;AACA;;AAEA,MAAM,CAAC,SAAP,GAAmB,mBAAnB;AACA,MAAM,CAAC,YAAP,GAAsB,sBAAtB;AACA,MAAM,CAAC,aAAP,GAAuB,oBAAvB;AACA,MAAM,CAAC,eAAP,GAAyB,sBAAzB;AACA,MAAM,CAAC,cAAP,GAAwB,qBAAxB;;;;;;;;;;;;;;;;ACVA;;AACA;;AAEA;AACA,IAAM,wBAAwB,GAAG;EAC7B,aAAa,EAAE,yCADc;EAE7B,cAAc,EAAE;AAFa,CAAjC;;IAKqB,Q;EACjB;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACI,kBAAY,MAAZ,EAAoB,sBAApB,EAA4C,QAA5C,EAAsD,QAAtD,EAAgE;IAAA;;IAC5D;IACA,KAAK,QAAL,GAAgB,QAAQ,IAAI,EAA5B;IAEA;;IACA,KAAK,QAAL,GAAgB,MAAM,CAAC,MAAP,CAAc,wBAAd,EAAwC,QAAxC,CAAhB;IAEA,IAAI,OAAO,GAAG;MACV,MAAM,EAAE,KAAK,QAAL,CAAc,MAAd,IAAwB;IADtB,CAAd;IAIA;;IACA,KAAK,sBAAL,GAA8B,sBAA9B;IACA,KAAK,aAAL,GAAqB,IAAI,KAAJ,CAAU,MAAV,EAAkB,OAAlB,CAArB;IACA,KAAK,YAAL,GAAoB,IAAI,kBAAJ,CAAiB,KAAK,QAAL,CAAc,eAA/B,EAAgD,KAAK,QAAL,CAAc,aAA9D,CAApB;IACA,KAAK,SAAL,GAAiB,IAAI,qBAAJ,CAAc,CAAC,CAAC,UAAD,CAAf,CAAjB;IACA,MAAM,CAAC,WAAP,GAAqB,CAAC,CAAC,KAAK,aAAL,CAAmB,UAArB,IAAmC,KAAK,aAAL,CAAmB,MAAnB,CAA0B,aAAlF,CAhB4D,CAgBqC;;IAEjG,IAAI,CAAC,MAAM,CAAC,eAAR,IAA0B,CAAC,MAAM,CAAC,eAAP,CAAuB,eAAvB,EAA/B,EAAyE;MACrE,KAAK,iBAAL;MACA;IACH;IAED;;;IACA,KAAK,IAAL,GAAY,KAAK,QAAL,CAAc,IAAd,IAAsB,QAAQ,CAAC,cAAT,CAAwB,oBAAxB,CAAlC,CAxB4D,CA0B5D;;IACA,KAAK,eAAL,GAAuB,KAAK,eAAL,CAAqB,IAArB,CAA0B,IAA1B,CAAvB,CA3B4D,CA2BJ;;IACxD,KAAK,IAAL,CAAU,gBAAV,CAA2B,QAA3B,EAAqC,KAAK,eAA1C;IACA,CAAC,CAAC,mBAAD,CAAD,CAAuB,EAAvB,CAA0B,OAA1B,EAAmC,KAAK,eAAL,CAAqB,IAArB,CAA0B,IAA1B,CAAnC;EACH;EAED;AACJ;AACA;AACA;;;;;WACI,yBAAgB,KAAhB,EAAuB;MAAA;;MACnB,KAAK,CAAC,cAAN;;MAEA,IAAI,CAAC,MAAM,CAAC,eAAR,IAA2B,CAAC,MAAM,CAAC,eAAP,CAAuB,eAAvB,EAAhC,EAA0E;QACtE,KAAK,iBAAL;QACA;MACH,CANkB,CAQnB;;;MACA,IAAM,OAAO,GAAG,IAAI,eAAJ,CAAoB,CAApB,EAAuB,KAAK,sBAA5B,CAAhB;MACA,KAAK,SAAL,CAAe,GAAf,CAAmB,uBAAnB,EAA4C;QAAC,cAAc,EAAE,KAAK;MAAtB,CAA5C;;MAEA,OAAO,CAAC,kBAAR,GAA6B,UAAC,KAAD,EAAW;QACpC,KAAI,CAAC,0BAAL,CAAgC,KAAhC,EAAuC,OAAvC;MACH,CAFD;;MAIA,OAAO,CAAC,mBAAR,GAA8B,UAAC,KAAD,EAAW;QACrC,KAAI,CAAC,0BAAL,CAAgC,KAAhC,EAAuC,OAAvC;MACH,CAFD;;MAIA,OAAO,CAAC,QAAR,GAAmB,UAAC,KAAD,EAAW;QAC1B,KAAI,CAAC,SAAL,CAAe,GAAf,CAAmB,YAAnB,EAAiC;UAAC,KAAK,EAAL;QAAD,CAAjC;;QACA,KAAI,CAAC,YAAL,CAAkB,IAAlB,CAAuB,KAAI,CAAC,QAAL,CAAc,cAArC;MACH,CAHD;;MAKA,OAAO,CAAC,KAAR;IACH;IAED;AACJ;AACA;AACA;AACA;;;;WACI,oCAA2B,KAA3B,EAAkC,OAAlC,EAA2C;MAAA;;MACvC,IAAI,aAAa,GAAG,IAAI,CAAC,SAAL,CAAe,KAAK,CAAC,aAArB,CAApB;MAEA,KAAK,SAAL,CAAe,GAAf,CAAmB,yBAAnB,EAA8C;QAAC,KAAK,EAAL;MAAD,CAA9C;MAEA,CAAC,CAAC,IAAF,CAAO;QACH,OAAO,CAAC,CAAC,GAAF,CAAM,EAAN,GAAW,OAAX,CAAmB,KADvB;QAEH,UAAU,MAFP;QAGH,YAAY,MAHT;QAIH,QAAQ,0DAA0D,aAA1D,GAA0E;MAJ/E,CAAP,EAKG,IALH,CAKQ,UAAC,kBAAD,EAAwB;QAC5B,MAAI,CAAC,SAAL,CAAe,GAAf,CAAmB,kCAAnB,EAAuD,kBAAvD;;QAEA,IAAI;UACA,OAAO,CAAC,0BAAR,CAAmC,kBAAnC;QACH,CAFD,CAEE,OAAO,CAAP,EAAU;UACR,KAAK,CAAC,CAAC,CAAC,OAAH,CAAL;QACH;MACJ,CAbD,EAcC,IAdD,CAcM,UAAC,KAAD,EAAW;QACb,MAAI,CAAC,SAAL,CAAe,GAAf,CAAmB,+BAAnB,EAAoD,KAApD;;QACA,MAAI,CAAC,YAAL,CAAkB,IAAlB,CAAuB,IAAI,CAAC,SAAL,CAAe,KAAK,CAAC,UAArB,CAAvB;;QACA,OAAO,CAAC,KAAR;MACH,CAlBD;IAmBH;IAED;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;WACI,oCAA2B,KAA3B,EAAkC,OAAlC,EAA2C;MACvC;MACA;MACA,IAAI,IAAI,GAAG,IAAX;MACA,IAAI,qBAAqB,GAAG,KAAK,aAAL,CAAmB,QAAnB,EAA5B;MACA,IAAI,WAAW,GAAG,KAAK,CAAC,OAAN,CAAc,KAAd,CAAoB,WAAtC;MAEA,KAAK,SAAL,CAAe,GAAf,CAAmB,2BAAnB,EAAgD;QAAC,qBAAqB,EAArB,qBAAD;QAAwB,KAAK,EAAL,KAAxB;QAA+B,WAAW,EAAX;MAA/B,CAAhD,EAPuC,CASvC;;MACA,qBAAqB,CAAC,cAAtB,CAAqC,WAArC,EACK,IADL,CACU,UAAU,eAAV,EAA2B;QAC7B;QACA,IAAI,MAAM,GAAG,IAAI,CAAC,SAAL,CAAe,eAAe,CAAC,EAA/B,CAAb;QACA,CAAC,CAAC,IAAF,CAAO;UACH,OAAO,CAAC,CAAC,GAAF,CAAM,EAAN,GAAW,OAAX,CAAmB,KADvB;UAEH,UAAU,MAFP;UAGH,YAAY,MAHT;UAIH,QAAQ,0DAA0D,MAA1D,GAAmE;QAJxE,CAAP,EAKG,IALH,CAKQ,UAAU,MAAV,EAAkB;UACtB;UACA,IAAI,CAAC,SAAL,CAAe,GAAf,CAAmB,oCAAnB,EAAyD;YAAC,MAAM,EAAN,MAAD;YAAS,MAAM,EAAN;UAAT,CAAzD;UACA,IAAI,MAAM,GAAG,MAAM,CAAC,iBAApB;;UACA,IAAI,MAAM,KAAK,SAAX,IAAwB,MAAM,KAAK,SAAvC,EAAkD;YAC9C,OAAO,CAAC,eAAR,CAAwB;cAAE,MAAM,EAAE,MAAM,CAAC,eAAP,CAAuB;YAAjC,CAAxB,EAD8C,CAG9C;;YACA,IAAM,WAAW,GAAG,QAAQ,CAAC,aAAT,CAAuB,OAAvB,CAApB;YACA,WAAW,CAAC,YAAZ,CAAyB,MAAzB,EAAiC,QAAjC;YACA,WAAW,CAAC,YAAZ,CAAyB,MAAzB,EAAiC,yBAAjC;YACA,WAAW,CAAC,YAAZ,CAAyB,OAAzB,EAAkC,MAAlC;YACA,IAAI,CAAC,IAAL,CAAU,WAAV,CAAsB,WAAtB,EAR8C,CAU9C;;YACA,IAAI,CAAC,IAAL,CAAU,mBAAV,CAA8B,QAA9B,EAAwC,IAAI,CAAC,eAA7C;YACA,IAAI,CAAC,IAAL,CAAU,MAAV;UACH,CAbD,MAaO;YACH,IAAI,CAAC,mBAAL,CAAyB,OAAzB;UACH;QACJ,CAzBD,EAyBG,IAzBH,CAyBQ,UAAU,KAAV,EAAiB;UACrB,IAAI,CAAC,YAAL,CAAkB,IAAlB,CAAuB,KAAK,CAAC,UAA7B;UACA,IAAI,CAAC,mBAAL,CAAyB,OAAzB;QACH,CA5BD;MA6BH,CAjCL,WAkCW,UAAU,KAAV,EAAiB;QACpB,IAAI,CAAC,SAAL,CAAe,GAAf,CAAmB,iCAAnB,EAAsD,KAAtD;QACA,IAAI,CAAC,YAAL,CAAkB,IAAlB,CAAuB,KAAK,CAAC,OAA7B;QACA,IAAI,CAAC,mBAAL,CAAyB,OAAzB;MACH,CAtCL;IAuCH;IAED;AACJ;AACA;;;;WACI,6BAAoB;MAChB,KAAK,QAAL,CAAc,YAAd,CAA2B,QAA3B,GAAsC,IAAtC;MACA,KAAK,QAAL,CAAc,YAAd,CAA2B,YAA3B,GAA0C,IAA1C;MACA,KAAK,YAAL,CAAkB,IAAlB,CAAuB,KAAK,QAAL,CAAc,aAArC;IACH;IAED;AACJ;AACA;AACA;;;;WACI,6BAAoB,OAApB,EAA6B;MACzB,KAAK,SAAL,CAAe,GAAf,CAAmB,2BAAnB,EAAgD;QAAE,MAAM,EAAE,MAAM,CAAC,eAAP,CAAuB;MAAjC,CAAhD;MACA,OAAO,CAAC,eAAR,CAAwB;QAAE,MAAM,EAAE,MAAM,CAAC,eAAP,CAAuB;MAAjC,CAAxB;MACA,OAAO,CAAC,KAAR;IACH;;;;;;;;;;;;;;;;;;;;;;;;;AChML;;AACA;;;;;;;;;;AAEA;AACA,IAAM,wBAAwB,GAAG;EAC7B,aAAa,EAAE,yCADc;EAE7B,cAAc,EAAE;AAFa,CAAjC;;;;;;;;;;;;IAKqB,U;EACjB;;EAGA;;EAGA;;EAGA;;EAMA;AACJ;AACA;AACA;AACA;AACA;AACA;EACI,oBAAY,MAAZ,EAAoB,sBAApB,EAA4C,QAA5C,EAAsD,QAAtD,EAAgE;IAAA;;IAAA;;IAAA;;IAAA;;IAAA;IAAA;IAAA;IAAA;;IAAA;MAAA;MAAA,OAVhD,IAAI,kBAAJ;IAUgD;;IAAA;MAAA;MAAA,OATnD,IAAI,sBAAJ,CAAc,CAAC,CAAC,UAAD,CAAf;IASmD;;IAC5D,KAAK,QAAL,GAAgB,QAAhB;IACA,KAAK,QAAL,GAAgB,MAAM,CAAC,MAAP,CAAc,wBAAd,EAAwC,QAAxC,CAAhB;IACA,KAAK,IAAL,GAAY,KAAK,QAAL,CAAc,IAAd,IAAsB,QAAQ,CAAC,cAAT,CAAwB,gBAAxB,CAAlC;IACA,KAAK,sBAAL,GAA8B,sBAA9B;IACA,KAAK,aAAL,GAAqB,IAAI,KAAJ,CAAU,MAAV,EAAkB;MACnC,MAAM,EAAE,KAAK,QAAL,CAAc,MAAd,IAAwB;IADG,CAAlB,CAArB;IAGA,MAAM,CAAC,WAAP,GAAqB,CAAC,CAAC,KAAK,aAAL,CAAmB,UAArB,IAAmC,KAAK,aAAL,CAAmB,MAAnB,CAA0B,aAAlF,CAR4D,CAQqC;;IAEjG,IAAI,CAAC,MAAM,CAAC,eAAR,IAA2B,CAAC,MAAM,CAAC,eAAP,CAAuB,eAAvB,EAAhC,EAA0E;MACtE;;MACA;IACH,CAb2D,CAe5D;;;IACA,KAAK,eAAL,GAAuB,KAAK,eAAL,CAAqB,IAArB,CAA0B,IAA1B,CAAvB,CAhB4D,CAgBJ;;IACxD,KAAK,IAAL,CAAU,gBAAV,CAA2B,QAA3B,EAAqC,KAAK,eAA1C;IACA,CAAC,CAAC,mBAAD,CAAD,CAAuB,EAAvB,CAA0B,OAA1B,EAAmC,KAAK,eAAL,CAAqB,IAArB,CAA0B,IAA1B,CAAnC;EACH;EAED;AACJ;AACA;;;;;WACI,yBAAgB,KAAhB,EAAuB;MAAA;;MACnB,KAAK,CAAC,cAAN;MACA,IAAM,gBAAgB,GAAG,KAAK,aAAL,CAAmB,QAAnB,EAAzB;MACA,IAAM,OAAO,GAAG,gBAAgB,CAAC,mBAAjB,CAAqC,KAAK,sBAA1C,CAAhB,CAHmB,CAGgE;;MAEnF,yDAAgB,GAAhB,CAAoB,uBAApB,EAA6C;QAAE,cAAc,EAAE,KAAK;MAAvB,CAA7C;;MAEA,IAAI,CAAC,MAAM,CAAC,eAAR,IAA2B,CAAC,MAAM,CAAC,eAAP,CAAuB,eAAvB,EAAhC,EAA0E;QACtE;;QACA;MACH;MAED;;;MACA,OAAO,CAAC,mBAAR,GAA8B,UAAC,KAAD,EAAW;QACrC,4BAAI,4DAAJ,WAAI,EAA6B,KAA7B,EAAoC,gBAApC,EAAsD,OAAtD,CAAJ;MACH,CAFD;MAIA;;;MACA,OAAO,CAAC,QAAR,GAAmB,UAAC,KAAD,EAAW;QAC1B,4CAAI,aAAJ,CAAgB,GAAhB,CAAoB,YAApB,EAAkC;UAAC,KAAK,EAAL;QAAD,CAAlC;QACA,4CAAI,gBAAJ,CAAmB,IAAnB,CAAwB,KAAI,CAAC,QAAL,CAAc,cAAtC;MACH,CAHD;;MAKA,OAAO,CAAC,KAAR;IACH;IAED;AACJ;AACA;AACA;AACA;AACA;AACA;;;;;;;;sCACgC,K,EAAO,gB,EAAkB,O,EAAS;EAAA;;EAC1D,IAAM,WAAW,GAAG,KAAK,CAAC,OAAN,CAAc,KAAd,CAAoB,WAAxC;EAEA,yDAAgB,GAAhB,CAAoB,2BAApB,EAAiD;IAAE,gBAAgB,EAAhB,gBAAF;IAAoB,KAAK,EAAL,KAApB;IAA2B,WAAW,EAAX;EAA3B,CAAjD,EAH0D,CAK1D;;EACA,gBAAgB,CAAC,cAAjB,CAAgC,WAAhC,EACK,IADL,CACU,UAAC,eAAD,EAAqB;IACvB,6CAAI,aAAJ,CAAgB,GAAhB,CAAoB,oCAApB,EAA0D;MAAE,eAAe,EAAf;IAAF,CAA1D;IACA,OAAO,CAAC,eAAR,CAAwB;MAAE,MAAM,EAAE,MAAM,CAAC,eAAP,CAAuB;IAAjC,CAAxB,EAFuB,CAIvB;;IACA,IAAM,MAAM,GAAG,IAAI,CAAC,SAAL,CAAe,eAAe,CAAC,EAA/B,CAAf;IACA,IAAM,WAAW,GAAG,QAAQ,CAAC,aAAT,CAAuB,OAAvB,CAApB;IACA,WAAW,CAAC,YAAZ,CAAyB,MAAzB,EAAiC,QAAjC;IACA,WAAW,CAAC,YAAZ,CAAyB,MAAzB,EAAiC,uBAAjC;IACA,WAAW,CAAC,YAAZ,CAAyB,OAAzB,EAAkC,MAAlC;;IAEA,MAAI,CAAC,IAAL,CAAU,WAAV,CAAsB,WAAtB;;IACA,MAAI,CAAC,IAAL,CAAU,mBAAV,CAA8B,QAA9B,EAAwC,MAAI,CAAC,eAA7C;;IACA,MAAI,CAAC,IAAL,CAAU,MAAV;EACH,CAfL,WAgBW,UAAA,KAAK,EAAI;IACZ,6CAAI,aAAJ,CAAgB,GAAhB,CAAoB,iCAApB,EAAuD,KAAvD;IACA,6CAAI,gBAAJ,CAAmB,IAAnB,CAAwB,KAAK,CAAC,OAA9B;;IACA,6BAAI,8CAAJ,YAAI,EAAsB,OAAtB,CAAJ;EACH,CApBL;AAqBH;;+BAMoB,O,EAAS;EAC1B,yDAAgB,GAAhB,CAAoB,2BAApB,EAAiD;IAAE,MAAM,EAAE,MAAM,CAAC,eAAP,CAAuB;EAAjC,CAAjD;EACA,OAAO,CAAC,eAAR,CAAwB;IAAE,MAAM,EAAE,MAAM,CAAC,eAAP,CAAuB;EAAjC,CAAxB;EACA,OAAO,CAAC,KAAR;AACH;;+BAKoB;EACjB,4DAAmB,IAAnB,CAAwB,KAAK,QAAL,CAAc,aAAtC;EACA,OAAO,CAAC,KAAR,CAAc,KAAK,QAAL,CAAc,aAA5B;AACH;;;;;;;;;;;;;;;;;;ACtIL;;IAEqB,Y;EA2BjB;AACJ;AACA;AACA;AACA;AACA;AACA;EACI,sBAAY,MAAZ,EAAoB,IAApB,EAA0B,QAA1B,EAAoC;IAAA;;IAChC;IACA,KAAK,QAAL,GAAgB,QAAQ,IAAI,EAA5B;IAEA,IAAI,OAAO,GAAG;MACV,MAAM,EAAE,KAAK,QAAL,CAAc,MAAd,IAAwB;IADtB,CAAd;IAIA,KAAK,aAAL,GAAqB,IAAI,KAAJ,CAAU,MAAV,EAAkB,OAAlB,CAArB;IACA,KAAK,YAAL,GAAoB,IAAI,kBAAJ,CAAiB,KAAK,QAAL,CAAc,eAA/B,EAAgD,KAAK,QAAL,CAAc,aAA9D,CAApB;IAEA;;IACA,KAAK,UAAL,GAAkB,QAAQ,CAAC,UAAT,IAAuB,IAAzC;IAEA;;IACA,KAAK,gBAAL,GAAwB,IAAxB;IAEA;;IACA,KAAK,WAAL,GAAmB,KAAK,eAAL,CAAqB,IAArB,CAAnB;IAEA;;IACA,KAAK,IAAL,GAAY,KAAK,QAAL,CAAc,IAAd,IAAsB,QAAQ,CAAC,cAAT,CAAwB,oBAAxB,CAAlC,CArBgC,CAuBhC;;IACA,KAAK,gBAAL,GAAwB,KAAK,gBAAL,CAAsB,IAAtB,CAA2B,IAA3B,CAAxB,CAxBgC,CAwB0B;;IAC1D,KAAK,IAAL,CAAU,gBAAV,CAA2B,QAA3B,EAAqC,KAAK,gBAA1C;;IAEA,IAAI,KAAK,QAAL,CAAc,UAAlB,EAA8B;MAC1B;MACA,KAAK,gBAAL,CAAsB,IAAI,KAAJ,CAAU,QAAV,CAAtB;IACH;EACJ;EAED;AACJ;AACA;AACA;AACA;AACA;AACA;;;;;WACI,yBAAgB,IAAhB,EAAsB;MAClB,QAAQ,IAAR;QACI,KAAK,YAAY,CAAC,aAAb,CAA2B,IAAhC;UACI,OAAO,KAAK,UAAL,EAAP;;QAEJ,KAAK,YAAY,CAAC,aAAb,CAA2B,OAAhC;UACI,OAAO,KAAK,aAAL,EAAP;;QAEJ,KAAK,YAAY,CAAC,aAAb,CAA2B,kBAAhC;UACI,OAAO,KAAK,uBAAL,EAAP;;QAEJ,KAAK,YAAY,CAAC,aAAb,CAA2B,iBAAhC;UACI,OAAO,KAAK,sBAAL,EAAP;;QAEJ,KAAK,YAAY,CAAC,aAAb,CAA2B,IAAhC;UACI,OAAO,KAAK,UAAL,EAAP;;QAEJ,KAAK,YAAY,CAAC,aAAb,CAA2B,eAAhC;UACI,OAAO,KAAK,oBAAL,EAAP;;QAEJ,KAAK,YAAY,CAAC,aAAb,CAA2B,MAAhC;UACI,OAAO,KAAK,YAAL,EAAP;;QAEJ,KAAK,YAAY,CAAC,aAAb,CAA2B,MAAhC;UACI,OAAO,KAAK,YAAL,EAAP;;QAEJ,KAAK,YAAY,CAAC,aAAb,CAA2B,OAAhC;UACI,OAAO,KAAK,aAAL,EAAP;;QAEJ,KAAK,YAAY,CAAC,aAAb,CAA2B,UAAhC;UACI,OAAO,KAAK,gBAAL,EAAP;;QAEJ,KAAK,YAAY,CAAC,aAAb,CAA2B,KAAhC;UACI,OAAO,KAAK,WAAL,EAAP;;QAEJ,KAAK,YAAY,CAAC,aAAb,CAA2B,UAAhC;UACI,OAAO,KAAK,gBAAL,EAAP;;QAEJ,KAAK,YAAY,CAAC,aAAb,CAA2B,GAAhC;UACI,OAAO,KAAK,SAAL,EAAP;;QAEJ,KAAK,YAAY,CAAC,aAAb,CAA2B,eAAhC;UACI,OAAO,KAAK,oBAAL,EAAP;;QAEJ,KAAK,YAAY,CAAC,aAAb,CAA2B,MAAhC;UACI,OAAO,KAAK,YAAL,EAAP;;QAEJ,KAAK,YAAY,CAAC,aAAb,CAA2B,KAAhC;UACI,OAAO,KAAK,WAAL,EAAP;;QAEJ,KAAK,YAAY,CAAC,aAAb,CAA2B,UAAhC;UACI,OAAO,KAAK,eAAL,EAAP;;QAEJ,KAAK,YAAY,CAAC,aAAb,CAA2B,aAAhC;UACI,OAAO,KAAK,kBAAL,EAAP;;QAEJ,KAAK,YAAY,CAAC,aAAb,CAA2B,gBAAhC;UACI,OAAO,KAAK,qBAAL,EAAP;;QAEJ,KAAK,YAAY,CAAC,aAAb,CAA2B,UAAhC;UACI,OAAO,KAAK,gBAAL,EAAP;;QAEJ,KAAK,YAAY,CAAC,aAAb,CAA2B,oBAAhC;UACI,OAAO,KAAK,yBAAL,EAAP;;QAEJ,KAAK,YAAY,CAAC,aAAb,CAA2B,qBAAhC;UACI,OAAO,KAAK,yBAAL,EAAP;;QAEJ,KAAK,YAAY,CAAC,aAAb,CAA2B,YAAhC;UACI,OAAO,KAAK,iBAAL,EAAP;;QAEJ;UACI,MAAM,IAAI,KAAJ,CAAU,0BAA0B,IAApC,CAAN;MAvER;IAyEH;IAED;AACJ;AACA;AACA;AACA;;;;WACI,0BAAiB,KAAjB,EAAwB;MACpB,IAAI,IAAI,GAAG,IAAX;MACA,KAAK,CAAC,cAAN,GAFoB,CAIpB;;MACA,IAAI,SAAS,GAAG,CAAC,KAAK,WAAL,CAAiB,cAAjB,EAAD,CAAhB;;MAEA,IAAI,KAAK,gBAAT,EAA2B;QACvB,SAAS,CAAC,IAAV,CAAe,KAAK,UAAL,GAAkB,KAAK,gBAAL,CAAsB,cAAtB,EAAlB,GAA2D,KAAK,gBAAL,CAAsB,cAAtB,EAA1E;MACH;;MAED,OAAO,CAAC,GAAR,CAAY,SAAZ,EAAuB,IAAvB,CAA4B,UAAU,MAAV,EAAkB;QAC1C;QACA,IAAI,WAAW,GAAG,QAAQ,CAAC,aAAT,CAAuB,OAAvB,CAAlB;QACA,WAAW,CAAC,YAAZ,CAAyB,MAAzB,EAAiC,QAAjC;QACA,WAAW,CAAC,YAAZ,CAAyB,MAAzB,EAAiC,yBAAjC;QACA,WAAW,CAAC,YAAZ,CAAyB,OAAzB,EAAkC,MAAM,CAAC,CAAD,CAAN,CAAU,EAA5C;QACA,IAAI,CAAC,IAAL,CAAU,WAAV,CAAsB,WAAtB,EAN0C,CAQ1C;;QACA,IAAI,MAAM,CAAC,MAAP,IAAiB,CAArB,EAAwB;UACpB,IAAI,cAAc,GAAG,QAAQ,CAAC,aAAT,CAAuB,OAAvB,CAArB;UACA,cAAc,CAAC,YAAf,CAA4B,MAA5B,EAAoC,QAApC;UACA,cAAc,CAAC,YAAf,CAA4B,MAA5B,EAAoC,yBAApC;UACA,cAAc,CAAC,YAAf,CAA4B,OAA5B,EAAqC,MAAM,CAAC,CAAD,CAAN,CAAU,EAA/C;UACA,IAAI,CAAC,IAAL,CAAU,WAAV,CAAsB,cAAtB;QACH,CAfyC,CAiB1C;;;QACA,IAAI,CAAC,IAAL,CAAU,mBAAV,CAA8B,QAA9B,EAAwC,IAAI,CAAC,gBAA7C;QACA,IAAI,CAAC,IAAL,CAAU,MAAV;MACH,CApBD,WAqBO,UAAU,KAAV,EAAiB;QACpB,IAAI,CAAC,YAAL,CAAkB,IAAlB,CAAuB,KAAK,CAAC,OAA7B;MACH,CAvBD;IAwBH;IAED;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;;;WACI,mCAA0B,KAA1B,EAAiC,OAAjC,EAA0C,iBAA1C,EAA6D,cAA7D,EAA6E;MACzE;MAEA,IAAI,OAAJ,EAAa;QACT;QACA,IAAI,cAAc,CAAC,YAAf,CAA4B,iBAA5B,KAAkD,KAAtD,EAA6D;UACzD,cAAc,CAAC,eAAf,CAA+B,UAA/B;UACA;QACH,CALQ,CAOT;;;QACA,IAAI,cAAc,CAAC,YAAf,CAA4B,iBAA5B,KAAkD,UAAtD,EAAkE;UAC9D,cAAc,CAAC,YAAf,CAA4B,iBAA5B,EAA+C,KAA/C;UACA,cAAc,CAAC,eAAf,CAA+B,UAA/B;UACA;QACH,CAZQ,CAcT;;;QACA,cAAc,CAAC,YAAf,CAA4B,iBAA5B,EAA+C,iBAA/C;QACA;MACH;;MAED,cAAc,CAAC,YAAf,CAA4B,UAA5B,EAAwC,IAAxC,EAtByE,CAwBzE;;MACA,IAAI,cAAc,CAAC,YAAf,CAA4B,iBAA5B,KAAkD,iBAAtD,EAAyE;QACrE,cAAc,CAAC,YAAf,CAA4B,iBAA5B,EAA+C,CAA/C;MACH,CAFD,MAEO,IAAI,cAAc,CAAC,YAAf,CAA4B,iBAA5B,KAAkD,KAAtD,EAA6D;QAChE,cAAc,CAAC,YAAf,CAA4B,iBAA5B,EAA+C,UAA/C;MACH;IACJ;IAED;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;;;WACI,0BAAmE;MAAA,IAApD,eAAoD,uEAAlC,IAAkC;MAAA,IAA5B,kBAA4B,uEAAP,KAAO;MAC/D,IAAI,QAAQ,GAAG,KAAK,QAAL,CAAc,KAAd,GAAsB,KAAK,aAAL,CAAmB,WAAnB,EAAtB,GAAyD,KAAK,aAAL,CAAmB,QAAnB,EAAxE;MACA,IAAI,WAAW,GAAG,KAAK,QAAL,CAAc,QAAd,IAA0B,EAA5C;MACA,IAAI,cAAc,GAAG,KAAK,QAAL,CAAc,YAAd,IAA8B,QAAQ,CAAC,cAAT,CAAwB,eAAxB,CAAnD;MACA,IAAI,OAAO,GAAG;QACV,WAAW,EAAE,UADH;QAEV,WAAW,EAAE,KAFH;QAGV,UAAU,EAAE,KAHF;QAIV,MAAM,EAAE,CAAC,MAAD,EAAS,WAAT;MAJE,CAAd;;MAOA,IAAI,eAAJ,EAAqB;QACjB,OAAO,CAAC,eAAR,GAA0B,eAA1B;MACH;;MAED,QAAQ,CAAC,cAAT,CAAwB,WAAxB;;MACA,IAAI,kBAAJ,EAAwB;QACpB,cAAc,CAAC,YAAf,CAA4B,iBAA5B,EAA+C,CAA/C;QAEA,QAAQ,CAAC,gBAAT,CAA0B,UAA1B,EAAsC,UAAC,CAAD,EAAO;UACzC;UACA,cAAc,CAAC,YAAf,CAA4B,UAA5B,EAAwC,IAAxC;;UAEA,IAAI,CAAC,CAAC,OAAN,EAAe;YACX;YACA,IAAI,cAAc,CAAC,YAAf,CAA4B,iBAA5B,KAAkD,KAAtD,EAA6D;cACzD,cAAc,CAAC,eAAf,CAA+B,UAA/B;cACA;YACH,CALU,CAOX;;;YACA,IAAI,cAAc,CAAC,YAAf,CAA4B,iBAA5B,KAAkD,eAAtD,EAAuE;cACnE,cAAc,CAAC,YAAf,CAA4B,iBAA5B,EAA+C,KAA/C;cACA,cAAc,CAAC,eAAf,CAA+B,UAA/B;cACA;YACH;;YAED,cAAc,CAAC,YAAf,CAA4B,iBAA5B,EAA+C,UAA/C;YACA;UACH,CApBwC,CAsBzC;;;UACA,IAAI,cAAc,CAAC,YAAf,CAA4B,iBAA5B,KAAkD,UAAtD,EAAkE;YAC9D,cAAc,CAAC,YAAf,CAA4B,iBAA5B,EAA+C,CAA/C;UACH,CAFD,MAEO,IAAI,cAAc,CAAC,YAAf,CAA4B,iBAA5B,KAAkD,KAAtD,EAA6D;YAChE,cAAc,CAAC,YAAf,CAA4B,iBAA5B,EAA+C,eAA/C;UACH;QACJ,CA5BD;MA6BH,CAhCD,MAgCO;QACH,QAAQ,CAAC,gBAAT,CAA0B,UAA1B,EAAsC,UAAC,CAAD,EAAO;UACzC,IAAI,CAAC,CAAC,OAAN,EAAe;YACX,cAAc,CAAC,eAAf,CAA+B,UAA/B;YACA;UACH;;UAED,cAAc,CAAC,YAAf,CAA4B,UAA5B,EAAwC,IAAxC;QACH,CAPD;MAQH;;MAED,IAAI,KAAK,QAAL,CAAc,KAAlB,EAAyB;QACrB,OAAO,CAAC,MAAR,GAAiB,CAAC,aAAD,CAAjB,CADqB,CAErB;MACH;;MAED,IAAI,KAAK,UAAT,EAAqB;QACjB,QAAQ,CAAC,MAAT,CAAgB,KAAK,UAArB,EAAiC,OAAjC;QACA,OAAO,QAAP;MACH;;MAED,QAAQ,CAAC,MAAT,CAAgB,OAAhB;MAEA,OAAO,QAAP;IACH;IAED;AACJ;AACA;AACA;;;;WACI,wBAAe,iBAAf,EAAkC;MAAA;;MAC9B,IAAM,KAAK,GAAG,CAAC,CAAC,WAAD,CAAf;MAEA,KAAK,CAAC,IAAN,CAAW,QAAX,EAAqB,MAArB,CACI,uEADJ,EAEE,IAFF;MAGA,KAAK,CAAC,IAAN,CAAW,sBAAX,EAAmC,IAAnC;MACA,KAAK,CAAC,IAAN,CAAW,uBAAX,EAAoC,MAApC,CAA2C,SAA3C,EAAsD,IAAtD;MACA,KAAK,CAAC,IAAN,CAAW,mCAAX,EAAgD,IAAhD;MACA,KAAK,CAAC,IAAN,CAAW,4BAAX,EAAyC,IAAzC;;MAEA,IAAI,iBAAJ,EAAuB;QACnB,KAAK,CAAC,IAAN,CAAW,QAAX,EAAqB,MAArB,CAA4B,kCAA5B,EAAgE,IAAhE;QACA,KAAK,CAAC,IAAN,CAAW,QAAX,EAAqB,MAArB,CACI,qFADJ,EAEE,IAFF;QAGA,KAAK,CAAC,IAAN,CAAW,8BAAX,EAA2C,IAA3C;QACA,KAAK,CAAC,IAAN,CAAW,qCAAqC,iBAArC,GAAyD,WAApE,EAAiF,IAAjF;MACH;;MAED,KAAK,CAAC,IAAN,CAAW,cAAX,EAA2B,EAA3B,CAA8B,QAA9B,EAAwC,UAAA,CAAC;QAAA,OAAI,KAAI,CAAC,cAAL,CAAoB,iBAApB,CAAJ;MAAA,CAAzC;IACH;IAED;AACJ;AACA;AACA;AACA;AACA;;;;WACI,qCAA4B;MAAA;;MACxB,KAAK,gBAAL,GAAwB,KAAK,cAAL,CAAoB,sBAApB,EAA4C,IAA5C,CAAxB;MACA,IAAM,cAAc,GAAG,KAAK,QAAL,CAAc,YAAd,IAA8B,QAAQ,CAAC,cAAT,CAAwB,eAAxB,CAArD;MACA,IAAM,mBAAmB,GAAG,KAAK,aAAL,CAAmB,mBAAnB,EAA5B;MAEA,KAAK,cAAL,CAAoB,sBAApB;MAEA,mBAAmB,CAAC,MAApB,CAA2B;QACvB,WAAW,EAAE,sBADU;QAEvB,MAAM,EAAE,KAAK,QAAL,CAAc,MAFC;QAGvB,QAAQ,EAAE,KAAK,QAAL,CAAc,QAHD;QAIvB,OAAO,EAAE,KAAK,QAAL,CAAc;MAJA,CAA3B;MAOA,mBAAmB,CAAC,gBAApB,CAAqC,0BAArC,EAAiE,UAAC,CAAD,EAAO;QACpE,QAAQ,CAAC,CAAC,WAAV;UACI,KAAK,WAAL;YACI,cAAc,CAAC,YAAf,CAA4B,UAA5B,EAAwC,IAAxC;YACA;;UAEJ,KAAK,aAAL;YACI,cAAc,CAAC,YAAf,CAA4B,UAA5B,EAAwC,KAAxC;YACA;;UAEJ;YACI;QAVR;;QAaA,IAAM,OAAO,GAAG,CAAC,CAAC,MAAF,KAAa,UAAb,IAA2B,CAAC,CAAC,OAA7C;;QACA,MAAI,CAAC,yBAAL,CAA+B,CAA/B,EAAkC,OAAlC,EAA2C,sBAA3C,EAAmE,cAAnE;MACH,CAhBD;MAkBA,OAAO,mBAAP;IACH;IAED;AACJ;AACA;AACA;AACA;AACA;;;;WACI,iCAAwB;MAAA;;MACpB,KAAK,gBAAL,GAAwB,KAAK,cAAL,CAAoB,kBAApB,EAAwC,IAAxC,CAAxB;MACA,IAAM,cAAc,GAAG,KAAK,QAAL,CAAc,YAAd,IAA8B,QAAQ,CAAC,cAAT,CAAwB,eAAxB,CAArD;MACA,IAAM,eAAe,GAAG,KAAK,aAAL,CAAmB,eAAnB,EAAxB;MAEA,KAAK,cAAL,CAAoB,kBAApB;MAEA,eAAe,CAAC,MAAhB,CAAuB;QACnB,WAAW,EAAE,kBADM;QAEnB,YAAY,EAAE,KAAK,QAAL,CAAc,KAAd,GAAsB,KAAtB,GAA8B;MAFzB,CAAvB;MAKA,eAAe,CAAC,gBAAhB,CAAiC,QAAjC,EAA2C,UAAC,CAAD;QAAA,OACvC,MAAI,CAAC,yBAAL,CACI,CADJ,EAEI,CAAC,CAAC,OAFN,EAGI,kBAHJ,EAII,cAJJ,CADuC;MAAA,CAA3C;MASA,OAAO,eAAP;IACH;IAED;AACJ;AACA;AACA;AACA;AACA;;;;WACI,qCAA4B;MAAA;;MACxB,KAAK,gBAAL,GAAwB,KAAK,cAAL,CAAoB,uBAApB,EAA6C,IAA7C,CAAxB;MACA,IAAM,cAAc,GAAG,KAAK,QAAL,CAAc,YAAd,IAA8B,QAAQ,CAAC,cAAT,CAAwB,eAAxB,CAArD;MACA,IAAM,mBAAmB,GAAG,KAAK,aAAL,CAAmB,mBAAnB,EAA5B;MAEA,KAAK,cAAL,CAAoB,uBAApB;MAEA,mBAAmB,CAAC,MAApB,CAA2B,uBAA3B,EAAoD;QAChD,WAAW,EAAE,uBADmC;QAEhD,YAAY,EAAE,KAAK,QAAL,CAAc,KAAd,GAAsB,KAAtB,GAA8B;MAFI,CAApD;MAKA,mBAAmB,CAAC,gBAApB,CAAqC,QAArC,EAA+C,UAAC,CAAD;QAAA,OAC3C,MAAI,CAAC,yBAAL,CACI,CADJ,EAEI,CAAC,CAAC,OAFN,EAGI,uBAHJ,EAII,cAJJ,CAD2C;MAAA,CAA/C;MASA,OAAO,mBAAP;IACH;IAED;AACJ;AACA;AACA;AACA;AACA;;;;WACI,4BAAmB;MACf,IAAM,UAAU,GAAG,KAAK,aAAL,CAAmB,UAAnB,EAAnB;MACA,IAAM,OAAO,GAAG;QAAE,QAAQ,EAAE,IAAZ;QAAkB,SAAS,EAAE,IAA7B;QAAmC,UAAU,EAAE;MAA/C,CAAhB;;MAEA,IAAI,KAAK,QAAL,CAAc,OAAlB,EAA2B;QACvB,OAAO,CAAC,SAAR,GAAoB,KAAK,QAAL,CAAc,OAAd,CAAsB,SAAtB,IAAmC,IAAvD;QACA,OAAO,CAAC,QAAR,GAAmB,KAAK,QAAL,CAAc,OAAd,CAAsB,QAAtB,IAAkC,IAArD;QACA,OAAO,CAAC,UAAR,GAAqB,KAAK,QAAL,CAAc,OAAd,CAAsB,UAAtB,IAAoC,IAAzD;MACH;;MAED,UAAU,CAAC,MAAX,CAAkB,QAAlB,EAA4B;QACxB,WAAW,EAAE,mBADW;QAExB,QAAQ,EAAE,OAAO,CAAC,QAFM;QAGxB,SAAS,EAAE,OAAO,CAAC,SAHK;QAIxB,UAAU,EAAE,OAAO,CAAC;MAJI,CAA5B;MAOA,OAAO,UAAP;IACH;IAED;AACJ;AACA;AACA;AACA;AACA;;;;WACI,sBAAa;MAAA;;MACT,IAAI,IAAI,GAAG,KAAK,aAAL,CAAmB,IAAnB,EAAX;MACA,IAAI,OAAO,GAAG;QAAC,QAAQ,EAAE,IAAX;QAAiB,SAAS,EAAE,IAA5B;QAAkC,UAAU,EAAE;MAA9C,CAAd;;MAEA,IAAI,KAAK,QAAL,CAAc,OAAlB,EAA2B;QACvB,OAAO,CAAC,SAAR,GAAoB,KAAK,QAAL,CAAc,OAAd,CAAsB,SAAtB,IAAmC,IAAvD;QACA,OAAO,CAAC,QAAR,GAAmB,KAAK,QAAL,CAAc,OAAd,CAAsB,QAAtB,IAAkC,IAArD;QACA,OAAO,CAAC,UAAR,GAAqB,KAAK,QAAL,CAAc,OAAd,CAAsB,UAAtB,IAAoC,IAAzD;MACH;;MAED,IAAI,CAAC,MAAL,CAAY,QAAZ,EAAsB;QAClB,WAAW,EAAE,wBADK;QAElB,UAAU,EAAE,KAFM;QAGlB,QAAQ,EAAE,OAAO,CAAC,QAHA;QAIlB,SAAS,EAAE,OAAO,CAAC,SAJD;QAKlB,UAAU,EAAE,OAAO,CAAC;MALF,CAAtB;MAOA,IAAI,CAAC,MAAL,CAAY,QAAZ,EAAsB;QAClB,WAAW,EAAE,wBADK;QAElB,UAAU,EAAE,KAFM;QAGlB,QAAQ,EAAE,OAAO,CAAC,QAHA;QAIlB,SAAS,EAAE,OAAO,CAAC,SAJD;QAKlB,UAAU,EAAE,OAAO,CAAC;MALF,CAAtB;MAOA,IAAI,CAAC,MAAL,CAAY,KAAZ,EAAmB;QACf,WAAW,EAAE,qBADE;QAEf,UAAU,EAAE,KAFG;QAGf,QAAQ,EAAE,OAAO,CAAC,QAHH;QAIf,SAAS,EAAE,OAAO,CAAC,SAJJ,CAKf;;MALe,CAAnB;MAOA,IAAI,CAAC,MAAL,CAAY,QAAZ,EAAsB;QAClB,WAAW,EAAE,wBADK;QAElB,UAAU,EAAE,KAFM;QAGlB,QAAQ,EAAE,OAAO,CAAC,QAHA;QAIlB,SAAS,EAAE,OAAO,CAAC,SAJD;QAKlB,UAAU,EAAE,OAAO,CAAC;MALF,CAAtB,EA/BS,CAuCT;;MACA,IAAI,cAAc,GAAG,EAArB;MAEA;;MACA,IAAI,cAAc,GAAG,KAAK,QAAL,CAAc,YAAd,IAA8B,QAAQ,CAAC,cAAT,CAAwB,eAAxB,CAAnD;MACA,cAAc,CAAC,YAAf,CAA4B,UAA5B,EAAwC,IAAxC;MAEA,IAAI,CAAC,gBAAL,CAAsB,QAAtB,EAAgC,UAAC,CAAD,EAAO;QACnC,IAAI,CAAC,CAAC,OAAN,EAAe;UACX,cAAc,CAAC,CAAC,CAAC,IAAH,CAAd,GAAyB,IAAzB;;UACA,MAAI,CAAC,YAAL,CAAkB,IAAlB;QACH;;QAED,IAAI,CAAC,CAAC,KAAN,EAAa;UACT,cAAc,CAAC,CAAC,CAAC,IAAH,CAAd,GAAyB,KAAzB;;UACA,MAAI,CAAC,YAAL,CAAkB,IAAlB,CAAuB,CAAC,CAAC,KAAzB;QACH;;QAED,IAAI,CAAC,CAAC,KAAN,EAAa;UACT,cAAc,CAAC,CAAC,CAAC,IAAH,CAAd,GAAyB,KAAzB;QACH;;QAED,IAAI,cAAc,CAAC,MAAf,IAAyB,cAAc,CAAC,MAAxC,IAAkD,cAAc,CAAC,GAAjE,IAAwE,cAAc,CAAC,MAA3F,EAAmG;UAC/F,cAAc,CAAC,eAAf,CAA+B,UAA/B;UACA;QACH;;QAED,cAAc,CAAC,YAAf,CAA4B,UAA5B,EAAwC,IAAxC;MACH,CArBD;MAuBA,OAAO,IAAP;IACH;IAED;AACJ;AACA;AACA;AACA;AACA;;;;WACI,yBAAgB;MACZ,OAAO,KAAK,aAAL,CAAmB,OAAnB,EAAP;IACH;IAED;AACJ;AACA;AACA;AACA;AACA;;;;WACI,mCAA0B;MACtB,KAAK,gBAAL,GAAwB,KAAK,cAAL,EAAxB;MAEA,OAAO,KAAK,aAAL,CAAmB,cAAnB,EAAP;IACH;IAED;AACJ;AACA;AACA;AACA;AACA;;;;WACI,kCAAyB;MACrB,KAAK,gBAAL,GAAwB,KAAK,cAAL,EAAxB;MAEA,OAAO,KAAK,aAAL,CAAmB,cAAnB,EAAP;IACH;IAED;AACJ;AACA;AACA;AACA;AACA;;;;WACI,sBAAa;MAAA;;MACT,IAAI,IAAI,GAAG,KAAK,aAAL,CAAmB,eAAnB,EAAX;MACA,IAAI,CAAC,MAAL,CAAY,mBAAZ,EAAiC;QAC7B,WAAW,EAAE;MADgB,CAAjC;MAIA;;MACA,IAAM,cAAc,GAAG,KAAK,QAAL,CAAc,YAAd,IAA8B,QAAQ,CAAC,cAAT,CAAwB,eAAxB,CAArD;MACA,cAAc,CAAC,YAAf,CAA4B,UAA5B,EAAwC,IAAxC;MAEA,IAAI,CAAC,gBAAL,CAAsB,QAAtB,EAAgC,UAAC,CAAD,EAAO;QACnC,IAAI,CAAC,CAAC,OAAN,EAAe;UACX,cAAc,CAAC,eAAf,CAA+B,UAA/B;;UACA,MAAI,CAAC,YAAL,CAAkB,IAAlB;;UACA;QACH;;QAED,cAAc,CAAC,YAAf,CAA4B,UAA5B,EAAwC,IAAxC;MACH,CARD;MAUA,OAAO,IAAP;IACH;IAED;AACJ;AACA;AACA;AACA;AACA;;;;WACI,gCAAuB;MAAA;;MACnB,IAAI,cAAc,GAAG,KAAK,aAAL,CAAmB,sBAAnB,EAArB;MACA,cAAc,CAAC,MAAf,CAAsB,8BAAtB,EAAsD;QAClD,WAAW,EAAE;MADqC,CAAtD;MAIA;;MACA,IAAM,cAAc,GAAG,KAAK,QAAL,CAAc,YAAd,IAA8B,QAAQ,CAAC,cAAT,CAAwB,eAAxB,CAArD;MACA,cAAc,CAAC,YAAf,CAA4B,UAA5B,EAAwC,IAAxC;MAEA,cAAc,CAAC,gBAAf,CAAgC,QAAhC,EAA0C,UAAC,CAAD,EAAO;QAC7C,IAAI,CAAC,CAAC,OAAN,EAAe;UACX,cAAc,CAAC,eAAf,CAA+B,UAA/B;;UACA,MAAI,CAAC,YAAL,CAAkB,IAAlB;;UACA;QACH;;QAED,cAAc,CAAC,YAAf,CAA4B,UAA5B,EAAwC,IAAxC;MACH,CARD;MAUA,KAAK,gBAAL,GAAwB,KAAK,cAAL,EAAxB;MAEA,OAAO,cAAP;IACH;IAED;AACJ;AACA;AACA;AACA;AACA;;;;WACG,wBAAe;MACV,IAAI,MAAM,GAAG,KAAK,aAAL,CAAmB,MAAnB,EAAb;MACA,MAAM,CAAC,MAAP,CAAc,OAAd,EAAuB;QACnB,WAAW,EAAE;MADM,CAAvB;MAIA,OAAO,MAAP;IACH;IAED;AACJ;AACA;AACA;AACA;AACA;;;;WACI,wBAAe;MACX,OAAO,KAAK,aAAL,CAAmB,MAAnB,EAAP;IACH;IAED;AACJ;AACA;AACA;AACA;AACA;;;;WACI,yBAAiB;MACb,OAAO,KAAK,aAAL,CAAmB,OAAnB,EAAP;IACH;IAED;AACJ;AACA;AACA;AACA;AACA;;;;WACI,4BAAmB;MACf,OAAO,KAAK,aAAL,CAAmB,UAAnB,EAAP;IACH;IAED;AACJ;AACA;AACA;AACA;AACA;;;;WACI,uBAAc;MAAA;;MACV,IAAI,KAAK,GAAG,KAAK,aAAL,CAAmB,KAAnB,EAAZ;MAEA,KAAK,CAAC,MAAN,CAAa,OAAb,EAAsB;QAClB,WAAW,EAAE;MADK,CAAtB;MAIA;;MACA,IAAM,cAAc,GAAG,KAAK,QAAL,CAAc,YAAd,IAA8B,QAAQ,CAAC,cAAT,CAAwB,eAAxB,CAArD;MACA,cAAc,CAAC,YAAf,CAA4B,UAA5B,EAAwC,IAAxC;MAEA,KAAK,CAAC,gBAAN,CAAuB,QAAvB,EAAiC,UAAC,CAAD,EAAO;QACpC,IAAI,CAAC,CAAC,KAAN,EAAa;UACT,cAAc,CAAC,eAAf,CAA+B,UAA/B;;UACA,MAAI,CAAC,YAAL,CAAkB,IAAlB;;UACA;QACH;;QAED,cAAc,CAAC,YAAf,CAA4B,UAA5B,EAAwC,IAAxC;MACH,CARD;MAUA,OAAO,KAAP;IACH;IAED;AACJ;AACA;AACA;AACA;AACA;;;;WACI,4BAAmB;MACf,OAAO,KAAK,aAAL,CAAmB,UAAnB,EAAP;IACH;IAED;AACJ;AACA;AACA;AACA;AACA;;;;WACI,qBAAY;MACR,OAAO,KAAK,aAAL,CAAmB,GAAnB,EAAP;IACH;IAED;AACJ;AACA;AACA;AACA;AACA;;;;WACI,gCAAuB;MACnB,OAAO,KAAK,aAAL,CAAmB,cAAnB,EAAP;IACH;IAED;AACJ;AACA;AACA;AACA;AACA;;;;WACI,wBAAe;MACX,OAAO,KAAK,aAAL,CAAmB,MAAnB,EAAP;IACH;IAED;AACJ;AACA;AACA;AACA;AACA;;;;WACI,uBAAc;MACV,OAAO,KAAK,aAAL,CAAmB,KAAnB,EAAP;IACH;IAED;AACJ;AACA;AACA;AACA;;;;WACI,6BAAoB;MAChB,OAAO,KAAK,aAAL,CAAmB,WAAnB,EAAP;IACH;IAED;AACJ;AACA;AACA;AACA;AACA;;;;WACI,2BAAkB;MACd,OAAO,KAAK,aAAL,CAAmB,SAAnB,EAAP;IACH;IAED;AACJ;AACA;AACA;AACA;AACA;;;;WACG,8BAAqB;MAChB,IAAI,kBAAkB,GAAG,KAAK,aAAL,CAAmB,kBAAnB,EAAzB;MACA,IAAI,IAAI,GAAG,IAAX;MACA,KAAK,gBAAL,GAAwB,KAAK,cAAL,EAAxB;MAEA;;MACA,IAAI,cAAc,GAAG,IAAI,CAAC,QAAL,CAAc,YAAd,IAA8B,QAAQ,CAAC,cAAT,CAAwB,eAAxB,CAAnD;MACA,cAAc,CAAC,YAAf,CAA4B,OAA5B,EAAqC,eAArC;MACA,cAAc,CAAC,YAAf,CAA4B,UAA5B,EAAwC,IAAxC;MAEA,kBAAkB,CAAC,MAAnB,CAA0B;QACtB,WAAW,EAAE,uBADS;QAEtB,MAAM,EAAE,KAAK,QAAL,CAAc,MAAd,IAAwB,IAFV;QAGtB,QAAQ,EAAE,KAAK,QAAL,CAAc,QAAd,IAA0B,IAHd;QAItB,iBAAiB,EAAE,KAAK,QAAL,CAAc,iBAAd,IAAmC,IAJhC;QAKtB,SAAS,EAAE,KAAK,QAAL,CAAc,SAAd,IAA2B;MALhB,CAA1B,EAMG,IANH,CAMQ,UAAU,IAAV,EAAgB,CACpB;QACA;QACA;MACH,CAVD,WAWO,UAAU,QAAV,EAAoB;QACvB;QACA,IAAI,GAAG,GAAG,EAAV;QACA,OAAO,CAAC,KAAR,CAAc,QAAQ,CAAC,OAAvB;QAEA,QAAQ,CAAC,KAAT,CAAe,OAAf,CAAuB,OAAvB,CAA+B,UAAS,GAAT,EAAc;UACzC,OAAO,CAAC,KAAR,CAAc,gBAAgB,GAAG,CAAC,IAAlC;UACA,GAAG,IAAI,GAAG,CAAC,eAAX;QACH,CAHD;QAKA,IAAI,CAAC,YAAL,CAAkB,IAAlB,CAAuB,GAAvB;MACH,CAtBD,EAVgB,CAmChB;;MACA,kBAAkB,CAAC,gBAAnB,CAAoC,yBAApC,EAA+D,UAAU,CAAV,EAAa;QACxE,IAAI,CAAC,CAAC,MAAF,KAAa,UAAjB,EAA6B;UACzB,IAAI,CAAC,CAAC,OAAN,EAAe;YACX,cAAc,CAAC,eAAf,CAA+B,UAA/B;YACA;UACH;;UAED,cAAc,CAAC,YAAf,CAA4B,UAA5B,EAAwC,IAAxC;QACH;;QAED,IAAI,CAAC,CAAC,MAAF,KAAa,aAAjB,EAAgC;UAC5B,IAAI,CAAC,CAAC,YAAF,KAAmB,WAAvB,EAAoC;YAChC,cAAc,CAAC,YAAf,CAA4B,OAA5B,EAAqC,eAArC;YACA,cAAc,CAAC,YAAf,CAA4B,UAA5B,EAAwC,IAAxC;YACA;UACH;;UAED,cAAc,CAAC,YAAf,CAA4B,OAA5B,EAAqC,uBAArC;QACH;MACJ,CAnBD;MAqBA,OAAO,kBAAP;IACH;;;;;;iCAh1BgB,Y,mBACM;EACnB,MAAM,EAAE,QADW;EAEnB,IAAI,EAAE,MAFa;EAGnB,GAAG,EAAE,KAHc;EAInB,eAAe,EAAE,iBAJE;EAKnB,aAAa,EAAE,eALI;EAMnB,MAAM,EAAE,QANW;EAOnB,OAAO,EAAE,SAPU;EAQnB,iBAAiB,EAAE,mBARA;EASnB,kBAAkB,EAAE,oBATD;EAUnB,IAAI,EAAE,MAVa;EAWnB,eAAe,EAAE,mBAXE;EAYnB,MAAM,EAAE,QAZW;EAanB,OAAO,EAAE,SAbU;EAcnB,UAAU,EAAE,YAdO;EAenB,KAAK,EAAE,OAfY;EAgBnB,UAAU,EAAE,YAhBO;EAiBnB,UAAU,EAAE,YAjBO;EAkBnB,gBAAgB,EAAE,kBAlBC;EAmBnB,UAAU,EAAE,YAnBO;EAoBnB,oBAAoB,EAAE,sBApBH;EAqBnB,qBAAqB,EAAE,uBArBJ;EAsBnB,KAAK,EAAE,OAtBY;EAuBnB,YAAY,EAAE;AAvBK,C;;;;;;;;;;;;;;;;ACH3B;;IAEqB,S;EAEjB;AACJ;AACA;AACA;EACI,mBAAY,MAAZ,EAAoB,QAApB,EAA8B;IAAA;;IAC1B;IACA,KAAK,QAAL,GAAgB,QAAQ,IAAI,EAA5B;IAEA;;IACA,KAAK,IAAL,GAAY,KAAK,QAAL,CAAc,IAAd,IAAsB,QAAQ,CAAC,cAAT,CAAwB,gBAAxB,CAAlC;IAEA,IAAM,OAAO,GAAG;MACZ,MAAM,EAAE,KAAK,QAAL,CAAc,MAAd,IAAwB;IADpB,CAAhB;IAIA,KAAK,aAAL,GAAqB,IAAI,KAAJ,CAAU,MAAV,EAAkB,OAAlB,CAArB;IACA,KAAK,YAAL,GAAoB,IAAI,kBAAJ,CAAiB,KAAK,QAAL,CAAc,eAA/B,EAAgD,KAAK,QAAL,CAAc,aAA9D,CAApB;IAEA,KAAK,yBAAL;EACH;;;;WAED,qCAA4B;MAAA;;MACxB;MACA,IAAM,iBAAiB,GAAG,KAAK,aAAL,CAAmB,SAAnB,EAA1B;MAEA,IAAM,WAAW,GAAG,iBAAiB,CAAC,4BAAlB,CAA+C;QAC/D,iBAAiB,EAAE,KAAK,QAAL,CAAc,SAAd,CAAwB,iBADoB;QAE/D,YAAY,EAAE,KAAK,QAAL,CAAc,SAAd,CAAwB,YAFyB;QAG/D,eAAe,EAAE,KAAK,QAAL,CAAc,SAAd,CAAwB,eAHsB;QAI/D,mBAAmB,EAAE,KAAK,QAAL,CAAc,SAAd,CAAwB,mBAJkB;QAK/D,gBAAgB,EAAE,KAAK,QAAL,CAAc,SAAd,CAAwB,gBALqB;QAM/D,iBAAiB,EAAE,KAAK,QAAL,CAAc,SAAd,CAAwB,iBANoB;QAO/D,aAAa,EAAE;UACX,WAAW,EAAE,KAAK,QAAL,CAAc,SAAd,CAAwB,aAAxB,CAAsC,WADxC;UAEX,cAAc,EAAE,KAAK,QAAL,CAAc,SAAd,CAAwB,aAAxB,CAAsC;QAF3C,CAPgD;QAW/D,2BAA2B,EAAG,qCAAC,WAAD;UAAA,OAAiB,iBAAiB,CAAC,cAAlB,CAAiC,WAAjC,EAC1C,IAD0C,CACrC,KAAI,CAAC,mBAAL,CAAyB,IAAzB,CAA8B,KAA9B,CADqC,WAEpC,KAAI,CAAC,kBAAL,CAAwB,IAAxB,CAA6B,KAA7B,CAFoC,CAAjB;QAAA;MAXiC,CAA/C,CAApB;MAgBA,iBAAiB,CAAC,MAAlB,CACI;QAAE,WAAW,EAAE;MAAf,CADJ,EAEI,WAFJ;IAIH;IAED;AACJ;AACA;AACA;;;;WACI,6BAAoB,MAApB,EAA4B;MACxB;MACA,IAAM,WAAW,GAAG,QAAQ,CAAC,aAAT,CAAuB,OAAvB,CAApB;MACA,WAAW,CAAC,YAAZ,CAAyB,MAAzB,EAAiC,QAAjC;MACA,WAAW,CAAC,YAAZ,CAAyB,MAAzB,EAAiC,uBAAjC;MACA,WAAW,CAAC,YAAZ,CAAyB,OAAzB,EAAkC,MAAM,CAAC,EAAzC;MAEA,KAAK,IAAL,CAAU,WAAV,CAAsB,WAAtB;MACA,KAAK,IAAL,CAAU,MAAV;MAEA,OAAO;QAAE,MAAM,EAAE;MAAV,CAAP;IACH;IAED;AACJ;AACA;AACA;;;;WACI,4BAAmB,KAAnB,EAA0B;MACtB,IAAI,YAAY,GAAG,KAAK,CAAC,eAAN,IAAyB,KAAK,CAAC,OAA/B,IAA0C,OAA7D;;MACA,IAAI,KAAK,CAAC,IAAN,IAAc,KAAK,CAAC,OAAN,CAAc,KAAK,CAAC,IAAN,CAAW,MAAzB,CAAd,IAAkD,KAAK,CAAC,IAAN,CAAW,MAAX,CAAkB,CAAlB,CAAtD,EAA4E;QACxE,YAAY,GAAG,KAAK,CAAC,IAAN,CAAW,MAAX,CAAkB,CAAlB,EAAqB,eAArB,IAAwC,OAAvD;MACH;;MAED,KAAK,YAAL,CAAkB,IAAlB,CAAuB,YAAvB;MAEA,OAAO;QACH,MAAM,EAAE,OADL;QAEH,OAAO,EAAE,YAAY,IAAI;MAFtB,CAAP;IAIH;;;;;;;;;;;;;;;ACpFL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAM,WAAW,GAAG,SAAd,WAAc,CAAC,aAAD,EAAgB,GAAhB,EAAqB,KAArB,EAA+B;EAC/C,IAAI,KAAK,GAAG,CAAC,CAAC,aAAD,CAAb;EAEA,GAAG,CAAC,gBAAJ,CAAqB,OAArB,EAA8B,YAAY;IACtC,KAAK,CAAC,OAAN,CAAc,QAAd;EACH,CAFD;EAIA,KAAK,CAAC,EAAN,CAAS,QAAT,EAAmB,UAAU,CAAV,EAAa;IAC5B,IAAI,CAAC,KAAK,CAAC,EAAN,CAAS,UAAT,CAAL,EAA2B;MACvB,CAAC,CAAC,cAAF;MACA,KAAK,CAAC,KAAN,CAAY,MAAZ;MACA,OAAO,KAAP;IACH;;IAED,OAAO,IAAP;EACH,CARD;AASH,CAhBD;;eAkBe,W;;;;;;;;;;;;;;;;;ICzBM,S;EACjB,mBAAY,UAAZ,EAAwB;IAAA;IACpB,KAAK,UAAL,GAAkB,UAAlB;IACA,KAAK,IAAL,GAAY,IAAZ;;IAEA,IAAI,CAAC,MAAM,CAAC,WAAZ,EAAyB;MACrB;IACH;;IAED,KAAK,iBAAL;EACH;;;;WAED,aAAI,OAAJ,EAAwB;MAAA,IAAX,IAAW,uEAAJ,EAAI;;MACpB,IAAI,CAAC,MAAM,CAAC,WAAZ,EAAyB;QACrB;MACH;;MAED,IAAI,CAAC,KAAK,IAAV,EAAgB;QACZ,KAAK,iBAAL;MACH;;MAED,KAAK,IAAL,CAAU,MAAV,CACI,iBAAiB,OAAjB,GAA2B,gBAA3B,GAA8C,IAAI,CAAC,SAAL,CAAe,IAAf,EAAsB,IAAtB,EAA4B,IAA5B,CAA9C,GAAmF,aADvF;IAGH;;;WAED,6BAAoB;MAChB,KAAK,UAAL,CAAgB,MAAhB,CACI,CAAC,CAAC,sFAAD,CADL;MAGA,KAAK,IAAL,GAAY,KAAK,UAAL,CAAgB,IAAhB,CAAqB,iBAArB,CAAZ;IACH;;;;;;;;;;;;;;;;;;;;;IC/BgB,Y;EACjB;AACJ;AACA;AACA;EACI,sBAAY,QAAZ,EAAsB,OAAtB,EAA+B;IAAA;IAC3B,KAAK,QAAL,GAAgB,QAAQ,IAAI,CAAC,CAAC,kBAAD,CAA7B;IACA,KAAK,OAAL,GAAe,OAAO,IAAI,KAAK,QAAL,CAAc,IAAd,CAAmB,QAAnB,CAA1B;EACH;EAED;AACJ;AACA;AACA;;;;;WACI,cAAK,OAAL,EAAc;MACV,KAAK,QAAL,CAAc,IAAd;MACA,KAAK,OAAL,CAAa,IAAb,CAAkB,OAAlB;IACH;IAED;AACJ;AACA;;;;WACI,gBAAO;MACH,KAAK,QAAL,CAAc,IAAd;MACA,KAAK,OAAL,CAAa,IAAb;IACH;;;;;;;;ACzBL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA", - "file": "unzer.js", - "sourceRoot": "", - "sourcesContent": [ - "(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c=\"function\"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error(\"Cannot find module '\"+i+\"'\");throw a.code=\"MODULE_NOT_FOUND\",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u=\"function\"==typeof require&&require,i=0;i Init Payment Type]', {paymentRequest: this.applePayPaymentRequest});\n\n session.onvalidatemerchant = (event) => {\n this.merchantValidationCallback(event, session);\n };\n\n session.onpaymentauthorized = (event) => {\n this.applePayAuthorizedCallback(event, session);\n };\n\n session.oncancel = (event) => {\n this.debugging.log('[> Cancel]', {event});\n this.errorHandler.show(this.snippets.CANCEL_BY_USER);\n };\n\n session.begin();\n }\n\n /**\n * Call the merchant validation in the server-side integration (apple_pay_merchantvalidation)\n * @param {Event} event\n * @param {ApplePaySession} session\n */\n merchantValidationCallback(event, session) {\n var validationUrl = JSON.stringify(event.validationURL);\n\n this.debugging.log('[> Merchant Validation]', {event});\n\n $.ajax({\n 'url': $.evo.io().options.ioUrl,\n 'method': 'POST',\n 'dataType': 'json',\n 'data': 'io={\"name\":\"apple_pay_merchantvalidation\", \"params\":[' + validationUrl + ']}',\n }).done((validationResponse) => {\n this.debugging.log('[> Merchant Validation Response]', validationResponse);\n\n try {\n session.completeMerchantValidation(validationResponse);\n } catch (e) {\n alert(e.message);\n }\n })\n .fail((error) => {\n this.debugging.log('[> Merchant Validation Error]', error);\n this.errorHandler.show(JSON.stringify(error.statusText));\n session.abort();\n });\n }\n\n /**\n * Create Apple Pay resource with unzer and save the resource id to charge it later.\n *\n * We do this here via AJAX instead of the validateAdditional method in the payment method to set the apple pay\n * session state accordingly.\n *\n * @param {Event} event\n * @param {ApplePaySession} session\n */\n applePayAuthorizedCallback(event, session) {\n // Get payment data from event.\n // \"event.payment\" also contains contact information, if they were set via Apple Pay.\n var self = this;\n var unzerApplePayInstance = this.unzerInstance.ApplePay();\n var paymentData = event.payment.token.paymentData;\n\n this.debugging.log('[> Payment Authorization]', {unzerApplePayInstance, event, paymentData});\n\n // Create an Unzer instance with your public key\n unzerApplePayInstance.createResource(paymentData)\n .then(function (createdResource) {\n // Hand over the type ID to your backend.\n var typeId = JSON.stringify(createdResource.id);\n $.ajax({\n 'url': $.evo.io().options.ioUrl,\n 'method': 'POST',\n 'dataType': 'json',\n 'data': 'io={\"name\":\"apple_pay_payment_authorized\", \"params\":[' + typeId + ']}',\n }).done(function (result) {\n // Handle the transaction respone from backend.\n self.debugging.log('[> Payment Authorization Response]', {result, typeId});\n var status = result.transactionStatus;\n if (status === 'success' || status === 'pending') {\n session.completePayment({ status: window.ApplePaySession.STATUS_SUCCESS });\n\n // Append Payment Resource Id\n const hiddenInput = document.createElement('input');\n hiddenInput.setAttribute('type', 'hidden');\n hiddenInput.setAttribute('name', 'paymentData[resourceId]');\n hiddenInput.setAttribute('value', typeId);\n self.form.appendChild(hiddenInput);\n\n // Submitting the form\n self.form.removeEventListener('submit', self.initPaymentType);\n self.form.submit();\n } else {\n self.abortPaymentSession(session);\n }\n }).fail(function (error) {\n self.errorHandler.show(error.statusText);\n self.abortPaymentSession(session);\n });\n })\n .catch(function (error) {\n self.debugging.log('[> Payment Authorization Error]', error);\n self.errorHandler.show(error.message);\n self.abortPaymentSession(session);\n });\n }\n\n /**\n * Handle Unsupported devices\n */\n unsupportedDevice() {\n this.settings.submitButton.disabled = true;\n this.settings.submitButton.ariaDisabled = true;\n this.errorHandler.show(this.snippets.NOT_SUPPORTED);\n }\n\n /**\n * abort current payment session.\n * @param {ApplePaySession} session\n */\n abortPaymentSession(session) {\n this.debugging.log('[> Abort Payment Session]', { status: window.ApplePaySession.STATUS_FAILURE });\n session.completePayment({ status: window.ApplePaySession.STATUS_FAILURE });\n session.abort();\n }\n}\n", - "import ErrorHandler from \"../utils/errors\";\nimport Debugging from \"../utils/debugging\";\n\n/** @type {ApplePaySnippets} */\nconst ApplePaySnippetsDefaults = {\n NOT_SUPPORTED: \"This device does not support Apple Pay!\",\n CANCEL_BY_USER: \"Canceled payment process by user!\"\n};\n\nexport default class ApplePayV2 {\n /** @type {ApplePaySettings} */\n settings;\n\n /** @type {ApplePaySnippets} */\n snippets;\n\n /** @type {HTMLFormElement} */\n form;\n\n /** @type {ApplePayPaymentRequest} */\n applePayPaymentRequest;\n\n #errorHandler = new ErrorHandler();\n #debugging = new Debugging($('.unzerUI'));\n\n /**\n * @class\n * @param {String} pubKey\n * @param {ApplePayPaymentRequest} applePayPaymentRequest\n * @param {ApplePaySnippets} snippets\n * @param {ApplePaySettings} settings\n */\n constructor(pubKey, applePayPaymentRequest, snippets, settings) {\n this.settings = settings;\n this.snippets = Object.assign(ApplePaySnippetsDefaults, snippets);\n this.form = this.settings.form || document.getElementById('complete_order');\n this.applePayPaymentRequest = applePayPaymentRequest;\n this.unzerInstance = new unzer(pubKey, {\n locale: this.settings.locale || 'de-DE'\n });\n window.UNZER_DEBUG = !!this.unzerInstance._isSandbox || this.unzerInstance.config.hasSandboxKey; // Enable Debugging in sandbox mode\n\n if (!window.ApplePaySession || !window.ApplePaySession.canMakePayments()) {\n this.#unsupportedDevice();\n return;\n }\n\n // Register Events\n this.initPaymentType = this.initPaymentType.bind(this); // it's a trick! needed in order to overcome the remove event listener\n this.form.addEventListener('submit', this.initPaymentType);\n $('.apple-pay-button').on('click', this.initPaymentType.bind(this));\n }\n\n /**\n * @param {Event} event\n */\n initPaymentType(event) {\n event.preventDefault();\n const applePayInstance = this.unzerInstance.ApplePay();\n const session = applePayInstance.initApplePaySession(this.applePayPaymentRequest); // setup session with default merchant validation\n\n this.#debugging.log('[> Init Payment Type]', { paymentRequest: this.applePayPaymentRequest });\n\n if (!window.ApplePaySession || !window.ApplePaySession.canMakePayments()) {\n this.#unsupportedDevice();\n return;\n }\n\n /** @param {Event} event */\n session.onpaymentauthorized = (event) => {\n this.#applePayAuthorizedCallback(event, applePayInstance, session);\n };\n\n /** @param {Event} event */\n session.oncancel = (event) => {\n this.#debugging.log('[> Cancel]', {event});\n this.#errorHandler.show(this.snippets.CANCEL_BY_USER);\n };\n\n session.begin();\n }\n\n /**\n * Create Apple Pay resource with unzer and save the resource id to charge it later.\n *\n * @param {Event & {payment: {token: {paymentData: object}}}} event\n * @param {Object} applePayInstance\n * @param {ApplePaySession} session\n */\n #applePayAuthorizedCallback(event, applePayInstance, session) {\n const paymentData = event.payment.token.paymentData;\n\n this.#debugging.log('[> Payment Authorization]', { applePayInstance, event, paymentData });\n\n // Create an Unzer instance with your public key\n applePayInstance.createResource(paymentData)\n .then((createdResource) => {\n this.#debugging.log('[> Payment Authorization Resource]', { createdResource });\n session.completePayment({ status: window.ApplePaySession.STATUS_SUCCESS });\n\n // Hand over the payment type ID (createdResource.id)\n const typeId = JSON.stringify(createdResource.id);\n const hiddenInput = document.createElement('input');\n hiddenInput.setAttribute('type', 'hidden');\n hiddenInput.setAttribute('name', 'unzer-payment-type-id');\n hiddenInput.setAttribute('value', typeId);\n\n this.form.appendChild(hiddenInput);\n this.form.removeEventListener('submit', this.initPaymentType);\n this.form.submit();\n })\n .catch(error => {\n this.#debugging.log('[> Payment Authorization Error]', error);\n this.#errorHandler.show(error.message);\n this.#abortPaymentSession(session);\n })\n }\n\n /**\n * abort current payment session.\n * @param {ApplePaySession} session\n */\n #abortPaymentSession(session) {\n this.#debugging.log('[> Abort Payment Session]', { status: window.ApplePaySession.STATUS_FAILURE });\n session.completePayment({ status: window.ApplePaySession.STATUS_FAILURE });\n session.abort();\n }\n\n /**\n * Handle Unsupported devices\n */\n #unsupportedDevice() {\n this.#errorHandler.show(this.snippets.NOT_SUPPORTED);\n console.error(this.snippets.NOT_SUPPORTED);\n }\n}", - "import ErrorHandler from \"../utils/errors\";\n\nexport default class UnzerPayment {\n static PAYMENT_TYPES = {\n ALIPAY: 'Alipay',\n CARD: 'Card',\n EPS: 'EPS',\n FLEXIPAY_DIRECT: 'FlexiPay Direct',\n HIRE_PURCHASE: 'Hire Purchase',\n PAYPAL: 'Paypal',\n INVOICE: 'Invoice',\n INVOICE_FACTORING: 'Invoice Factoring',\n INVOICE_GUARANTEED: 'Invoice Guaranteed',\n SEPA: 'SEPA',\n SEPA_GUARANTEED: 'SEPA (guaranteed)',\n SOFORT: 'SOFORT',\n GIROPAY: 'Giropay',\n PRZELEWY24: 'Przelewy24',\n IDEAL: 'iDEAL',\n PREPAYMENT: 'Prepayment',\n WECHAT_PAY: 'WeChat Pay',\n PAYLATER_INVOICE: 'Paylater Invoice',\n BANCONTACT: 'Bancontact',\n PAYLATER_INSTALLMENT: 'Paylater Installment',\n PAYLATER_DIRECT_DEBIT: 'Paylater Direct Debit',\n TWINT: 'Twint',\n OPEN_BANKING: 'Open Banking',\n };\n\n /**\n * Heidelpay Payment Class\n *\n * @param {string} pubKey Public Key\n * @param {string} type Payment Type\n * @param {PaymentSettings} settings\n */\n constructor(pubKey, type, settings) {\n /** @type {PaymentSettings} */\n this.settings = settings || {};\n\n var options = {\n locale: this.settings.locale || 'de-DE'\n };\n\n this.unzerInstance = new unzer(pubKey, options);\n this.errorHandler = new ErrorHandler(this.settings.$errorContainer, this.settings.$errorMessage);\n\n /** @type {?string} customerId */\n this.customerId = settings.customerId || null;\n\n /** @type {{createCustomer: Function, updateCustomer: Function}|null} customerResource */\n this.customerResource = null;\n\n /** @type {{createResource: Function}} paymentType */\n this.paymentType = this.initPaymentType(type);\n\n /** @type {HTMLElement} form Form in which the customer enters additional details */\n this.form = this.settings.form || document.getElementById('form_payment_extra');\n\n // Register Events\n this.handleFormSubmit = this.handleFormSubmit.bind(this); // it's a trick! needed in order to overcome the remove event listener\n this.form.addEventListener('submit', this.handleFormSubmit);\n\n if (this.settings.autoSubmit) {\n // this.form.dispatchEvent(new Event('submit')); // Causes endless redirects in some browsers like FF, so we call the callback directly...\n this.handleFormSubmit(new Event('submit'));\n }\n }\n\n /**\n * Init Payment Type\n *\n * @param {string} type\n * @returns {object} payment type\n * @throws Error if there is an unkown payment type\n */\n initPaymentType(type) {\n switch (type) {\n case UnzerPayment.PAYMENT_TYPES.CARD:\n return this.createCard();\n\n case UnzerPayment.PAYMENT_TYPES.INVOICE:\n return this.createInvoice();\n\n case UnzerPayment.PAYMENT_TYPES.INVOICE_GUARANTEED:\n return this.createInvoiceGuaranteed();\n\n case UnzerPayment.PAYMENT_TYPES.INVOICE_FACTORING:\n return this.createInvoiceFactoring();\n\n case UnzerPayment.PAYMENT_TYPES.SEPA:\n return this.createSepa();\n\n case UnzerPayment.PAYMENT_TYPES.SEPA_GUARANTEED:\n return this.createSepaGuaranteed();\n\n case UnzerPayment.PAYMENT_TYPES.PAYPAL:\n return this.createPaypal();\n\n case UnzerPayment.PAYMENT_TYPES.SOFORT:\n return this.createSofort();\n\n case UnzerPayment.PAYMENT_TYPES.GIROPAY:\n return this.createGiropay();\n\n case UnzerPayment.PAYMENT_TYPES.PRZELEWY24:\n return this.createPrzelewy24();\n\n case UnzerPayment.PAYMENT_TYPES.IDEAL:\n return this.createIdeal();\n\n case UnzerPayment.PAYMENT_TYPES.PREPAYMENT:\n return this.createPrepayment();\n\n case UnzerPayment.PAYMENT_TYPES.EPS:\n return this.createEPS();\n\n case UnzerPayment.PAYMENT_TYPES.FLEXIPAY_DIRECT:\n return this.createFlexiPayDirect();\n\n case UnzerPayment.PAYMENT_TYPES.ALIPAY:\n return this.createAlipay();\n\n case UnzerPayment.PAYMENT_TYPES.TWINT:\n return this.createTwint();\n\n case UnzerPayment.PAYMENT_TYPES.WECHAT_PAY:\n return this.createWeChatPay();\n\n case UnzerPayment.PAYMENT_TYPES.HIRE_PURCHASE:\n return this.createHirePurchase();\n\n case UnzerPayment.PAYMENT_TYPES.PAYLATER_INVOICE:\n return this.createPaylaterInvoice();\n\n case UnzerPayment.PAYMENT_TYPES.BANCONTACT:\n return this.createBancontact();\n\n case UnzerPayment.PAYMENT_TYPES.PAYLATER_INSTALLMENT:\n return this.createPaylaterInstallment();\n\n case UnzerPayment.PAYMENT_TYPES.PAYLATER_DIRECT_DEBIT:\n return this.createPaylaterDirectDebit();\n\n case UnzerPayment.PAYMENT_TYPES.OPEN_BANKING:\n return this.createOpenBanking();\n\n default:\n throw new Error('Unkown Payment Type: ' + type);\n }\n }\n\n /**\n * Handle the form submit\n *\n * @param {Event} event Submit Event\n */\n handleFormSubmit(event) {\n var self = this;\n event.preventDefault();\n\n // Creating a Payment resource and (optional) Customer Resource\n var resources = [this.paymentType.createResource()];\n\n if (this.customerResource) {\n resources.push(this.customerId ? this.customerResource.updateCustomer() : this.customerResource.createCustomer());\n }\n\n Promise.all(resources).then(function (result) {\n // Append Payment Resource Id\n var hiddenInput = document.createElement('input');\n hiddenInput.setAttribute('type', 'hidden');\n hiddenInput.setAttribute('name', 'paymentData[resourceId]');\n hiddenInput.setAttribute('value', result[0].id);\n self.form.appendChild(hiddenInput);\n\n // Append Customer Id\n if (result.length >= 2) {\n var hiddenCstInput = document.createElement('input');\n hiddenCstInput.setAttribute('type', 'hidden');\n hiddenCstInput.setAttribute('name', 'paymentData[customerId]');\n hiddenCstInput.setAttribute('value', result[1].id);\n self.form.appendChild(hiddenCstInput);\n }\n\n // Submitting the form\n self.form.removeEventListener('submit', self.handleFormSubmit);\n self.form.submit();\n })\n .catch(function (error) {\n self.errorHandler.show(error.message);\n });\n }\n\n /**\n * Handle Paylater Input Validation\n * @param {Event} event\n * @param {boolean} isValid\n * @param {String} paymentMethodName\n * @param {HTMLElement} continueButton\n * @returns\n */\n onPaylaterInputValidation(event, isValid, paymentMethodName, continueButton) {\n // console.log(paymentMethodName, { event, isValid, continueButton, 's360-valid': continueButton.getAttribute('data-s360-valid') });\n\n if (isValid) {\n // everything is still valid\n if (continueButton.getAttribute('data-s360-valid') == 'all') {\n continueButton.removeAttribute('disabled');\n return;\n }\n\n // Customer is already valid -> everything is valid\n if (continueButton.getAttribute('data-s360-valid') == 'customer') {\n continueButton.setAttribute('data-s360-valid', 'all');\n continueButton.removeAttribute('disabled');\n return;\n }\n\n // mark payment method as valid\n continueButton.setAttribute('data-s360-valid', paymentMethodName);\n return;\n }\n\n continueButton.setAttribute('disabled', true);\n\n // only invalidate if the paymentMethodName was valid before\n if (continueButton.getAttribute('data-s360-valid') == paymentMethodName) {\n continueButton.setAttribute('data-s360-valid', 0);\n } else if (continueButton.getAttribute('data-s360-valid') == 'all') {\n continueButton.setAttribute('data-s360-valid', 'customer');\n }\n }\n\n /**\n * Create (or update) customer resource.\n *\n * @param {?String} paymentTypeName\n * @param {?String} multipleValidation\n * @see https://docs.heidelpay.com/docs/customer-ui-integration\n * @returns {{createCustomer: Function, updateCustomer: Function}} Customer Resource\n */\n createCustomer(paymentTypeName = null, multipleValidation = false) {\n var Customer = this.settings.isB2B ? this.unzerInstance.B2BCustomer() : this.unzerInstance.Customer();\n var customerObj = this.settings.customer || {};\n var continueButton = this.settings.submitButton || document.getElementById(\"submit-button\");\n let options = {\n containerId: 'customer',\n showInfoBox: false,\n showHeader: false,\n fields: ['name', 'birthdate']\n };\n\n if (paymentTypeName) {\n options.paymentTypeName = paymentTypeName;\n }\n\n Customer.initFormFields(customerObj);\n if (multipleValidation) {\n continueButton.setAttribute('data-s360-valid', 0);\n\n Customer.addEventListener('validate', (e) => {\n // console.log('customer validate', e, continueButton, continueButton.getAttribute('data-s360-valid'));\n continueButton.setAttribute('disabled', true);\n\n if (e.success) {\n // everything is still valid\n if (continueButton.getAttribute('data-s360-valid') == 'all') {\n continueButton.removeAttribute('disabled');\n return;\n }\n\n // payment method is already valid -> everything is valid\n if (continueButton.getAttribute('data-s360-valid') == paymentTypeName) {\n continueButton.setAttribute('data-s360-valid', 'all');\n continueButton.removeAttribute('disabled');\n return;\n }\n\n continueButton.setAttribute('data-s360-valid', 'customer');\n return;\n }\n\n // only invalidate if the customer was valid before\n if (continueButton.getAttribute('data-s360-valid') == 'customer') {\n continueButton.setAttribute('data-s360-valid', 0);\n } else if (continueButton.getAttribute('data-s360-valid') == 'all') {\n continueButton.setAttribute('data-s360-valid', paymentTypeName);\n }\n });\n } else {\n Customer.addEventListener('validate', (e) => {\n if (e.success) {\n continueButton.removeAttribute('disabled');\n return;\n }\n\n continueButton.setAttribute('disabled', true);\n });\n }\n\n if (this.settings.isB2B) {\n options.fields = ['companyInfo'];\n // options = {containerId: 'customer'};\n }\n\n if (this.customerId) {\n Customer.update(this.customerId, options);\n return Customer;\n }\n\n Customer.create(options);\n\n return Customer;\n }\n\n /**\n * Hide form fields from unzer ui component because they are already filled by the shop\n * @param {string} paymentMethodName\n */\n hideFormFields(paymentMethodName) {\n const field = $('#customer');\n\n field.find('.field').filter(\n '.city, .company, :has(.country), .street, .zip, .firstname, .lastname'\n ).hide();\n field.find('.salutation-customer').hide();\n field.find('.firstname, .lastname').parent('.fields').hide();\n field.find('.unzerUI.divider-horizontal:eq(0)').hide();\n field.find('.unzerUI.message.downArrow').hide();\n\n if (paymentMethodName) {\n field.find('.field').filter('.checkbox-billingAddress, .email').hide();\n field.find('.field').filter(\n '.billing-name, .billing-street, .billing-zip, .billing-city, :has(.billing-country)'\n ).hide();\n field.find('.unzerUI.form>.checkboxLabel').hide();\n field.find('.unzerUI.form>.salutation-unzer-' + paymentMethodName + '-customer').hide();\n }\n\n field.find('.companyType').on('change', e => this.hideFormFields(paymentMethodName));\n }\n\n /**\n * Create Paylayter Installment Payment Type\n *\n * @see https://docs.unzer.com/payment-methods/unzer-installment-upl/accept-unzer-installment-ui-component/\n * @returns {{createResource: Function}}\n */\n createPaylaterInstallment() {\n this.customerResource = this.createCustomer('paylater-installment', true);\n const continueButton = this.settings.submitButton || document.getElementById(\"submit-button\");\n const paylaterInstallment = this.unzerInstance.PaylaterInstallment();\n\n this.hideFormFields('paylater-installment');\n\n paylaterInstallment.create({\n containerId: 'paylater-installment',\n amount: this.settings.amount,\n currency: this.settings.currency,\n country: this.settings.country\n });\n\n paylaterInstallment.addEventListener('paylaterInstallmentEvent', (e) => {\n switch (e.currentStep) {\n case 'plan-list':\n continueButton.setAttribute('disabled', true);\n break;\n\n case 'plan-detail':\n continueButton.setAttribute('disabled', false);\n break;\n\n default:\n break;\n }\n\n const isValid = e.action === 'validate' && e.success;\n this.onPaylaterInputValidation(e, isValid, 'paylater-installment', continueButton);\n });\n\n return paylaterInstallment;\n }\n\n /**\n * Create Paylayter Invoice Payment Type\n *\n * @see https://docs.unzer.com/payment-methods/unzer-invoice-upl/accept-unzer-invoice-upl-ui-component/\n * @returns {{createResource: Function}}\n */\n createPaylaterInvoice() {\n this.customerResource = this.createCustomer('paylater-invoice', true);\n const continueButton = this.settings.submitButton || document.getElementById(\"submit-button\");\n const paylaterInvoice = this.unzerInstance.PaylaterInvoice();\n\n this.hideFormFields('paylater-invoice');\n\n paylaterInvoice.create({\n containerId: 'paylater-invoice',\n customerType: this.settings.isB2B ? 'B2B' : 'B2C'\n });\n\n paylaterInvoice.addEventListener('change', (e) =>\n this.onPaylaterInputValidation(\n e,\n e.success,\n 'paylater-invoice',\n continueButton\n )\n );\n\n return paylaterInvoice;\n }\n\n /**\n * Create Paylayter Invoice Payment Type\n *\n * @see https://docs.unzer.com/payment-methods/direct-debit-secured/accept-direct-debit-secured-ui-component/\n * @returns {{createResource: Function}}\n */\n createPaylaterDirectDebit() {\n this.customerResource = this.createCustomer('paylater-direct-debit', true);\n const continueButton = this.settings.submitButton || document.getElementById(\"submit-button\");\n const paylaterDirectDebit = this.unzerInstance.PaylaterDirectDebit();\n\n this.hideFormFields('paylater-direct-debit');\n\n paylaterDirectDebit.create('paylater-direct-debit', {\n containerId: 'paylater-direct-debit',\n customerType: this.settings.isB2B ? 'B2B' : 'B2C'\n });\n\n paylaterDirectDebit.addEventListener('change', (e) =>\n this.onPaylaterInputValidation(\n e,\n e.success,\n 'paylater-direct-debit',\n continueButton\n )\n );\n\n return paylaterDirectDebit;\n }\n\n /**\n * Create Bancontact Payment Type\n *\n * @see https://docs.unzer.com/payment-methods/bancontact/accept-bancontact-ui-component/\n * @returns {{createResource: Function}}\n */\n createBancontact() {\n const bancontact = this.unzerInstance.Bancontact();\n const styling = { fontSize: null, fontColor: null, fontFamily: null };\n\n if (this.settings.styling) {\n styling.fontColor = this.settings.styling.fontColor || null;\n styling.fontSize = this.settings.styling.fontSize || null;\n styling.fontFamily = this.settings.styling.fontFamily || null;\n }\n\n bancontact.create('holder', {\n containerId: 'bancontact-holder',\n fontSize: styling.fontSize,\n fontColor: styling.fontColor,\n fontFamily: styling.fontFamily\n });\n\n return bancontact;\n }\n\n /**\n * Create a new Card Payment Type.\n *\n * @see https://docs.heidelpay.com/docs/credit-card-ui-integration\n * @returns {{createResource: Function}} Card Payment Type\n */\n createCard() {\n var Card = this.unzerInstance.Card();\n var styling = {fontSize: null, fontColor: null, fontFamily: null};\n\n if (this.settings.styling) {\n styling.fontColor = this.settings.styling.fontColor || null;\n styling.fontSize = this.settings.styling.fontSize || null;\n styling.fontFamily = this.settings.styling.fontFamily || null;\n }\n\n Card.create('number', {\n containerId: 'card-element-id-number',\n onlyIframe: false,\n fontSize: styling.fontSize,\n fontColor: styling.fontColor,\n fontFamily: styling.fontFamily\n });\n Card.create('expiry', {\n containerId: 'card-element-id-expiry',\n onlyIframe: false,\n fontSize: styling.fontSize,\n fontColor: styling.fontColor,\n fontFamily: styling.fontFamily\n });\n Card.create('cvc', {\n containerId: 'card-element-id-cvc',\n onlyIframe: false,\n fontSize: styling.fontSize,\n fontColor: styling.fontColor,\n // fontFamily: styling.fontFamily // messes with hidden font in firefox\n });\n Card.create('holder', {\n containerId: 'card-element-id-holder',\n onlyIframe: false,\n fontSize: styling.fontSize,\n fontColor: styling.fontColor,\n fontFamily: styling.fontFamily\n });\n\n // Enable pay button initially\n var formFieldValid = {};\n\n /** @type {HTMLElement} continueButton */\n var continueButton = this.settings.submitButton || document.getElementById(\"submit-button\");\n continueButton.setAttribute('disabled', true);\n\n Card.addEventListener('change', (e) => {\n if (e.success) {\n formFieldValid[e.type] = true;\n this.errorHandler.hide();\n }\n\n if (e.error) {\n formFieldValid[e.type] = false;\n this.errorHandler.show(e.error);\n }\n\n if (e.reset) {\n formFieldValid[e.type] = false;\n }\n\n if (formFieldValid.number && formFieldValid.expiry && formFieldValid.cvc && formFieldValid.holder) {\n continueButton.removeAttribute('disabled');\n return;\n }\n\n continueButton.setAttribute('disabled', true);\n });\n\n return Card;\n }\n\n /**\n * Create a new Invoice Payment Type.\n *\n * @see https://docs.heidelpay.com/docs/invoice-ui-integration\n * @returns {{createResource: Function}} Invoice Payment Type\n */\n createInvoice() {\n return this.unzerInstance.Invoice();\n }\n\n /**\n * Create a new Invoice Guaranteed Payment Type.\n *\n * @see https://docs.heidelpay.com/docs/invoice-ui-integration\n * @returns {{createResource: Function}} Invoice Payment Type\n */\n createInvoiceGuaranteed() {\n this.customerResource = this.createCustomer();\n\n return this.unzerInstance.InvoiceSecured();\n }\n\n /**\n * Create a new Invoice Factoring Payment Type.\n *\n * @see https://docs.heidelpay.com/docs/invoice-ui-integration\n * @returns {{createResource: Function}} Invoice Payment Type\n */\n createInvoiceFactoring() {\n this.customerResource = this.createCustomer();\n\n return this.unzerInstance.InvoiceSecured();\n }\n\n /**\n * Create a new SEPA Direct Debit Payment Type.\n *\n * @see https://docs.heidelpay.com/docs/sepa-direct-debit-ui-integration\n * @returns {{createResource: Function}} SEPA Direct Debit Payment Type\n */\n createSepa() {\n var Sepa = this.unzerInstance.SepaDirectDebit();\n Sepa.create('sepa-direct-debit', {\n containerId: 'sepa-IBAN'\n });\n\n /** @type {HTMLElement} continueButton */\n const continueButton = this.settings.submitButton || document.getElementById(\"submit-button\");\n continueButton.setAttribute('disabled', true);\n\n Sepa.addEventListener('change', (e) => {\n if (e.success) {\n continueButton.removeAttribute('disabled');\n this.errorHandler.hide();\n return;\n }\n\n continueButton.setAttribute('disabled', true);\n });\n\n return Sepa;\n }\n\n /**\n * Create a new SEPA Direct Debit (guaranteed) Payment Type.\n *\n * @see https://docs.heidelpay.com/docs/sepa-direct-debit-ui-integration\n * @returns {{createResource: Function}} SEPA Direct Debit (guaranteed) Payment Type\n */\n createSepaGuaranteed() {\n var SepaGuaranteed = this.unzerInstance.SepaDirectDebitSecured();\n SepaGuaranteed.create('sepa-direct-debit-guaranteed', {\n containerId: 'sepa-guaranteed-IBAN'\n });\n\n /** @type {HTMLElement} continueButton */\n const continueButton = this.settings.submitButton || document.getElementById(\"submit-button\");\n continueButton.setAttribute('disabled', true);\n\n SepaGuaranteed.addEventListener('change', (e) => {\n if (e.success) {\n continueButton.removeAttribute('disabled');\n this.errorHandler.hide();\n return;\n }\n\n continueButton.setAttribute('disabled', true);\n });\n\n this.customerResource = this.createCustomer();\n\n return SepaGuaranteed;\n }\n\n /**\n * Create a new PayPal Payment Type.\n *\n * @see https://docs.heidelpay.com/docs/paypal-ui-integration\n * @returns {{createResource: Function}} Papal Payment Type\n */\n createPaypal() {\n var Paypal = this.unzerInstance.Paypal();\n Paypal.create('email', {\n containerId: 'paypal-element-email'\n });\n\n return Paypal;\n }\n\n /**\n * Create a new SOFORT Payment Type.\n *\n * @see https://docs.heidelpay.com/docs/redirect-ui-integration#sofort\n * @returns {{createResource: Function}} Sofort Payment Type\n */\n createSofort() {\n return this.unzerInstance.Sofort();\n }\n\n /**\n * Create a new Giropay Payment Type.\n *\n * @see https://docs.heidelpay.com/docs/redirect-ui-integration#giropay\n * @returns {{createResource: Function}} Giropay Payment Type\n */\n createGiropay () {\n return this.unzerInstance.Giropay();\n }\n\n /**\n * Create a new Przelewy24 Payment Type.\n *\n * @see https://docs.heidelpay.com/docs/redirect-ui-integration#przelewy24\n * @returns {{createResource: Function}} Przelewy24 Payment Type\n */\n createPrzelewy24() {\n return this.unzerInstance.Przelewy24();\n }\n\n /**\n * Create a new iDEAL Payment Type.\n *\n * @see https://docs.heidelpay.com/docs/ideal-ui-integration\n * @returns {{createResource: Function}} iDEAL Payment Type\n */\n createIdeal() {\n var Ideal = this.unzerInstance.Ideal();\n\n Ideal.create('ideal', {\n containerId: 'ideal-element'\n });\n\n /** @type {HTMLElement} continueButton */\n const continueButton = this.settings.submitButton || document.getElementById(\"submit-button\");\n continueButton.setAttribute('disabled', true);\n\n Ideal.addEventListener('change', (e) => {\n if (e.value) {\n continueButton.removeAttribute('disabled');\n this.errorHandler.hide();\n return;\n }\n\n continueButton.setAttribute('disabled', true);\n });\n\n return Ideal;\n }\n\n /**\n * Create a new Prepayment Payment Type.\n *\n * @see https://docs.heidelpay.com/docs/prepayment-ui-integration\n * @returns {{createResource: Function}} Prepayment Payment Type\n */\n createPrepayment() {\n return this.unzerInstance.Prepayment();\n }\n\n /**\n * Create a new EPS Payment Type.\n *\n * @see https://docs.heidelpay.com/docs/eps-ui-integration\n * @returns {{createResource: Function}} EPS Payment Type\n */\n createEPS() {\n return this.unzerInstance.EPS();\n }\n\n /**\n * Create a new FlexiPay Direct Payment Type.\n *\n * @see https://docs.heidelpay.com/docs/redirect-ui-integration#flexipay-direct\n * @returns {{createResource: Function}} Alipay Payment Type\n */\n createFlexiPayDirect() {\n return this.unzerInstance.FlexiPayDirect();\n }\n\n /**\n * Create a new Alipay Payment Type.\n *\n * @see https://docs.heidelpay.com/docs/redirect-ui-integration#alipay\n * @returns {{createResource: Function}} Alipay Payment Type\n */\n createAlipay() {\n return this.unzerInstance.Alipay();\n }\n\n /**\n * Create a new TWINT Payment Type.\n *\n * @see https://docs.unzer.com/payment-methods/twint/accept-twint-ui-component/\n * @returns {{createResource: Function}} Twint Payment Type\n */\n createTwint() {\n return this.unzerInstance.Twint();\n }\n\n /**\n * Create a new Open Banking Payment Type.\n *\n * @returns {{createResource: Function}} Twint Payment Type\n */\n createOpenBanking() {\n return this.unzerInstance.OpenBanking();\n }\n\n /**\n * Create an new WeChat Pay Payment Type.\n *\n * @see https://docs.heidelpay.com/docs/redirect-ui-integration#wechat-pay\n * @returns {{createResource: Function}} WeChat Pay Payment Type\n */\n createWeChatPay() {\n return this.unzerInstance.Wechatpay();\n }\n\n /**\n * Create a new Hire Purchase Payment Type.\n *\n * @see https:://docs.heidelpay.com/docs/hire-purchase-ui-integration\n * @returns {{createResource: Function}} Hire Purchase Payment Type\n */\n createHirePurchase() {\n var InstallmentSecured = this.unzerInstance.InstallmentSecured();\n var self = this;\n this.customerResource = this.createCustomer();\n\n /** @type {HTMLElement} continueButton */\n var continueButton = self.settings.submitButton || document.getElementById(\"submit-button\");\n continueButton.setAttribute('style', 'display: none');\n continueButton.setAttribute('disabled', true);\n\n InstallmentSecured.create({\n containerId: 'hire-purchase-element',\n amount: this.settings.amount || null,\n currency: this.settings.currency || null,\n effectiveInterest: this.settings.effectiveInterest || null,\n orderDate: this.settings.orderDate || null\n }).then(function (data) {\n // if successful, notify the user that the list of installments was fetched successfully\n // in case you were using a loading element during the fetching process,\n // you can remove it inside this callback function\n })\n .catch(function (response) {\n // sent an error message to the user (fetching installment list failed)\n var msg = '';\n console.error(response.message);\n\n response.error.details.forEach(function(err) {\n console.error('API-Error: ' + err.code);\n msg += err.customerMessage;\n });\n\n self.errorHandler.show(msg);\n });\n\n\n // Listen to UI events\n InstallmentSecured.addEventListener('installmentSecuredEvent', function (e) {\n if (e.action === 'validate') {\n if (e.success) {\n continueButton.removeAttribute('disabled');\n return;\n }\n\n continueButton.setAttribute('disabled', true);\n }\n\n if (e.action === 'change-step') {\n if (e.currentSteep === 'plan-list') {\n continueButton.setAttribute('style', 'display: none');\n continueButton.setAttribute('disabled', true);\n return;\n }\n\n continueButton.setAttribute('style', 'display: inline-block');\n }\n });\n\n return InstallmentSecured;\n }\n}\n", - "import ErrorHandler from \"../utils/errors\";\n\nexport default class GooglePay\n{\n /**\n * @param {string} pubKey\n * @param {GooglePaySettings} settings\n */\n constructor(pubKey, settings) {\n /** @type {GooglePaySettings} */\n this.settings = settings || {};\n\n /** @type {HTMLFormElement} */\n this.form = this.settings.form || document.getElementById('complete_order');\n\n const options = {\n locale: this.settings.locale || 'de-DE'\n };\n\n this.unzerInstance = new unzer(pubKey, options);\n this.errorHandler = new ErrorHandler(this.settings.$errorContainer, this.settings.$errorMessage);\n\n this.createPaymentTypeResource();\n }\n\n createPaymentTypeResource() {\n // Creating a Google Pay instance\n const googlepayInstance = this.unzerInstance.Googlepay();\n\n const paymentData = googlepayInstance.initPaymentDataRequestObject({\n gatewayMerchantId: this.settings.googlepay.gatewayMerchantId,\n merchantInfo: this.settings.googlepay.merchantInfo,\n transactionInfo: this.settings.googlepay.transactionInfo,\n allowedCardNetworks: this.settings.googlepay.allowedCardNetworks,\n allowCreditCards: this.settings.googlepay.allowCreditCards,\n allowPrepaidCards: this.settings.googlepay.allowPrepaidCards,\n buttonOptions: {\n buttonColor: this.settings.googlepay.buttonOptions.buttonColor,\n buttonSizeMode: this.settings.googlepay.buttonOptions.buttonSize,\n },\n onPaymentAuthorizedCallback: (paymentData) => googlepayInstance.createResource(paymentData)\n .then(this.onAuthorizedSuccess.bind(this))\n .catch(this.onAuthorizedFailed.bind(this))\n });\n\n googlepayInstance.create(\n { containerId: 'googlepay-holder' },\n paymentData\n );\n }\n\n /**\n * @param {{id: string}} result\n * @returns {{ status: string }}\n */\n onAuthorizedSuccess(result) {\n // Submit the ID to your server-side integration\n const hiddenInput = document.createElement('input');\n hiddenInput.setAttribute('type', 'hidden');\n hiddenInput.setAttribute('name', 'unzer-payment-type-id');\n hiddenInput.setAttribute('value', result.id);\n\n this.form.appendChild(hiddenInput);\n this.form.submit();\n\n return { status: 'success' };\n }\n\n /**\n * @param {{customerMessage?: string, message?: string, data?: {errors?: Array<{customerMessage?: string}>}}} error\n * @returns {{ status: string, message: string }}\n */\n onAuthorizedFailed(error) {\n let errorMessage = error.customerMessage || error.message || 'Error';\n if (error.data && Array.isArray(error.data.errors) && error.data.errors[0]) {\n errorMessage = error.data.errors[0].customerMessage || 'Error';\n }\n\n this.errorHandler.show(errorMessage);\n\n return {\n status: 'error',\n message: errorMessage || 'Unexpected error'\n };\n }\n}", - "/**\n * Heidelpay Installment Modal Window Handler\n *\n * @param {string} modalSelector\n * @param {HTMLElement} btn Submit Trigger\n * @param {JQuery} $form\n */\nconst Installment = (modalSelector, btn, $form) => {\n var modal = $(modalSelector);\n\n btn.addEventListener('click', function () {\n $form.trigger('submit');\n });\n\n $form.on('submit', function (e) {\n if (!modal.is(':visible')) {\n e.preventDefault();\n modal.modal('show');\n return false;\n }\n\n return true;\n });\n};\n\nexport default Installment;", - "export default class Debugging {\n constructor($container) {\n this.$container = $container;\n this.$log = null;\n\n if (!window.UNZER_DEBUG) {\n return;\n }\n\n this.createLogTemplate();\n }\n\n log(context, data = {}) {\n if (!window.UNZER_DEBUG) {\n return;\n }\n\n if (!this.$log) {\n this.createLogTemplate();\n }\n\n this.$log.append(\n '
    • ' + context + '
      ' + JSON.stringify(data,  null, '  ') +  '
    • '\n );\n }\n\n createLogTemplate() {\n this.$container.append(\n $('
        ')\n );\n this.$log = this.$container.find('.debug-log > ul');\n }\n}\n", - "export default class ErrorHandler {\n /**\n * @param {JQuery|null} $wrapper Wrapper for Container to display error messages in\n * @param {JQuery|null} $holder Container to display error messages in\n */\n constructor($wrapper, $holder) {\n this.$wrapper = $wrapper || $('#error-container');\n this.$holder = $holder || this.$wrapper.find('.alert');\n }\n\n /**\n * Show Error message\n * @param {String} message\n */\n show(message) {\n this.$wrapper.show();\n this.$holder.html(message);\n }\n\n /**\n * Hide error message\n */\n hide() {\n this.$wrapper.hide();\n this.$holder.html();\n }\n}\n", - "function _classApplyDescriptorGet(receiver, descriptor) {\n if (descriptor.get) {\n return descriptor.get.call(receiver);\n }\n\n return descriptor.value;\n}\n\nmodule.exports = _classApplyDescriptorGet, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", - "function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nmodule.exports = _classCallCheck, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", - "function _classExtractFieldDescriptor(receiver, privateMap, action) {\n if (!privateMap.has(receiver)) {\n throw new TypeError(\"attempted to \" + action + \" private field on non-instance\");\n }\n\n return privateMap.get(receiver);\n}\n\nmodule.exports = _classExtractFieldDescriptor, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", - "var classApplyDescriptorGet = require(\"./classApplyDescriptorGet.js\");\n\nvar classExtractFieldDescriptor = require(\"./classExtractFieldDescriptor.js\");\n\nfunction _classPrivateFieldGet(receiver, privateMap) {\n var descriptor = classExtractFieldDescriptor(receiver, privateMap, \"get\");\n return classApplyDescriptorGet(receiver, descriptor);\n}\n\nmodule.exports = _classPrivateFieldGet, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", - "function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}\n\nmodule.exports = _createClass, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", - "function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nmodule.exports = _defineProperty, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", - "function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n}\n\nmodule.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;" - ] -} \ No newline at end of file diff --git a/frontend/js/unzer.min.js b/frontend/js/unzer.min.js deleted file mode 100644 index b8be71e..0000000 --- a/frontend/js/unzer.min.js +++ /dev/null @@ -1,2 +0,0 @@ -!function(){function e(t,n,i){function r(s,o){if(!n[s]){if(!t[s]){var l="function"==typeof require&&require;if(!o&&l)return l(s,!0);if(a)return a(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var c=n[s]={exports:{}};t[s][0].call(c.exports,function(e){return r(t[s][1][e]||e)},c,c.exports,e,t,n,i)}return n[s].exports}for(var a="function"==typeof require&&require,s=0;s Init Payment Type]",{paymentRequest:this.applePayPaymentRequest}),n.onvalidatemerchant=function(e){t.merchantValidationCallback(e,n)},n.onpaymentauthorized=function(e){t.applePayAuthorizedCallback(e,n)},n.oncancel=function(e){t.debugging.log("[> Cancel]",{event:e}),t.errorHandler.show(t.snippets.CANCEL_BY_USER)},n.begin()}else this.unsupportedDevice()}},{key:"merchantValidationCallback",value:function(e,t){var n=this,i=JSON.stringify(e.validationURL);this.debugging.log("[> Merchant Validation]",{event:e}),$.ajax({url:$.evo.io().options.ioUrl,method:"POST",dataType:"json",data:'io={"name":"apple_pay_merchantvalidation", "params":['+i+"]}"}).done(function(e){n.debugging.log("[> Merchant Validation Response]",e);try{t.completeMerchantValidation(e)}catch(e){alert(e.message)}}).fail(function(e){n.debugging.log("[> Merchant Validation Error]",e),n.errorHandler.show(JSON.stringify(e.statusText)),t.abort()})}},{key:"applePayAuthorizedCallback",value:function(e,t){var n=this,i=this.unzerInstance.ApplePay(),r=e.payment.token.paymentData;this.debugging.log("[> Payment Authorization]",{unzerApplePayInstance:i,event:e,paymentData:r}),i.createResource(r).then(function(e){var i=JSON.stringify(e.id);$.ajax({url:$.evo.io().options.ioUrl,method:"POST",dataType:"json",data:'io={"name":"apple_pay_payment_authorized", "params":['+i+"]}"}).done(function(e){n.debugging.log("[> Payment Authorization Response]",{result:e,typeId:i});var r=e.transactionStatus;if("success"===r||"pending"===r){t.completePayment({status:window.ApplePaySession.STATUS_SUCCESS});var a=document.createElement("input");a.setAttribute("type","hidden"),a.setAttribute("name","paymentData[resourceId]"),a.setAttribute("value",i),n.form.appendChild(a),n.form.removeEventListener("submit",n.initPaymentType),n.form.submit()}else n.abortPaymentSession(t)}).fail(function(e){n.errorHandler.show(e.statusText),n.abortPaymentSession(t)})}).catch(function(e){n.debugging.log("[> Payment Authorization Error]",e),n.errorHandler.show(e.message),n.abortPaymentSession(t)})}},{key:"unsupportedDevice",value:function(){this.settings.submitButton.disabled=!0,this.settings.submitButton.ariaDisabled=!0,this.errorHandler.show(this.snippets.NOT_SUPPORTED)}},{key:"abortPaymentSession",value:function(e){this.debugging.log("[> Abort Payment Session]",{status:window.ApplePaySession.STATUS_FAILURE}),e.completePayment({status:window.ApplePaySession.STATUS_FAILURE}),e.abort()}}]),e}();n.default=u},{"../utils/debugging":7,"../utils/errors":8,"@babel/runtime/helpers/classCallCheck":10,"@babel/runtime/helpers/createClass":13,"@babel/runtime/helpers/interopRequireDefault":15}],3:[function(e,t,n){"use strict";function i(e,t){a(e,t),t.add(e)}function r(e,t,n){a(e,t),t.set(e,n)}function a(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function s(e,t,n){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return n}function o(e,t,n){var i=this,r=e.payment.token.paymentData;(0,m.default)(this,g).log("[> Payment Authorization]",{applePayInstance:t,event:e,paymentData:r}),t.createResource(r).then(function(e){(0,m.default)(i,g).log("[> Payment Authorization Resource]",{createdResource:e}),n.completePayment({status:window.ApplePaySession.STATUS_SUCCESS});var t=JSON.stringify(e.id),r=document.createElement("input");r.setAttribute("type","hidden"),r.setAttribute("name","unzer-payment-type-id"),r.setAttribute("value",t),i.form.appendChild(r),i.form.removeEventListener("submit",i.initPaymentType),i.form.submit()}).catch(function(e){(0,m.default)(i,g).log("[> Payment Authorization Error]",e),(0,m.default)(i,v).show(e.message),s(i,A,l).call(i,n)})}function l(e){(0,m.default)(this,g).log("[> Abort Payment Session]",{status:window.ApplePaySession.STATUS_FAILURE}),e.completePayment({status:window.ApplePaySession.STATUS_FAILURE}),e.abort()}function u(){(0,m.default)(this,v).show(this.snippets.NOT_SUPPORTED),console.error(this.snippets.NOT_SUPPORTED)}var c=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var d=c(e("@babel/runtime/helpers/classCallCheck")),p=c(e("@babel/runtime/helpers/createClass")),h=c(e("@babel/runtime/helpers/defineProperty")),m=c(e("@babel/runtime/helpers/classPrivateFieldGet")),y=c(e("../utils/errors")),f=c(e("../utils/debugging")),b={NOT_SUPPORTED:"This device does not support Apple Pay!",CANCEL_BY_USER:"Canceled payment process by user!"},v=new WeakMap,g=new WeakMap,P=new WeakSet,A=new WeakSet,E=new WeakSet,I=function(){function e(t,n,a,o){(0,d.default)(this,e),i(this,E),i(this,A),i(this,P),(0,h.default)(this,"settings",void 0),(0,h.default)(this,"snippets",void 0),(0,h.default)(this,"form",void 0),(0,h.default)(this,"applePayPaymentRequest",void 0),r(this,v,{writable:!0,value:new y.default}),r(this,g,{writable:!0,value:new f.default($(".unzerUI"))}),this.settings=o,this.snippets=Object.assign(b,a),this.form=this.settings.form||document.getElementById("complete_order"),this.applePayPaymentRequest=n,this.unzerInstance=new unzer(t,{locale:this.settings.locale||"de-DE"}),window.UNZER_DEBUG=!!this.unzerInstance._isSandbox||this.unzerInstance.config.hasSandboxKey,window.ApplePaySession&&window.ApplePaySession.canMakePayments()?(this.initPaymentType=this.initPaymentType.bind(this),this.form.addEventListener("submit",this.initPaymentType),$(".apple-pay-button").on("click",this.initPaymentType.bind(this))):s(this,E,u).call(this)}return(0,p.default)(e,[{key:"initPaymentType",value:function(e){var t=this;e.preventDefault();var n=this.unzerInstance.ApplePay(),i=n.initApplePaySession(this.applePayPaymentRequest);(0,m.default)(this,g).log("[> Init Payment Type]",{paymentRequest:this.applePayPaymentRequest}),window.ApplePaySession&&window.ApplePaySession.canMakePayments()?(i.onpaymentauthorized=function(e){s(t,P,o).call(t,e,n,i)},i.oncancel=function(e){(0,m.default)(t,g).log("[> Cancel]",{event:e}),(0,m.default)(t,v).show(t.snippets.CANCEL_BY_USER)},i.begin()):s(this,E,u).call(this)}}]),e}();n.default=I},{"../utils/debugging":7,"../utils/errors":8,"@babel/runtime/helpers/classCallCheck":10,"@babel/runtime/helpers/classPrivateFieldGet":12,"@babel/runtime/helpers/createClass":13,"@babel/runtime/helpers/defineProperty":14,"@babel/runtime/helpers/interopRequireDefault":15}],4:[function(e,t,n){"use strict";var i=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=i(e("@babel/runtime/helpers/classCallCheck")),a=i(e("@babel/runtime/helpers/createClass")),s=i(e("@babel/runtime/helpers/defineProperty")),o=i(e("../utils/errors")),l=function(){function e(t,n,i){(0,r.default)(this,e),this.settings=i||{};var a={locale:this.settings.locale||"de-DE"};this.unzerInstance=new unzer(t,a),this.errorHandler=new o.default(this.settings.$errorContainer,this.settings.$errorMessage),this.customerId=i.customerId||null,this.customerResource=null,this.paymentType=this.initPaymentType(n),this.form=this.settings.form||document.getElementById("form_payment_extra"),this.handleFormSubmit=this.handleFormSubmit.bind(this),this.form.addEventListener("submit",this.handleFormSubmit),this.settings.autoSubmit&&this.handleFormSubmit(new Event("submit"))}return(0,a.default)(e,[{key:"initPaymentType",value:function(t){switch(t){case e.PAYMENT_TYPES.CARD:return this.createCard();case e.PAYMENT_TYPES.INVOICE:return this.createInvoice();case e.PAYMENT_TYPES.INVOICE_GUARANTEED:return this.createInvoiceGuaranteed();case e.PAYMENT_TYPES.INVOICE_FACTORING:return this.createInvoiceFactoring();case e.PAYMENT_TYPES.SEPA:return this.createSepa();case e.PAYMENT_TYPES.SEPA_GUARANTEED:return this.createSepaGuaranteed();case e.PAYMENT_TYPES.PAYPAL:return this.createPaypal();case e.PAYMENT_TYPES.SOFORT:return this.createSofort();case e.PAYMENT_TYPES.GIROPAY:return this.createGiropay();case e.PAYMENT_TYPES.PRZELEWY24:return this.createPrzelewy24();case e.PAYMENT_TYPES.IDEAL:return this.createIdeal();case e.PAYMENT_TYPES.PREPAYMENT:return this.createPrepayment();case e.PAYMENT_TYPES.EPS:return this.createEPS();case e.PAYMENT_TYPES.FLEXIPAY_DIRECT:return this.createFlexiPayDirect();case e.PAYMENT_TYPES.ALIPAY:return this.createAlipay();case e.PAYMENT_TYPES.TWINT:return this.createTwint();case e.PAYMENT_TYPES.WECHAT_PAY:return this.createWeChatPay();case e.PAYMENT_TYPES.HIRE_PURCHASE:return this.createHirePurchase();case e.PAYMENT_TYPES.PAYLATER_INVOICE:return this.createPaylaterInvoice();case e.PAYMENT_TYPES.BANCONTACT:return this.createBancontact();case e.PAYMENT_TYPES.PAYLATER_INSTALLMENT:return this.createPaylaterInstallment();case e.PAYMENT_TYPES.PAYLATER_DIRECT_DEBIT:return this.createPaylaterDirectDebit();case e.PAYMENT_TYPES.OPEN_BANKING:return this.createOpenBanking();default:throw new Error("Unkown Payment Type: "+t)}}},{key:"handleFormSubmit",value:function(e){var t=this;e.preventDefault();var n=[this.paymentType.createResource()];this.customerResource&&n.push(this.customerId?this.customerResource.updateCustomer():this.customerResource.createCustomer()),Promise.all(n).then(function(e){var n=document.createElement("input");if(n.setAttribute("type","hidden"),n.setAttribute("name","paymentData[resourceId]"),n.setAttribute("value",e[0].id),t.form.appendChild(n),e.length>=2){var i=document.createElement("input");i.setAttribute("type","hidden"),i.setAttribute("name","paymentData[customerId]"),i.setAttribute("value",e[1].id),t.form.appendChild(i)}t.form.removeEventListener("submit",t.handleFormSubmit),t.form.submit()}).catch(function(e){t.errorHandler.show(e.message)})}},{key:"onPaylaterInputValidation",value:function(e,t,n,i){if(t)return"all"==i.getAttribute("data-s360-valid")?void i.removeAttribute("disabled"):"customer"==i.getAttribute("data-s360-valid")?(i.setAttribute("data-s360-valid","all"),void i.removeAttribute("disabled")):void i.setAttribute("data-s360-valid",n);i.setAttribute("disabled",!0),i.getAttribute("data-s360-valid")==n?i.setAttribute("data-s360-valid",0):"all"==i.getAttribute("data-s360-valid")&&i.setAttribute("data-s360-valid","customer")}},{key:"createCustomer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.settings.isB2B?this.unzerInstance.B2BCustomer():this.unzerInstance.Customer(),i=this.settings.customer||{},r=this.settings.submitButton||document.getElementById("submit-button"),a={containerId:"customer",showInfoBox:!1,showHeader:!1,fields:["name","birthdate"]};return e&&(a.paymentTypeName=e),n.initFormFields(i),t?(r.setAttribute("data-s360-valid",0),n.addEventListener("validate",function(t){if(r.setAttribute("disabled",!0),t.success)return"all"==r.getAttribute("data-s360-valid")?void r.removeAttribute("disabled"):r.getAttribute("data-s360-valid")==e?(r.setAttribute("data-s360-valid","all"),void r.removeAttribute("disabled")):void r.setAttribute("data-s360-valid","customer");"customer"==r.getAttribute("data-s360-valid")?r.setAttribute("data-s360-valid",0):"all"==r.getAttribute("data-s360-valid")&&r.setAttribute("data-s360-valid",e)})):n.addEventListener("validate",function(e){e.success?r.removeAttribute("disabled"):r.setAttribute("disabled",!0)}),this.settings.isB2B&&(a.fields=["companyInfo"]),this.customerId?(n.update(this.customerId,a),n):(n.create(a),n)}},{key:"hideFormFields",value:function(e){var t=this,n=$("#customer");n.find(".field").filter(".city, .company, :has(.country), .street, .zip, .firstname, .lastname").hide(),n.find(".salutation-customer").hide(),n.find(".firstname, .lastname").parent(".fields").hide(),n.find(".unzerUI.divider-horizontal:eq(0)").hide(),n.find(".unzerUI.message.downArrow").hide(),e&&(n.find(".field").filter(".checkbox-billingAddress, .email").hide(),n.find(".field").filter(".billing-name, .billing-street, .billing-zip, .billing-city, :has(.billing-country)").hide(),n.find(".unzerUI.form>.checkboxLabel").hide(),n.find(".unzerUI.form>.salutation-unzer-"+e+"-customer").hide()),n.find(".companyType").on("change",function(n){return t.hideFormFields(e)})}},{key:"createPaylaterInstallment",value:function(){var e=this;this.customerResource=this.createCustomer("paylater-installment",!0);var t=this.settings.submitButton||document.getElementById("submit-button"),n=this.unzerInstance.PaylaterInstallment();return this.hideFormFields("paylater-installment"),n.create({containerId:"paylater-installment",amount:this.settings.amount,currency:this.settings.currency,country:this.settings.country}),n.addEventListener("paylaterInstallmentEvent",function(n){switch(n.currentStep){case"plan-list":t.setAttribute("disabled",!0);break;case"plan-detail":t.setAttribute("disabled",!1)}var i="validate"===n.action&&n.success;e.onPaylaterInputValidation(n,i,"paylater-installment",t)}),n}},{key:"createPaylaterInvoice",value:function(){var e=this;this.customerResource=this.createCustomer("paylater-invoice",!0);var t=this.settings.submitButton||document.getElementById("submit-button"),n=this.unzerInstance.PaylaterInvoice();return this.hideFormFields("paylater-invoice"),n.create({containerId:"paylater-invoice",customerType:this.settings.isB2B?"B2B":"B2C"}),n.addEventListener("change",function(n){return e.onPaylaterInputValidation(n,n.success,"paylater-invoice",t)}),n}},{key:"createPaylaterDirectDebit",value:function(){var e=this;this.customerResource=this.createCustomer("paylater-direct-debit",!0);var t=this.settings.submitButton||document.getElementById("submit-button"),n=this.unzerInstance.PaylaterDirectDebit();return this.hideFormFields("paylater-direct-debit"),n.create("paylater-direct-debit",{containerId:"paylater-direct-debit",customerType:this.settings.isB2B?"B2B":"B2C"}),n.addEventListener("change",function(n){return e.onPaylaterInputValidation(n,n.success,"paylater-direct-debit",t)}),n}},{key:"createBancontact",value:function(){var e=this.unzerInstance.Bancontact(),t={fontSize:null,fontColor:null,fontFamily:null};return this.settings.styling&&(t.fontColor=this.settings.styling.fontColor||null,t.fontSize=this.settings.styling.fontSize||null,t.fontFamily=this.settings.styling.fontFamily||null),e.create("holder",{containerId:"bancontact-holder",fontSize:t.fontSize,fontColor:t.fontColor,fontFamily:t.fontFamily}),e}},{key:"createCard",value:function(){var e=this,t=this.unzerInstance.Card(),n={fontSize:null,fontColor:null,fontFamily:null};this.settings.styling&&(n.fontColor=this.settings.styling.fontColor||null,n.fontSize=this.settings.styling.fontSize||null,n.fontFamily=this.settings.styling.fontFamily||null),t.create("number",{containerId:"card-element-id-number",onlyIframe:!1,fontSize:n.fontSize,fontColor:n.fontColor,fontFamily:n.fontFamily}),t.create("expiry",{containerId:"card-element-id-expiry",onlyIframe:!1,fontSize:n.fontSize,fontColor:n.fontColor,fontFamily:n.fontFamily}),t.create("cvc",{containerId:"card-element-id-cvc",onlyIframe:!1,fontSize:n.fontSize,fontColor:n.fontColor}),t.create("holder",{containerId:"card-element-id-holder",onlyIframe:!1,fontSize:n.fontSize,fontColor:n.fontColor,fontFamily:n.fontFamily});var i={},r=this.settings.submitButton||document.getElementById("submit-button");return r.setAttribute("disabled",!0),t.addEventListener("change",function(t){t.success&&(i[t.type]=!0,e.errorHandler.hide()),t.error&&(i[t.type]=!1,e.errorHandler.show(t.error)),t.reset&&(i[t.type]=!1),i.number&&i.expiry&&i.cvc&&i.holder?r.removeAttribute("disabled"):r.setAttribute("disabled",!0)}),t}},{key:"createInvoice",value:function(){return this.unzerInstance.Invoice()}},{key:"createInvoiceGuaranteed",value:function(){return this.customerResource=this.createCustomer(),this.unzerInstance.InvoiceSecured()}},{key:"createInvoiceFactoring",value:function(){return this.customerResource=this.createCustomer(),this.unzerInstance.InvoiceSecured()}},{key:"createSepa",value:function(){var e=this,t=this.unzerInstance.SepaDirectDebit();t.create("sepa-direct-debit",{containerId:"sepa-IBAN"});var n=this.settings.submitButton||document.getElementById("submit-button");return n.setAttribute("disabled",!0),t.addEventListener("change",function(t){if(t.success)return n.removeAttribute("disabled"),void e.errorHandler.hide();n.setAttribute("disabled",!0)}),t}},{key:"createSepaGuaranteed",value:function(){var e=this,t=this.unzerInstance.SepaDirectDebitSecured();t.create("sepa-direct-debit-guaranteed",{containerId:"sepa-guaranteed-IBAN"});var n=this.settings.submitButton||document.getElementById("submit-button");return n.setAttribute("disabled",!0),t.addEventListener("change",function(t){if(t.success)return n.removeAttribute("disabled"),void e.errorHandler.hide();n.setAttribute("disabled",!0)}),this.customerResource=this.createCustomer(),t}},{key:"createPaypal",value:function(){var e=this.unzerInstance.Paypal();return e.create("email",{containerId:"paypal-element-email"}),e}},{key:"createSofort",value:function(){return this.unzerInstance.Sofort()}},{key:"createGiropay",value:function(){return this.unzerInstance.Giropay()}},{key:"createPrzelewy24",value:function(){return this.unzerInstance.Przelewy24()}},{key:"createIdeal",value:function(){var e=this,t=this.unzerInstance.Ideal();t.create("ideal",{containerId:"ideal-element"});var n=this.settings.submitButton||document.getElementById("submit-button");return n.setAttribute("disabled",!0),t.addEventListener("change",function(t){if(t.value)return n.removeAttribute("disabled"),void e.errorHandler.hide();n.setAttribute("disabled",!0)}),t}},{key:"createPrepayment",value:function(){return this.unzerInstance.Prepayment()}},{key:"createEPS",value:function(){return this.unzerInstance.EPS()}},{key:"createFlexiPayDirect",value:function(){return this.unzerInstance.FlexiPayDirect()}},{key:"createAlipay",value:function(){return this.unzerInstance.Alipay()}},{key:"createTwint",value:function(){return this.unzerInstance.Twint()}},{key:"createOpenBanking",value:function(){return this.unzerInstance.OpenBanking()}},{key:"createWeChatPay",value:function(){return this.unzerInstance.Wechatpay()}},{key:"createHirePurchase",value:function(){var e=this.unzerInstance.InstallmentSecured(),t=this;this.customerResource=this.createCustomer();var n=t.settings.submitButton||document.getElementById("submit-button");return n.setAttribute("style","display: none"),n.setAttribute("disabled",!0),e.create({containerId:"hire-purchase-element",amount:this.settings.amount||null,currency:this.settings.currency||null,effectiveInterest:this.settings.effectiveInterest||null,orderDate:this.settings.orderDate||null}).then(function(e){}).catch(function(e){var n="";console.error(e.message),e.error.details.forEach(function(e){console.error("API-Error: "+e.code),n+=e.customerMessage}),t.errorHandler.show(n)}),e.addEventListener("installmentSecuredEvent",function(e){if("validate"===e.action){if(e.success)return void n.removeAttribute("disabled");n.setAttribute("disabled",!0)}if("change-step"===e.action){if("plan-list"===e.currentSteep)return n.setAttribute("style","display: none"),void n.setAttribute("disabled",!0);n.setAttribute("style","display: inline-block")}}),e}}]),e}();n.default=l,(0,s.default)(l,"PAYMENT_TYPES",{ALIPAY:"Alipay",CARD:"Card",EPS:"EPS",FLEXIPAY_DIRECT:"FlexiPay Direct",HIRE_PURCHASE:"Hire Purchase",PAYPAL:"Paypal",INVOICE:"Invoice",INVOICE_FACTORING:"Invoice Factoring",INVOICE_GUARANTEED:"Invoice Guaranteed",SEPA:"SEPA",SEPA_GUARANTEED:"SEPA (guaranteed)",SOFORT:"SOFORT",GIROPAY:"Giropay",PRZELEWY24:"Przelewy24",IDEAL:"iDEAL",PREPAYMENT:"Prepayment",WECHAT_PAY:"WeChat Pay",PAYLATER_INVOICE:"Paylater Invoice",BANCONTACT:"Bancontact",PAYLATER_INSTALLMENT:"Paylater Installment",PAYLATER_DIRECT_DEBIT:"Paylater Direct Debit",TWINT:"Twint",OPEN_BANKING:"Open Banking"})},{"../utils/errors":8,"@babel/runtime/helpers/classCallCheck":10,"@babel/runtime/helpers/createClass":13,"@babel/runtime/helpers/defineProperty":14,"@babel/runtime/helpers/interopRequireDefault":15}],5:[function(e,t,n){"use strict";var i=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=i(e("@babel/runtime/helpers/classCallCheck")),a=i(e("@babel/runtime/helpers/createClass")),s=i(e("../utils/errors")),o=function(){function e(t,n){(0,r.default)(this,e),this.settings=n||{},this.form=this.settings.form||document.getElementById("complete_order");var i={locale:this.settings.locale||"de-DE"};this.unzerInstance=new unzer(t,i),this.errorHandler=new s.default(this.settings.$errorContainer,this.settings.$errorMessage),this.createPaymentTypeResource()}return(0,a.default)(e,[{key:"createPaymentTypeResource",value:function(){var e=this,t=this.unzerInstance.Googlepay(),n=t.initPaymentDataRequestObject({gatewayMerchantId:this.settings.googlepay.gatewayMerchantId,merchantInfo:this.settings.googlepay.merchantInfo,transactionInfo:this.settings.googlepay.transactionInfo,allowedCardNetworks:this.settings.googlepay.allowedCardNetworks,allowCreditCards:this.settings.googlepay.allowCreditCards,allowPrepaidCards:this.settings.googlepay.allowPrepaidCards,buttonOptions:{buttonColor:this.settings.googlepay.buttonOptions.buttonColor,buttonSizeMode:this.settings.googlepay.buttonOptions.buttonSize},onPaymentAuthorizedCallback:function(n){return t.createResource(n).then(e.onAuthorizedSuccess.bind(e)).catch(e.onAuthorizedFailed.bind(e))}});t.create({containerId:"googlepay-holder"},n)}},{key:"onAuthorizedSuccess",value:function(e){var t=document.createElement("input");return t.setAttribute("type","hidden"),t.setAttribute("name","unzer-payment-type-id"),t.setAttribute("value",e.id),this.form.appendChild(t),this.form.submit(),{status:"success"}}},{key:"onAuthorizedFailed",value:function(e){var t=e.customerMessage||e.message||"Error";return e.data&&Array.isArray(e.data.errors)&&e.data.errors[0]&&(t=e.data.errors[0].customerMessage||"Error"),this.errorHandler.show(t),{status:"error",message:t||"Unexpected error"}}}]),e}();n.default=o},{"../utils/errors":8,"@babel/runtime/helpers/classCallCheck":10,"@babel/runtime/helpers/createClass":13,"@babel/runtime/helpers/interopRequireDefault":15}],6:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;n.default=function(e,t,n){var i=$(e);t.addEventListener("click",function(){n.trigger("submit")}),n.on("submit",function(e){return!!i.is(":visible")||(e.preventDefault(),i.modal("show"),!1)})}},{}],7:[function(e,t,n){"use strict";var i=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=i(e("@babel/runtime/helpers/classCallCheck")),a=i(e("@babel/runtime/helpers/createClass")),s=function(){function e(t){(0,r.default)(this,e),this.$container=t,this.$log=null,window.UNZER_DEBUG&&this.createLogTemplate()}return(0,a.default)(e,[{key:"log",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};window.UNZER_DEBUG&&(this.$log||this.createLogTemplate(),this.$log.append("
      • "+e+"
        "+JSON.stringify(t,null,"  ")+"
      • "))}},{key:"createLogTemplate",value:function(){this.$container.append($('
          ')),this.$log=this.$container.find(".debug-log > ul")}}]),e}();n.default=s},{"@babel/runtime/helpers/classCallCheck":10,"@babel/runtime/helpers/createClass":13,"@babel/runtime/helpers/interopRequireDefault":15}],8:[function(e,t,n){"use strict";var i=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=i(e("@babel/runtime/helpers/classCallCheck")),a=i(e("@babel/runtime/helpers/createClass")),s=function(){function e(t,n){(0,r.default)(this,e),this.$wrapper=t||$("#error-container"),this.$holder=n||this.$wrapper.find(".alert")}return(0,a.default)(e,[{key:"show",value:function(e){this.$wrapper.show(),this.$holder.html(e)}},{key:"hide",value:function(){this.$wrapper.hide(),this.$holder.html()}}]),e}();n.default=s},{"@babel/runtime/helpers/classCallCheck":10,"@babel/runtime/helpers/createClass":13,"@babel/runtime/helpers/interopRequireDefault":15}],9:[function(e,t,n){t.exports=function(e,t){return t.get?t.get.call(e):t.value},t.exports.__esModule=!0,t.exports.default=t.exports},{}],10:[function(e,t,n){t.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},t.exports.__esModule=!0,t.exports.default=t.exports},{}],11:[function(e,t,n){t.exports=function(e,t,n){if(!t.has(e))throw new TypeError("attempted to "+n+" private field on non-instance");return t.get(e)},t.exports.__esModule=!0,t.exports.default=t.exports},{}],12:[function(e,t,n){var i=e("./classApplyDescriptorGet.js"),r=e("./classExtractFieldDescriptor.js");t.exports=function(e,t){var n=r(e,t,"get");return i(e,n)},t.exports.__esModule=!0,t.exports.default=t.exports},{"./classApplyDescriptorGet.js":9,"./classExtractFieldDescriptor.js":11}],13:[function(e,t,n){function i(e,t){for(var n=0;n Init Payment Type]', {paymentRequest: this.applePayPaymentRequest});\n\n session.onvalidatemerchant = (event) => {\n this.merchantValidationCallback(event, session);\n };\n\n session.onpaymentauthorized = (event) => {\n this.applePayAuthorizedCallback(event, session);\n };\n\n session.oncancel = (event) => {\n this.debugging.log('[> Cancel]', {event});\n this.errorHandler.show(this.snippets.CANCEL_BY_USER);\n };\n\n session.begin();\n }\n\n /**\n * Call the merchant validation in the server-side integration (apple_pay_merchantvalidation)\n * @param {Event} event\n * @param {ApplePaySession} session\n */\n merchantValidationCallback(event, session) {\n var validationUrl = JSON.stringify(event.validationURL);\n\n this.debugging.log('[> Merchant Validation]', {event});\n\n $.ajax({\n 'url': $.evo.io().options.ioUrl,\n 'method': 'POST',\n 'dataType': 'json',\n 'data': 'io={\"name\":\"apple_pay_merchantvalidation\", \"params\":[' + validationUrl + ']}',\n }).done((validationResponse) => {\n this.debugging.log('[> Merchant Validation Response]', validationResponse);\n\n try {\n session.completeMerchantValidation(validationResponse);\n } catch (e) {\n alert(e.message);\n }\n })\n .fail((error) => {\n this.debugging.log('[> Merchant Validation Error]', error);\n this.errorHandler.show(JSON.stringify(error.statusText));\n session.abort();\n });\n }\n\n /**\n * Create Apple Pay resource with unzer and save the resource id to charge it later.\n *\n * We do this here via AJAX instead of the validateAdditional method in the payment method to set the apple pay\n * session state accordingly.\n *\n * @param {Event} event\n * @param {ApplePaySession} session\n */\n applePayAuthorizedCallback(event, session) {\n // Get payment data from event.\n // \"event.payment\" also contains contact information, if they were set via Apple Pay.\n var self = this;\n var unzerApplePayInstance = this.unzerInstance.ApplePay();\n var paymentData = event.payment.token.paymentData;\n\n this.debugging.log('[> Payment Authorization]', {unzerApplePayInstance, event, paymentData});\n\n // Create an Unzer instance with your public key\n unzerApplePayInstance.createResource(paymentData)\n .then(function (createdResource) {\n // Hand over the type ID to your backend.\n var typeId = JSON.stringify(createdResource.id);\n $.ajax({\n 'url': $.evo.io().options.ioUrl,\n 'method': 'POST',\n 'dataType': 'json',\n 'data': 'io={\"name\":\"apple_pay_payment_authorized\", \"params\":[' + typeId + ']}',\n }).done(function (result) {\n // Handle the transaction respone from backend.\n self.debugging.log('[> Payment Authorization Response]', {result, typeId});\n var status = result.transactionStatus;\n if (status === 'success' || status === 'pending') {\n session.completePayment({ status: window.ApplePaySession.STATUS_SUCCESS });\n\n // Append Payment Resource Id\n const hiddenInput = document.createElement('input');\n hiddenInput.setAttribute('type', 'hidden');\n hiddenInput.setAttribute('name', 'paymentData[resourceId]');\n hiddenInput.setAttribute('value', typeId);\n self.form.appendChild(hiddenInput);\n\n // Submitting the form\n self.form.removeEventListener('submit', self.initPaymentType);\n self.form.submit();\n } else {\n self.abortPaymentSession(session);\n }\n }).fail(function (error) {\n self.errorHandler.show(error.statusText);\n self.abortPaymentSession(session);\n });\n })\n .catch(function (error) {\n self.debugging.log('[> Payment Authorization Error]', error);\n self.errorHandler.show(error.message);\n self.abortPaymentSession(session);\n });\n }\n\n /**\n * Handle Unsupported devices\n */\n unsupportedDevice() {\n this.settings.submitButton.disabled = true;\n this.settings.submitButton.ariaDisabled = true;\n this.errorHandler.show(this.snippets.NOT_SUPPORTED);\n }\n\n /**\n * abort current payment session.\n * @param {ApplePaySession} session\n */\n abortPaymentSession(session) {\n this.debugging.log('[> Abort Payment Session]', { status: window.ApplePaySession.STATUS_FAILURE });\n session.completePayment({ status: window.ApplePaySession.STATUS_FAILURE });\n session.abort();\n }\n}\n","import ErrorHandler from \"../utils/errors\";\nimport Debugging from \"../utils/debugging\";\n\n/** @type {ApplePaySnippets} */\nconst ApplePaySnippetsDefaults = {\n NOT_SUPPORTED: \"This device does not support Apple Pay!\",\n CANCEL_BY_USER: \"Canceled payment process by user!\"\n};\n\nexport default class ApplePayV2 {\n /** @type {ApplePaySettings} */\n settings;\n\n /** @type {ApplePaySnippets} */\n snippets;\n\n /** @type {HTMLFormElement} */\n form;\n\n /** @type {ApplePayPaymentRequest} */\n applePayPaymentRequest;\n\n #errorHandler = new ErrorHandler();\n #debugging = new Debugging($('.unzerUI'));\n\n /**\n * @class\n * @param {String} pubKey\n * @param {ApplePayPaymentRequest} applePayPaymentRequest\n * @param {ApplePaySnippets} snippets\n * @param {ApplePaySettings} settings\n */\n constructor(pubKey, applePayPaymentRequest, snippets, settings) {\n this.settings = settings;\n this.snippets = Object.assign(ApplePaySnippetsDefaults, snippets);\n this.form = this.settings.form || document.getElementById('complete_order');\n this.applePayPaymentRequest = applePayPaymentRequest;\n this.unzerInstance = new unzer(pubKey, {\n locale: this.settings.locale || 'de-DE'\n });\n window.UNZER_DEBUG = !!this.unzerInstance._isSandbox || this.unzerInstance.config.hasSandboxKey; // Enable Debugging in sandbox mode\n\n if (!window.ApplePaySession || !window.ApplePaySession.canMakePayments()) {\n this.#unsupportedDevice();\n return;\n }\n\n // Register Events\n this.initPaymentType = this.initPaymentType.bind(this); // it's a trick! needed in order to overcome the remove event listener\n this.form.addEventListener('submit', this.initPaymentType);\n $('.apple-pay-button').on('click', this.initPaymentType.bind(this));\n }\n\n /**\n * @param {Event} event\n */\n initPaymentType(event) {\n event.preventDefault();\n const applePayInstance = this.unzerInstance.ApplePay();\n const session = applePayInstance.initApplePaySession(this.applePayPaymentRequest); // setup session with default merchant validation\n\n this.#debugging.log('[> Init Payment Type]', { paymentRequest: this.applePayPaymentRequest });\n\n if (!window.ApplePaySession || !window.ApplePaySession.canMakePayments()) {\n this.#unsupportedDevice();\n return;\n }\n\n /** @param {Event} event */\n session.onpaymentauthorized = (event) => {\n this.#applePayAuthorizedCallback(event, applePayInstance, session);\n };\n\n /** @param {Event} event */\n session.oncancel = (event) => {\n this.#debugging.log('[> Cancel]', {event});\n this.#errorHandler.show(this.snippets.CANCEL_BY_USER);\n };\n\n session.begin();\n }\n\n /**\n * Create Apple Pay resource with unzer and save the resource id to charge it later.\n *\n * @param {Event & {payment: {token: {paymentData: object}}}} event\n * @param {Object} applePayInstance\n * @param {ApplePaySession} session\n */\n #applePayAuthorizedCallback(event, applePayInstance, session) {\n const paymentData = event.payment.token.paymentData;\n\n this.#debugging.log('[> Payment Authorization]', { applePayInstance, event, paymentData });\n\n // Create an Unzer instance with your public key\n applePayInstance.createResource(paymentData)\n .then((createdResource) => {\n this.#debugging.log('[> Payment Authorization Resource]', { createdResource });\n session.completePayment({ status: window.ApplePaySession.STATUS_SUCCESS });\n\n // Hand over the payment type ID (createdResource.id)\n const typeId = JSON.stringify(createdResource.id);\n const hiddenInput = document.createElement('input');\n hiddenInput.setAttribute('type', 'hidden');\n hiddenInput.setAttribute('name', 'unzer-payment-type-id');\n hiddenInput.setAttribute('value', typeId);\n\n this.form.appendChild(hiddenInput);\n this.form.removeEventListener('submit', this.initPaymentType);\n this.form.submit();\n })\n .catch(error => {\n this.#debugging.log('[> Payment Authorization Error]', error);\n this.#errorHandler.show(error.message);\n this.#abortPaymentSession(session);\n })\n }\n\n /**\n * abort current payment session.\n * @param {ApplePaySession} session\n */\n #abortPaymentSession(session) {\n this.#debugging.log('[> Abort Payment Session]', { status: window.ApplePaySession.STATUS_FAILURE });\n session.completePayment({ status: window.ApplePaySession.STATUS_FAILURE });\n session.abort();\n }\n\n /**\n * Handle Unsupported devices\n */\n #unsupportedDevice() {\n this.#errorHandler.show(this.snippets.NOT_SUPPORTED);\n console.error(this.snippets.NOT_SUPPORTED);\n }\n}","import ErrorHandler from \"../utils/errors\";\n\nexport default class UnzerPayment {\n static PAYMENT_TYPES = {\n ALIPAY: 'Alipay',\n CARD: 'Card',\n EPS: 'EPS',\n FLEXIPAY_DIRECT: 'FlexiPay Direct',\n HIRE_PURCHASE: 'Hire Purchase',\n PAYPAL: 'Paypal',\n INVOICE: 'Invoice',\n INVOICE_FACTORING: 'Invoice Factoring',\n INVOICE_GUARANTEED: 'Invoice Guaranteed',\n SEPA: 'SEPA',\n SEPA_GUARANTEED: 'SEPA (guaranteed)',\n SOFORT: 'SOFORT',\n GIROPAY: 'Giropay',\n PRZELEWY24: 'Przelewy24',\n IDEAL: 'iDEAL',\n PREPAYMENT: 'Prepayment',\n WECHAT_PAY: 'WeChat Pay',\n PAYLATER_INVOICE: 'Paylater Invoice',\n BANCONTACT: 'Bancontact',\n PAYLATER_INSTALLMENT: 'Paylater Installment',\n PAYLATER_DIRECT_DEBIT: 'Paylater Direct Debit',\n TWINT: 'Twint',\n OPEN_BANKING: 'Open Banking',\n };\n\n /**\n * Heidelpay Payment Class\n *\n * @param {string} pubKey Public Key\n * @param {string} type Payment Type\n * @param {PaymentSettings} settings\n */\n constructor(pubKey, type, settings) {\n /** @type {PaymentSettings} */\n this.settings = settings || {};\n\n var options = {\n locale: this.settings.locale || 'de-DE'\n };\n\n this.unzerInstance = new unzer(pubKey, options);\n this.errorHandler = new ErrorHandler(this.settings.$errorContainer, this.settings.$errorMessage);\n\n /** @type {?string} customerId */\n this.customerId = settings.customerId || null;\n\n /** @type {{createCustomer: Function, updateCustomer: Function}|null} customerResource */\n this.customerResource = null;\n\n /** @type {{createResource: Function}} paymentType */\n this.paymentType = this.initPaymentType(type);\n\n /** @type {HTMLElement} form Form in which the customer enters additional details */\n this.form = this.settings.form || document.getElementById('form_payment_extra');\n\n // Register Events\n this.handleFormSubmit = this.handleFormSubmit.bind(this); // it's a trick! needed in order to overcome the remove event listener\n this.form.addEventListener('submit', this.handleFormSubmit);\n\n if (this.settings.autoSubmit) {\n // this.form.dispatchEvent(new Event('submit')); // Causes endless redirects in some browsers like FF, so we call the callback directly...\n this.handleFormSubmit(new Event('submit'));\n }\n }\n\n /**\n * Init Payment Type\n *\n * @param {string} type\n * @returns {object} payment type\n * @throws Error if there is an unkown payment type\n */\n initPaymentType(type) {\n switch (type) {\n case UnzerPayment.PAYMENT_TYPES.CARD:\n return this.createCard();\n\n case UnzerPayment.PAYMENT_TYPES.INVOICE:\n return this.createInvoice();\n\n case UnzerPayment.PAYMENT_TYPES.INVOICE_GUARANTEED:\n return this.createInvoiceGuaranteed();\n\n case UnzerPayment.PAYMENT_TYPES.INVOICE_FACTORING:\n return this.createInvoiceFactoring();\n\n case UnzerPayment.PAYMENT_TYPES.SEPA:\n return this.createSepa();\n\n case UnzerPayment.PAYMENT_TYPES.SEPA_GUARANTEED:\n return this.createSepaGuaranteed();\n\n case UnzerPayment.PAYMENT_TYPES.PAYPAL:\n return this.createPaypal();\n\n case UnzerPayment.PAYMENT_TYPES.SOFORT:\n return this.createSofort();\n\n case UnzerPayment.PAYMENT_TYPES.GIROPAY:\n return this.createGiropay();\n\n case UnzerPayment.PAYMENT_TYPES.PRZELEWY24:\n return this.createPrzelewy24();\n\n case UnzerPayment.PAYMENT_TYPES.IDEAL:\n return this.createIdeal();\n\n case UnzerPayment.PAYMENT_TYPES.PREPAYMENT:\n return this.createPrepayment();\n\n case UnzerPayment.PAYMENT_TYPES.EPS:\n return this.createEPS();\n\n case UnzerPayment.PAYMENT_TYPES.FLEXIPAY_DIRECT:\n return this.createFlexiPayDirect();\n\n case UnzerPayment.PAYMENT_TYPES.ALIPAY:\n return this.createAlipay();\n\n case UnzerPayment.PAYMENT_TYPES.TWINT:\n return this.createTwint();\n\n case UnzerPayment.PAYMENT_TYPES.WECHAT_PAY:\n return this.createWeChatPay();\n\n case UnzerPayment.PAYMENT_TYPES.HIRE_PURCHASE:\n return this.createHirePurchase();\n\n case UnzerPayment.PAYMENT_TYPES.PAYLATER_INVOICE:\n return this.createPaylaterInvoice();\n\n case UnzerPayment.PAYMENT_TYPES.BANCONTACT:\n return this.createBancontact();\n\n case UnzerPayment.PAYMENT_TYPES.PAYLATER_INSTALLMENT:\n return this.createPaylaterInstallment();\n\n case UnzerPayment.PAYMENT_TYPES.PAYLATER_DIRECT_DEBIT:\n return this.createPaylaterDirectDebit();\n\n case UnzerPayment.PAYMENT_TYPES.OPEN_BANKING:\n return this.createOpenBanking();\n\n default:\n throw new Error('Unkown Payment Type: ' + type);\n }\n }\n\n /**\n * Handle the form submit\n *\n * @param {Event} event Submit Event\n */\n handleFormSubmit(event) {\n var self = this;\n event.preventDefault();\n\n // Creating a Payment resource and (optional) Customer Resource\n var resources = [this.paymentType.createResource()];\n\n if (this.customerResource) {\n resources.push(this.customerId ? this.customerResource.updateCustomer() : this.customerResource.createCustomer());\n }\n\n Promise.all(resources).then(function (result) {\n // Append Payment Resource Id\n var hiddenInput = document.createElement('input');\n hiddenInput.setAttribute('type', 'hidden');\n hiddenInput.setAttribute('name', 'paymentData[resourceId]');\n hiddenInput.setAttribute('value', result[0].id);\n self.form.appendChild(hiddenInput);\n\n // Append Customer Id\n if (result.length >= 2) {\n var hiddenCstInput = document.createElement('input');\n hiddenCstInput.setAttribute('type', 'hidden');\n hiddenCstInput.setAttribute('name', 'paymentData[customerId]');\n hiddenCstInput.setAttribute('value', result[1].id);\n self.form.appendChild(hiddenCstInput);\n }\n\n // Submitting the form\n self.form.removeEventListener('submit', self.handleFormSubmit);\n self.form.submit();\n })\n .catch(function (error) {\n self.errorHandler.show(error.message);\n });\n }\n\n /**\n * Handle Paylater Input Validation\n * @param {Event} event\n * @param {boolean} isValid\n * @param {String} paymentMethodName\n * @param {HTMLElement} continueButton\n * @returns\n */\n onPaylaterInputValidation(event, isValid, paymentMethodName, continueButton) {\n // console.log(paymentMethodName, { event, isValid, continueButton, 's360-valid': continueButton.getAttribute('data-s360-valid') });\n\n if (isValid) {\n // everything is still valid\n if (continueButton.getAttribute('data-s360-valid') == 'all') {\n continueButton.removeAttribute('disabled');\n return;\n }\n\n // Customer is already valid -> everything is valid\n if (continueButton.getAttribute('data-s360-valid') == 'customer') {\n continueButton.setAttribute('data-s360-valid', 'all');\n continueButton.removeAttribute('disabled');\n return;\n }\n\n // mark payment method as valid\n continueButton.setAttribute('data-s360-valid', paymentMethodName);\n return;\n }\n\n continueButton.setAttribute('disabled', true);\n\n // only invalidate if the paymentMethodName was valid before\n if (continueButton.getAttribute('data-s360-valid') == paymentMethodName) {\n continueButton.setAttribute('data-s360-valid', 0);\n } else if (continueButton.getAttribute('data-s360-valid') == 'all') {\n continueButton.setAttribute('data-s360-valid', 'customer');\n }\n }\n\n /**\n * Create (or update) customer resource.\n *\n * @param {?String} paymentTypeName\n * @param {?String} multipleValidation\n * @see https://docs.heidelpay.com/docs/customer-ui-integration\n * @returns {{createCustomer: Function, updateCustomer: Function}} Customer Resource\n */\n createCustomer(paymentTypeName = null, multipleValidation = false) {\n var Customer = this.settings.isB2B ? this.unzerInstance.B2BCustomer() : this.unzerInstance.Customer();\n var customerObj = this.settings.customer || {};\n var continueButton = this.settings.submitButton || document.getElementById(\"submit-button\");\n let options = {\n containerId: 'customer',\n showInfoBox: false,\n showHeader: false,\n fields: ['name', 'birthdate']\n };\n\n if (paymentTypeName) {\n options.paymentTypeName = paymentTypeName;\n }\n\n Customer.initFormFields(customerObj);\n if (multipleValidation) {\n continueButton.setAttribute('data-s360-valid', 0);\n\n Customer.addEventListener('validate', (e) => {\n // console.log('customer validate', e, continueButton, continueButton.getAttribute('data-s360-valid'));\n continueButton.setAttribute('disabled', true);\n\n if (e.success) {\n // everything is still valid\n if (continueButton.getAttribute('data-s360-valid') == 'all') {\n continueButton.removeAttribute('disabled');\n return;\n }\n\n // payment method is already valid -> everything is valid\n if (continueButton.getAttribute('data-s360-valid') == paymentTypeName) {\n continueButton.setAttribute('data-s360-valid', 'all');\n continueButton.removeAttribute('disabled');\n return;\n }\n\n continueButton.setAttribute('data-s360-valid', 'customer');\n return;\n }\n\n // only invalidate if the customer was valid before\n if (continueButton.getAttribute('data-s360-valid') == 'customer') {\n continueButton.setAttribute('data-s360-valid', 0);\n } else if (continueButton.getAttribute('data-s360-valid') == 'all') {\n continueButton.setAttribute('data-s360-valid', paymentTypeName);\n }\n });\n } else {\n Customer.addEventListener('validate', (e) => {\n if (e.success) {\n continueButton.removeAttribute('disabled');\n return;\n }\n\n continueButton.setAttribute('disabled', true);\n });\n }\n\n if (this.settings.isB2B) {\n options.fields = ['companyInfo'];\n // options = {containerId: 'customer'};\n }\n\n if (this.customerId) {\n Customer.update(this.customerId, options);\n return Customer;\n }\n\n Customer.create(options);\n\n return Customer;\n }\n\n /**\n * Hide form fields from unzer ui component because they are already filled by the shop\n * @param {string} paymentMethodName\n */\n hideFormFields(paymentMethodName) {\n const field = $('#customer');\n\n field.find('.field').filter(\n '.city, .company, :has(.country), .street, .zip, .firstname, .lastname'\n ).hide();\n field.find('.salutation-customer').hide();\n field.find('.firstname, .lastname').parent('.fields').hide();\n field.find('.unzerUI.divider-horizontal:eq(0)').hide();\n field.find('.unzerUI.message.downArrow').hide();\n\n if (paymentMethodName) {\n field.find('.field').filter('.checkbox-billingAddress, .email').hide();\n field.find('.field').filter(\n '.billing-name, .billing-street, .billing-zip, .billing-city, :has(.billing-country)'\n ).hide();\n field.find('.unzerUI.form>.checkboxLabel').hide();\n field.find('.unzerUI.form>.salutation-unzer-' + paymentMethodName + '-customer').hide();\n }\n\n field.find('.companyType').on('change', e => this.hideFormFields(paymentMethodName));\n }\n\n /**\n * Create Paylayter Installment Payment Type\n *\n * @see https://docs.unzer.com/payment-methods/unzer-installment-upl/accept-unzer-installment-ui-component/\n * @returns {{createResource: Function}}\n */\n createPaylaterInstallment() {\n this.customerResource = this.createCustomer('paylater-installment', true);\n const continueButton = this.settings.submitButton || document.getElementById(\"submit-button\");\n const paylaterInstallment = this.unzerInstance.PaylaterInstallment();\n\n this.hideFormFields('paylater-installment');\n\n paylaterInstallment.create({\n containerId: 'paylater-installment',\n amount: this.settings.amount,\n currency: this.settings.currency,\n country: this.settings.country\n });\n\n paylaterInstallment.addEventListener('paylaterInstallmentEvent', (e) => {\n switch (e.currentStep) {\n case 'plan-list':\n continueButton.setAttribute('disabled', true);\n break;\n\n case 'plan-detail':\n continueButton.setAttribute('disabled', false);\n break;\n\n default:\n break;\n }\n\n const isValid = e.action === 'validate' && e.success;\n this.onPaylaterInputValidation(e, isValid, 'paylater-installment', continueButton);\n });\n\n return paylaterInstallment;\n }\n\n /**\n * Create Paylayter Invoice Payment Type\n *\n * @see https://docs.unzer.com/payment-methods/unzer-invoice-upl/accept-unzer-invoice-upl-ui-component/\n * @returns {{createResource: Function}}\n */\n createPaylaterInvoice() {\n this.customerResource = this.createCustomer('paylater-invoice', true);\n const continueButton = this.settings.submitButton || document.getElementById(\"submit-button\");\n const paylaterInvoice = this.unzerInstance.PaylaterInvoice();\n\n this.hideFormFields('paylater-invoice');\n\n paylaterInvoice.create({\n containerId: 'paylater-invoice',\n customerType: this.settings.isB2B ? 'B2B' : 'B2C'\n });\n\n paylaterInvoice.addEventListener('change', (e) =>\n this.onPaylaterInputValidation(\n e,\n e.success,\n 'paylater-invoice',\n continueButton\n )\n );\n\n return paylaterInvoice;\n }\n\n /**\n * Create Paylayter Invoice Payment Type\n *\n * @see https://docs.unzer.com/payment-methods/direct-debit-secured/accept-direct-debit-secured-ui-component/\n * @returns {{createResource: Function}}\n */\n createPaylaterDirectDebit() {\n this.customerResource = this.createCustomer('paylater-direct-debit', true);\n const continueButton = this.settings.submitButton || document.getElementById(\"submit-button\");\n const paylaterDirectDebit = this.unzerInstance.PaylaterDirectDebit();\n\n this.hideFormFields('paylater-direct-debit');\n\n paylaterDirectDebit.create('paylater-direct-debit', {\n containerId: 'paylater-direct-debit',\n customerType: this.settings.isB2B ? 'B2B' : 'B2C'\n });\n\n paylaterDirectDebit.addEventListener('change', (e) =>\n this.onPaylaterInputValidation(\n e,\n e.success,\n 'paylater-direct-debit',\n continueButton\n )\n );\n\n return paylaterDirectDebit;\n }\n\n /**\n * Create Bancontact Payment Type\n *\n * @see https://docs.unzer.com/payment-methods/bancontact/accept-bancontact-ui-component/\n * @returns {{createResource: Function}}\n */\n createBancontact() {\n const bancontact = this.unzerInstance.Bancontact();\n const styling = { fontSize: null, fontColor: null, fontFamily: null };\n\n if (this.settings.styling) {\n styling.fontColor = this.settings.styling.fontColor || null;\n styling.fontSize = this.settings.styling.fontSize || null;\n styling.fontFamily = this.settings.styling.fontFamily || null;\n }\n\n bancontact.create('holder', {\n containerId: 'bancontact-holder',\n fontSize: styling.fontSize,\n fontColor: styling.fontColor,\n fontFamily: styling.fontFamily\n });\n\n return bancontact;\n }\n\n /**\n * Create a new Card Payment Type.\n *\n * @see https://docs.heidelpay.com/docs/credit-card-ui-integration\n * @returns {{createResource: Function}} Card Payment Type\n */\n createCard() {\n var Card = this.unzerInstance.Card();\n var styling = {fontSize: null, fontColor: null, fontFamily: null};\n\n if (this.settings.styling) {\n styling.fontColor = this.settings.styling.fontColor || null;\n styling.fontSize = this.settings.styling.fontSize || null;\n styling.fontFamily = this.settings.styling.fontFamily || null;\n }\n\n Card.create('number', {\n containerId: 'card-element-id-number',\n onlyIframe: false,\n fontSize: styling.fontSize,\n fontColor: styling.fontColor,\n fontFamily: styling.fontFamily\n });\n Card.create('expiry', {\n containerId: 'card-element-id-expiry',\n onlyIframe: false,\n fontSize: styling.fontSize,\n fontColor: styling.fontColor,\n fontFamily: styling.fontFamily\n });\n Card.create('cvc', {\n containerId: 'card-element-id-cvc',\n onlyIframe: false,\n fontSize: styling.fontSize,\n fontColor: styling.fontColor,\n // fontFamily: styling.fontFamily // messes with hidden font in firefox\n });\n Card.create('holder', {\n containerId: 'card-element-id-holder',\n onlyIframe: false,\n fontSize: styling.fontSize,\n fontColor: styling.fontColor,\n fontFamily: styling.fontFamily\n });\n\n // Enable pay button initially\n var formFieldValid = {};\n\n /** @type {HTMLElement} continueButton */\n var continueButton = this.settings.submitButton || document.getElementById(\"submit-button\");\n continueButton.setAttribute('disabled', true);\n\n Card.addEventListener('change', (e) => {\n if (e.success) {\n formFieldValid[e.type] = true;\n this.errorHandler.hide();\n }\n\n if (e.error) {\n formFieldValid[e.type] = false;\n this.errorHandler.show(e.error);\n }\n\n if (e.reset) {\n formFieldValid[e.type] = false;\n }\n\n if (formFieldValid.number && formFieldValid.expiry && formFieldValid.cvc && formFieldValid.holder) {\n continueButton.removeAttribute('disabled');\n return;\n }\n\n continueButton.setAttribute('disabled', true);\n });\n\n return Card;\n }\n\n /**\n * Create a new Invoice Payment Type.\n *\n * @see https://docs.heidelpay.com/docs/invoice-ui-integration\n * @returns {{createResource: Function}} Invoice Payment Type\n */\n createInvoice() {\n return this.unzerInstance.Invoice();\n }\n\n /**\n * Create a new Invoice Guaranteed Payment Type.\n *\n * @see https://docs.heidelpay.com/docs/invoice-ui-integration\n * @returns {{createResource: Function}} Invoice Payment Type\n */\n createInvoiceGuaranteed() {\n this.customerResource = this.createCustomer();\n\n return this.unzerInstance.InvoiceSecured();\n }\n\n /**\n * Create a new Invoice Factoring Payment Type.\n *\n * @see https://docs.heidelpay.com/docs/invoice-ui-integration\n * @returns {{createResource: Function}} Invoice Payment Type\n */\n createInvoiceFactoring() {\n this.customerResource = this.createCustomer();\n\n return this.unzerInstance.InvoiceSecured();\n }\n\n /**\n * Create a new SEPA Direct Debit Payment Type.\n *\n * @see https://docs.heidelpay.com/docs/sepa-direct-debit-ui-integration\n * @returns {{createResource: Function}} SEPA Direct Debit Payment Type\n */\n createSepa() {\n var Sepa = this.unzerInstance.SepaDirectDebit();\n Sepa.create('sepa-direct-debit', {\n containerId: 'sepa-IBAN'\n });\n\n /** @type {HTMLElement} continueButton */\n const continueButton = this.settings.submitButton || document.getElementById(\"submit-button\");\n continueButton.setAttribute('disabled', true);\n\n Sepa.addEventListener('change', (e) => {\n if (e.success) {\n continueButton.removeAttribute('disabled');\n this.errorHandler.hide();\n return;\n }\n\n continueButton.setAttribute('disabled', true);\n });\n\n return Sepa;\n }\n\n /**\n * Create a new SEPA Direct Debit (guaranteed) Payment Type.\n *\n * @see https://docs.heidelpay.com/docs/sepa-direct-debit-ui-integration\n * @returns {{createResource: Function}} SEPA Direct Debit (guaranteed) Payment Type\n */\n createSepaGuaranteed() {\n var SepaGuaranteed = this.unzerInstance.SepaDirectDebitSecured();\n SepaGuaranteed.create('sepa-direct-debit-guaranteed', {\n containerId: 'sepa-guaranteed-IBAN'\n });\n\n /** @type {HTMLElement} continueButton */\n const continueButton = this.settings.submitButton || document.getElementById(\"submit-button\");\n continueButton.setAttribute('disabled', true);\n\n SepaGuaranteed.addEventListener('change', (e) => {\n if (e.success) {\n continueButton.removeAttribute('disabled');\n this.errorHandler.hide();\n return;\n }\n\n continueButton.setAttribute('disabled', true);\n });\n\n this.customerResource = this.createCustomer();\n\n return SepaGuaranteed;\n }\n\n /**\n * Create a new PayPal Payment Type.\n *\n * @see https://docs.heidelpay.com/docs/paypal-ui-integration\n * @returns {{createResource: Function}} Papal Payment Type\n */\n createPaypal() {\n var Paypal = this.unzerInstance.Paypal();\n Paypal.create('email', {\n containerId: 'paypal-element-email'\n });\n\n return Paypal;\n }\n\n /**\n * Create a new SOFORT Payment Type.\n *\n * @see https://docs.heidelpay.com/docs/redirect-ui-integration#sofort\n * @returns {{createResource: Function}} Sofort Payment Type\n */\n createSofort() {\n return this.unzerInstance.Sofort();\n }\n\n /**\n * Create a new Giropay Payment Type.\n *\n * @see https://docs.heidelpay.com/docs/redirect-ui-integration#giropay\n * @returns {{createResource: Function}} Giropay Payment Type\n */\n createGiropay () {\n return this.unzerInstance.Giropay();\n }\n\n /**\n * Create a new Przelewy24 Payment Type.\n *\n * @see https://docs.heidelpay.com/docs/redirect-ui-integration#przelewy24\n * @returns {{createResource: Function}} Przelewy24 Payment Type\n */\n createPrzelewy24() {\n return this.unzerInstance.Przelewy24();\n }\n\n /**\n * Create a new iDEAL Payment Type.\n *\n * @see https://docs.heidelpay.com/docs/ideal-ui-integration\n * @returns {{createResource: Function}} iDEAL Payment Type\n */\n createIdeal() {\n var Ideal = this.unzerInstance.Ideal();\n\n Ideal.create('ideal', {\n containerId: 'ideal-element'\n });\n\n /** @type {HTMLElement} continueButton */\n const continueButton = this.settings.submitButton || document.getElementById(\"submit-button\");\n continueButton.setAttribute('disabled', true);\n\n Ideal.addEventListener('change', (e) => {\n if (e.value) {\n continueButton.removeAttribute('disabled');\n this.errorHandler.hide();\n return;\n }\n\n continueButton.setAttribute('disabled', true);\n });\n\n return Ideal;\n }\n\n /**\n * Create a new Prepayment Payment Type.\n *\n * @see https://docs.heidelpay.com/docs/prepayment-ui-integration\n * @returns {{createResource: Function}} Prepayment Payment Type\n */\n createPrepayment() {\n return this.unzerInstance.Prepayment();\n }\n\n /**\n * Create a new EPS Payment Type.\n *\n * @see https://docs.heidelpay.com/docs/eps-ui-integration\n * @returns {{createResource: Function}} EPS Payment Type\n */\n createEPS() {\n return this.unzerInstance.EPS();\n }\n\n /**\n * Create a new FlexiPay Direct Payment Type.\n *\n * @see https://docs.heidelpay.com/docs/redirect-ui-integration#flexipay-direct\n * @returns {{createResource: Function}} Alipay Payment Type\n */\n createFlexiPayDirect() {\n return this.unzerInstance.FlexiPayDirect();\n }\n\n /**\n * Create a new Alipay Payment Type.\n *\n * @see https://docs.heidelpay.com/docs/redirect-ui-integration#alipay\n * @returns {{createResource: Function}} Alipay Payment Type\n */\n createAlipay() {\n return this.unzerInstance.Alipay();\n }\n\n /**\n * Create a new TWINT Payment Type.\n *\n * @see https://docs.unzer.com/payment-methods/twint/accept-twint-ui-component/\n * @returns {{createResource: Function}} Twint Payment Type\n */\n createTwint() {\n return this.unzerInstance.Twint();\n }\n\n /**\n * Create a new Open Banking Payment Type.\n *\n * @returns {{createResource: Function}} Twint Payment Type\n */\n createOpenBanking() {\n return this.unzerInstance.OpenBanking();\n }\n\n /**\n * Create an new WeChat Pay Payment Type.\n *\n * @see https://docs.heidelpay.com/docs/redirect-ui-integration#wechat-pay\n * @returns {{createResource: Function}} WeChat Pay Payment Type\n */\n createWeChatPay() {\n return this.unzerInstance.Wechatpay();\n }\n\n /**\n * Create a new Hire Purchase Payment Type.\n *\n * @see https:://docs.heidelpay.com/docs/hire-purchase-ui-integration\n * @returns {{createResource: Function}} Hire Purchase Payment Type\n */\n createHirePurchase() {\n var InstallmentSecured = this.unzerInstance.InstallmentSecured();\n var self = this;\n this.customerResource = this.createCustomer();\n\n /** @type {HTMLElement} continueButton */\n var continueButton = self.settings.submitButton || document.getElementById(\"submit-button\");\n continueButton.setAttribute('style', 'display: none');\n continueButton.setAttribute('disabled', true);\n\n InstallmentSecured.create({\n containerId: 'hire-purchase-element',\n amount: this.settings.amount || null,\n currency: this.settings.currency || null,\n effectiveInterest: this.settings.effectiveInterest || null,\n orderDate: this.settings.orderDate || null\n }).then(function (data) {\n // if successful, notify the user that the list of installments was fetched successfully\n // in case you were using a loading element during the fetching process,\n // you can remove it inside this callback function\n })\n .catch(function (response) {\n // sent an error message to the user (fetching installment list failed)\n var msg = '';\n console.error(response.message);\n\n response.error.details.forEach(function(err) {\n console.error('API-Error: ' + err.code);\n msg += err.customerMessage;\n });\n\n self.errorHandler.show(msg);\n });\n\n\n // Listen to UI events\n InstallmentSecured.addEventListener('installmentSecuredEvent', function (e) {\n if (e.action === 'validate') {\n if (e.success) {\n continueButton.removeAttribute('disabled');\n return;\n }\n\n continueButton.setAttribute('disabled', true);\n }\n\n if (e.action === 'change-step') {\n if (e.currentSteep === 'plan-list') {\n continueButton.setAttribute('style', 'display: none');\n continueButton.setAttribute('disabled', true);\n return;\n }\n\n continueButton.setAttribute('style', 'display: inline-block');\n }\n });\n\n return InstallmentSecured;\n }\n}\n","import ErrorHandler from \"../utils/errors\";\n\nexport default class GooglePay\n{\n /**\n * @param {string} pubKey\n * @param {GooglePaySettings} settings\n */\n constructor(pubKey, settings) {\n /** @type {GooglePaySettings} */\n this.settings = settings || {};\n\n /** @type {HTMLFormElement} */\n this.form = this.settings.form || document.getElementById('complete_order');\n\n const options = {\n locale: this.settings.locale || 'de-DE'\n };\n\n this.unzerInstance = new unzer(pubKey, options);\n this.errorHandler = new ErrorHandler(this.settings.$errorContainer, this.settings.$errorMessage);\n\n this.createPaymentTypeResource();\n }\n\n createPaymentTypeResource() {\n // Creating a Google Pay instance\n const googlepayInstance = this.unzerInstance.Googlepay();\n\n const paymentData = googlepayInstance.initPaymentDataRequestObject({\n gatewayMerchantId: this.settings.googlepay.gatewayMerchantId,\n merchantInfo: this.settings.googlepay.merchantInfo,\n transactionInfo: this.settings.googlepay.transactionInfo,\n allowedCardNetworks: this.settings.googlepay.allowedCardNetworks,\n allowCreditCards: this.settings.googlepay.allowCreditCards,\n allowPrepaidCards: this.settings.googlepay.allowPrepaidCards,\n buttonOptions: {\n buttonColor: this.settings.googlepay.buttonOptions.buttonColor,\n buttonSizeMode: this.settings.googlepay.buttonOptions.buttonSize,\n },\n onPaymentAuthorizedCallback: (paymentData) => googlepayInstance.createResource(paymentData)\n .then(this.onAuthorizedSuccess.bind(this))\n .catch(this.onAuthorizedFailed.bind(this))\n });\n\n googlepayInstance.create(\n { containerId: 'googlepay-holder' },\n paymentData\n );\n }\n\n /**\n * @param {{id: string}} result\n * @returns {{ status: string }}\n */\n onAuthorizedSuccess(result) {\n // Submit the ID to your server-side integration\n const hiddenInput = document.createElement('input');\n hiddenInput.setAttribute('type', 'hidden');\n hiddenInput.setAttribute('name', 'unzer-payment-type-id');\n hiddenInput.setAttribute('value', result.id);\n\n this.form.appendChild(hiddenInput);\n this.form.submit();\n\n return { status: 'success' };\n }\n\n /**\n * @param {{customerMessage?: string, message?: string, data?: {errors?: Array<{customerMessage?: string}>}}} error\n * @returns {{ status: string, message: string }}\n */\n onAuthorizedFailed(error) {\n let errorMessage = error.customerMessage || error.message || 'Error';\n if (error.data && Array.isArray(error.data.errors) && error.data.errors[0]) {\n errorMessage = error.data.errors[0].customerMessage || 'Error';\n }\n\n this.errorHandler.show(errorMessage);\n\n return {\n status: 'error',\n message: errorMessage || 'Unexpected error'\n };\n }\n}","/**\n * Heidelpay Installment Modal Window Handler\n *\n * @param {string} modalSelector\n * @param {HTMLElement} btn Submit Trigger\n * @param {JQuery} $form\n */\nconst Installment = (modalSelector, btn, $form) => {\n var modal = $(modalSelector);\n\n btn.addEventListener('click', function () {\n $form.trigger('submit');\n });\n\n $form.on('submit', function (e) {\n if (!modal.is(':visible')) {\n e.preventDefault();\n modal.modal('show');\n return false;\n }\n\n return true;\n });\n};\n\nexport default Installment;","export default class Debugging {\n constructor($container) {\n this.$container = $container;\n this.$log = null;\n\n if (!window.UNZER_DEBUG) {\n return;\n }\n\n this.createLogTemplate();\n }\n\n log(context, data = {}) {\n if (!window.UNZER_DEBUG) {\n return;\n }\n\n if (!this.$log) {\n this.createLogTemplate();\n }\n\n this.$log.append(\n '
        • ' + context + '
          ' + JSON.stringify(data,  null, '  ') +  '
        • '\n );\n }\n\n createLogTemplate() {\n this.$container.append(\n $('
            ')\n );\n this.$log = this.$container.find('.debug-log > ul');\n }\n}\n","export default class ErrorHandler {\n /**\n * @param {JQuery|null} $wrapper Wrapper for Container to display error messages in\n * @param {JQuery|null} $holder Container to display error messages in\n */\n constructor($wrapper, $holder) {\n this.$wrapper = $wrapper || $('#error-container');\n this.$holder = $holder || this.$wrapper.find('.alert');\n }\n\n /**\n * Show Error message\n * @param {String} message\n */\n show(message) {\n this.$wrapper.show();\n this.$holder.html(message);\n }\n\n /**\n * Hide error message\n */\n hide() {\n this.$wrapper.hide();\n this.$holder.html();\n }\n}\n","function _classApplyDescriptorGet(receiver, descriptor) {\n if (descriptor.get) {\n return descriptor.get.call(receiver);\n }\n\n return descriptor.value;\n}\n\nmodule.exports = _classApplyDescriptorGet, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nmodule.exports = _classCallCheck, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _classExtractFieldDescriptor(receiver, privateMap, action) {\n if (!privateMap.has(receiver)) {\n throw new TypeError(\"attempted to \" + action + \" private field on non-instance\");\n }\n\n return privateMap.get(receiver);\n}\n\nmodule.exports = _classExtractFieldDescriptor, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var classApplyDescriptorGet = require(\"./classApplyDescriptorGet.js\");\n\nvar classExtractFieldDescriptor = require(\"./classExtractFieldDescriptor.js\");\n\nfunction _classPrivateFieldGet(receiver, privateMap) {\n var descriptor = classExtractFieldDescriptor(receiver, privateMap, \"get\");\n return classApplyDescriptorGet(receiver, descriptor);\n}\n\nmodule.exports = _classPrivateFieldGet, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}\n\nmodule.exports = _createClass, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nmodule.exports = _defineProperty, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n}\n\nmodule.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;"]} \ No newline at end of file diff --git a/frontend/scss/heidelpay.scss b/frontend/scss/heidelpay.scss deleted file mode 100644 index 1281783..0000000 --- a/frontend/scss/heidelpay.scss +++ /dev/null @@ -1,34 +0,0 @@ -// Heidelpay UI Fixes -.unzerUI { - .field { - position: relative; - } -} - -// NOVA Fixes -.label-slide .form-group:not(.exclude-from-label-slide):not(.checkbox) .unzerUI { - &.form { - label { - position: relative; - top: initial; - left: initial; - font-size: 1rem; - margin: 0 0 .28571429rem; - padding: 0; - transform: none; - line-height: 30px; - pointer-events: all; - text-overflow: initial; - white-space: normal; - overflow: initial; - max-width: none; - } - } - - &.checkbox { - .box, label { - cursor: pointer; - padding-left: 2.5em; - } - } -} diff --git a/frontend/src/js/app.js b/frontend/src/js/app.js deleted file mode 100644 index 9402407..0000000 --- a/frontend/src/js/app.js +++ /dev/null @@ -1,11 +0,0 @@ -import ApplePay from './payments/applepay'; -import ApplePayV2 from './payments/applepay_v2'; -import UnzerPayment from "./payments/general"; -import GooglePay from './payments/googlepay'; -import Installment from "./payments/instalment"; - -window.HpPayment = UnzerPayment; -window.HpInstalment = Installment; -window.UnzerApplePay = ApplePay; -window.UnzerApplePayV2 = ApplePayV2; -window.UnzerGooglePay = GooglePay; diff --git a/frontend/src/js/components/applepay.js b/frontend/src/js/components/applepay.js new file mode 100644 index 0000000..c3f053f --- /dev/null +++ b/frontend/src/js/components/applepay.js @@ -0,0 +1,17 @@ +import BaseComponent from './base'; + +export default class extends BaseComponent { + mounted() { + super.mounted(); + this.inputNames.resourceId = 'unzer-payment-type-id'; + + const applePayData = JSON.parse(this.el.dataset.paymentDataRequest) || {}; + // applePayData.onPaymentAuthorizedCallback = async(paymentData) => { + // return await this.unzerPayment?.submit() + // .then(response => this.onPaymentSubmit(response)) + // .catch(err => this.logError(err)); + // }; + + this.unzerPayment.setApplePayData(applePayData); + } +} \ No newline at end of file diff --git a/frontend/src/js/components/base.js b/frontend/src/js/components/base.js new file mode 100644 index 0000000..50f1884 --- /dev/null +++ b/frontend/src/js/components/base.js @@ -0,0 +1,151 @@ +import ErrorHandler from "../utils/errors"; + +export default class +{ + inputNames = { + 'resourceId': 'paymentData[resourceId]', + 'customerId': 'paymentData[customerId]', + 'threatMetrixId': 'paymentData[threatMetrixId]' + }; + + unzerCheckout = null; + unzerPayment = null; + + /** + *@param {HTMLElement} el + * @param {{component: string, autoSubmit: boolean, ?customer: object, ?basket:object, ?submitButton: string, ?isB2B: boolean}} settings + */ + constructor(el, settings) { + this.el = el; + this.settings = settings; + this.customElement = "unzer-" + settings.component; + this.submitButton = document.querySelector(settings.submitButton); + this.errorHandler = new ErrorHandler(); + + this.boot(); + this.register(); + } + + boot() { + const wrapper = document.createElement('unzer-checkout'); + + if (this.submitButton) { + // Wrap Submit Button with for + // "automatic handling for enabling/disabling the submit button depending on the current status, + // and showing/hiding of brand icons." + wrapper.id = "unzer-checkout-wrapper" + this.submitButton.parentNode.insertBefore(wrapper, this.submitButton); + wrapper.appendChild(this.submitButton); + this.submitButton.id = 'unzerUiComponentCheckoutBtn'; + } else { + this.el.appendChild(wrapper); + } + } + + register() { + // form + this.submitButton?.addEventListener('click', e => { + e.preventDefault(); + // this.el.closest('form').submit(); + }); + + // this.#el.closest('form').addEventListener('submit', (e) => { + // console.log('on submit'); + // e.preventDefault(); + // document.querySelector('unzer-checkout > button[type="submit"]').click(); + // }) + + // Wait for ui components to be loaded + Promise.all([ + customElements.whenDefined("unzer-payment"), + customElements.whenDefined("unzer-checkout"), + customElements.whenDefined(this.customElement) + ]).then(() => { + this.unzerPayment = document.querySelector('unzer-payment'); + this.unzerCheckout = document.querySelector('unzer-checkout'); + this.mounted(); + }) + .catch((err) => this.logError(err)); + } + + mounted() { + // this.unzerCheckout.autoDisable = true; + this.unzerCheckout.onPaymentSubmit = this.onPaymentSubmit.bind(this); + + // Small style fix if needed + if (this.unzerCheckout.shadowRoot.querySelector('.unzer-checkout')) { + this.unzerCheckout.shadowRoot.querySelector('.unzer-checkout').style.width = '100%'; + } + + // Set customer data if available + if (this.settings.customer) { + if (this.settings.isB2B) { + this.settings.customer.customerSettings = {'type': 'B2B'}; + } + + this.unzerPayment.setCustomerData(this.settings.customer); + } + + // Set basket data if available + if (this.settings.basket) { + this.unzerPayment.setBasketData(this.settings.basket); + } + + // Autosubmit form + if (this.settings.autoSubmit) { + // document.querySelector('unzer-checkout > button[type="submit"]').click(); + this.submitButton?.click(); + } + } + + onPaymentSubmit(response) { + try { + if (this.settings.component === 'card' && response.submitResponse?.success !== true) { + if (!response.submitResponse || response.submitResponse.status !== 'SUCCESS') { + throw new Error(response.submitResponse.message ?? 'Failed payment response: ' + JSON.stringify(response, null, 2)); + } + } else { + if (!response.submitResponse || !response.submitResponse.success) { + throw new Error(response.submitResponse.message ?? 'Failed payment response: ' + JSON.stringify(response, null, 2)); + } + } + + console.log({ response }); + + // Append payment resource id + const resourceIdInput = document.createElement('input'); + resourceIdInput.setAttribute('type', 'hidden'); + resourceIdInput.setAttribute('name', this.inputNames.resourceId); + resourceIdInput.setAttribute('value', response.submitResponse.data.id); + this.el.appendChild(resourceIdInput); + + // append customer id + if (response.customerResponse && response.customerResponse.success) { + const customerIdInput = document.createElement('input'); + customerIdInput.setAttribute('type', 'hidden'); + customerIdInput.setAttribute('name', this.inputNames.customerId); + customerIdInput.setAttribute('value', response.customerResponse.data.id); + this.el.appendChild(customerIdInput); + } + + // append threatmetrix id + if (response.threatMetrixId) { + const threatmetrixIdInput = document.createElement('input'); + threatmetrixIdInput.setAttribute('type', 'hidden'); + threatmetrixIdInput.setAttribute('name', this.inputNames.threatMetrixId); + threatmetrixIdInput.setAttribute('value', response.threatMetrixId); + this.el.appendChild(threatmetrixIdInput); + } + + // submit ids to server side intergration to perform payment transaction + this.el.closest('form').submit(); + } catch(err) { + this.logError(err); + } + } + + logError(err) { + this.errorHandler.show(err); + console.error('Unzer UI Component Error', {err}) + } +} \ No newline at end of file diff --git a/frontend/src/js/components/googlepay.js b/frontend/src/js/components/googlepay.js new file mode 100644 index 0000000..1d79b05 --- /dev/null +++ b/frontend/src/js/components/googlepay.js @@ -0,0 +1,30 @@ +import BaseComponent from './base'; + +export default class extends BaseComponent { + mounted() { + super.mounted(); + + this.inputNames.resourceId = 'unzer-payment-type-id'; + + const settings = JSON.parse(this.el.dataset.paymentDataRequest) || {}; + const googlePayData = { + gatewayMerchantId: settings.gatewayMerchantId, + merchantInfo: settings.merchantInfo, + transactionInfo: settings.transactionInfo, + allowedCardNetworks: settings.allowedCardNetworks, + allowCreditCards: settings.allowCreditCards, + allowPrepaidCards: settings.allowPrepaidCards, + buttonOptions: { + buttonColor: settings.buttonOptions.buttonColor, + buttonSizeMode: settings.buttonOptions.buttonSize, + }, + // onPaymentAuthorizedCallback: async (paymentData) => { + // return await this.unzerPayment?.submit() + // .then(response => this.onPaymentSubmit(response)) + // .catch(err => this.logError(err)); + // } + }; + + this.unzerPayment.setGooglePayData(googlePayData); + } +} \ No newline at end of file diff --git a/frontend/src/js/components/index.js b/frontend/src/js/components/index.js new file mode 100644 index 0000000..84b5d7f --- /dev/null +++ b/frontend/src/js/components/index.js @@ -0,0 +1,38 @@ +/** + * Unzer UI Components V2 + * @see https://docs.unzer.com/online-payments/ui-component-v2/ + */ +import BaseComponent from "./base"; +import ErrorHandler from "../utils/errors"; +import GooglePayComponent from "./googlepay"; +import ApplePayComponent from "./applepay"; +import KlarnaComponent from "./klarna"; + +// Init component +document.addEventListener('DOMContentLoaded', function() { + /** @type {NodeListOf} */ + const components = document.querySelectorAll('[data-unzer-ui-component]'); + + if (!components || components.length === 0) { + return; + } + + components.forEach(el => { + try { + const settings = JSON.parse(el.dataset.unzerUiComponent) || {}; + + if (settings.component === 'google-pay') { + new GooglePayComponent(el, settings); + } else if (settings.component === 'apple-pay') { + new ApplePayComponent(el, settings); + } else if (settings.component === 'klarna') { + new KlarnaComponent(el, settings); + } else { + new BaseComponent(el, settings); + } + } catch(err) { + (new ErrorHandler).show(err); + console.error(err); + } + }); +}); diff --git a/frontend/src/js/components/klarna.js b/frontend/src/js/components/klarna.js new file mode 100644 index 0000000..1ec2838 --- /dev/null +++ b/frontend/src/js/components/klarna.js @@ -0,0 +1,13 @@ +import BaseComponent from './base'; + +export default class extends BaseComponent { + mounted() { + super.mounted(); + + const locale = new Intl.Locale(navigator.language || navigator.userLanguage || 'en-GB'); + + this.unzerPayment.updateCustomerData({ + "language": locale.language + }); + } +} \ No newline at end of file diff --git a/frontend/src/js/payments/applepay.js b/frontend/src/js/payments/applepay.js deleted file mode 100644 index c9f7dbe..0000000 --- a/frontend/src/js/payments/applepay.js +++ /dev/null @@ -1,194 +0,0 @@ -import ErrorHandler from "../utils/errors"; -import Debugging from "../utils/debugging"; - -/** @type {ApplePaySnippets} */ -const ApplePaySnippetsDefaults = { - NOT_SUPPORTED: "This device does not support Apple Pay!", - CANCEL_BY_USER: "Canceled payment process by user!" -}; - -export default class ApplePay { - /** - * Similiar to the HeidelpayPayment class but slightly differently - * (apple pay works differently, so yeah, custom class it is :D) - * - * @class - * @param {String} pubKey - * @param {ApplePayPaymentRequest} applePayPaymentRequest - * @param {ApplePaySnippets} snippets - * @param {ApplePaySettings} settings - */ - constructor(pubKey, applePayPaymentRequest, snippets, settings) { - /** @type {ApplePaySettings} */ - this.settings = settings || {}; - - /** @type {ApplePaySnippets} */ - this.snippets = Object.assign(ApplePaySnippetsDefaults, snippets); - - var options = { - locale: this.settings.locale || 'de-DE' - }; - - /** @type {ApplePayPaymentRequest} */ - this.applePayPaymentRequest = applePayPaymentRequest; - this.unzerInstance = new unzer(pubKey, options); - this.errorHandler = new ErrorHandler(this.settings.$errorContainer, this.settings.$errorMessage); - this.debugging = new Debugging($('.unzerUI')); - window.UNZER_DEBUG = !!this.unzerInstance._isSandbox || this.unzerInstance.config.hasSandboxKey; // Enable Debugging in sandbox mode - - if (!window.ApplePaySession|| !window.ApplePaySession.canMakePayments()) { - this.unsupportedDevice(); - return; - } - - /** @type {HTMLElement} form Form in which the customer enters additional details */ - this.form = this.settings.form || document.getElementById('form_payment_extra'); - - // Register Events - this.initPaymentType = this.initPaymentType.bind(this); // it's a trick! needed in order to overcome the remove event listener - this.form.addEventListener('submit', this.initPaymentType); - $('.apple-pay-button').on('click', this.initPaymentType.bind(this)); - } - - /** - * Init the payment type in this case means starting the apple pay session - * @param {Event} event - */ - initPaymentType(event) { - event.preventDefault(); - - if (!window.ApplePaySession || !window.ApplePaySession.canMakePayments()) { - this.unsupportedDevice(); - return; - } - - // We adhere to Apple Pay version 6 to handle the payment request. - const session = new ApplePaySession(3, this.applePayPaymentRequest); - this.debugging.log('[> Init Payment Type]', {paymentRequest: this.applePayPaymentRequest}); - - session.onvalidatemerchant = (event) => { - this.merchantValidationCallback(event, session); - }; - - session.onpaymentauthorized = (event) => { - this.applePayAuthorizedCallback(event, session); - }; - - session.oncancel = (event) => { - this.debugging.log('[> Cancel]', {event}); - this.errorHandler.show(this.snippets.CANCEL_BY_USER); - }; - - session.begin(); - } - - /** - * Call the merchant validation in the server-side integration (apple_pay_merchantvalidation) - * @param {Event} event - * @param {ApplePaySession} session - */ - merchantValidationCallback(event, session) { - var validationUrl = JSON.stringify(event.validationURL); - - this.debugging.log('[> Merchant Validation]', {event}); - - $.ajax({ - 'url': $.evo.io().options.ioUrl, - 'method': 'POST', - 'dataType': 'json', - 'data': 'io={"name":"apple_pay_merchantvalidation", "params":[' + validationUrl + ']}', - }).done((validationResponse) => { - this.debugging.log('[> Merchant Validation Response]', validationResponse); - - try { - session.completeMerchantValidation(validationResponse); - } catch (e) { - alert(e.message); - } - }) - .fail((error) => { - this.debugging.log('[> Merchant Validation Error]', error); - this.errorHandler.show(JSON.stringify(error.statusText)); - session.abort(); - }); - } - - /** - * Create Apple Pay resource with unzer and save the resource id to charge it later. - * - * We do this here via AJAX instead of the validateAdditional method in the payment method to set the apple pay - * session state accordingly. - * - * @param {Event} event - * @param {ApplePaySession} session - */ - applePayAuthorizedCallback(event, session) { - // Get payment data from event. - // "event.payment" also contains contact information, if they were set via Apple Pay. - var self = this; - var unzerApplePayInstance = this.unzerInstance.ApplePay(); - var paymentData = event.payment.token.paymentData; - - this.debugging.log('[> Payment Authorization]', {unzerApplePayInstance, event, paymentData}); - - // Create an Unzer instance with your public key - unzerApplePayInstance.createResource(paymentData) - .then(function (createdResource) { - // Hand over the type ID to your backend. - var typeId = JSON.stringify(createdResource.id); - $.ajax({ - 'url': $.evo.io().options.ioUrl, - 'method': 'POST', - 'dataType': 'json', - 'data': 'io={"name":"apple_pay_payment_authorized", "params":[' + typeId + ']}', - }).done(function (result) { - // Handle the transaction respone from backend. - self.debugging.log('[> Payment Authorization Response]', {result, typeId}); - var status = result.transactionStatus; - if (status === 'success' || status === 'pending') { - session.completePayment({ status: window.ApplePaySession.STATUS_SUCCESS }); - - // Append Payment Resource Id - const hiddenInput = document.createElement('input'); - hiddenInput.setAttribute('type', 'hidden'); - hiddenInput.setAttribute('name', 'paymentData[resourceId]'); - hiddenInput.setAttribute('value', typeId); - self.form.appendChild(hiddenInput); - - // Submitting the form - self.form.removeEventListener('submit', self.initPaymentType); - self.form.submit(); - } else { - self.abortPaymentSession(session); - } - }).fail(function (error) { - self.errorHandler.show(error.statusText); - self.abortPaymentSession(session); - }); - }) - .catch(function (error) { - self.debugging.log('[> Payment Authorization Error]', error); - self.errorHandler.show(error.message); - self.abortPaymentSession(session); - }); - } - - /** - * Handle Unsupported devices - */ - unsupportedDevice() { - this.settings.submitButton.disabled = true; - this.settings.submitButton.ariaDisabled = true; - this.errorHandler.show(this.snippets.NOT_SUPPORTED); - } - - /** - * abort current payment session. - * @param {ApplePaySession} session - */ - abortPaymentSession(session) { - this.debugging.log('[> Abort Payment Session]', { status: window.ApplePaySession.STATUS_FAILURE }); - session.completePayment({ status: window.ApplePaySession.STATUS_FAILURE }); - session.abort(); - } -} diff --git a/frontend/src/js/payments/applepay_v2.js b/frontend/src/js/payments/applepay_v2.js deleted file mode 100644 index 085d916..0000000 --- a/frontend/src/js/payments/applepay_v2.js +++ /dev/null @@ -1,136 +0,0 @@ -import ErrorHandler from "../utils/errors"; -import Debugging from "../utils/debugging"; - -/** @type {ApplePaySnippets} */ -const ApplePaySnippetsDefaults = { - NOT_SUPPORTED: "This device does not support Apple Pay!", - CANCEL_BY_USER: "Canceled payment process by user!" -}; - -export default class ApplePayV2 { - /** @type {ApplePaySettings} */ - settings; - - /** @type {ApplePaySnippets} */ - snippets; - - /** @type {HTMLFormElement} */ - form; - - /** @type {ApplePayPaymentRequest} */ - applePayPaymentRequest; - - #errorHandler = new ErrorHandler(); - #debugging = new Debugging($('.unzerUI')); - - /** - * @class - * @param {String} pubKey - * @param {ApplePayPaymentRequest} applePayPaymentRequest - * @param {ApplePaySnippets} snippets - * @param {ApplePaySettings} settings - */ - constructor(pubKey, applePayPaymentRequest, snippets, settings) { - this.settings = settings; - this.snippets = Object.assign(ApplePaySnippetsDefaults, snippets); - this.form = this.settings.form || document.getElementById('complete_order'); - this.applePayPaymentRequest = applePayPaymentRequest; - this.unzerInstance = new unzer(pubKey, { - locale: this.settings.locale || 'de-DE' - }); - window.UNZER_DEBUG = !!this.unzerInstance._isSandbox || this.unzerInstance.config.hasSandboxKey; // Enable Debugging in sandbox mode - - if (!window.ApplePaySession || !window.ApplePaySession.canMakePayments()) { - this.#unsupportedDevice(); - return; - } - - // Register Events - this.initPaymentType = this.initPaymentType.bind(this); // it's a trick! needed in order to overcome the remove event listener - this.form.addEventListener('submit', this.initPaymentType); - $('.apple-pay-button').on('click', this.initPaymentType.bind(this)); - } - - /** - * @param {Event} event - */ - initPaymentType(event) { - event.preventDefault(); - const applePayInstance = this.unzerInstance.ApplePay(); - const session = applePayInstance.initApplePaySession(this.applePayPaymentRequest); // setup session with default merchant validation - - this.#debugging.log('[> Init Payment Type]', { paymentRequest: this.applePayPaymentRequest }); - - if (!window.ApplePaySession || !window.ApplePaySession.canMakePayments()) { - this.#unsupportedDevice(); - return; - } - - /** @param {Event} event */ - session.onpaymentauthorized = (event) => { - this.#applePayAuthorizedCallback(event, applePayInstance, session); - }; - - /** @param {Event} event */ - session.oncancel = (event) => { - this.#debugging.log('[> Cancel]', {event}); - this.#errorHandler.show(this.snippets.CANCEL_BY_USER); - }; - - session.begin(); - } - - /** - * Create Apple Pay resource with unzer and save the resource id to charge it later. - * - * @param {Event & {payment: {token: {paymentData: object}}}} event - * @param {Object} applePayInstance - * @param {ApplePaySession} session - */ - #applePayAuthorizedCallback(event, applePayInstance, session) { - const paymentData = event.payment.token.paymentData; - - this.#debugging.log('[> Payment Authorization]', { applePayInstance, event, paymentData }); - - // Create an Unzer instance with your public key - applePayInstance.createResource(paymentData) - .then((createdResource) => { - this.#debugging.log('[> Payment Authorization Resource]', { createdResource }); - session.completePayment({ status: window.ApplePaySession.STATUS_SUCCESS }); - - // Hand over the payment type ID (createdResource.id) - const typeId = JSON.stringify(createdResource.id); - const hiddenInput = document.createElement('input'); - hiddenInput.setAttribute('type', 'hidden'); - hiddenInput.setAttribute('name', 'unzer-payment-type-id'); - hiddenInput.setAttribute('value', typeId); - - this.form.appendChild(hiddenInput); - this.form.removeEventListener('submit', this.initPaymentType); - this.form.submit(); - }) - .catch(error => { - this.#debugging.log('[> Payment Authorization Error]', error); - this.#errorHandler.show(error.message); - this.#abortPaymentSession(session); - }) - } - - /** - * abort current payment session. - * @param {ApplePaySession} session - */ - #abortPaymentSession(session) { - this.#debugging.log('[> Abort Payment Session]', { status: window.ApplePaySession.STATUS_FAILURE }); - session.completePayment({ status: window.ApplePaySession.STATUS_FAILURE }); - session.abort(); - } - - /** - * Handle Unsupported devices - */ - #unsupportedDevice() { - this.#errorHandler.show(this.snippets.NOT_SUPPORTED); - console.error(this.snippets.NOT_SUPPORTED); - } -} \ No newline at end of file diff --git a/frontend/src/js/payments/general.js b/frontend/src/js/payments/general.js deleted file mode 100644 index 0808764..0000000 --- a/frontend/src/js/payments/general.js +++ /dev/null @@ -1,852 +0,0 @@ -import ErrorHandler from "../utils/errors"; - -export default class UnzerPayment { - static PAYMENT_TYPES = { - ALIPAY: 'Alipay', - CARD: 'Card', - EPS: 'EPS', - FLEXIPAY_DIRECT: 'FlexiPay Direct', - HIRE_PURCHASE: 'Hire Purchase', - PAYPAL: 'Paypal', - INVOICE: 'Invoice', - INVOICE_FACTORING: 'Invoice Factoring', - INVOICE_GUARANTEED: 'Invoice Guaranteed', - SEPA: 'SEPA', - SEPA_GUARANTEED: 'SEPA (guaranteed)', - SOFORT: 'SOFORT', - GIROPAY: 'Giropay', - PRZELEWY24: 'Przelewy24', - IDEAL: 'iDEAL', - PREPAYMENT: 'Prepayment', - WECHAT_PAY: 'WeChat Pay', - PAYLATER_INVOICE: 'Paylater Invoice', - BANCONTACT: 'Bancontact', - PAYLATER_INSTALLMENT: 'Paylater Installment', - PAYLATER_DIRECT_DEBIT: 'Paylater Direct Debit', - TWINT: 'Twint', - OPEN_BANKING: 'Open Banking', - }; - - /** - * Heidelpay Payment Class - * - * @param {string} pubKey Public Key - * @param {string} type Payment Type - * @param {PaymentSettings} settings - */ - constructor(pubKey, type, settings) { - /** @type {PaymentSettings} */ - this.settings = settings || {}; - - var options = { - locale: this.settings.locale || 'de-DE' - }; - - this.unzerInstance = new unzer(pubKey, options); - this.errorHandler = new ErrorHandler(this.settings.$errorContainer, this.settings.$errorMessage); - - /** @type {?string} customerId */ - this.customerId = settings.customerId || null; - - /** @type {{createCustomer: Function, updateCustomer: Function}|null} customerResource */ - this.customerResource = null; - - /** @type {{createResource: Function}} paymentType */ - this.paymentType = this.initPaymentType(type); - - /** @type {HTMLElement} form Form in which the customer enters additional details */ - this.form = this.settings.form || document.getElementById('form_payment_extra'); - - // Register Events - this.handleFormSubmit = this.handleFormSubmit.bind(this); // it's a trick! needed in order to overcome the remove event listener - this.form.addEventListener('submit', this.handleFormSubmit); - - if (this.settings.autoSubmit) { - // this.form.dispatchEvent(new Event('submit')); // Causes endless redirects in some browsers like FF, so we call the callback directly... - this.handleFormSubmit(new Event('submit')); - } - } - - /** - * Init Payment Type - * - * @param {string} type - * @returns {object} payment type - * @throws Error if there is an unkown payment type - */ - initPaymentType(type) { - switch (type) { - case UnzerPayment.PAYMENT_TYPES.CARD: - return this.createCard(); - - case UnzerPayment.PAYMENT_TYPES.INVOICE: - return this.createInvoice(); - - case UnzerPayment.PAYMENT_TYPES.INVOICE_GUARANTEED: - return this.createInvoiceGuaranteed(); - - case UnzerPayment.PAYMENT_TYPES.INVOICE_FACTORING: - return this.createInvoiceFactoring(); - - case UnzerPayment.PAYMENT_TYPES.SEPA: - return this.createSepa(); - - case UnzerPayment.PAYMENT_TYPES.SEPA_GUARANTEED: - return this.createSepaGuaranteed(); - - case UnzerPayment.PAYMENT_TYPES.PAYPAL: - return this.createPaypal(); - - case UnzerPayment.PAYMENT_TYPES.SOFORT: - return this.createSofort(); - - case UnzerPayment.PAYMENT_TYPES.GIROPAY: - return this.createGiropay(); - - case UnzerPayment.PAYMENT_TYPES.PRZELEWY24: - return this.createPrzelewy24(); - - case UnzerPayment.PAYMENT_TYPES.IDEAL: - return this.createIdeal(); - - case UnzerPayment.PAYMENT_TYPES.PREPAYMENT: - return this.createPrepayment(); - - case UnzerPayment.PAYMENT_TYPES.EPS: - return this.createEPS(); - - case UnzerPayment.PAYMENT_TYPES.FLEXIPAY_DIRECT: - return this.createFlexiPayDirect(); - - case UnzerPayment.PAYMENT_TYPES.ALIPAY: - return this.createAlipay(); - - case UnzerPayment.PAYMENT_TYPES.TWINT: - return this.createTwint(); - - case UnzerPayment.PAYMENT_TYPES.WECHAT_PAY: - return this.createWeChatPay(); - - case UnzerPayment.PAYMENT_TYPES.HIRE_PURCHASE: - return this.createHirePurchase(); - - case UnzerPayment.PAYMENT_TYPES.PAYLATER_INVOICE: - return this.createPaylaterInvoice(); - - case UnzerPayment.PAYMENT_TYPES.BANCONTACT: - return this.createBancontact(); - - case UnzerPayment.PAYMENT_TYPES.PAYLATER_INSTALLMENT: - return this.createPaylaterInstallment(); - - case UnzerPayment.PAYMENT_TYPES.PAYLATER_DIRECT_DEBIT: - return this.createPaylaterDirectDebit(); - - case UnzerPayment.PAYMENT_TYPES.OPEN_BANKING: - return this.createOpenBanking(); - - default: - throw new Error('Unkown Payment Type: ' + type); - } - } - - /** - * Handle the form submit - * - * @param {Event} event Submit Event - */ - handleFormSubmit(event) { - var self = this; - event.preventDefault(); - - // Creating a Payment resource and (optional) Customer Resource - var resources = [this.paymentType.createResource()]; - - if (this.customerResource) { - resources.push(this.customerId ? this.customerResource.updateCustomer() : this.customerResource.createCustomer()); - } - - Promise.all(resources).then(function (result) { - // Append Payment Resource Id - var hiddenInput = document.createElement('input'); - hiddenInput.setAttribute('type', 'hidden'); - hiddenInput.setAttribute('name', 'paymentData[resourceId]'); - hiddenInput.setAttribute('value', result[0].id); - self.form.appendChild(hiddenInput); - - // Append Customer Id - if (result.length >= 2) { - var hiddenCstInput = document.createElement('input'); - hiddenCstInput.setAttribute('type', 'hidden'); - hiddenCstInput.setAttribute('name', 'paymentData[customerId]'); - hiddenCstInput.setAttribute('value', result[1].id); - self.form.appendChild(hiddenCstInput); - } - - // Submitting the form - self.form.removeEventListener('submit', self.handleFormSubmit); - self.form.submit(); - }) - .catch(function (error) { - self.errorHandler.show(error.message); - }); - } - - /** - * Handle Paylater Input Validation - * @param {Event} event - * @param {boolean} isValid - * @param {String} paymentMethodName - * @param {HTMLElement} continueButton - * @returns - */ - onPaylaterInputValidation(event, isValid, paymentMethodName, continueButton) { - // console.log(paymentMethodName, { event, isValid, continueButton, 's360-valid': continueButton.getAttribute('data-s360-valid') }); - - if (isValid) { - // everything is still valid - if (continueButton.getAttribute('data-s360-valid') == 'all') { - continueButton.removeAttribute('disabled'); - return; - } - - // Customer is already valid -> everything is valid - if (continueButton.getAttribute('data-s360-valid') == 'customer') { - continueButton.setAttribute('data-s360-valid', 'all'); - continueButton.removeAttribute('disabled'); - return; - } - - // mark payment method as valid - continueButton.setAttribute('data-s360-valid', paymentMethodName); - return; - } - - continueButton.setAttribute('disabled', true); - - // only invalidate if the paymentMethodName was valid before - if (continueButton.getAttribute('data-s360-valid') == paymentMethodName) { - continueButton.setAttribute('data-s360-valid', 0); - } else if (continueButton.getAttribute('data-s360-valid') == 'all') { - continueButton.setAttribute('data-s360-valid', 'customer'); - } - } - - /** - * Create (or update) customer resource. - * - * @param {?String} paymentTypeName - * @param {?String} multipleValidation - * @see https://docs.heidelpay.com/docs/customer-ui-integration - * @returns {{createCustomer: Function, updateCustomer: Function}} Customer Resource - */ - createCustomer(paymentTypeName = null, multipleValidation = false) { - var Customer = this.settings.isB2B ? this.unzerInstance.B2BCustomer() : this.unzerInstance.Customer(); - var customerObj = this.settings.customer || {}; - var continueButton = this.settings.submitButton || document.getElementById("submit-button"); - let options = { - containerId: 'customer', - showInfoBox: false, - showHeader: false, - fields: ['name', 'birthdate'] - }; - - if (paymentTypeName) { - options.paymentTypeName = paymentTypeName; - } - - Customer.initFormFields(customerObj); - if (multipleValidation) { - continueButton.setAttribute('data-s360-valid', 0); - - Customer.addEventListener('validate', (e) => { - // console.log('customer validate', e, continueButton, continueButton.getAttribute('data-s360-valid')); - continueButton.setAttribute('disabled', true); - - if (e.success) { - // everything is still valid - if (continueButton.getAttribute('data-s360-valid') == 'all') { - continueButton.removeAttribute('disabled'); - return; - } - - // payment method is already valid -> everything is valid - if (continueButton.getAttribute('data-s360-valid') == paymentTypeName) { - continueButton.setAttribute('data-s360-valid', 'all'); - continueButton.removeAttribute('disabled'); - return; - } - - continueButton.setAttribute('data-s360-valid', 'customer'); - return; - } - - // only invalidate if the customer was valid before - if (continueButton.getAttribute('data-s360-valid') == 'customer') { - continueButton.setAttribute('data-s360-valid', 0); - } else if (continueButton.getAttribute('data-s360-valid') == 'all') { - continueButton.setAttribute('data-s360-valid', paymentTypeName); - } - }); - } else { - Customer.addEventListener('validate', (e) => { - if (e.success) { - continueButton.removeAttribute('disabled'); - return; - } - - continueButton.setAttribute('disabled', true); - }); - } - - if (this.settings.isB2B) { - options.fields = ['companyInfo']; - // options = {containerId: 'customer'}; - } - - if (this.customerId) { - Customer.update(this.customerId, options); - return Customer; - } - - Customer.create(options); - - return Customer; - } - - /** - * Hide form fields from unzer ui component because they are already filled by the shop - * @param {string} paymentMethodName - */ - hideFormFields(paymentMethodName) { - const field = $('#customer'); - - field.find('.field').filter( - '.city, .company, :has(.country), .street, .zip, .firstname, .lastname' - ).hide(); - field.find('.salutation-customer').hide(); - field.find('.firstname, .lastname').parent('.fields').hide(); - field.find('.unzerUI.divider-horizontal:eq(0)').hide(); - field.find('.unzerUI.message.downArrow').hide(); - - if (paymentMethodName) { - field.find('.field').filter('.checkbox-billingAddress, .email').hide(); - field.find('.field').filter( - '.billing-name, .billing-street, .billing-zip, .billing-city, :has(.billing-country)' - ).hide(); - field.find('.unzerUI.form>.checkboxLabel').hide(); - field.find('.unzerUI.form>.salutation-unzer-' + paymentMethodName + '-customer').hide(); - } - - field.find('.companyType').on('change', e => this.hideFormFields(paymentMethodName)); - } - - /** - * Create Paylayter Installment Payment Type - * - * @see https://docs.unzer.com/payment-methods/unzer-installment-upl/accept-unzer-installment-ui-component/ - * @returns {{createResource: Function}} - */ - createPaylaterInstallment() { - this.customerResource = this.createCustomer('paylater-installment', true); - const continueButton = this.settings.submitButton || document.getElementById("submit-button"); - const paylaterInstallment = this.unzerInstance.PaylaterInstallment(); - - this.hideFormFields('paylater-installment'); - - paylaterInstallment.create({ - containerId: 'paylater-installment', - amount: this.settings.amount, - currency: this.settings.currency, - country: this.settings.country - }); - - paylaterInstallment.addEventListener('paylaterInstallmentEvent', (e) => { - switch (e.currentStep) { - case 'plan-list': - continueButton.setAttribute('disabled', true); - break; - - case 'plan-detail': - continueButton.setAttribute('disabled', false); - break; - - default: - break; - } - - const isValid = e.action === 'validate' && e.success; - this.onPaylaterInputValidation(e, isValid, 'paylater-installment', continueButton); - }); - - return paylaterInstallment; - } - - /** - * Create Paylayter Invoice Payment Type - * - * @see https://docs.unzer.com/payment-methods/unzer-invoice-upl/accept-unzer-invoice-upl-ui-component/ - * @returns {{createResource: Function}} - */ - createPaylaterInvoice() { - this.customerResource = this.createCustomer('paylater-invoice', true); - const continueButton = this.settings.submitButton || document.getElementById("submit-button"); - const paylaterInvoice = this.unzerInstance.PaylaterInvoice(); - - this.hideFormFields('paylater-invoice'); - - paylaterInvoice.create({ - containerId: 'paylater-invoice', - customerType: this.settings.isB2B ? 'B2B' : 'B2C' - }); - - paylaterInvoice.addEventListener('change', (e) => - this.onPaylaterInputValidation( - e, - e.success, - 'paylater-invoice', - continueButton - ) - ); - - return paylaterInvoice; - } - - /** - * Create Paylayter Invoice Payment Type - * - * @see https://docs.unzer.com/payment-methods/direct-debit-secured/accept-direct-debit-secured-ui-component/ - * @returns {{createResource: Function}} - */ - createPaylaterDirectDebit() { - this.customerResource = this.createCustomer('paylater-direct-debit', true); - const continueButton = this.settings.submitButton || document.getElementById("submit-button"); - const paylaterDirectDebit = this.unzerInstance.PaylaterDirectDebit(); - - this.hideFormFields('paylater-direct-debit'); - - paylaterDirectDebit.create('paylater-direct-debit', { - containerId: 'paylater-direct-debit', - customerType: this.settings.isB2B ? 'B2B' : 'B2C' - }); - - paylaterDirectDebit.addEventListener('change', (e) => - this.onPaylaterInputValidation( - e, - e.success, - 'paylater-direct-debit', - continueButton - ) - ); - - return paylaterDirectDebit; - } - - /** - * Create Bancontact Payment Type - * - * @see https://docs.unzer.com/payment-methods/bancontact/accept-bancontact-ui-component/ - * @returns {{createResource: Function}} - */ - createBancontact() { - const bancontact = this.unzerInstance.Bancontact(); - const styling = { fontSize: null, fontColor: null, fontFamily: null }; - - if (this.settings.styling) { - styling.fontColor = this.settings.styling.fontColor || null; - styling.fontSize = this.settings.styling.fontSize || null; - styling.fontFamily = this.settings.styling.fontFamily || null; - } - - bancontact.create('holder', { - containerId: 'bancontact-holder', - fontSize: styling.fontSize, - fontColor: styling.fontColor, - fontFamily: styling.fontFamily - }); - - return bancontact; - } - - /** - * Create a new Card Payment Type. - * - * @see https://docs.heidelpay.com/docs/credit-card-ui-integration - * @returns {{createResource: Function}} Card Payment Type - */ - createCard() { - var Card = this.unzerInstance.Card(); - var styling = {fontSize: null, fontColor: null, fontFamily: null}; - - if (this.settings.styling) { - styling.fontColor = this.settings.styling.fontColor || null; - styling.fontSize = this.settings.styling.fontSize || null; - styling.fontFamily = this.settings.styling.fontFamily || null; - } - - Card.create('number', { - containerId: 'card-element-id-number', - onlyIframe: false, - fontSize: styling.fontSize, - fontColor: styling.fontColor, - fontFamily: styling.fontFamily - }); - Card.create('expiry', { - containerId: 'card-element-id-expiry', - onlyIframe: false, - fontSize: styling.fontSize, - fontColor: styling.fontColor, - fontFamily: styling.fontFamily - }); - Card.create('cvc', { - containerId: 'card-element-id-cvc', - onlyIframe: false, - fontSize: styling.fontSize, - fontColor: styling.fontColor, - // fontFamily: styling.fontFamily // messes with hidden font in firefox - }); - Card.create('holder', { - containerId: 'card-element-id-holder', - onlyIframe: false, - fontSize: styling.fontSize, - fontColor: styling.fontColor, - fontFamily: styling.fontFamily - }); - - // Enable pay button initially - var formFieldValid = {}; - - /** @type {HTMLElement} continueButton */ - var continueButton = this.settings.submitButton || document.getElementById("submit-button"); - continueButton.setAttribute('disabled', true); - - Card.addEventListener('change', (e) => { - if (e.success) { - formFieldValid[e.type] = true; - this.errorHandler.hide(); - } - - if (e.error) { - formFieldValid[e.type] = false; - this.errorHandler.show(e.error); - } - - if (e.reset) { - formFieldValid[e.type] = false; - } - - if (formFieldValid.number && formFieldValid.expiry && formFieldValid.cvc && formFieldValid.holder) { - continueButton.removeAttribute('disabled'); - return; - } - - continueButton.setAttribute('disabled', true); - }); - - return Card; - } - - /** - * Create a new Invoice Payment Type. - * - * @see https://docs.heidelpay.com/docs/invoice-ui-integration - * @returns {{createResource: Function}} Invoice Payment Type - */ - createInvoice() { - return this.unzerInstance.Invoice(); - } - - /** - * Create a new Invoice Guaranteed Payment Type. - * - * @see https://docs.heidelpay.com/docs/invoice-ui-integration - * @returns {{createResource: Function}} Invoice Payment Type - */ - createInvoiceGuaranteed() { - this.customerResource = this.createCustomer(); - - return this.unzerInstance.InvoiceSecured(); - } - - /** - * Create a new Invoice Factoring Payment Type. - * - * @see https://docs.heidelpay.com/docs/invoice-ui-integration - * @returns {{createResource: Function}} Invoice Payment Type - */ - createInvoiceFactoring() { - this.customerResource = this.createCustomer(); - - return this.unzerInstance.InvoiceSecured(); - } - - /** - * Create a new SEPA Direct Debit Payment Type. - * - * @see https://docs.heidelpay.com/docs/sepa-direct-debit-ui-integration - * @returns {{createResource: Function}} SEPA Direct Debit Payment Type - */ - createSepa() { - var Sepa = this.unzerInstance.SepaDirectDebit(); - Sepa.create('sepa-direct-debit', { - containerId: 'sepa-IBAN' - }); - - /** @type {HTMLElement} continueButton */ - const continueButton = this.settings.submitButton || document.getElementById("submit-button"); - continueButton.setAttribute('disabled', true); - - Sepa.addEventListener('change', (e) => { - if (e.success) { - continueButton.removeAttribute('disabled'); - this.errorHandler.hide(); - return; - } - - continueButton.setAttribute('disabled', true); - }); - - return Sepa; - } - - /** - * Create a new SEPA Direct Debit (guaranteed) Payment Type. - * - * @see https://docs.heidelpay.com/docs/sepa-direct-debit-ui-integration - * @returns {{createResource: Function}} SEPA Direct Debit (guaranteed) Payment Type - */ - createSepaGuaranteed() { - var SepaGuaranteed = this.unzerInstance.SepaDirectDebitSecured(); - SepaGuaranteed.create('sepa-direct-debit-guaranteed', { - containerId: 'sepa-guaranteed-IBAN' - }); - - /** @type {HTMLElement} continueButton */ - const continueButton = this.settings.submitButton || document.getElementById("submit-button"); - continueButton.setAttribute('disabled', true); - - SepaGuaranteed.addEventListener('change', (e) => { - if (e.success) { - continueButton.removeAttribute('disabled'); - this.errorHandler.hide(); - return; - } - - continueButton.setAttribute('disabled', true); - }); - - this.customerResource = this.createCustomer(); - - return SepaGuaranteed; - } - - /** - * Create a new PayPal Payment Type. - * - * @see https://docs.heidelpay.com/docs/paypal-ui-integration - * @returns {{createResource: Function}} Papal Payment Type - */ - createPaypal() { - var Paypal = this.unzerInstance.Paypal(); - Paypal.create('email', { - containerId: 'paypal-element-email' - }); - - return Paypal; - } - - /** - * Create a new SOFORT Payment Type. - * - * @see https://docs.heidelpay.com/docs/redirect-ui-integration#sofort - * @returns {{createResource: Function}} Sofort Payment Type - */ - createSofort() { - return this.unzerInstance.Sofort(); - } - - /** - * Create a new Giropay Payment Type. - * - * @see https://docs.heidelpay.com/docs/redirect-ui-integration#giropay - * @returns {{createResource: Function}} Giropay Payment Type - */ - createGiropay () { - return this.unzerInstance.Giropay(); - } - - /** - * Create a new Przelewy24 Payment Type. - * - * @see https://docs.heidelpay.com/docs/redirect-ui-integration#przelewy24 - * @returns {{createResource: Function}} Przelewy24 Payment Type - */ - createPrzelewy24() { - return this.unzerInstance.Przelewy24(); - } - - /** - * Create a new iDEAL Payment Type. - * - * @see https://docs.heidelpay.com/docs/ideal-ui-integration - * @returns {{createResource: Function}} iDEAL Payment Type - */ - createIdeal() { - var Ideal = this.unzerInstance.Ideal(); - - Ideal.create('ideal', { - containerId: 'ideal-element' - }); - - /** @type {HTMLElement} continueButton */ - const continueButton = this.settings.submitButton || document.getElementById("submit-button"); - continueButton.setAttribute('disabled', true); - - Ideal.addEventListener('change', (e) => { - if (e.value) { - continueButton.removeAttribute('disabled'); - this.errorHandler.hide(); - return; - } - - continueButton.setAttribute('disabled', true); - }); - - return Ideal; - } - - /** - * Create a new Prepayment Payment Type. - * - * @see https://docs.heidelpay.com/docs/prepayment-ui-integration - * @returns {{createResource: Function}} Prepayment Payment Type - */ - createPrepayment() { - return this.unzerInstance.Prepayment(); - } - - /** - * Create a new EPS Payment Type. - * - * @see https://docs.heidelpay.com/docs/eps-ui-integration - * @returns {{createResource: Function}} EPS Payment Type - */ - createEPS() { - return this.unzerInstance.EPS(); - } - - /** - * Create a new FlexiPay Direct Payment Type. - * - * @see https://docs.heidelpay.com/docs/redirect-ui-integration#flexipay-direct - * @returns {{createResource: Function}} Alipay Payment Type - */ - createFlexiPayDirect() { - return this.unzerInstance.FlexiPayDirect(); - } - - /** - * Create a new Alipay Payment Type. - * - * @see https://docs.heidelpay.com/docs/redirect-ui-integration#alipay - * @returns {{createResource: Function}} Alipay Payment Type - */ - createAlipay() { - return this.unzerInstance.Alipay(); - } - - /** - * Create a new TWINT Payment Type. - * - * @see https://docs.unzer.com/payment-methods/twint/accept-twint-ui-component/ - * @returns {{createResource: Function}} Twint Payment Type - */ - createTwint() { - return this.unzerInstance.Twint(); - } - - /** - * Create a new Open Banking Payment Type. - * - * @returns {{createResource: Function}} Twint Payment Type - */ - createOpenBanking() { - return this.unzerInstance.OpenBanking(); - } - - /** - * Create an new WeChat Pay Payment Type. - * - * @see https://docs.heidelpay.com/docs/redirect-ui-integration#wechat-pay - * @returns {{createResource: Function}} WeChat Pay Payment Type - */ - createWeChatPay() { - return this.unzerInstance.Wechatpay(); - } - - /** - * Create a new Hire Purchase Payment Type. - * - * @see https:://docs.heidelpay.com/docs/hire-purchase-ui-integration - * @returns {{createResource: Function}} Hire Purchase Payment Type - */ - createHirePurchase() { - var InstallmentSecured = this.unzerInstance.InstallmentSecured(); - var self = this; - this.customerResource = this.createCustomer(); - - /** @type {HTMLElement} continueButton */ - var continueButton = self.settings.submitButton || document.getElementById("submit-button"); - continueButton.setAttribute('style', 'display: none'); - continueButton.setAttribute('disabled', true); - - InstallmentSecured.create({ - containerId: 'hire-purchase-element', - amount: this.settings.amount || null, - currency: this.settings.currency || null, - effectiveInterest: this.settings.effectiveInterest || null, - orderDate: this.settings.orderDate || null - }).then(function (data) { - // if successful, notify the user that the list of installments was fetched successfully - // in case you were using a loading element during the fetching process, - // you can remove it inside this callback function - }) - .catch(function (response) { - // sent an error message to the user (fetching installment list failed) - var msg = ''; - console.error(response.message); - - response.error.details.forEach(function(err) { - console.error('API-Error: ' + err.code); - msg += err.customerMessage; - }); - - self.errorHandler.show(msg); - }); - - - // Listen to UI events - InstallmentSecured.addEventListener('installmentSecuredEvent', function (e) { - if (e.action === 'validate') { - if (e.success) { - continueButton.removeAttribute('disabled'); - return; - } - - continueButton.setAttribute('disabled', true); - } - - if (e.action === 'change-step') { - if (e.currentSteep === 'plan-list') { - continueButton.setAttribute('style', 'display: none'); - continueButton.setAttribute('disabled', true); - return; - } - - continueButton.setAttribute('style', 'display: inline-block'); - } - }); - - return InstallmentSecured; - } -} diff --git a/frontend/src/js/payments/googlepay.js b/frontend/src/js/payments/googlepay.js deleted file mode 100644 index 2d85430..0000000 --- a/frontend/src/js/payments/googlepay.js +++ /dev/null @@ -1,86 +0,0 @@ -import ErrorHandler from "../utils/errors"; - -export default class GooglePay -{ - /** - * @param {string} pubKey - * @param {GooglePaySettings} settings - */ - constructor(pubKey, settings) { - /** @type {GooglePaySettings} */ - this.settings = settings || {}; - - /** @type {HTMLFormElement} */ - this.form = this.settings.form || document.getElementById('complete_order'); - - const options = { - locale: this.settings.locale || 'de-DE' - }; - - this.unzerInstance = new unzer(pubKey, options); - this.errorHandler = new ErrorHandler(this.settings.$errorContainer, this.settings.$errorMessage); - - this.createPaymentTypeResource(); - } - - createPaymentTypeResource() { - // Creating a Google Pay instance - const googlepayInstance = this.unzerInstance.Googlepay(); - - const paymentData = googlepayInstance.initPaymentDataRequestObject({ - gatewayMerchantId: this.settings.googlepay.gatewayMerchantId, - merchantInfo: this.settings.googlepay.merchantInfo, - transactionInfo: this.settings.googlepay.transactionInfo, - allowedCardNetworks: this.settings.googlepay.allowedCardNetworks, - allowCreditCards: this.settings.googlepay.allowCreditCards, - allowPrepaidCards: this.settings.googlepay.allowPrepaidCards, - buttonOptions: { - buttonColor: this.settings.googlepay.buttonOptions.buttonColor, - buttonSizeMode: this.settings.googlepay.buttonOptions.buttonSize, - }, - onPaymentAuthorizedCallback: (paymentData) => googlepayInstance.createResource(paymentData) - .then(this.onAuthorizedSuccess.bind(this)) - .catch(this.onAuthorizedFailed.bind(this)) - }); - - googlepayInstance.create( - { containerId: 'googlepay-holder' }, - paymentData - ); - } - - /** - * @param {{id: string}} result - * @returns {{ status: string }} - */ - onAuthorizedSuccess(result) { - // Submit the ID to your server-side integration - const hiddenInput = document.createElement('input'); - hiddenInput.setAttribute('type', 'hidden'); - hiddenInput.setAttribute('name', 'unzer-payment-type-id'); - hiddenInput.setAttribute('value', result.id); - - this.form.appendChild(hiddenInput); - this.form.submit(); - - return { status: 'success' }; - } - - /** - * @param {{customerMessage?: string, message?: string, data?: {errors?: Array<{customerMessage?: string}>}}} error - * @returns {{ status: string, message: string }} - */ - onAuthorizedFailed(error) { - let errorMessage = error.customerMessage || error.message || 'Error'; - if (error.data && Array.isArray(error.data.errors) && error.data.errors[0]) { - errorMessage = error.data.errors[0].customerMessage || 'Error'; - } - - this.errorHandler.show(errorMessage); - - return { - status: 'error', - message: errorMessage || 'Unexpected error' - }; - } -} \ No newline at end of file diff --git a/frontend/src/js/payments/instalment.js b/frontend/src/js/payments/instalment.js deleted file mode 100644 index 7b11abb..0000000 --- a/frontend/src/js/payments/instalment.js +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Heidelpay Installment Modal Window Handler - * - * @param {string} modalSelector - * @param {HTMLElement} btn Submit Trigger - * @param {JQuery} $form - */ -const Installment = (modalSelector, btn, $form) => { - var modal = $(modalSelector); - - btn.addEventListener('click', function () { - $form.trigger('submit'); - }); - - $form.on('submit', function (e) { - if (!modal.is(':visible')) { - e.preventDefault(); - modal.modal('show'); - return false; - } - - return true; - }); -}; - -export default Installment; \ No newline at end of file diff --git a/frontend/src/js/utils/types.js b/frontend/src/js/utils/types.js deleted file mode 100644 index 12c117d..0000000 --- a/frontend/src/js/utils/types.js +++ /dev/null @@ -1,68 +0,0 @@ -// @ts-check - -/** - * @typedef {{ - * submitButton?: HTMLElement|HTMLButtonElement|null, - * form: ?HTMLElement, - * locale: string - * }} ApplePaySettings - */ - -/** - * @typedef {{ - * NOT_SUPPORTED: string - * CANCEL_BY_USER: string - * }} ApplePaySnippets - */ - -/** - * @typedef {{ - * $errorHolder: ?jQuery, - * $form: ?jQuery, - * submitButton: HTMLElement|HTMLButtonElement|null, - * locale: ?string, - * customerId: ?string, - * customer: ?object, - * autoSubmit: ?boolean, - * amount: null|string|number, - * currency: ?string, - * effectiveInterest: null|string|number, - * orderDate: ?string, - * styling: {fontSize: string, fontFamily: string, fontColor: string}, - * isB2B: ?boolean, - * county: ?string - * }} PaymentSettings - */ - -/** - * @typedef {{ - * countryCode: string, - * currencyCode: string, - * supportedNetworks: string[], - * merchantCapabilities: string[], - * total: { label: string, amount: number }, - * lineItems: Array<{label: string, amount: number, type: string}> - * }} ApplePayPaymentRequest - */ - -/** - * @typedef {{ - * $errorContainer?: jQuery, - * $errorMessage?: jQuery, - * submitButton: HTMLElement|HTMLButtonElement|null, - * locale: ?string, - * googlepay: GooglePayDataRequest - * }} GooglePaySettings - */ - -/** - * @typedef {{ - * gatewayMerchantId: string, - * merchantInfo: {merchantId: string, merchantName: string}, - * transactionInfo: {countryCode: string, currencyCode: string, totalPrice: string}, - * allowCreditCards: boolean, - * allowPrepaidCards: boolean, - * allowedCardNetworks: string[], - * buttonOptions: { buttonColor: "default" | "white" | "black ", buttonSize: "static" | "fill"} - * }} GooglePayDataRequest - */ \ No newline at end of file diff --git a/frontend/src/scss/unzer.scss b/frontend/src/scss/unzer.scss deleted file mode 100644 index e5fa788..0000000 --- a/frontend/src/scss/unzer.scss +++ /dev/null @@ -1,45 +0,0 @@ -// Heidelpay UI Fixes -.unzerUI { - .field { - position: relative; - } -} - -#googlepay-holder { - text-align: right; -} - -// ET Fixes -.et-widget { - #googlepay-holder { - margin-top: 10px; - } -} - -// NOVA Fixes -.label-slide .form-group:not(.exclude-from-label-slide):not(.checkbox) .unzerUI { - &.form { - label { - position: relative; - top: initial; - left: initial; - font-size: 1rem; - margin: 0 0 .28571429rem; - padding: 0; - transform: none; - line-height: 30px; - pointer-events: all; - text-overflow: initial; - white-space: normal; - overflow: initial; - max-width: none; - } - } - - &.checkbox { - .box, label { - cursor: pointer; - padding-left: 2.5em; - } - } -} diff --git a/frontend/template/apple_pay_button.tpl b/frontend/template/apple_pay_button.tpl index a2ff77f..c87e39e 100644 --- a/frontend/template/apple_pay_button.tpl +++ b/frontend/template/apple_pay_button.tpl @@ -1,5 +1,3 @@ -{include file="{$hpPayment.pluginPath}paymentmethod/template/_includes.tpl"} - -
            -
            -
            -
            -
            -
            + [data-unzer-ui-component] { + /* display: flex; + justify-content: flex-end; + flex-flow: row wrap; */ + --apple-pay-button-height: 40px; + } + - \ No newline at end of file +
            + + + +
            \ No newline at end of file diff --git a/frontend/template/google_pay_button.tpl b/frontend/template/google_pay_button.tpl index 83fc9cb..d5cd841 100644 --- a/frontend/template/google_pay_button.tpl +++ b/frontend/template/google_pay_button.tpl @@ -1,25 +1,20 @@ - - - - - +{include file="{$hpPayment.pluginPath}paymentmethod/template/_components_v2.tpl"} - +{if $hpPayment.googlepay.buttonOptions.buttonSize === 'static'} + +{/if} -
            -
            -
            - \ No newline at end of file +
            + + + +
            \ No newline at end of file diff --git a/frontend/template/instalment_info.tpl b/frontend/template/instalment_info.tpl index 1b144ad..1e5ef21 100644 --- a/frontend/template/instalment_info.tpl +++ b/frontend/template/instalment_info.tpl @@ -1 +1,10 @@ -{$info} \ No newline at end of file + + +
            {$info}
            \ No newline at end of file diff --git a/frontend/template/partials/payment_info.tpl b/frontend/template/partials/payment_info.tpl index 6771608..1cdd834 100644 --- a/frontend/template/partials/payment_info.tpl +++ b/frontend/template/partials/payment_info.tpl @@ -2,10 +2,18 @@ {if $Bestellung->Zahlungsinfo}

            {lang key='doFollowingBanktransfer' section='checkout'}

            -

            {lang key='iban' section='checkout'}: {$Bestellung->Zahlungsinfo->cIBAN}

            -

            {lang key='bic' section='checkout'}: {$Bestellung->Zahlungsinfo->cBIC}

            -

            {lang key='accountHolder' section='checkout'}: {$Bestellung->Zahlungsinfo->cInhaber}

            -

            {lang key='purpose' section='checkout'}: {$Bestellung->Zahlungsinfo->cVerwendungszweck}

            + {if !empty($Bestellung->Zahlungsinfo->cIBAN)} +

            {lang key='iban' section='checkout'}: {$Bestellung->Zahlungsinfo->cIBAN}

            + {/if} + {if !empty($Bestellung->Zahlungsinfo->cBIC)} +

            {lang key='bic' section='checkout'}: {$Bestellung->Zahlungsinfo->cBIC}

            + {/if} + {if !empty($Bestellung->Zahlungsinfo->cInhaber)} +

            {lang key='accountHolder' section='checkout'}: {$Bestellung->Zahlungsinfo->cInhaber}

            + {/if} + {if !empty($Bestellung->Zahlungsinfo->cVerwendungszweck)} +

            {lang key='purpose' section='checkout'}: {$Bestellung->Zahlungsinfo->cVerwendungszweck}

            + {/if}
            {/if} {/block} \ No newline at end of file diff --git a/info.xml b/info.xml index 74801a5..fc95203 100644 --- a/info.xml +++ b/info.xml @@ -6,7 +6,7 @@ http://www.solution360.de 100 5.0.0 - 1.8.2 + 2.0.0 s360_unzer_shop5 2020-10-27 @@ -15,9 +15,9 @@ - + @@ -303,12 +303,108 @@ Note: The total amount shown differs from the amount to be paid. Please refer to your instalment plan for the amount to be paid.]]> + + + s360_hp_company_type_label + + + + + + + + + + + + s360_hp_company_type_placeholder + + + + + + + + + + + + s360_hp_company_type_authority + + + + + + + + + + + + s360_hp_company_type_association + + + + + + + + + + + + s360_hp_company_type_sole + + + + + + + + + + + + s360_hp_company_type_company + + + + + + + + + + + + s360_hp_company_type_other + + + + + + + + + + + + s360_hp_company_type_missing + + + + + + + + + + - images/Card.svg 0 1 @@ -331,10 +427,17 @@ + + + + + + + enable_ctp + - images/SEPA.svg 0 1 @@ -360,7 +463,6 @@ - images/SEPA.svg 0 1 @@ -386,7 +488,6 @@ - images/InvoiceWL.svg 0 1 @@ -412,7 +513,6 @@ - images/InvoiceWL.svg 0 1 @@ -438,7 +538,6 @@ - images/InvoiceWL.svg 0 1 @@ -489,7 +588,6 @@ - images/Paypal.svg 0 1 @@ -515,7 +613,6 @@ - images/Sofort.svg 0 1 @@ -541,7 +638,6 @@ - images/Giropay.svg 0 1 @@ -567,7 +663,6 @@ - images/Przelewy24.svg 0 1 @@ -593,7 +688,6 @@ - images/Ideal.svg 0 1 @@ -619,7 +713,6 @@ - images/PrepaymentWL.svg 0 1 @@ -645,7 +738,6 @@ - images/EPS.svg 0 1 @@ -696,7 +788,6 @@ - images/Alipay.svg 0 1 @@ -722,7 +813,6 @@ - images/WeChatPay.svg 0 1 @@ -780,7 +870,6 @@ - images/ApplePay.svg 10 1 @@ -806,7 +895,6 @@ - images/Bancontact.svg 20 1 @@ -832,7 +920,6 @@ - images/InstalmentWL.svg 30 1 @@ -858,7 +945,6 @@ - images/Default.svg 40 1 @@ -884,7 +970,6 @@ - images/GooglePay.svg 50 1 @@ -1030,7 +1115,6 @@ - images/Twint.svg 60 1 @@ -1057,7 +1141,6 @@ - images/ApplePay.svg 15 1 @@ -1091,10 +1174,8 @@ - - images/DirectBankTransferWL.svg 70 1 @@ -1118,6 +1199,67 @@ + + + + 80 + 1 + + OTHER + 1 + 0 + 1 + 0 + UnzerKlarna.php + UnzerKlarna + template/dummy.tpl + template/klarna.tpl + + + + + + + + + + + + + + + 90 + 1 + + OTHER + 1 + 0 + 1 + 0 + UnzerWero.php + UnzerWero + template/dummy.tpl + template/wero.tpl + + + + + + + + + + + + + + booking_mode + + + + + + \ No newline at end of file diff --git a/locale/de-DE/base.mo b/locale/de-DE/base.mo index 8ebd0b8..7e2dd17 100644 Binary files a/locale/de-DE/base.mo and b/locale/de-DE/base.mo differ diff --git a/locale/de-DE/base.po b/locale/de-DE/base.po index fcfdb44..93b4858 100644 --- a/locale/de-DE/base.po +++ b/locale/de-DE/base.po @@ -5,85 +5,97 @@ msgid "Einstellungen" msgstr "Einstellungen" msgid "Unzer Kreditkarte" -msgstr "Unzer Kreditkarte" +msgstr "Kreditkarte" msgid "Unzer SEPA-Lastschrift" -msgstr "Unzer SEPA Lastschrift" +msgstr "SEPA Lastschrift" msgid "Unzer Lastschrift" -msgstr "Unzer SEPA Lastschrift" +msgstr "SEPA Lastschrift" msgid "Unzer SEPA-Lastschrift (guaranteed)" -msgstr "(Veraltet) Unzer Direct Debit (Gesichert)" +msgstr "(Veraltet) Direct Debit (Gesichert)" msgid "Unzer Lastschrift (secured)" -msgstr "(Veraltet) Unzer Direct Debit (Gesichert)" +msgstr "(Veraltet) Direct Debit (Gesichert)" msgid "Unzer Lastschrift (Paylater)" -msgstr "Unzer Lastschrift" +msgstr "Lastschrift" msgid "Unzer Rechnung" -msgstr "(Veraltet) Unzer Rechnungskauf" +msgstr "(Veraltet) Rechnungskauf" msgid "Unzer Rechnung (guaranteed)" -msgstr "(Veraltet) Unzer Rechnungskauf Gesichert" +msgstr "(Veraltet) Rechnungskauf Gesichert" msgid "Unzer Rechnung (secured)" -msgstr "(Veraltet) Unzer Rechnungskauf Gesichert" +msgstr "(Veraltet) Rechnungskauf Gesichert" msgid "Unzer Fakturierung von Rechnungen" -msgstr "Unzer Fakturierung von Rechnungen" +msgstr "Fakturierung von Rechnungen" msgid "Unzer Rechnungskauf" -msgstr "Unzer Rechnungskauf" +msgstr "Rechnungskauf" msgid "Unzer PayPal" -msgstr "Unzer PayPal" +msgstr "PayPal" msgid "Unzer SOFORT" -msgstr "(Veraltet) Unzer SOFORT" +msgstr "(Veraltet) SOFORT" msgid "Unzer Giropay" -msgstr "(Veraltet) Unzer Giropay" +msgstr "(Veraltet) Giropay" msgid "Unzer Przelewy24" -msgstr "Unzer Przelewy24" +msgstr "Przelewy24" msgid "Unzer iDEAL" -msgstr "Unzer iDEAL" +msgstr " iDEAL" msgid "Unzer Prepayment" -msgstr "Unzer Vorkasse" +msgstr "Vorkasse" msgid "Unzer EPS" -msgstr "Unzer EPS" +msgstr "EPS" msgid "Unzer FlexiPay Direct" -msgstr "Unzer FlexiPay Direct" +msgstr "FlexiPay Direct" msgid "Unzer Direktüberweisung" -msgstr "(Veraltet) Unzer Direktüberweisung" +msgstr "(Veraltet) Direktüberweisung" msgid "Unzer Alipay" -msgstr "Unzer Alipay" +msgstr "Alipay" msgid "Unzer WeChat Pay" -msgstr "Unzer WeChat Pay" +msgstr "WeChat Pay" msgid "Unzer FlexiPay Installment (Hire Purchase)" -msgstr "Unzer FlexiPay Instalment (Hire Purchase)" +msgstr "FlexiPay Instalment (Hire Purchase)" msgid "Unzer Instalment" -msgstr "(Veraltet) Unzer Ratenkauf" +msgstr "(Veraltet) Ratenkauf" msgid "Unzer Ratenkauf" -msgstr "(Veraltet) Unzer Ratenkauf" +msgstr "(Veraltet) Ratenkauf" msgid "Unzer Rechnung (Jetzt kaufen, Später bezahlen)" -msgstr "Unzer Rechnungskauf" +msgstr "Rechnungskauf" msgid "Unzer Ratenzahlung (Paylater)" -msgstr "Unzer Ratenkauf" +msgstr "Ratenkauf" + +msgid "Unzer Bancontact" +msgstr "Bancontact" + +msgid "Unzer Google Pay" +msgstr "Google Pay" + +msgid "Unzer TWINT" +msgstr "TWINT" + +msgid "Unzer Vorkasse" +msgstr "Vorkasse" msgid "hpError" msgstr "Fehler" @@ -305,7 +317,7 @@ msgid "hpSettingsMerchantIdHelp" msgstr "Die Händler ID (Merchant ID) des Insight Portal wird benötigt, um in den Bestelldetails einen Link zur jeweiligen Transaktion im Insight Portal bereitzustellen." msgid "hpSettingsStyles" -msgstr "Styles" +msgstr "(Veraltet) Styles" msgid "hpSettingsFontSize" msgstr "Schriftgröße" @@ -518,7 +530,7 @@ msgstr "" "Sie verwenden die Zahlungsmethode `GiroPay`, beachten Sie, dass GiroPay den Service eingestellt hat. Das bedeutet, dass Kunden den Dienst nicht mehr nutzen können!" msgid "Key Pairs" -msgstr "Schlüsselpaare" +msgstr "Zusätzliche Schlüsselpaare" msgid "hpKeyPairEdit" msgstr "Schlüsselpaar bearbeiten" @@ -571,14 +583,14 @@ msgstr "Die Webhooks wurden erfolgreich registriert." msgid "twint" msgstr "TWINT" -msgid "Apple Pay" -msgstr "(Veraltet) Apple Pay" +# msgid "Apple Pay" +# msgstr "(Veraltet) Apple Pay" msgid "Unzer Apple Pay" -msgstr "(Veraltet) Unzer Apple Pay" +msgstr "(Veraltet) Apple Pay" msgid "Unzer Apple Pay v2" -msgstr "Unzer Apple Pay" +msgstr "Apple Pay" msgid "hpApplePayMigrationNotification" msgstr "" @@ -599,8 +611,77 @@ msgstr "" msgid "hpApplePayMissingMerchantIdDomainAssociation" msgstr "Die Apple Pay-Verifizierungsdatei konnte nicht gefunden werden. Laden Sie die Verifizierungsdatei von Apple wie folgt auf Ihren Server hoch: %1$s/.well-known/apple-developer-merchantid-domain-association" +msgid "hpSettingsUIComponents" +msgstr "UI Components" + +msgid "hpSettingsUIVersion" +msgstr "Version" + +msgid "hpSettingsFontFamilyHelp" +msgstr "z.B. Arial, Helvetica, sans-serif" + +msgid "hpSettingsTextColor" +msgstr "Schriftfarbe" + +msgid "hpSettingsTextColorPlaceholder" +msgstr "z.B. red oder #ff0000" + +msgid "hpSettingsTextColorHelp" +msgstr "Die für die Typografie verwendete Schriftfarbe." + +msgid "hpSettingsBrandColor" +msgstr "Marken/Primär-Farbe" + +msgid "hpSettingsBrandColorPlaceholder" +msgstr "z.B. red oder #ff0000" + +msgid "hpSettingsBrandColorHelp" +msgstr "Die Hauptfarbe der Anwendung." + +msgid "hpSettingsBackgroundColor" +msgstr "Hintergrund-Farbe" + +msgid "hpSettingsBackgroundColorPlaceholder" +msgstr "z.B. red oder #ff0000" + +msgid "hpSettingsBackgroundColorHelp" +msgstr "Die Hintergrundfarbe der Seite." + +msgid "hpSettingsLinkColor" +msgstr "Link-Farbe" + +msgid "hpSettingsLinkColorPlaceholder" +msgstr "z.B. red oder #ff0000" + +msgid "hpSettingsLinkColorHelp" +msgstr "Die Farbe der Links." + +msgid "hpSettingsCornerRadius" +msgstr "Abgerundete Kanten" + +msgid "hpSettingsCornerRadiusHelp" +msgstr "Ob die Steuerelemente abgerundete Ecken haben sollen oder nicht." + +msgid "hpSettingsShadows" +msgstr "Schatten" + +msgid "hpSettingsShadowsHelp" +msgstr "Ob Schatten aktiviert sind oder nicht." + msgid "Unzer Direct Bank Transfer" -msgstr "Unzer Direktüberweisung" +msgstr "Direktüberweisung" msgid "openbanking-pis" -msgstr "Unzer Direktüberweisung" \ No newline at end of file +msgstr "Direktüberweisung" + +msgid "Unzer Klarna" +msgstr "Klarna" + +msgid "Unzer Wero" +msgstr "Wero" + +msgid "clicktopay" +msgstr "Click to Pay" + +msgid "klarna" +msgstr "Klarna" diff --git a/locale/en-GB/base.mo b/locale/en-GB/base.mo index 92e29f6..b58b4ff 100644 Binary files a/locale/en-GB/base.mo and b/locale/en-GB/base.mo differ diff --git a/locale/en-GB/base.po b/locale/en-GB/base.po index 49bfd1a..51b136a 100644 --- a/locale/en-GB/base.po +++ b/locale/en-GB/base.po @@ -5,88 +5,97 @@ msgid "Einstellungen" msgstr "Settings" msgid "Unzer Kreditkarte" -msgstr "Unzer Credit Card" +msgstr "Credit Card" msgid "Unzer SEPA-Lastschrift" -msgstr "Unzer SEPA Direct Debit" +msgstr "SEPA Direct Debit" msgid "Unzer Lastschrift" -msgstr "Unzer SEPA Direct Debit" +msgstr "SEPA Direct Debit" msgid "Unzer SEPA-Lastschrift (guaranteed)" -msgstr "(Deprecated) Unzer SEPA Direct Debit (secured)" +msgstr "(Deprecated) SEPA Direct Debit (secured)" msgid "Unzer Lastschrift (secured)" -msgstr "(Deprecated) Unzer Direct Debit (secured)" +msgstr "(Deprecated) Direct Debit (secured)" msgid "Unzer Lastschrift (Paylater)" -msgstr "Unzer Direct Debit" +msgstr "Direct Debit" msgid "Unzer Rechnung" -msgstr "(Deprecated) Unzer Invoice" +msgstr "(Deprecated) Invoice" msgid "Unzer Rechnung (guaranteed)" -msgstr "(Deprecated) Unzer Invoice Secured" +msgstr "(Deprecated) Invoice Secured" msgid "Unzer Rechnung (secured)" -msgstr "(Deprecated) Unzer Invoice Secured" +msgstr "(Deprecated) Invoice Secured" msgid "Unzer Fakturierung von Rechnungen" -msgstr "Unzer Invoice Factoring" +msgstr "Invoice Factoring" msgid "Unzer Rechnungskauf" -msgstr "Unzer Invoice" +msgstr "Invoice" msgid "Unzer PayPal" -msgstr "Unzer PayPal" +msgstr "PayPal" msgid "Unzer SOFORT" -msgstr "(Deprecated) Unzer SOFORT" +msgstr "(Deprecated) SOFORT" msgid "Unzer Giropay" -msgstr "(Deprecated) Unzer Giropay" +msgstr "(Deprecated) Giropay" msgid "Unzer Przelewy24" -msgstr "Unzer Przelewy24" +msgstr "Przelewy24" msgid "Unzer iDEAL" -msgstr "Unzer iDEAL" +msgstr "iDEAL" msgid "Unzer Prepayment" -msgstr "Unzer Prepayment" +msgstr "Prepayment" msgid "Unzer Vorkasse" -msgstr "Unzer Prepayment" +msgstr "Prepayment" msgid "Unzer EPS" -msgstr "Unzer EPS" +msgstr "EPS" msgid "Unzer FlexiPay Direct" -msgstr "Unzer FlexiPay Direct" +msgstr "FlexiPay Direct" msgid "Unzer Direktüberweisung" -msgstr "(Deprecated) Unzer Bank Transfer" +msgstr "(Deprecated) Bank Transfer" msgid "Unzer Alipay" -msgstr "Unzer Alipay" +msgstr "Alipay" msgid "Unzer WeChat Pay" -msgstr "Unzer WeChat Pay" +msgstr "WeChat Pay" msgid "Unzer FlexiPay Installment (Hire Purchase)" -msgstr "Unzer FlexiPay Instalment (Hire Purchase)" +msgstr "FlexiPay Instalment (Hire Purchase)" msgid "Unzer Instalment" -msgstr "(Deprecated) Unzer Installment" +msgstr "(Deprecated) Installment" msgid "Unzer Ratenkauf" -msgstr "(Deprecated) Unzer Instalment" +msgstr "(Deprecated) Instalment" msgid "Unzer Rechnung (Jetzt kaufen, Später bezahlen)" -msgstr "Unzer Invoice" +msgstr "Invoice" msgid "Unzer Ratenzahlung (Paylater)" -msgstr "Unzer Installment" +msgstr "Installment" + +msgid "Unzer Bancontact" +msgstr "Bancontact" + +msgid "Unzer Google Pay" +msgstr "Google Pay" + +msgid "Unzer TWINT" +msgstr "TWINT" msgid "hpError" msgstr "Error" @@ -542,10 +551,10 @@ msgid "Die Webhooks wurden erfolgreich gespeichert." msgstr "Webhooks have been registered successfully." msgid "Key Pairs" -msgstr "Key Pairs" +msgstr "Additional Keypairs" msgid "hpKeyPairEdit" -msgstr "Edit Key Pair" +msgstr "Edit Keypair" msgid "hpKeypairIsB2B" msgstr "B2B" @@ -676,14 +685,14 @@ msgstr "The country code of the acquirer (default DK)." msgid "twint" msgstr "TWINT" -msgid "Apple Pay" -msgstr "(Deprecated) Apple Pay" +# msgid "Apple Pay" +# msgstr "(Deprecated) Apple Pay" msgid "Unzer Apple Pay" -msgstr "(Deprecated) Unzer Apple Pay" +msgstr "(Deprecated) Apple Pay" msgid "Unzer Apple Pay v2" -msgstr "Unzer Apple Pay" +msgstr "Apple Pay" msgid "hpApplePayMigrationNotification" msgstr "" @@ -703,8 +712,83 @@ msgstr "" msgid "hpApplePayMissingMerchantIdDomainAssociation" msgstr "Could not find Apple Pay Verification File. Upload the verification file from Apple to your server as follows: %1$s/.well-known/apple-developer-merchantid-domain-association" +msgid "hpSettingsUIComponents" +msgstr "UI Components" + +msgid "hpSettingsUIVersion" +msgstr "Version" + +msgid "hpSettingsFontFamilyHelp" +msgstr "e.g. Arial, Helvetica, sans-serif" + +msgid "hpSettingsTextColor" +msgstr "Text Color" + +msgid "hpSettingsTextColorPlaceholder" +msgstr "e.g. red or #ff0000" + +msgid "hpSettingsTextColorHelp" +msgstr "The font color use for typography." + +msgid "hpSettingsBrandColor" +msgstr "Primary Color" + +msgid "hpSettingsBrandColorPlaceholder" +msgstr "e.g. red or #ff0000" + +msgid "hpSettingsBrandColorHelp" +msgstr "The main color of the application." + +msgid "hpSettingsBackgroundColor" +msgstr "Background Color" + +msgid "hpSettingsBackgroundColorPlaceholder" +msgstr "e.g. red or #ff0000" + +msgid "hpSettingsBackgroundColorHelp" +msgstr "The page background." + +msgid "hpSettingsLinkColor" +msgstr "Link Color" + +msgid "hpSettingsLinkColorPlaceholder" +msgstr "e.g. red or #ff0000" + +msgid "hpSettingsLinkColorHelp" +msgstr "The color of links." + +msgid "hpSettingsCornerRadius" +msgstr "Rounded Corners" + +msgid "hpSettingsCornerRadiusHelp" +msgstr "Whether controls will have rounded corners or not." + +msgid "hpSettingsShadows" +msgstr "Shadows" + +msgid "hpSettingsShadowsHelp" +msgstr "Whether shadows are enabled or not." + msgid "Unzer Direct Bank Transfer" -msgstr "Unzer Direct Bank Transfer" +msgstr "Direct Bank Transfer" msgid "openbanking-pis" -msgstr "Unzer Direct Bank Transfer" \ No newline at end of file +msgstr "Direct Bank Transfer" + +msgid "\"Click to Pay\" aktivieren" +msgstr "Enable \"Click to Pay\"" + +msgid "Unzer Klarna" +msgstr "Klarna" + +msgid "Unzer Wero" +msgstr "Wero" + +msgid "Wollen Sie den Eintrag wirklich löschen?" +msgstr "Are you sure you want to delete this entry?" + +msgid "clicktopay" +msgstr "Click to Pay" + +msgid "klarna" +msgstr "Klarna" diff --git a/paymentmethod/HeidelpayCreditCard.php b/paymentmethod/HeidelpayCreditCard.php index 1e5bc57..4db293d 100644 --- a/paymentmethod/HeidelpayCreditCard.php +++ b/paymentmethod/HeidelpayCreditCard.php @@ -20,6 +20,7 @@ use Plugin\s360_unzer_shop5\src\Payments\Traits\HasCustomer; use Plugin\s360_unzer_shop5\src\Payments\Traits\HasMetadata; use Plugin\s360_unzer_shop5\src\Utils\Config; +use UnzerSDK\Resources\PaymentTypes\Clicktopay; /** * HeidelpayCreditCard Payment Method. @@ -61,33 +62,35 @@ class HeidelpayCreditCard extends HeidelpayPaymentMethod implements public function getOrderAttributes(Bestellung $order, AbstractTransactionType $transaction): array { try { - /** @var Card $type */ + /** @var Card|Clicktopay $type */ $type = $transaction->getPayment()->getPaymentType(); - // Save Payment Info - $oPaymentInfo = new ZahlungsInfo(0, $order->kBestellung); - $oPaymentInfo->kKunde = $order->kKunde; - $oPaymentInfo->kBestellung = $order->kBestellung; - $oPaymentInfo->cInhaber = Text::convertUTF8($type->getCardHolder() ?? ''); - $oPaymentInfo->cKartenNr = Text::convertUTF8($type->getNumber() ?? ''); - $oPaymentInfo->cGueltigkeit = Text::convertUTF8($type->getExpiryDate() ?? ''); - $oPaymentInfo->cCVV = Text::convertUTF8($type->getCvc() ?? ''); - $oPaymentInfo->cKartenTyp = Text::convertUTF8($type->getBrand() ?? ''); - $oPaymentInfo->cBankName = ''; - $oPaymentInfo->cKartenNr = ''; - $oPaymentInfo->cCVV = ''; - - - isset($oPaymentInfo->kZahlungsInfo) ? $oPaymentInfo->updateInDB() : $oPaymentInfo->insertInDB(); - - // Order Attributes - return [ - self::ATTR_CARD_HOLDER => $oPaymentInfo->cInhaber, - self::ATTR_CARD_NUMBER => $oPaymentInfo->cKartenNr, - self::ATTR_CARD_EXPIRY_DATE => $oPaymentInfo->cGueltigkeit, - self::ATTR_CARD_CVC => $oPaymentInfo->cCVV, - self::ATTR_CARD_TYPE => $oPaymentInfo->cKartenTyp - ]; + if ($type instanceof Card) { + // Save Payment Info + $oPaymentInfo = new ZahlungsInfo(0, $order->kBestellung); + $oPaymentInfo->kKunde = $order->kKunde; + $oPaymentInfo->kBestellung = $order->kBestellung; + $oPaymentInfo->cInhaber = Text::convertUTF8($type->getCardHolder() ?? ''); + $oPaymentInfo->cKartenNr = Text::convertUTF8($type->getNumber() ?? ''); + $oPaymentInfo->cGueltigkeit = Text::convertUTF8($type->getExpiryDate() ?? ''); + $oPaymentInfo->cCVV = Text::convertUTF8($type->getCvc() ?? ''); + $oPaymentInfo->cKartenTyp = Text::convertUTF8($type->getBrand() ?? ''); + $oPaymentInfo->cBankName = ''; + $oPaymentInfo->cKartenNr = ''; + $oPaymentInfo->cCVV = ''; + + + isset($oPaymentInfo->kZahlungsInfo) ? $oPaymentInfo->updateInDB() : $oPaymentInfo->insertInDB(); + + // Order Attributes + return [ + self::ATTR_CARD_HOLDER => $oPaymentInfo->cInhaber, + self::ATTR_CARD_NUMBER => $oPaymentInfo->cKartenNr, + self::ATTR_CARD_EXPIRY_DATE => $oPaymentInfo->cGueltigkeit, + self::ATTR_CARD_CVC => $oPaymentInfo->cCVV, + self::ATTR_CARD_TYPE => $oPaymentInfo->cKartenTyp + ]; + } } catch (Exception $exc) { $this->errorLog( 'An exception was thrown while trying to get the order attributes ' @@ -115,6 +118,7 @@ public function handleStepAdditional(JTLSmarty $view): void Config::FONT_FAMILY => $config->get(Config::FONT_FAMILY), Config::FONT_SIZE => $config->get(Config::FONT_SIZE), ]; + $data['enableCTP'] = $config->getPaymentSetting(Config::ENABLE_CTP, $this->moduleID) === 'Y'; $view->assign('hpPayment', $data); } diff --git a/paymentmethod/HeidelpayFlexiPayDirect.php b/paymentmethod/HeidelpayFlexiPayDirect.php index 35937c0..11b0a04 100644 --- a/paymentmethod/HeidelpayFlexiPayDirect.php +++ b/paymentmethod/HeidelpayFlexiPayDirect.php @@ -77,4 +77,14 @@ public function isSelectable(): bool //! Note: Payment Method is deprecated -> should not be used anymore return false; } + + /** + * Deactivate as the payment method is deprecated + * @param array $args + * @return bool + */ + public function isValidIntern($args = []): bool + { + return false; + } } diff --git a/paymentmethod/HeidelpayHirePurchaseDirectDebit.php b/paymentmethod/HeidelpayHirePurchaseDirectDebit.php index 3f60408..cf0ad92 100644 --- a/paymentmethod/HeidelpayHirePurchaseDirectDebit.php +++ b/paymentmethod/HeidelpayHirePurchaseDirectDebit.php @@ -187,6 +187,9 @@ public function isSelectable(): bool */ public function isValidIntern($args = []): bool { + //! Note: Payment Method is deprecated -> should not be used anymore + return false; + /** @var Config $config */ $config = Shop::Container()->get(Config::class); $effectiveInterest = $config->getPaymentSetting('effectiveInterest', $this->moduleID); diff --git a/paymentmethod/HeidelpayInvoice.php b/paymentmethod/HeidelpayInvoice.php index 3bb2549..7234bde 100644 --- a/paymentmethod/HeidelpayInvoice.php +++ b/paymentmethod/HeidelpayInvoice.php @@ -34,28 +34,13 @@ class HeidelpayInvoice extends HeidelpayPaymentMethod use HasCustomer; /** - * @inheritDoc + * Deactivate as the payment method is deprecated + * @param array $args + * @return bool */ - public function initBackendNotification(): void + public function isValidIntern($args = []): bool { - // Add deprecation notice IF paymethod is used (ie assigned to a shipping method) - $payMethod = $this->plugin->getPaymentMethods()->getMethodByID($this->moduleID); - - if ($payMethod !== null && $payMethod->getActive()) { - $this->kZahlungsart = $payMethod->getMethodID(); - $result = Shop::Container()->getDB()->select('tversandartzahlungsart', 'kZahlungsart', $this->kZahlungsart); - - if ($result) { - $notification = new NotificationEntry( - NotificationEntry::TYPE_INFO, - sprintf(__('hpDeprecationPaymentMethodTitle'), $payMethod->getName()), - sprintf(nl2br(__('hpDeprecationInvoiceNotice')), $payMethod->getName()) - ); - - $notification->setPluginId((string) $this->plugin->getID()); - Notification::getInstance()->addNotify($notification); - } - } + return false; } /** diff --git a/paymentmethod/HeidelpayInvoiceFactoring.php b/paymentmethod/HeidelpayInvoiceFactoring.php index 37d6376..e0aa464 100644 --- a/paymentmethod/HeidelpayInvoiceFactoring.php +++ b/paymentmethod/HeidelpayInvoiceFactoring.php @@ -38,6 +38,16 @@ class HeidelpayInvoiceFactoring extends HeidelpayInvoice implements CancelableIn use HasMetadata; use SupportsB2B; + /** + * Deactivate as the payment method is deprecated + * @param array $args + * @return bool + */ + public function isValidIntern($args = []): bool + { + return false; + } + /** * Cancel the Charge. * diff --git a/paymentmethod/HeidelpayInvoiceGuaranteed.php b/paymentmethod/HeidelpayInvoiceGuaranteed.php index 14a205c..2f6d38b 100644 --- a/paymentmethod/HeidelpayInvoiceGuaranteed.php +++ b/paymentmethod/HeidelpayInvoiceGuaranteed.php @@ -41,6 +41,16 @@ class HeidelpayInvoiceGuaranteed extends HeidelpayInvoice implements HandleStepA use HasMetadata; use SupportsB2B; + /** + * Deactivate as the payment method is deprecated + * @param array $args + * @return bool + */ + public function isValidIntern($args = []): bool + { + return false; + } + /** * Cancel the Charge. * diff --git a/paymentmethod/HeidelpaySEPADirectDebitGuaranteed.php b/paymentmethod/HeidelpaySEPADirectDebitGuaranteed.php index 9798c8d..37423f8 100644 --- a/paymentmethod/HeidelpaySEPADirectDebitGuaranteed.php +++ b/paymentmethod/HeidelpaySEPADirectDebitGuaranteed.php @@ -51,6 +51,16 @@ class HeidelpaySEPADirectDebitGuaranteed extends HeidelpayPaymentMethod implemen use SupportsB2B; use TranslatorTrait; + /** + * Deactivate as the payment method is deprecated + * @param array $args + * @return bool + */ + public function isValidIntern($args = []): bool + { + return false; + } + /** * Cancel the Charge. * diff --git a/paymentmethod/HeidelpaySofort.php b/paymentmethod/HeidelpaySofort.php index fead65c..1394b0d 100644 --- a/paymentmethod/HeidelpaySofort.php +++ b/paymentmethod/HeidelpaySofort.php @@ -27,6 +27,7 @@ * and those who prefer online payment methods over invoices. * * @see https://docs.heidelpay.com/docs/sofort-payment + * @deprecated */ class HeidelpaySofort extends HeidelpayPaymentMethod implements RedirectPaymentInterface { @@ -43,6 +44,16 @@ protected function getAllowedCurrencies(): array return ['EUR', 'CHF']; } + /** + * Deactivate as the payment method is deprecated + * @param array $args + * @return bool + */ + public function isValidIntern($args = []): bool + { + return false; + } + /** * @inheritDoc * @return AbstractTransactionType|Charge diff --git a/paymentmethod/UnzerApplePay.php b/paymentmethod/UnzerApplePay.php index 80e4e64..c42e823 100644 --- a/paymentmethod/UnzerApplePay.php +++ b/paymentmethod/UnzerApplePay.php @@ -27,6 +27,7 @@ * Apple Pay is a mobile wallet solution available to all users of Apple devices. * * @see https://docs.unzer.com/payment-methods/applepay/ + * @deprecated Replaced by UnzerApplePayV2 */ class UnzerApplePay extends HeidelpayPaymentMethod implements HandleStepAdditionalInterface, NotificationInterface { @@ -34,31 +35,6 @@ class UnzerApplePay extends HeidelpayPaymentMethod implements HandleStepAddition use HasMetadata; use HasBasket; - /** - * @inheritDoc - */ - public function initBackendNotification(): void - { - // Add deprecation notice IF paymethod is used (ie assigned to a shipping method) - $payMethod = $this->plugin->getPaymentMethods()->getMethodByID($this->moduleID); - - if ($payMethod !== null && $payMethod->getActive()) { - $this->kZahlungsart = $payMethod->getMethodID(); - $result = Shop::Container()->getDB()->select('tversandartzahlungsart', 'kZahlungsart', $this->kZahlungsart); - - if ($result) { - $notification = new NotificationEntry( - NotificationEntry::TYPE_INFO, - sprintf(__('hpDeprecationPaymentMethodTitle'), __($payMethod->getName())), - nl2br(__('hpApplePayMigrationNotification')) - ); - - $notification->setPluginId((string) $this->plugin->getID()); - Notification::getInstance()->addNotify($notification); - } - } - } - /** * @param JTLSmarty $view * @return void @@ -103,6 +79,8 @@ public function handleStepAdditional(JTLSmarty $view): void */ public function isValidIntern($args = []): bool { + return false; // !NOTE: Discontinued + try { /** @var CertificationService $certService */ $certService = Shop::Container()->get(CertificationService::class); diff --git a/paymentmethod/UnzerApplePayV2.php b/paymentmethod/UnzerApplePayV2.php index c18774c..cec60bd 100644 --- a/paymentmethod/UnzerApplePayV2.php +++ b/paymentmethod/UnzerApplePayV2.php @@ -12,17 +12,18 @@ use Plugin\s360_unzer_shop5\src\Payments\Interfaces\HasPayButton; use Plugin\s360_unzer_shop5\src\Payments\Interfaces\NotificationInterface; use Plugin\s360_unzer_shop5\src\Payments\Traits\CancelPaymentTransaction; +use Plugin\s360_unzer_shop5\src\Payments\Traits\HasAuthorization; use Plugin\s360_unzer_shop5\src\Payments\Traits\HasBasket; use Plugin\s360_unzer_shop5\src\Payments\Traits\HasCustomer; use Plugin\s360_unzer_shop5\src\Payments\Traits\HasMetadata; use Plugin\s360_unzer_shop5\src\Utils\Config; use UnzerSDK\Resources\PaymentTypes\BasePaymentType; use UnzerSDK\Resources\TransactionTypes\AbstractTransactionType; -use UnzerSDK\Resources\TransactionTypes\Authorization; use UnzerSDK\Resources\TransactionTypes\Charge; class UnzerApplePayV2 extends HeidelpayPaymentMethod implements HasPayButton, NotificationInterface, CancelableInterface { + use HasAuthorization; use HasCustomer; use HasMetadata; use HasBasket; @@ -113,15 +114,8 @@ protected function performTransaction(BasePaymentType $payment, Bestellung $orde // Authorize payment if ($config->getPaymentSetting(Config::APPLEPAY_BOOKING_MODE, $this->moduleID) === 'authorize') { - $authorization = new Authorization( - $this->getTotalPriceCustomerCurrency($order), - $order->Waehrung->getCode(), - $this->getReturnURL($order) - ); - $authorization->setOrderId($order->cBestellNr ?? null); - return $this->adapter->getCurrentConnection()->performAuthorization( - $authorization, + $this->createAuthorization($session->getCustomer(), $order), $payment->getId(), $customer, $this->createMetadata(), diff --git a/paymentmethod/UnzerGooglePay.php b/paymentmethod/UnzerGooglePay.php index 73410f9..71af85e 100644 --- a/paymentmethod/UnzerGooglePay.php +++ b/paymentmethod/UnzerGooglePay.php @@ -12,6 +12,7 @@ use Plugin\s360_unzer_shop5\src\Payments\Interfaces\CancelableInterface; use Plugin\s360_unzer_shop5\src\Payments\Interfaces\HasPayButton; use Plugin\s360_unzer_shop5\src\Payments\Interfaces\RedirectPaymentInterface; +use Plugin\s360_unzer_shop5\src\Payments\Traits\HasAuthorization; use Plugin\s360_unzer_shop5\src\Payments\Traits\HasBasket; use Plugin\s360_unzer_shop5\src\Payments\Traits\HasCustomer; use Plugin\s360_unzer_shop5\src\Payments\Traits\HasMetadata; @@ -28,6 +29,7 @@ class UnzerGooglePay extends HeidelpayPaymentMethod implements HasPayButton, RedirectPaymentInterface, CancelableInterface { + use HasAuthorization; use HasMetadata; use HasCustomer; use HasBasket; @@ -95,11 +97,12 @@ public function handleAdditional($post): bool $config = Shop::Container()->get(Config::class); // $channelId = $config->getPaymentSetting(Config::GPAY_GATEWAY_MERCHANT_ID, $this->moduleID); - // if (empty($channelId)) { - $this->adapter->getConnectionForSession(); - $channelId = $this->adapter->getChannelIdForPaymentType(Googlepay::getResourceName()); + $this->adapter->getConnectionForSession(); + $channelId = $this->adapter->getChannelIdForPaymentType(Googlepay::getResourceName()); + + if (!empty($channelId)) { $config->savePaymentSetting(Config::GPAY_GATEWAY_MERCHANT_ID, $this->moduleID, $channelId); - // } + } $this->sessionHelper->setCheckoutSession(null, $channelId); @@ -212,15 +215,8 @@ protected function performTransaction(BasePaymentType $payment, Bestellung $orde // Authorize payment if ($config->getPaymentSetting(Config::GPAY_BOOKING_MODE, $this->moduleID) === 'authorize') { - $authorization = new Authorization( - $this->getTotalPriceCustomerCurrency($order), - $order->Waehrung->getCode(), - $this->getReturnURL($order) - ); - $authorization->setOrderId($order->cBestellNr ?? null); - return $this->adapter->getCurrentConnection()->performAuthorization( - $authorization, + $this->createAuthorization($shopCustomer, $order), $payment->getId(), $customer, $this->createMetadata(), diff --git a/paymentmethod/UnzerKlarna.php b/paymentmethod/UnzerKlarna.php new file mode 100644 index 0000000..7f0723d --- /dev/null +++ b/paymentmethod/UnzerKlarna.php @@ -0,0 +1,167 @@ + 'AUD', + 'AT' => 'EUR', + 'BE' => 'EUR', + 'CA' => 'CAD', + 'CZ' => 'CZK', + 'DK' => 'DKK', + 'FI' => 'EUR', + 'FR' => 'EUR', + 'DE' => 'EUR', + 'GR' => 'EUR', + 'HU' => 'HUF', + 'IE' => 'EUR', + 'IT' => 'EUR', + 'MX' => 'MXN', + 'NL' => 'EUR', + 'NZ' => 'NZD', + 'NO' => 'NOK', + 'PL' => 'PLN', + 'PT' => 'EUR', + 'RO' => 'RON', + 'SK' => 'EUR', + 'ES' => 'EUR', + 'SE' => 'SEK', + 'CH' => 'CHF', + 'GB' => 'GBP', + 'US' => 'USD', + ]; + } + + protected function getAllowedCountries(): array + { + return array_keys($this->getAllowedCountryCurrencyCombination()); + } + + protected function getAllowedCurrencies(): array + { + return array_values($this->getAllowedCountryCurrencyCombination()); + } + + /** + * Add Customer Resource to view. + * + * @param JTLSmarty $view + * @return void + */ + public function handleStepAdditional(JTLSmarty $view): void + { + $this->adapter->getConnectionForSession(); + $shopCustomer = $this->sessionHelper->getFrontendSession()->getCustomer(); + $customer = $this->createOrFetchHeidelpayCustomer( + $this->adapter, + $this->sessionHelper, + $this->isB2BCustomer($shopCustomer) + ); + $customer->setShippingAddress( + $this->createHeidelpayAddress( + $this->sessionHelper->getFrontendSession()->get('Lieferadresse') + ) + ); + + $data = $view->getTemplateVars('hpPayment') ?: []; + $data['customer'] = $customer; + + $view->assign('hpPayment', $data); + } + + /** + * Check country+currency combination + * + * @return bool + */ + public function isSelectable(): bool + { + if (!parent::isSelectable()) { + return false; + } + + // Check Country + Currency combination + $country = $this->sessionHelper->getFrontendSession()->getCustomer()->cLand; + $currency = $this->sessionHelper->getFrontendSession()->getCurrency()->getCode(); + + if ($this->getAllowedCountryCurrencyCombination()[$country] !== $currency) { + return false; + } + + return true; + } + + protected function performTransaction(BasePaymentType $payment, Bestellung $order): AbstractTransactionType + { + // Create or fetch customer resource + $shopCustomer = $this->sessionHelper->getFrontendSession()->getCustomer(); + $customer = $this->createOrFetchHeidelpayCustomer( + $this->adapter, + $this->sessionHelper, + $this->isB2BCustomer($shopCustomer) + ); + $customer->setShippingAddress($this->createHeidelpayAddress($order->Lieferadresse)); + $customer->setBillingAddress($this->createHeidelpayAddress($order->oRechnungsadresse)); + + if (empty($customer->getLanguage())) { + $customer->setLanguage(strtolower($this->sessionHelper->getFrontendSession()->getCustomer()->cLand ?? 'de')); + } + + $this->debugLog('Customer Resource: ' . $customer->jsonSerialize(), static::class); + + // Update existing customer resource if needed + if ($customer->getId()) { + $customer = $this->adapter->getCurrentConnection()->updateCustomer($customer); + $this->debugLog('Updated Customer Resource: ' . $customer->jsonSerialize(), static::class); + } + + // Create Basket + $session = $this->sessionHelper->getFrontendSession(); + $basket = $this->createHeidelpayBasket( + $session->getCart(), + $order->Waehrung, + $session->getLanguage(), + $order->cBestellNr ?? $payment->getId() + ); + $this->debugLog('Basket Resource: ' . $basket->jsonSerialize(), static::class); + + return $this->adapter->getCurrentConnection()->performAuthorization( + $this->createAuthorization($shopCustomer, $order, false), + $payment->getId(), + $customer, + $this->createMetadata(), + $basket + ); + } +} diff --git a/paymentmethod/UnzerPaylaterDirectDebit.php b/paymentmethod/UnzerPaylaterDirectDebit.php index 8eabbab..cbb5d1b 100644 --- a/paymentmethod/UnzerPaylaterDirectDebit.php +++ b/paymentmethod/UnzerPaylaterDirectDebit.php @@ -4,38 +4,34 @@ namespace Plugin\s360_unzer_shop5\paymentmethod; -use DateTime; use JTL\Checkout\Bestellung; -use JTL\Checkout\Lieferadresse; -use JTL\Shop; use JTL\Smarty\JTLSmarty; use Plugin\s360_unzer_shop5\src\Payments\HeidelpayPaymentMethod; use Plugin\s360_unzer_shop5\src\Payments\Interfaces\CancelableInterface; use Plugin\s360_unzer_shop5\src\Payments\Interfaces\HandleStepAdditionalInterface; use Plugin\s360_unzer_shop5\src\Payments\Interfaces\HandleStepReviewOrderInterface; +use Plugin\s360_unzer_shop5\src\Payments\Traits\CancelPaymentTransaction; +use Plugin\s360_unzer_shop5\src\Payments\Traits\HasAuthorization; use Plugin\s360_unzer_shop5\src\Payments\Traits\HasBasket; use Plugin\s360_unzer_shop5\src\Payments\Traits\HasCustomer; use Plugin\s360_unzer_shop5\src\Payments\Traits\HasMetadata; use Plugin\s360_unzer_shop5\src\Payments\Traits\SupportsB2B; -use Plugin\s360_unzer_shop5\src\Utils\Config; use Plugin\s360_unzer_shop5\src\Utils\SessionHelper; -use UnzerSDK\Resources\EmbeddedResources\RiskData; -use UnzerSDK\Resources\Payment; use UnzerSDK\Resources\PaymentTypes\BasePaymentType; use UnzerSDK\Resources\TransactionTypes\AbstractTransactionType; use UnzerSDK\Resources\TransactionTypes\Authorization; -use UnzerSDK\Resources\TransactionTypes\Cancellation; -use UnzerSDK\Resources\TransactionTypes\Charge; class UnzerPaylaterDirectDebit extends HeidelpayPaymentMethod implements HandleStepAdditionalInterface, HandleStepReviewOrderInterface, CancelableInterface { + use HasAuthorization; use HasMetadata; use HasCustomer; use HasBasket; use SupportsB2B; + use CancelPaymentTransaction; protected function getAllowedCountries(): array { @@ -47,38 +43,6 @@ protected function getAllowedCurrencies(): array return ['EUR']; } - /** - * Cancel the Charge or authorization - * - * @param Payment $payment - * @param Charge|Authorization $transaction - * @param Bestellung $order - * @return Cancellation - */ - public function cancelPaymentTransaction( - Payment $payment, - AbstractTransactionType $transaction, - Bestellung $order - ): Cancellation { - $api = $this->adapter->getConnectionForOrder($order); - - $reference = str_replace( - ['%ORDER_ID%', '%SHOPNAME%'], - [$order->cBestellNr, Shop::getSettingValue(CONF_GLOBAL, 'global_shopname')], - $this->trans(Config::LANG_CANCEL_PAYMENT_REFERENCE) - ); - - $cancel = (new Cancellation($transaction->getAmount()))->setPaymentReference($reference); - - // Cancel before charge (reversal) - if ($transaction instanceof Authorization) { - return $api->cancelAuthorizedPayment($payment, $cancel); - } - - // Cancel after charge (refund) - return $api->cancelChargedPayment($payment, $cancel); - } - /** * Save the payment reference and some other bank data. * @@ -155,6 +119,7 @@ public function handleStepAdditional(JTLSmarty $view): void /** * Generate and add threat metrix id (fraud prevention). * + * @deprecated Only used for backwards compatibility (UI Components v1) * @param JTLSmarty $view * @return null|string */ @@ -167,6 +132,23 @@ public function handleStepReviewOrder(JTLSmarty $view): ?string return 'template/partials/_threatMetrix'; } + + /** + * @SuppressWarnings(PHPMD.Superglobals) + * @return bool + */ + public function validateAdditional(): bool + { + $postPaymentData = $_POST['paymentData'] ?? []; + + // Save Threat Metrix ID + if (isset($postPaymentData['threatMetrixId'])) { + $this->sessionHelper->set(SessionHelper::KEY_THREAT_METRIX_ID, $postPaymentData['threatMetrixId']); + } + + return parent::validateAdditional(); + } + protected function performTransaction(BasePaymentType $payment, Bestellung $order): AbstractTransactionType { // Create or fetch customer resource @@ -196,24 +178,8 @@ protected function performTransaction(BasePaymentType $payment, Bestellung $orde ); $this->debugLog('Basket Resource: ' . $basket->jsonSerialize(), static::class); - // Authorize Transaction - $riskData = (new RiskData()) - ->setThreatMetrixId($this->sessionHelper->get(SessionHelper::KEY_THREAT_METRIX_ID)) - ->setRegistrationLevel($shopCustomer->nRegistriert == '1' ? '1' : '0') - ->setRegistrationDate( - DateTime::createFromFormat('Y-m-d', $shopCustomer->dErstellt ?? date('Y-m-d'))->format('Ymd') - ); - - $authorization = new Authorization( - $this->getTotalPriceCustomerCurrency($order), - $order->Waehrung->getCode(), - $this->getReturnURL($order) - ); - $authorization->setOrderId($order->cBestellNr ?? null); - $authorization->setRiskData($riskData); - return $this->adapter->getCurrentConnection()->performAuthorization( - $authorization, + $this->createAuthorization($shopCustomer, $order), $payment->getId(), $customer, $this->createMetadata(), diff --git a/paymentmethod/UnzerPaylaterInstallment.php b/paymentmethod/UnzerPaylaterInstallment.php index 5035dd1..cef2a89 100644 --- a/paymentmethod/UnzerPaylaterInstallment.php +++ b/paymentmethod/UnzerPaylaterInstallment.php @@ -4,7 +4,6 @@ namespace Plugin\s360_unzer_shop5\paymentmethod; -use DateTime; use JTL\Cart\Cart; use JTL\Checkout\Bestellung; use JTL\Checkout\ZahlungsInfo; @@ -17,13 +16,13 @@ use Plugin\s360_unzer_shop5\src\Payments\Interfaces\HandleStepAdditionalInterface; use Plugin\s360_unzer_shop5\src\Payments\Interfaces\HandleStepReviewOrderInterface; use Plugin\s360_unzer_shop5\src\Payments\PaymentHandler; +use Plugin\s360_unzer_shop5\src\Payments\Traits\HasAuthorization; use Plugin\s360_unzer_shop5\src\Payments\Traits\HasBasket; use Plugin\s360_unzer_shop5\src\Payments\Traits\HasCustomer; use Plugin\s360_unzer_shop5\src\Payments\Traits\HasMetadata; use Plugin\s360_unzer_shop5\src\Payments\Traits\SupportsB2B; use Plugin\s360_unzer_shop5\src\Utils\Config; use Plugin\s360_unzer_shop5\src\Utils\SessionHelper; -use UnzerSDK\Resources\EmbeddedResources\RiskData; use UnzerSDK\Resources\PaymentTypes\BasePaymentType; use UnzerSDK\Resources\TransactionTypes\AbstractTransactionType; use UnzerSDK\Resources\Payment; @@ -35,6 +34,7 @@ class UnzerPaylaterInstallment extends HeidelpayPaymentMethod implements HandleStepReviewOrderInterface, CancelableInterface { + use HasAuthorization; use HasMetadata; use HasCustomer; use HasBasket; @@ -178,6 +178,11 @@ public function validateAdditional(): bool { $postPaymentData = $_POST['paymentData'] ?? []; + // Save Threat Metrix ID + if (isset($postPaymentData['threatMetrixId'])) { + $this->sessionHelper->set(SessionHelper::KEY_THREAT_METRIX_ID, $postPaymentData['threatMetrixId']); + } + // Save Customer ID if it exists if (isset($postPaymentData['customerId'])) { $this->sessionHelper->set(SessionHelper::KEY_CUSTOMER_ID, $postPaymentData['customerId']); @@ -201,6 +206,7 @@ public function validateAdditional(): bool /** * Generate and add threat metrix id (fraud prevention). * + * @deprecated ThreatMetrix Only used for backwards compatibility (UI Components v1) * @param JTLSmarty $view * @return null|string */ @@ -277,23 +283,8 @@ protected function performTransaction(BasePaymentType $payment, Bestellung $orde $this->debugLog('Basket Resource: ' . $basket->jsonSerialize(), static::class); // Authorize Transaction - $riskData = (new RiskData()) - ->setThreatMetrixId($this->sessionHelper->get(SessionHelper::KEY_THREAT_METRIX_ID)) - ->setRegistrationLevel($shopCustomer->nRegistriert == '1' ? '1' : '0') - ->setRegistrationDate( - DateTime::createFromFormat('Y-m-d', $shopCustomer->dErstellt ?? date('Y-m-d'))->format('Ymd') - ); - - $authorization = new Authorization( - $this->getTotalPriceCustomerCurrency($order), - $order->Waehrung->getCode(), - $this->getReturnURL($order) - ); - $authorization->setOrderId($order->cBestellNr ?? null); - $authorization->setRiskData($riskData); - return $this->adapter->getCurrentConnection()->performAuthorization( - $authorization, + $this->createAuthorization($shopCustomer, $order), $payment->getId(), $customer, $this->createMetadata(), diff --git a/paymentmethod/UnzerPaylaterInvoice.php b/paymentmethod/UnzerPaylaterInvoice.php index 9d5d364..48551bc 100644 --- a/paymentmethod/UnzerPaylaterInvoice.php +++ b/paymentmethod/UnzerPaylaterInvoice.php @@ -4,42 +4,43 @@ namespace Plugin\s360_unzer_shop5\paymentmethod; -use DateTime; use JTL\Checkout\Bestellung; use JTL\Checkout\Lieferadresse; use JTL\Checkout\ZahlungsInfo; use JTL\Helpers\Text; -use JTL\Shop; use JTL\Smarty\JTLSmarty; use Plugin\s360_unzer_shop5\src\Payments\HeidelpayPaymentMethod; use Plugin\s360_unzer_shop5\src\Payments\Interfaces\CancelableInterface; use Plugin\s360_unzer_shop5\src\Payments\Interfaces\HandleStepAdditionalInterface; use Plugin\s360_unzer_shop5\src\Payments\Interfaces\HandleStepReviewOrderInterface; +use Plugin\s360_unzer_shop5\src\Payments\Traits\CancelPaymentTransaction; +use Plugin\s360_unzer_shop5\src\Payments\Traits\HasAuthorization; use Plugin\s360_unzer_shop5\src\Payments\Traits\HasBasket; use Plugin\s360_unzer_shop5\src\Payments\Traits\HasCustomer; use Plugin\s360_unzer_shop5\src\Payments\Traits\HasMetadata; use Plugin\s360_unzer_shop5\src\Payments\Traits\SupportsB2B; -use Plugin\s360_unzer_shop5\src\Utils\Config; use Plugin\s360_unzer_shop5\src\Utils\SessionHelper; use stdClass; +use UnzerSDK\Constants\CompanyCommercialSectorItems; +use UnzerSDK\Constants\CompanyRegistrationTypes; +use UnzerSDK\Constants\CompanyTypes; use UnzerSDK\Constants\ShippingTypes; -use UnzerSDK\Resources\EmbeddedResources\RiskData; +use UnzerSDK\Resources\EmbeddedResources\CompanyInfo; use UnzerSDK\Resources\PaymentTypes\BasePaymentType; use UnzerSDK\Resources\TransactionTypes\AbstractTransactionType; use UnzerSDK\Resources\TransactionTypes\Authorization; -use UnzerSDK\Resources\Payment; -use UnzerSDK\Resources\TransactionTypes\Cancellation; -use UnzerSDK\Resources\TransactionTypes\Charge; class UnzerPaylaterInvoice extends HeidelpayPaymentMethod implements HandleStepAdditionalInterface, HandleStepReviewOrderInterface, CancelableInterface { + use HasAuthorization; use HasMetadata; use HasCustomer; use HasBasket; use SupportsB2B; + use CancelPaymentTransaction; protected function getAllowedCountries(): array { @@ -51,39 +52,6 @@ protected function getAllowedCurrencies(): array return ['EUR', 'CHF']; } - /** - * Cancel the Charge or authorization - * - * @param Payment $payment - * @param Charge|Authorization $transaction - * @param Bestellung $order - * @return Cancellation - */ - public function cancelPaymentTransaction( - Payment $payment, - AbstractTransactionType $transaction, - Bestellung $order - ): Cancellation { - $api = $this->adapter->getConnectionForOrder($order); - - $reference = str_replace( - ['%ORDER_ID%', '%SHOPNAME%'], - [$order->cBestellNr, Shop::getSettingValue(CONF_GLOBAL, 'global_shopname')], - $this->trans(Config::LANG_CANCEL_PAYMENT_REFERENCE) - ); - - $cancel = (new Cancellation($transaction->getAmount()))->setPaymentReference($reference); - - // Cancel before charge (reversal) - if ($transaction instanceof Authorization) { - return $api->cancelAuthorizedPayment($payment, $cancel); - } - - // Cancel after charge (refund) - return $api->cancelChargedPayment($payment, $cancel); - } - - /** * Data the merchant needs to put on the Invoice. * @@ -145,10 +113,12 @@ public function handleStepAdditional(JTLSmarty $view): void $this->sessionHelper->getFrontendSession()->get('Lieferadresse') ) ); + $this->sessionHelper->set(SessionHelper::KEY_CUSTOMER_ID, $customer->getId()); $data = $view->getTemplateVars('hpPayment') ?: []; $data['customer'] = $customer; $data['isB2B'] = $this->isB2BCustomer($shopCustomer); + $data['companyTypes'] = [CompanyTypes::AUTHORITY, CompanyTypes::ASSOCIATION, CompanyTypes::COMPANY, CompanyTypes::SOLE, CompanyTypes::OTHER]; $view->assign('hpPayment', $data); } @@ -156,6 +126,7 @@ public function handleStepAdditional(JTLSmarty $view): void /** * Generate and add threat metrix id (fraud prevention). * + * @deprecated Only used for backwards compatibility (UI Components v1) * @param JTLSmarty $view * @return null|string */ @@ -180,6 +151,30 @@ public function validateAdditional(): bool { $postPaymentData = $_POST['paymentData'] ?? []; + // Save Threat Metrix ID + if (isset($postPaymentData['threatMetrixId'])) { + $this->sessionHelper->set(SessionHelper::KEY_THREAT_METRIX_ID, $postPaymentData['threatMetrixId']); + } + + // Save company info type + if ($this->isB2BCustomer($this->sessionHelper->getFrontendSession()->getCustomer())) { + $shopCustomer = $this->sessionHelper->getFrontendSession()->getCustomer(); + $customer = $this->createOrFetchHeidelpayCustomer( + $this->adapter, + $this->sessionHelper, + $this->isB2BCustomer($shopCustomer) + ); + + // Set company info for b2b customers + if ($customer->getCompanyInfo() === null) { + $customer->setCompanyInfo(new CompanyInfo()); + $customer->getCompanyInfo() + ->setRegistrationType(CompanyRegistrationTypes::REGISTRATION_TYPE_NOT_REGISTERED) + ->setFunction('OWNER') + ->setCommercialSector(CompanyCommercialSectorItems::OTHER); + } + } + // Save Customer ID if it exists if (isset($postPaymentData['customerId'])) { $this->sessionHelper->set(SessionHelper::KEY_CUSTOMER_ID, $postPaymentData['customerId']); @@ -198,7 +193,7 @@ public function validateAdditional(): bool $names = $this->getNamesFromAddress($customer->getShippingAddress()); $shipping->cVorname = $names['firstname'] ?: $shipping->cVorname; $shipping->cNachname = $names['lastname'] ?: $shipping->cNachname; - $shipping->cBundesland = $customer->getShippingAddress()->getState(); + $shipping->cBundesland = $customer->getShippingAddress()->getState() ?? $shopCustomer->cBundesland; $shipping->cPLZ = $customer->getShippingAddress()->getZip(); $shipping->cOrt = $customer->getShippingAddress()->getCity(); $shipping->cLand = $customer->getShippingAddress()->getCountry(); @@ -216,7 +211,7 @@ public function validateAdditional(): bool $shopCustomer->cNachname = $names['lastname'] ?: $shopCustomer->cNachname; if ($this->isB2BCustomer($shopCustomer)) { - $shopCustomer->cBundesland = $customer->getBillingAddress()->getState() ?? ''; + $shopCustomer->cBundesland = $customer->getBillingAddress()->getState() ?? $shopCustomer->cBundesland; $shopCustomer->cPLZ = $customer->getBillingAddress()->getZip(); $shopCustomer->cOrt = $customer->getBillingAddress()->getCity(); $shopCustomer->cLand = $customer->getBillingAddress()->getCountry(); @@ -292,24 +287,8 @@ protected function performTransaction(BasePaymentType $payment, $order): Abstrac ); $this->debugLog('Basket Resource: ' . $basket->jsonSerialize(), static::class); - // Authorize Transaction - $riskData = (new RiskData()) - ->setThreatMetrixId($this->sessionHelper->get(SessionHelper::KEY_THREAT_METRIX_ID)) - ->setRegistrationLevel($shopCustomer->nRegistriert == '1' ? '1' : '0') - ->setRegistrationDate( - DateTime::createFromFormat('Y-m-d', $shopCustomer->dErstellt ?? date('Y-m-d'))->format('Ymd') - ); - - $authorization = new Authorization( - $this->getTotalPriceCustomerCurrency($order), - $order->Waehrung->getCode(), - $this->getReturnURL($order) - ); - $authorization->setOrderId($order->cBestellNr ?? null); - $authorization->setRiskData($riskData); - return $this->adapter->getCurrentConnection()->performAuthorization( - $authorization, + $this->createAuthorization($shopCustomer, $order), $payment->getId(), $customer, $this->createMetadata(), diff --git a/paymentmethod/UnzerWero.php b/paymentmethod/UnzerWero.php new file mode 100644 index 0000000..3fadd33 --- /dev/null +++ b/paymentmethod/UnzerWero.php @@ -0,0 +1,93 @@ +get(Config::class); + + // Create or fetch customer resource + $shopCustomer = $this->sessionHelper->getFrontendSession()->getCustomer(); + $customer = $this->createOrFetchHeidelpayCustomer( + $this->adapter, + $this->sessionHelper, + $this->isB2BCustomer($shopCustomer) + ); + $customer->setShippingAddress($this->createHeidelpayAddress($order->Lieferadresse)); + $customer->setBillingAddress($this->createHeidelpayAddress($order->oRechnungsadresse)); + $customer->setLanguage(strtolower($this->sessionHelper->getFrontendSession()->getCustomer()->cLand ?? 'de')); + + $this->debugLog('Customer Resource: ' . $customer->jsonSerialize(), static::class); + + // Update existing customer resource if needed + if ($customer->getId()) { + $customer = $this->adapter->getCurrentConnection()->updateCustomer($customer); + $this->debugLog('Updated Customer Resource: ' . $customer->jsonSerialize(), static::class); + } + + // Create Basket + $session = $this->sessionHelper->getFrontendSession(); + $basket = $this->createHeidelpayBasket( + $session->getCart(), + $order->Waehrung, + $session->getLanguage(), + $order->cBestellNr ?? $payment->getId() + ); + $this->debugLog('Basket Resource: ' . $basket->jsonSerialize(), static::class); + + // Authorize payment + if ($config->getPaymentSetting(Config::PAYMENT_BOOKING_MODE, $this->moduleID) === 'authorize') { + return $this->adapter->getCurrentConnection()->performAuthorization( + $this->createAuthorization($shopCustomer, $order, false), + $payment->getId(), + $customer, + $this->createMetadata(), + $basket + ); + } + + // Charge Payment + return $this->adapter->getCurrentConnection()->performCharge( + $this->createCharge($order), + $payment->getId(), + $customer, + $this->createMetadata(), + $basket + ); + } +} \ No newline at end of file diff --git a/paymentmethod/template/_components_v2.tpl b/paymentmethod/template/_components_v2.tpl new file mode 100644 index 0000000..f1f054d --- /dev/null +++ b/paymentmethod/template/_components_v2.tpl @@ -0,0 +1,26 @@ + + + + +{if $hpPayment.isSandbox && $hpPayment.isDev} + +{else} + +{/if} + {* TODO *} \ No newline at end of file diff --git a/paymentmethod/template/alipay_form.tpl b/paymentmethod/template/alipay_form.tpl index 9ba5868..1d470ca 100644 --- a/paymentmethod/template/alipay_form.tpl +++ b/paymentmethod/template/alipay_form.tpl @@ -1,15 +1,13 @@ -{include file="{$hpPayment.pluginPath}paymentmethod/template/_includes.tpl"} +{include file="{$hpPayment.pluginPath}paymentmethod/template/_components_v2.tpl"} -
            {$hpPayment.redirectingNote}
            +
            +
            {$hpPayment.redirectingNote}
            - - -{include file="{$hpPayment.pluginPath}paymentmethod/template/_footer.tpl"} \ No newline at end of file + + + +
            \ No newline at end of file diff --git a/paymentmethod/template/applepay.tpl b/paymentmethod/template/applepay.tpl index 90103d5..96a76e2 100644 --- a/paymentmethod/template/applepay.tpl +++ b/paymentmethod/template/applepay.tpl @@ -1,35 +1 @@ -{include file="{$hpPayment.pluginPath}paymentmethod/template/_includes.tpl"} - - - -
            -
            -
            -
            -
            -
            - - - -{include file="{$hpPayment.pluginPath}paymentmethod/template/_footer.tpl"} \ No newline at end of file +{* !! DEPRECATED !! *} \ No newline at end of file diff --git a/paymentmethod/template/bancontact_form.tpl b/paymentmethod/template/bancontact_form.tpl index 8d9d05d..c57a843 100644 --- a/paymentmethod/template/bancontact_form.tpl +++ b/paymentmethod/template/bancontact_form.tpl @@ -1,19 +1,10 @@ -{include file="{$hpPayment.pluginPath}paymentmethod/template/_includes.tpl"} +{include file="{$hpPayment.pluginPath}paymentmethod/template/_components_v2.tpl"} -
            -
            +
            + + +
            - - - -{include file="{$hpPayment.pluginPath}paymentmethod/template/_footer.tpl"} \ No newline at end of file diff --git a/paymentmethod/template/credit_card_form.tpl b/paymentmethod/template/credit_card_form.tpl index 65915f1..7d66bf6 100644 --- a/paymentmethod/template/credit_card_form.tpl +++ b/paymentmethod/template/credit_card_form.tpl @@ -1,36 +1,10 @@ -{include file="{$hpPayment.pluginPath}paymentmethod/template/_includes.tpl"} +{include file="{$hpPayment.pluginPath}paymentmethod/template/_components_v2.tpl"} -
            -
            -
            -
            -
            -
            -
            -
            -
            -
            -
            -
            -
            -
            -
            -
            -
            -
            -
            -
            - - - -{include file="{$hpPayment.pluginPath}paymentmethod/template/_footer.tpl"} \ No newline at end of file +
            + + + +
            \ No newline at end of file diff --git a/paymentmethod/template/direct_bank_transfer.tpl b/paymentmethod/template/direct_bank_transfer.tpl index 207511b..5f7d29d 100644 --- a/paymentmethod/template/direct_bank_transfer.tpl +++ b/paymentmethod/template/direct_bank_transfer.tpl @@ -1,15 +1,13 @@ -{include file="{$hpPayment.pluginPath}paymentmethod/template/_includes.tpl"} +{include file="{$hpPayment.pluginPath}paymentmethod/template/_components_v2.tpl"} -
            {$hpPayment.redirectingNote}
            +
            +
            {$hpPayment.redirectingNote}
            - - -{include file="{$hpPayment.pluginPath}paymentmethod/template/_footer.tpl"} \ No newline at end of file + + + +
            diff --git a/paymentmethod/template/eps_form.tpl b/paymentmethod/template/eps_form.tpl index e5866fb..6d13872 100644 --- a/paymentmethod/template/eps_form.tpl +++ b/paymentmethod/template/eps_form.tpl @@ -1,15 +1,13 @@ -{include file="{$hpPayment.pluginPath}paymentmethod/template/_includes.tpl"} +{include file="{$hpPayment.pluginPath}paymentmethod/template/_components_v2.tpl"} -
            {$hpPayment.redirectingNote}
            +
            +
            {$hpPayment.redirectingNote}
            - - -{include file="{$hpPayment.pluginPath}paymentmethod/template/_footer.tpl"} \ No newline at end of file + + + +
            diff --git a/paymentmethod/template/flexipay_direct_form.tpl b/paymentmethod/template/flexipay_direct_form.tpl index ebbc63e..96a76e2 100644 --- a/paymentmethod/template/flexipay_direct_form.tpl +++ b/paymentmethod/template/flexipay_direct_form.tpl @@ -1,15 +1 @@ -{include file="{$hpPayment.pluginPath}paymentmethod/template/_includes.tpl"} - -
            {$hpPayment.redirectingNote}
            - - - -{include file="{$hpPayment.pluginPath}paymentmethod/template/_footer.tpl"} \ No newline at end of file +{* !! DEPRECATED !! *} \ No newline at end of file diff --git a/paymentmethod/template/giropay_form.tpl b/paymentmethod/template/giropay_form.tpl index ea759e5..96a76e2 100644 --- a/paymentmethod/template/giropay_form.tpl +++ b/paymentmethod/template/giropay_form.tpl @@ -1,15 +1 @@ -{include file="{$hpPayment.pluginPath}paymentmethod/template/_includes.tpl"} - -
            {$hpPayment.redirectingNote}
            - - - -{include file="{$hpPayment.pluginPath}paymentmethod/template/_footer.tpl"} \ No newline at end of file +{* !! DEPRECATED !! *} \ No newline at end of file diff --git a/paymentmethod/template/hire_purchase_direct_debit_form.tpl b/paymentmethod/template/hire_purchase_direct_debit_form.tpl index 4fcb58c..96a76e2 100644 --- a/paymentmethod/template/hire_purchase_direct_debit_form.tpl +++ b/paymentmethod/template/hire_purchase_direct_debit_form.tpl @@ -1,27 +1 @@ -{include file="{$hpPayment.pluginPath}paymentmethod/template/_includes.tpl"} - -
            -
            -
            -
            - - - -{include file="{$hpPayment.pluginPath}paymentmethod/template/_footer.tpl"} \ No newline at end of file +{* !! DEPRECATED !! *} \ No newline at end of file diff --git a/paymentmethod/template/ideal_form.tpl b/paymentmethod/template/ideal_form.tpl index a608861..452fd0d 100644 --- a/paymentmethod/template/ideal_form.tpl +++ b/paymentmethod/template/ideal_form.tpl @@ -1,16 +1,11 @@ -{include file="{$hpPayment.pluginPath}paymentmethod/template/_includes.tpl"} +{include file="{$hpPayment.pluginPath}paymentmethod/template/_components_v2.tpl"} -
            -
            -
            - - - -{include file="{$hpPayment.pluginPath}paymentmethod/template/_footer.tpl"} \ No newline at end of file +
            + + + +
            \ No newline at end of file diff --git a/paymentmethod/template/invoice_factoring_form.tpl b/paymentmethod/template/invoice_factoring_form.tpl index df415ce..96a76e2 100644 --- a/paymentmethod/template/invoice_factoring_form.tpl +++ b/paymentmethod/template/invoice_factoring_form.tpl @@ -1,23 +1 @@ -{include file="{$hpPayment.pluginPath}paymentmethod/template/_includes.tpl"} - -
            -
            -
            - - - -{include file="{$hpPayment.pluginPath}paymentmethod/template/_footer.tpl"} \ No newline at end of file +{* !! DEPRECATED !! *} \ No newline at end of file diff --git a/paymentmethod/template/invoice_form.tpl b/paymentmethod/template/invoice_form.tpl index 2889e47..96a76e2 100644 --- a/paymentmethod/template/invoice_form.tpl +++ b/paymentmethod/template/invoice_form.tpl @@ -1,15 +1 @@ -{include file="{$hpPayment.pluginPath}paymentmethod/template/_includes.tpl"} - -
            {$hpPayment.redirectingNote}
            - - - -{include file="{$hpPayment.pluginPath}paymentmethod/template/_footer.tpl"} \ No newline at end of file +{* !! DEPRECATED !! *} \ No newline at end of file diff --git a/paymentmethod/template/invoice_guaranteed_form.tpl b/paymentmethod/template/invoice_guaranteed_form.tpl index ca6918c..96a76e2 100644 --- a/paymentmethod/template/invoice_guaranteed_form.tpl +++ b/paymentmethod/template/invoice_guaranteed_form.tpl @@ -1,23 +1 @@ -{include file="{$hpPayment.pluginPath}paymentmethod/template/_includes.tpl"} - -
            -
            -
            - - - -{include file="{$hpPayment.pluginPath}paymentmethod/template/_footer.tpl"} \ No newline at end of file +{* !! DEPRECATED !! *} \ No newline at end of file diff --git a/paymentmethod/template/klarna.tpl b/paymentmethod/template/klarna.tpl new file mode 100644 index 0000000..11d44a3 --- /dev/null +++ b/paymentmethod/template/klarna.tpl @@ -0,0 +1,14 @@ +{include file="{$hpPayment.pluginPath}paymentmethod/template/_components_v2.tpl"} + +
            +
            {$hpPayment.redirectingNote}
            + + + + +
            \ No newline at end of file diff --git a/paymentmethod/template/paylater_direct_debit_form.tpl b/paymentmethod/template/paylater_direct_debit_form.tpl index 6b691bf..62f7d1e 100644 --- a/paymentmethod/template/paylater_direct_debit_form.tpl +++ b/paymentmethod/template/paylater_direct_debit_form.tpl @@ -1,24 +1,12 @@ -{include file="{$hpPayment.pluginPath}paymentmethod/template/_includes.tpl"} +{include file="{$hpPayment.pluginPath}paymentmethod/template/_components_v2.tpl"} -
            -
            -
            -
            - - - -{include file="{$hpPayment.pluginPath}paymentmethod/template/_footer.tpl"} \ No newline at end of file +
            + + + +
            \ No newline at end of file diff --git a/paymentmethod/template/paylater_installment_form.tpl b/paymentmethod/template/paylater_installment_form.tpl index 3cdd4bd..d0c31b4 100644 --- a/paymentmethod/template/paylater_installment_form.tpl +++ b/paymentmethod/template/paylater_installment_form.tpl @@ -1,26 +1,16 @@ -{include file="{$hpPayment.pluginPath}paymentmethod/template/_includes.tpl"} +{include file="{$hpPayment.pluginPath}paymentmethod/template/_components_v2.tpl"} -
            -
            -
            +
            + + +
            - - - -{include file="{$hpPayment.pluginPath}paymentmethod/template/_footer.tpl"} \ No newline at end of file diff --git a/paymentmethod/template/paylater_invoice_form.tpl b/paymentmethod/template/paylater_invoice_form.tpl index e6d70a9..cf1b8e9 100644 --- a/paymentmethod/template/paylater_invoice_form.tpl +++ b/paymentmethod/template/paylater_invoice_form.tpl @@ -1,24 +1,12 @@ -{include file="{$hpPayment.pluginPath}paymentmethod/template/_includes.tpl"} +{include file="{$hpPayment.pluginPath}paymentmethod/template/_components_v2.tpl"} -
            -
            -
            -
            - - - -{include file="{$hpPayment.pluginPath}paymentmethod/template/_footer.tpl"} \ No newline at end of file +
            + + + +
            \ No newline at end of file diff --git a/paymentmethod/template/paypal_form.tpl b/paymentmethod/template/paypal_form.tpl index 7703c73..699cd44 100644 --- a/paymentmethod/template/paypal_form.tpl +++ b/paymentmethod/template/paypal_form.tpl @@ -1,16 +1,10 @@ -{include file="{$hpPayment.pluginPath}paymentmethod/template/_includes.tpl"} +{include file="{$hpPayment.pluginPath}paymentmethod/template/_components_v2.tpl"} -
            -
            -
            - - - -{include file="{$hpPayment.pluginPath}paymentmethod/template/_footer.tpl"} \ No newline at end of file +
            + + + +
            \ No newline at end of file diff --git a/paymentmethod/template/prepayment_form.tpl b/paymentmethod/template/prepayment_form.tpl index cf62ad5..c6403e0 100644 --- a/paymentmethod/template/prepayment_form.tpl +++ b/paymentmethod/template/prepayment_form.tpl @@ -1,15 +1,13 @@ -{include file="{$hpPayment.pluginPath}paymentmethod/template/_includes.tpl"} +{include file="{$hpPayment.pluginPath}paymentmethod/template/_components_v2.tpl"} -
            {$hpPayment.redirectingNote}
            +
            +
            {$hpPayment.redirectingNote}
            - - -{include file="{$hpPayment.pluginPath}paymentmethod/template/_footer.tpl"} \ No newline at end of file + + + +
            diff --git a/paymentmethod/template/przelewy24_form.tpl b/paymentmethod/template/przelewy24_form.tpl index 02d06c2..818e556 100644 --- a/paymentmethod/template/przelewy24_form.tpl +++ b/paymentmethod/template/przelewy24_form.tpl @@ -1,15 +1,13 @@ -{include file="{$hpPayment.pluginPath}paymentmethod/template/_includes.tpl"} +{include file="{$hpPayment.pluginPath}paymentmethod/template/_components_v2.tpl"} -
            {$hpPayment.redirectingNote}
            +
            +
            {$hpPayment.redirectingNote}
            - - -{include file="{$hpPayment.pluginPath}paymentmethod/template/_footer.tpl"} \ No newline at end of file + + + +
            diff --git a/paymentmethod/template/sepa_form.tpl b/paymentmethod/template/sepa_form.tpl index 3e9f3bf..e7f97d6 100644 --- a/paymentmethod/template/sepa_form.tpl +++ b/paymentmethod/template/sepa_form.tpl @@ -1,21 +1,10 @@ - -{include file="{$hpPayment.pluginPath}paymentmethod/template/_includes.tpl"} - -
            -
            - -
            - {$hpPayment.mandate} -
            +{include file="{$hpPayment.pluginPath}paymentmethod/template/_components_v2.tpl"} + +
            + + +
            - - - -{include file="{$hpPayment.pluginPath}paymentmethod/template/_footer.tpl"} \ No newline at end of file diff --git a/paymentmethod/template/sepa_guaranteed_form.tpl b/paymentmethod/template/sepa_guaranteed_form.tpl index f3e1c1d..96a76e2 100644 --- a/paymentmethod/template/sepa_guaranteed_form.tpl +++ b/paymentmethod/template/sepa_guaranteed_form.tpl @@ -1,29 +1 @@ - -{include file="{$hpPayment.pluginPath}paymentmethod/template/_includes.tpl"} - -
            -
            -
            - -
            - {$hpPayment.mandate} -
            -
            - - - -{include file="{$hpPayment.pluginPath}paymentmethod/template/_footer.tpl"} \ No newline at end of file +{* !! DEPRECATED !! *} \ No newline at end of file diff --git a/paymentmethod/template/sofort_form.tpl b/paymentmethod/template/sofort_form.tpl index 3c8b9ba..96a76e2 100644 --- a/paymentmethod/template/sofort_form.tpl +++ b/paymentmethod/template/sofort_form.tpl @@ -1,15 +1 @@ -{include file="{$hpPayment.pluginPath}paymentmethod/template/_includes.tpl"} - -
            {$hpPayment.redirectingNote}
            - - - -{include file="{$hpPayment.pluginPath}paymentmethod/template/_footer.tpl"} \ No newline at end of file +{* !! DEPRECATED !! *} \ No newline at end of file diff --git a/paymentmethod/template/twint.tpl b/paymentmethod/template/twint.tpl index b7097d9..40c993d 100644 --- a/paymentmethod/template/twint.tpl +++ b/paymentmethod/template/twint.tpl @@ -1,15 +1,13 @@ -{include file="{$hpPayment.pluginPath}paymentmethod/template/_includes.tpl"} +{include file="{$hpPayment.pluginPath}paymentmethod/template/_components_v2.tpl"} -
            {$hpPayment.redirectingNote}
            +
            +
            {$hpPayment.redirectingNote}
            - - -{include file="{$hpPayment.pluginPath}paymentmethod/template/_footer.tpl"} \ No newline at end of file + + + +
            diff --git a/paymentmethod/template/wechat_form.tpl b/paymentmethod/template/wechat_form.tpl index ec93bbf..1a2f8e8 100644 --- a/paymentmethod/template/wechat_form.tpl +++ b/paymentmethod/template/wechat_form.tpl @@ -1,15 +1,13 @@ -{include file="{$hpPayment.pluginPath}paymentmethod/template/_includes.tpl"} +{include file="{$hpPayment.pluginPath}paymentmethod/template/_components_v2.tpl"} -
            {$hpPayment.redirectingNote}
            +
            +
            {$hpPayment.redirectingNote}
            - - -{include file="{$hpPayment.pluginPath}paymentmethod/template/_footer.tpl"} \ No newline at end of file + + + +
            \ No newline at end of file diff --git a/paymentmethod/template/wero.tpl b/paymentmethod/template/wero.tpl new file mode 100644 index 0000000..89f2030 --- /dev/null +++ b/paymentmethod/template/wero.tpl @@ -0,0 +1,13 @@ +{include file="{$hpPayment.pluginPath}paymentmethod/template/_components_v2.tpl"} + +
            +
            {$hpPayment.redirectingNote}
            + + + + +
            \ No newline at end of file diff --git a/phpmd-ruleset.xml b/phpmd-ruleset.xml deleted file mode 100644 index 1ee4545..0000000 --- a/phpmd-ruleset.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - - Inspired by https://github.com/phpmd/phpmd/issues/137 - using http://phpmd.org/documentation/creating-a-ruleset.html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 3 - - - - - - - \ No newline at end of file diff --git a/src/Controllers/Admin/AdminController.php b/src/Controllers/Admin/AdminController.php index 50177f5..c3ff370 100644 --- a/src/Controllers/Admin/AdminController.php +++ b/src/Controllers/Admin/AdminController.php @@ -18,6 +18,7 @@ * Abstract Admin Controller * * @package Plugin\s360_unzer_shop5\src\Controllers\Admin + * @deprecated */ abstract class AdminController extends Controller { diff --git a/src/Controllers/Admin/AdminKeyPairsController.php b/src/Controllers/Admin/AdminKeyPairsController.php index 7cb9ea2..58fdd9f 100644 --- a/src/Controllers/Admin/AdminKeyPairsController.php +++ b/src/Controllers/Admin/AdminKeyPairsController.php @@ -8,6 +8,11 @@ use UnzerSDK\Validators\PrivateKeyValidator; use UnzerSDK\Validators\PublicKeyValidator; use JTL\Helpers\Request; +use Plugin\s360_unzer_shop5\paymentmethod\HeidelpaySEPADirectDebit; +use Plugin\s360_unzer_shop5\paymentmethod\UnzerDirectBankTransfer; +use Plugin\s360_unzer_shop5\paymentmethod\UnzerPaylaterDirectDebit; +use Plugin\s360_unzer_shop5\paymentmethod\UnzerPaylaterInstallment; +use Plugin\s360_unzer_shop5\paymentmethod\UnzerPaylaterInvoice; use Plugin\s360_unzer_shop5\src\Controllers\AjaxResponse; use Plugin\s360_unzer_shop5\src\Controllers\HasAjaxResponse; use Plugin\s360_unzer_shop5\src\KeyPairs\KeyPairEntity; @@ -81,12 +86,28 @@ public function handleAjax(): void $item = $this->saveKeypair($item); } + // Filter payment methods + $availablePaymentMethods = []; + $methodIds = [ + UnzerPaylaterInvoice::class, + UnzerPaylaterDirectDebit::class, + UnzerPaylaterInstallment::class, + HeidelpaySEPADirectDebit::class + // UnzerDirectBankTransfer::class + ]; + + foreach ($this->paymentMethods as $method) { + if ($method->getActive() && \in_array($method->getClassName(), $methodIds)) { + $availablePaymentMethods[$method->getMethodID()] = $method; + } + } + // Response $data = [ 'item' => $item, 'items' => $this->model->all(), 'currencies' => $this->model->getCurrencies(), - 'paymentMethods' => $this->paymentMethods, + 'paymentMethods' => $availablePaymentMethods, 'url' => $this->linkHelper->getFullAdminTabUrl(JtlLinkHelper::ADMIN_TAB_ORDERS) ]; diff --git a/src/Controllers/Admin/AdminSettingsController.php b/src/Controllers/Admin/AdminSettingsController.php index a18e97e..4a5c744 100644 --- a/src/Controllers/Admin/AdminSettingsController.php +++ b/src/Controllers/Admin/AdminSettingsController.php @@ -62,7 +62,6 @@ public function handle(): string $settings = $this->smarty->getTemplateVars('hpSettings'); $settings['config'] = $this->config->all(); - try { if ( empty($this->config->get(Config::PRIVATE_KEY)) @@ -134,6 +133,14 @@ protected function handleSaveRequest(): void $this->config->set(Config::PQ_SELECTOR_REVIEW_STEP, Request::postVar('pqSelectorReviewStep')); $this->config->set(Config::PQ_METHOD_REVIEW_STEP, Request::postVar('pqMethodReviewStep')); $this->config->set(Config::ADD_INCOMING_PAYMENTS, Request::postVar('addIncomingPayments', false)); + + $this->config->set(Config::UI_FONT_FAMILY, Request::postVar('ui-font-family', '')); + $this->config->set(Config::UI_TEXT_COLOR, Request::postVar('ui-text-color', '')); + $this->config->set(Config::UI_BRAND_COLOR, Request::postVar('ui-brand-color', '')); + $this->config->set(Config::UI_BACKGROUND_COLOR, Request::postVar('ui-background-color', '')); + $this->config->set(Config::UI_LINK_COLOR, Request::postVar('ui-link-color', '')); + $this->config->set(Config::UI_CORNER_RADIUS, Request::postVar('ui-corner-radius', '')); + $this->config->set(Config::UI_SHADOWS, Request::postVar('ui-shadows', '')); $this->saveChannelId(null); // Validate diff --git a/src/Controllers/PaymentController.php b/src/Controllers/PaymentController.php index ab26cbb..a3b34d9 100644 --- a/src/Controllers/PaymentController.php +++ b/src/Controllers/PaymentController.php @@ -70,7 +70,7 @@ public function handle(): string // Instalment Info if ($paymentMethod instanceof UnzerPaylaterInstallment) { - $method = $this->config->get(Config::PQ_METHOD_INSTALMENT_INFO, 'after'); + $method = $this->config->get(Config::PQ_METHOD_INSTALMENT_INFO, 'before'); $data = [ 'info' => $this->plugin->getLocalization()->getTranslation(Config::LANG_INSTLAMENT_INFO) ]; diff --git a/src/Controllers/SyncController.php b/src/Controllers/SyncController.php index 509a2f0..7295d4b 100644 --- a/src/Controllers/SyncController.php +++ b/src/Controllers/SyncController.php @@ -119,13 +119,13 @@ public function handle(): string // Action routing if ($this->action == self::ACTION_SHIPMENT) { $this->handleShipment($mappedOrder); - $this->model->save($mappedOrder); + $this->updatePaymentState($mappedOrder); return self::ACTION_SHIPMENT; } if ($this->action == self::ACTION_CANCEL) { $this->handleCancel($mappedOrder); - $this->model->save($mappedOrder); + $this->updatePaymentState($mappedOrder); return self::ACTION_CANCEL; } @@ -262,7 +262,7 @@ private function handleCancel(OrderMappingEntity $entity): void // Most payment types probably contain only one charge, but for a full cancelation we have to cancel all. foreach ($payment->getCharges() as $charge) { /** @var Charge $charge */ - $charge = $api->fetchCharge($charge); + $charge = $api->fetchChargeById($payment, $charge->getId()); if (!$charge->isError()) { try { @@ -274,9 +274,11 @@ private function handleCancel(OrderMappingEntity $entity): void continue; } + $key = $this->adapter->getCurrentConnection()->getKey(); + $key = substr($key, 0, -16) . str_repeat('•', 16); $this->errorLog( 'An API error occured while trying to cancel the transaction: ' . - $exc->getMerchantMessage() . ' | ' . $exc->getCode() + $exc->getMerchantMessage() . ' | Id: ' . $exc->getErrorId() . ' | Code: ' . $exc->getCode() . ' | API-Key: ' . $key ); } } @@ -332,4 +334,13 @@ private function cancelTransaction(Payment $payment, $transaction, HeidelpayPaym static::class ); } + + private function updatePaymentState(OrderMappingEntity $entity): void + { + $this->adapter->getConnectionForOrder($this->order); + $payment = $this->adapter->fetchPayment($entity->getPaymentId()); + $entity->setPaymentState($payment->getStateName()); + + $this->model->save($entity); + } } diff --git a/src/Payments/HeidelpayApiAdapter.php b/src/Payments/HeidelpayApiAdapter.php index d2874b2..dad1134 100644 --- a/src/Payments/HeidelpayApiAdapter.php +++ b/src/Payments/HeidelpayApiAdapter.php @@ -5,6 +5,7 @@ namespace Plugin\s360_unzer_shop5\src\Payments; use Exception; +use UnzerSDK\Resources\PaymentTypes\Applepay; use UnzerSDK\Unzer; use UnzerSDK\Resources\Payment; use UnzerSDK\Resources\PaymentTypes\BasePaymentType; @@ -14,6 +15,7 @@ use UnzerSDK\Resources\PaymentTypes\PaylaterInvoice; use UnzerSDK\Resources\PaymentTypes\PaylaterDirectDebit; use UnzerSDK\Resources\PaymentTypes\PaylaterInstallment; +use UnzerSDK\Resources\PaymentTypes\Klarna; use UnzerSDK\Resources\TransactionTypes\AbstractTransactionType; use UnzerSDK\Resources\TransactionTypes\Authorization; use JTL\Cart\Cart; @@ -26,6 +28,7 @@ use Plugin\s360_unzer_shop5\src\Utils\JtlLinkHelper; use Plugin\s360_unzer_shop5\src\Utils\JtlLoggerTrait; use Plugin\s360_unzer_shop5\src\Utils\SessionHelper; +use UnzerSDK\Resources\PaymentTypes\Wero; /** * Heidelpay API Adapter for JTL Shop. @@ -47,7 +50,10 @@ class HeidelpayApiAdapter PaylaterInvoice::class, PaylaterInstallment::class, PaylaterDirectDebit::class, - Googlepay::class + Googlepay::class, + Applepay::class, + Klarna::class, + Wero::class ]; /** diff --git a/src/Payments/HeidelpayPaymentMethod.php b/src/Payments/HeidelpayPaymentMethod.php index 3138c22..b322013 100644 --- a/src/Payments/HeidelpayPaymentMethod.php +++ b/src/Payments/HeidelpayPaymentMethod.php @@ -427,11 +427,12 @@ public function handleNotification($order, $hash, $args): void { parent::handleNotification($order, $hash, $args); + $paymentId = $this->sessionHelper->get(SessionHelper::KEY_PAYMENT_ID); $this->handler->finishPayment($hash); try { $this->adapter->getConnectionForOrder($order); - $payment = $this->adapter->fetchPayment(); + $payment = $this->adapter->fetchPayment($paymentId); $transaction = $this->adapter->getPaymentTransaction($payment); // update cBestellNummer because we already have generated it but have no way of telling JTL to use @@ -443,9 +444,8 @@ public function handleNotification($order, $hash, $args): void } // Preorder = 1 => Order was not finalized before and therefore no order mapping was saved. Do this now! - if (isset($args['state']) && $args['state'] == self::STATE_DURING_CHECKOUT) { - $this->handler->saveOrderMapping($transaction->getPayment(), $order); - } + // Otherwise, we update the order mapping with possible new payment status (ie user aborted or payment failed already!) + $this->handler->saveOrderMapping($transaction->getPayment(), $order); // The payment process has been successful (probably, as it can be pending). if ($payment->isCompleted() || $payment->isPending()) { diff --git a/src/Payments/PaymentHandler.php b/src/Payments/PaymentHandler.php index 542464f..f2f7e07 100644 --- a/src/Payments/PaymentHandler.php +++ b/src/Payments/PaymentHandler.php @@ -411,6 +411,8 @@ public function prepareView(): void $data['locale'] = $this->adapter->mapToLocale( $this->session->getFrontendSession()->getLanguage()->cISOSprache ?? 'eng' ); + $data['isSandbox'] = $this->config->isSandbox(); + $data['isDev'] = stripos(Shop::getURL(), 'solution360.dev') !== false || stripos(Shop::getURL(), '.test') !== false; $publicKey = $this->adapter->getKeypairService()->getPublicKey( isset(Frontend::getCustomer()->cFirma) && strlen(trim(Frontend::getCustomer()->cFirma)) > 0, diff --git a/src/Payments/PaymentMethodModuleFactory.php b/src/Payments/PaymentMethodModuleFactory.php index 9d007c3..1f554c5 100644 --- a/src/Payments/PaymentMethodModuleFactory.php +++ b/src/Payments/PaymentMethodModuleFactory.php @@ -25,18 +25,23 @@ use Plugin\s360_unzer_shop5\paymentmethod\HeidelpaySofort; use Plugin\s360_unzer_shop5\paymentmethod\HeidelpayWeChatPay; use Plugin\s360_unzer_shop5\paymentmethod\UnzerApplePay; +use Plugin\s360_unzer_shop5\paymentmethod\UnzerApplePayV2; use Plugin\s360_unzer_shop5\paymentmethod\UnzerBancontact; +use Plugin\s360_unzer_shop5\paymentmethod\UnzerDirectBankTransfer; use Plugin\s360_unzer_shop5\paymentmethod\UnzerGooglePay; +use Plugin\s360_unzer_shop5\paymentmethod\UnzerKlarna; use Plugin\s360_unzer_shop5\paymentmethod\UnzerPaylaterDirectDebit; use Plugin\s360_unzer_shop5\paymentmethod\UnzerPaylaterInstallment; use Plugin\s360_unzer_shop5\paymentmethod\UnzerPaylaterInvoice; use Plugin\s360_unzer_shop5\paymentmethod\UnzerTwint; +use Plugin\s360_unzer_shop5\paymentmethod\UnzerWero; use Plugin\s360_unzer_shop5\src\Utils\Config; use UnzerSDK\Resources\PaymentTypes\Alipay; use UnzerSDK\Resources\PaymentTypes\Applepay; use UnzerSDK\Resources\PaymentTypes\Bancontact; use UnzerSDK\Resources\PaymentTypes\BasePaymentType; use UnzerSDK\Resources\PaymentTypes\Card; +use UnzerSDK\Resources\PaymentTypes\Clicktopay; use UnzerSDK\Resources\PaymentTypes\EPS; use UnzerSDK\Resources\PaymentTypes\Giropay; use UnzerSDK\Resources\PaymentTypes\Googlepay; @@ -44,6 +49,8 @@ use UnzerSDK\Resources\PaymentTypes\InstallmentSecured; use UnzerSDK\Resources\PaymentTypes\Invoice; use UnzerSDK\Resources\PaymentTypes\InvoiceSecured; +use UnzerSDK\Resources\PaymentTypes\OpenbankingPis; +use UnzerSDK\Resources\PaymentTypes\Klarna; use UnzerSDK\Resources\PaymentTypes\PaylaterDirectDebit; use UnzerSDK\Resources\PaymentTypes\PaylaterInstallment; use UnzerSDK\Resources\PaymentTypes\PaylaterInvoice; @@ -56,6 +63,7 @@ use UnzerSDK\Resources\PaymentTypes\Sofort; use UnzerSDK\Resources\PaymentTypes\Twint; use UnzerSDK\Resources\PaymentTypes\Wechatpay; +use UnzerSDK\Resources\PaymentTypes\Wero; /** * Factory to create payment method modules. @@ -88,12 +96,16 @@ class PaymentMethodModuleFactory HeidelpaySEPADirectDebitGuaranteed::class => ['unzersepalastschrift(guaranteed)', 'unzerlastschrift(secured)'], HeidelpayWeChatPay::class => 'unzerwechatpay', UnzerApplePay::class => 'unzerapplepay', - UnzerPaylaterInvoice::class => 'unzerrechnung(jetztkaufen,späterbezahlen)', + UnzerApplePayV2::class => 'unzerapplepayv2', UnzerBancontact::class => 'unzerbancontact', - UnzerPaylaterInstallment::class => 'unzerratenzahlung(paylater)', - UnzerPaylaterDirectDebit::class => 'unzerlastschrift(paylater)', + UnzerDirectBankTransfer::class => 'unzerdirectbanktransfer', UnzerGooglePay::class => 'unzergooglepay', + UnzerPaylaterDirectDebit::class => 'unzerlastschrift(paylater)', + UnzerPaylaterInstallment::class => 'unzerratenzahlung(paylater)', + UnzerPaylaterInvoice::class => 'unzerrechnung(jetztkaufen,späterbezahlen)', UnzerTwint::class => 'unzertwint', + UnzerKlarna::class => 'unzerklarna', + UnzerWero::class => 'unzerwero', ]; private const MAPPING = [ @@ -106,7 +118,6 @@ class PaymentMethodModuleFactory Ideal::class => HeidelpayiDEAL::class, Invoice::class => HeidelpayInvoice::class, InvoiceSecured::class => HeidelpayInvoiceGuaranteed::class, - PaylaterInvoice::class => UnzerPaylaterInvoice::class, Paypal::class => HeidelpayPayPal::class, PIS::class => HeidelpayFlexiPayDirect::class, Prepayment::class => HeidelpayPrepayment::class, @@ -115,11 +126,17 @@ class PaymentMethodModuleFactory SepaDirectDebitSecured::class => HeidelpaySEPADirectDebitGuaranteed::class, Sofort::class => HeidelpaySofort::class, Wechatpay::class => HeidelpayWeChatPay::class, + Applepay::class => UnzerApplePayV2::class, Bancontact::class => UnzerBancontact::class, - PaylaterInstallment::class => UnzerPaylaterInstallment::class, - PaylaterDirectDebit::class => UnzerPaylaterDirectDebit::class, + OpenbankingPis::class => UnzerDirectBankTransfer::class, Googlepay::class => UnzerGooglePay::class, - Twint::class => UnzerTwint::class + PaylaterDirectDebit::class => UnzerPaylaterDirectDebit::class, + PaylaterInstallment::class => UnzerPaylaterInstallment::class, + PaylaterInvoice::class => UnzerPaylaterInvoice::class, + Twint::class => UnzerTwint::class, + Clicktopay::class => HeidelpayCreditCard::class, + Klarna::class => UnzerKlarna::class, + Wero::class => UnzerWero::class, ]; public function __construct() diff --git a/src/Payments/Traits/CancelPaymentTransaction.php b/src/Payments/Traits/CancelPaymentTransaction.php index 917cf94..22f3bf1 100644 --- a/src/Payments/Traits/CancelPaymentTransaction.php +++ b/src/Payments/Traits/CancelPaymentTransaction.php @@ -13,6 +13,7 @@ use UnzerSDK\Resources\TransactionTypes\AbstractTransactionType; use UnzerSDK\Resources\TransactionTypes\Authorization; use UnzerSDK\Resources\TransactionTypes\Cancellation; +use UnzerSDK\Resources\TransactionTypes\Charge; /** * Implements a default for CancelableInterface diff --git a/src/Payments/Traits/HasAuthorization.php b/src/Payments/Traits/HasAuthorization.php new file mode 100644 index 0000000..340b7e8 --- /dev/null +++ b/src/Payments/Traits/HasAuthorization.php @@ -0,0 +1,49 @@ +getLinkService()->getSpecialPages(); + + $authorization = new Authorization( + $this->getTotalPriceCustomerCurrency($order), + $order->Waehrung->getCode(), + $this->getReturnURL($order) + ); + + $authorization->setTermsAndConditionUrl( + $specialpages->first(static fn(LinkInterface $link) => $link->getLinkType() === LINKTYP_AGB)?->getUrl() + ); + $authorization->setPrivacyPolicyUrl( + $specialpages->first(static fn(LinkInterface $link) => $link->getLinkType() === LINKTYP_DATENSCHUTZ)?->getUrl() + ); + $authorization->setOrderId($order->cBestellNr ?? null); + + if ($withRiskData) { + $riskData = (new RiskData()) + ->setThreatMetrixId($this->sessionHelper->get(SessionHelper::KEY_THREAT_METRIX_ID)) + ->setRegistrationLevel($customer->nRegistriert == '1' ? '1' : '0') + ->setRegistrationDate( + DateTime::createFromFormat('Y-m-d', $customer->dErstellt ?? date('Y-m-d'))->format('Ymd') + ); + + $authorization->setRiskData($riskData); + } + + return $authorization; + } +} \ No newline at end of file diff --git a/src/Payments/Traits/HasCustomer.php b/src/Payments/Traits/HasCustomer.php index 2746b1e..b06d7f6 100644 --- a/src/Payments/Traits/HasCustomer.php +++ b/src/Payments/Traits/HasCustomer.php @@ -83,7 +83,9 @@ protected function createOrFetchHeidelpayCustomer( // Create new customer object but do not save the customer in the api // because some mandatory fields (e.g. birthday) may be missing! if ($isB2B) { - return $this->createHeidelpayB2BCustomer($session->getFrontendSession()->getCustomer()); + return $adapter->getCurrentConnection()->createOrUpdateCustomer( + $this->createHeidelpayB2BCustomer($session->getFrontendSession()->getCustomer()) + ); } return $adapter->getCurrentConnection()->createOrUpdateCustomer( diff --git a/src/Payments/Traits/HasDirectCharge.php b/src/Payments/Traits/HasDirectCharge.php new file mode 100644 index 0000000..8f16948 --- /dev/null +++ b/src/Payments/Traits/HasDirectCharge.php @@ -0,0 +1,27 @@ +getTotalPriceCustomerCurrency($order), + $order->Waehrung->getCode(), + $this->getReturnURL($order) + ); + $charge->setOrderId($order->cBestellNr ?? null); + + return $charge; + } +} \ No newline at end of file diff --git a/src/Utils/Config.php b/src/Utils/Config.php index 9c83643..f07711a 100644 --- a/src/Utils/Config.php +++ b/src/Utils/Config.php @@ -46,6 +46,8 @@ class Config public const LANG_APPLE_PAY_CANCEL_BY_USER = 's360_hp_apple_pay_cancel_by_user'; public const LANG_CANCEL_PAYMENT_REFERENCE = 's360_hp_cancel_payment_reference'; public const LANG_INSTLAMENT_INFO = 's360_hp_instalment_info'; + public const LANG_COMPANY_TYPE_MISSING = 's360_hp_company_type_missing'; + // Config Keys public const PRIVATE_KEY = 'privateKey'; @@ -69,6 +71,17 @@ class Config public const PQ_SELECTOR_PLACE_ORDER_BUTTON = 'pqSelectorPlaceOrderButton'; public const PQ_SELECTOR_ORDER_CONFIRM_FORM = 'pqSelectorOrderConfirmForm'; + public const PAYMENT_BOOKING_MODE = 'booking_mode'; + public const UI_FONT_FAMILY = 'ui_fontFamily'; + public const UI_TEXT_COLOR = 'ui_textColor'; + public const UI_BRAND_COLOR = 'ui_brandColor'; + public const UI_BACKGROUND_COLOR = 'ui_backgroundColor'; + public const UI_LINK_COLOR = 'ui_linkColor'; + public const UI_CORNER_RADIUS = 'ui_cornerRadius'; + public const UI_SHADOWS = 'ui_shadows'; + + public const ENABLE_CTP = 'enable_ctp'; + // Apple Pay Config Keys public const APPLEPAY_MERCHANT_IDENTIFIER = 'applepay_merchant_identifier'; public const APPLEPAY_MERCHANT_DOMAIN = 'applepay_merchant_domain'; diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 2a95046..294ea2b 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -2,27 +2,29 @@ "packages": [ { "name": "paragonie/constant_time_encoding", - "version": "v3.0.0", - "version_normalized": "3.0.0.0", + "version": "v3.1.3", + "version_normalized": "3.1.3.0", "source": { "type": "git", "url": "https://github.com/paragonie/constant_time_encoding.git", - "reference": "df1e7fde177501eee2037dd159cf04f5f301a512" + "reference": "d5b01a39b3415c2cd581d3bd3a3575c1ebbd8e77" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/df1e7fde177501eee2037dd159cf04f5f301a512", - "reference": "df1e7fde177501eee2037dd159cf04f5f301a512", + "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/d5b01a39b3415c2cd581d3bd3a3575c1ebbd8e77", + "reference": "d5b01a39b3415c2cd581d3bd3a3575c1ebbd8e77", "shasum": "" }, "require": { "php": "^8" }, "require-dev": { - "phpunit/phpunit": "^9", - "vimeo/psalm": "^4|^5" + "infection/infection": "^0", + "nikic/php-fuzzer": "^0", + "phpunit/phpunit": "^9|^10|^11", + "vimeo/psalm": "^4|^5|^6" }, - "time": "2024-05-08T12:36:18+00:00", + "time": "2025-09-24T15:06:41+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -125,17 +127,17 @@ }, { "name": "phpseclib/phpseclib", - "version": "3.0.43", - "version_normalized": "3.0.43.0", + "version": "3.0.46", + "version_normalized": "3.0.46.0", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "709ec107af3cb2f385b9617be72af8cf62441d02" + "reference": "56483a7de62a6c2a6635e42e93b8a9e25d4f0ec6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/709ec107af3cb2f385b9617be72af8cf62441d02", - "reference": "709ec107af3cb2f385b9617be72af8cf62441d02", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/56483a7de62a6c2a6635e42e93b8a9e25d4f0ec6", + "reference": "56483a7de62a6c2a6635e42e93b8a9e25d4f0ec6", "shasum": "" }, "require": { @@ -153,7 +155,7 @@ "ext-mcrypt": "Install the Mcrypt extension in order to speed up a few other cryptographic operations.", "ext-openssl": "Install the OpenSSL extension in order to speed up a wide variety of cryptographic operations." }, - "time": "2024-12-14T21:12:59+00:00", + "time": "2025-06-26T16:29:55+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -218,7 +220,7 @@ ], "support": { "issues": "https://github.com/phpseclib/phpseclib/issues", - "source": "https://github.com/phpseclib/phpseclib/tree/3.0.43" + "source": "https://github.com/phpseclib/phpseclib/tree/3.0.46" }, "funding": [ { @@ -238,17 +240,17 @@ }, { "name": "unzerdev/php-sdk", - "version": "3.11.0", - "version_normalized": "3.11.0.0", + "version": "3.13.1", + "version_normalized": "3.13.1.0", "source": { "type": "git", "url": "https://github.com/unzerdev/php-sdk.git", - "reference": "274650b6120b8665c8867627210cd8adab65406b" + "reference": "0a26d70b33185d52e49b06cb500a6e01bb6f1087" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/unzerdev/php-sdk/zipball/274650b6120b8665c8867627210cd8adab65406b", - "reference": "274650b6120b8665c8867627210cd8adab65406b", + "url": "https://api.github.com/repos/unzerdev/php-sdk/zipball/0a26d70b33185d52e49b06cb500a6e01bb6f1087", + "reference": "0a26d70b33185d52e49b06cb500a6e01bb6f1087", "shasum": "" }, "require": { @@ -262,7 +264,7 @@ "suggest": { "ext-curl": "*" }, - "time": "2024-12-04T08:14:47+00:00", + "time": "2025-09-23T14:21:50+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -278,7 +280,7 @@ "description": "This is the php sdk to connect to the Unzer rest API.", "support": { "email": "support@unzer.com", - "source": "https://github.com/unzerdev/php-sdk/tree/3.11.0" + "source": "https://github.com/unzerdev/php-sdk/tree/3.13.1" }, "install-path": "../unzerdev/php-sdk" } diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index 4521064..07f5e42 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -1,9 +1,9 @@ array( 'name' => 's360/s360_unzer_shop5', - 'pretty_version' => 'dev-master', - 'version' => 'dev-master', - 'reference' => 'dbc2aa7d6bf36b6c68fe0e57fa9f776e52ebe65f', + 'pretty_version' => 'dev-develop', + 'version' => 'dev-develop', + 'reference' => '7003c4acea1ff6298834f293122048fcffe8814b', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -11,9 +11,9 @@ ), 'versions' => array( 'paragonie/constant_time_encoding' => array( - 'pretty_version' => 'v3.0.0', - 'version' => '3.0.0.0', - 'reference' => 'df1e7fde177501eee2037dd159cf04f5f301a512', + 'pretty_version' => 'v3.1.3', + 'version' => '3.1.3.0', + 'reference' => 'd5b01a39b3415c2cd581d3bd3a3575c1ebbd8e77', 'type' => 'library', 'install_path' => __DIR__ . '/../paragonie/constant_time_encoding', 'aliases' => array(), @@ -29,27 +29,27 @@ 'dev_requirement' => false, ), 'phpseclib/phpseclib' => array( - 'pretty_version' => '3.0.43', - 'version' => '3.0.43.0', - 'reference' => '709ec107af3cb2f385b9617be72af8cf62441d02', + 'pretty_version' => '3.0.46', + 'version' => '3.0.46.0', + 'reference' => '56483a7de62a6c2a6635e42e93b8a9e25d4f0ec6', 'type' => 'library', 'install_path' => __DIR__ . '/../phpseclib/phpseclib', 'aliases' => array(), 'dev_requirement' => false, ), 's360/s360_unzer_shop5' => array( - 'pretty_version' => 'dev-master', - 'version' => 'dev-master', - 'reference' => 'dbc2aa7d6bf36b6c68fe0e57fa9f776e52ebe65f', + 'pretty_version' => 'dev-develop', + 'version' => 'dev-develop', + 'reference' => '7003c4acea1ff6298834f293122048fcffe8814b', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), 'dev_requirement' => false, ), 'unzerdev/php-sdk' => array( - 'pretty_version' => '3.11.0', - 'version' => '3.11.0.0', - 'reference' => '274650b6120b8665c8867627210cd8adab65406b', + 'pretty_version' => '3.13.1', + 'version' => '3.13.1.0', + 'reference' => '0a26d70b33185d52e49b06cb500a6e01bb6f1087', 'type' => 'library', 'install_path' => __DIR__ . '/../unzerdev/php-sdk', 'aliases' => array(), diff --git a/vendor/paragonie/constant_time_encoding/composer.json b/vendor/paragonie/constant_time_encoding/composer.json index 5023095..11fad5e 100644 --- a/vendor/paragonie/constant_time_encoding/composer.json +++ b/vendor/paragonie/constant_time_encoding/composer.json @@ -40,8 +40,10 @@ "php": "^8" }, "require-dev": { - "phpunit/phpunit": "^9", - "vimeo/psalm": "^4|^5" + "infection/infection": "^0", + "nikic/php-fuzzer": "^0", + "phpunit/phpunit": "^9|^10|^11", + "vimeo/psalm": "^4|^5|^6" }, "autoload": { "psr-4": { @@ -52,5 +54,14 @@ "psr-4": { "ParagonIE\\ConstantTime\\Tests\\": "tests/" } + }, + "scripts": { + "mutation-test": "infection" + }, + "config": { + "process-timeout": 0, + "allow-plugins": { + "infection/extension-installer": true + } } } diff --git a/vendor/paragonie/constant_time_encoding/src/Base32.php b/vendor/paragonie/constant_time_encoding/src/Base32.php index 48d00b9..379552a 100644 --- a/vendor/paragonie/constant_time_encoding/src/Base32.php +++ b/vendor/paragonie/constant_time_encoding/src/Base32.php @@ -3,8 +3,15 @@ namespace ParagonIE\ConstantTime; use InvalidArgumentException; +use Override; use RangeException; +use SensitiveParameter; use TypeError; +use function pack; +use function rtrim; +use function strlen; +use function substr; +use function unpack; /** * Copyright (c) 2016 - 2022 Paragon Initiative Enterprises. @@ -44,8 +51,9 @@ abstract class Base32 implements EncoderInterface * @param bool $strictPadding * @return string */ + #[Override] public static function decode( - #[\SensitiveParameter] + #[SensitiveParameter] string $encodedString, bool $strictPadding = false ): string { @@ -60,7 +68,7 @@ public static function decode( * @return string */ public static function decodeUpper( - #[\SensitiveParameter] + #[SensitiveParameter] string $src, bool $strictPadding = false ): string { @@ -74,8 +82,9 @@ public static function decodeUpper( * @return string * @throws TypeError */ + #[Override] public static function encode( - #[\SensitiveParameter] + #[SensitiveParameter] string $binString ): string { return static::doEncode($binString, false, true); @@ -87,9 +96,10 @@ public static function encode( * @param string $src * @return string * @throws TypeError + * @api */ public static function encodeUnpadded( - #[\SensitiveParameter] + #[SensitiveParameter] string $src ): string { return static::doEncode($src, false, false); @@ -101,9 +111,10 @@ public static function encodeUnpadded( * @param string $src * @return string * @throws TypeError + * @api */ public static function encodeUpper( - #[\SensitiveParameter] + #[SensitiveParameter] string $src ): string { return static::doEncode($src, true, true); @@ -115,9 +126,10 @@ public static function encodeUpper( * @param string $src * @return string * @throws TypeError + * @api */ public static function encodeUpperUnpadded( - #[\SensitiveParameter] + #[SensitiveParameter] string $src ): string { return static::doEncode($src, true, false); @@ -129,6 +141,7 @@ public static function encodeUpperUnpadded( * * @param int $src * @return int + * @api */ protected static function decode5Bits(int $src): int { @@ -151,6 +164,7 @@ protected static function decode5Bits(int $src): int * * @param int $src * @return int + * @api */ protected static function decode5BitsUpper(int $src): int { @@ -171,6 +185,7 @@ protected static function decode5BitsUpper(int $src): int * * @param int $src * @return string + * @api */ protected static function encode5Bits(int $src): string { @@ -179,7 +194,7 @@ protected static function encode5Bits(int $src): string // if ($src > 25) $ret -= 72; $diff -= ((25 - $src) >> 8) & 73; - return \pack('C', $src + $diff); + return pack('C', $src + $diff); } /** @@ -190,6 +205,7 @@ protected static function encode5Bits(int $src): string * * @param int $src * @return string + * @api */ protected static function encode5BitsUpper(int $src): string { @@ -198,20 +214,21 @@ protected static function encode5BitsUpper(int $src): string // if ($src > 25) $ret -= 40; $diff -= ((25 - $src) >> 8) & 41; - return \pack('C', $src + $diff); + return pack('C', $src + $diff); } /** * @param string $encodedString * @param bool $upper * @return string + * @api */ public static function decodeNoPadding( - #[\SensitiveParameter] + #[SensitiveParameter] string $encodedString, bool $upper = false ): string { - $srcLen = Binary::safeStrlen($encodedString); + $srcLen = strlen($encodedString); if ($srcLen === 0) { return ''; } @@ -242,7 +259,7 @@ public static function decodeNoPadding( * @throws TypeError */ protected static function doDecode( - #[\SensitiveParameter] + #[SensitiveParameter] string $src, bool $upper = false, bool $strictPadding = false @@ -253,7 +270,7 @@ protected static function doDecode( : 'decode5Bits'; // Remove padding - $srcLen = Binary::safeStrlen($src); + $srcLen = strlen($src); if ($srcLen === 0) { return ''; } @@ -273,8 +290,8 @@ protected static function doDecode( ); } } else { - $src = \rtrim($src, '='); - $srcLen = Binary::safeStrlen($src); + $src = rtrim($src, '='); + $srcLen = strlen($src); } $err = 0; @@ -282,7 +299,7 @@ protected static function doDecode( // Main loop (no padding): for ($i = 0; $i + 8 <= $srcLen; $i += 8) { /** @var array $chunk */ - $chunk = \unpack('C*', Binary::safeSubstr($src, $i, 8)); + $chunk = unpack('C*', substr($src, $i, 8)); /** @var int $c0 */ $c0 = static::$method($chunk[1]); /** @var int $c1 */ @@ -300,7 +317,7 @@ protected static function doDecode( /** @var int $c7 */ $c7 = static::$method($chunk[8]); - $dest .= \pack( + $dest .= pack( 'CCCCC', (($c0 << 3) | ($c1 >> 2) ) & 0xff, (($c1 << 6) | ($c2 << 1) | ($c3 >> 4)) & 0xff, @@ -313,7 +330,7 @@ protected static function doDecode( // The last chunk, which may have padding: if ($i < $srcLen) { /** @var array $chunk */ - $chunk = \unpack('C*', Binary::safeSubstr($src, $i, $srcLen - $i)); + $chunk = unpack('C*', substr($src, $i, $srcLen - $i)); /** @var int $c0 */ $c0 = static::$method($chunk[1]); @@ -331,7 +348,7 @@ protected static function doDecode( /** @var int $c6 */ $c6 = static::$method($chunk[7]); - $dest .= \pack( + $dest .= pack( 'CCCC', (($c0 << 3) | ($c1 >> 2) ) & 0xff, (($c1 << 6) | ($c2 << 1) | ($c3 >> 4)) & 0xff, @@ -354,7 +371,7 @@ protected static function doDecode( /** @var int $c5 */ $c5 = static::$method($chunk[6]); - $dest .= \pack( + $dest .= pack( 'CCCC', (($c0 << 3) | ($c1 >> 2) ) & 0xff, (($c1 << 6) | ($c2 << 1) | ($c3 >> 4)) & 0xff, @@ -372,7 +389,7 @@ protected static function doDecode( /** @var int $c4 */ $c4 = static::$method($chunk[5]); - $dest .= \pack( + $dest .= pack( 'CCC', (($c0 << 3) | ($c1 >> 2) ) & 0xff, (($c1 << 6) | ($c2 << 1) | ($c3 >> 4)) & 0xff, @@ -390,7 +407,7 @@ protected static function doDecode( /** @var int $c3 */ $c3 = static::$method($chunk[4]); - $dest .= \pack( + $dest .= pack( 'CC', (($c0 << 3) | ($c1 >> 2) ) & 0xff, (($c1 << 6) | ($c2 << 1) | ($c3 >> 4)) & 0xff @@ -405,7 +422,7 @@ protected static function doDecode( /** @var int $c2 */ $c2 = static::$method($chunk[3]); - $dest .= \pack( + $dest .= pack( 'CC', (($c0 << 3) | ($c1 >> 2) ) & 0xff, (($c1 << 6) | ($c2 << 1) ) & 0xff @@ -418,7 +435,7 @@ protected static function doDecode( /** @var int $c1 */ $c1 = static::$method($chunk[2]); - $dest .= \pack( + $dest .= pack( 'C', (($c0 << 3) | ($c1 >> 2) ) & 0xff ); @@ -427,7 +444,7 @@ protected static function doDecode( $err |= ($c1 << 6) & 0xff; } } else { - $dest .= \pack( + $dest .= pack( 'C', (($c0 << 3) ) & 0xff ); @@ -453,10 +470,10 @@ protected static function doDecode( * @throws TypeError */ protected static function doEncode( - #[\SensitiveParameter] + #[SensitiveParameter] string $src, bool $upper = false, - $pad = true + bool $pad = true ): string { // We do this to reduce code duplication: $method = $upper @@ -464,12 +481,12 @@ protected static function doEncode( : 'encode5Bits'; $dest = ''; - $srcLen = Binary::safeStrlen($src); + $srcLen = strlen($src); // Main loop (no padding): for ($i = 0; $i + 5 <= $srcLen; $i += 5) { /** @var array $chunk */ - $chunk = \unpack('C*', Binary::safeSubstr($src, $i, 5)); + $chunk = unpack('C*', substr($src, $i, 5)); $b0 = $chunk[1]; $b1 = $chunk[2]; $b2 = $chunk[3]; @@ -488,7 +505,7 @@ protected static function doEncode( // The last chunk, which may have padding: if ($i < $srcLen) { /** @var array $chunk */ - $chunk = \unpack('C*', Binary::safeSubstr($src, $i, $srcLen - $i)); + $chunk = unpack('C*', substr($src, $i, $srcLen - $i)); $b0 = $chunk[1]; if ($i + 3 < $srcLen) { $b1 = $chunk[2]; diff --git a/vendor/paragonie/constant_time_encoding/src/Base32Hex.php b/vendor/paragonie/constant_time_encoding/src/Base32Hex.php index b868dd0..4323a57 100644 --- a/vendor/paragonie/constant_time_encoding/src/Base32Hex.php +++ b/vendor/paragonie/constant_time_encoding/src/Base32Hex.php @@ -2,6 +2,9 @@ declare(strict_types=1); namespace ParagonIE\ConstantTime; +use Override; +use function pack; + /** * Copyright (c) 2016 - 2022 Paragon Initiative Enterprises. * Copyright (c) 2014 Steve "Sc00bz" Thomas (steve at tobtu dot com) @@ -40,6 +43,7 @@ abstract class Base32Hex extends Base32 * @param int $src * @return int */ + #[Override] protected static function decode5Bits(int $src): int { $ret = -1; @@ -60,6 +64,7 @@ protected static function decode5Bits(int $src): int * @param int $src * @return int */ + #[Override] protected static function decode5BitsUpper(int $src): int { $ret = -1; @@ -80,6 +85,7 @@ protected static function decode5BitsUpper(int $src): int * @param int $src * @return string */ + #[Override] protected static function encode5Bits(int $src): string { $src += 0x30; @@ -87,7 +93,7 @@ protected static function encode5Bits(int $src): string // if ($src > 0x39) $src += 0x61 - 0x3a; // 39 $src += ((0x39 - $src) >> 8) & 39; - return \pack('C', $src); + return pack('C', $src); } /** @@ -99,6 +105,7 @@ protected static function encode5Bits(int $src): string * @param int $src * @return string */ + #[Override] protected static function encode5BitsUpper(int $src): string { $src += 0x30; @@ -106,6 +113,6 @@ protected static function encode5BitsUpper(int $src): string // if ($src > 0x39) $src += 0x41 - 0x3a; // 7 $src += ((0x39 - $src) >> 8) & 7; - return \pack('C', $src); + return pack('C', $src); } } \ No newline at end of file diff --git a/vendor/paragonie/constant_time_encoding/src/Base64.php b/vendor/paragonie/constant_time_encoding/src/Base64.php index 2e3ecc8..9679748 100644 --- a/vendor/paragonie/constant_time_encoding/src/Base64.php +++ b/vendor/paragonie/constant_time_encoding/src/Base64.php @@ -3,8 +3,23 @@ namespace ParagonIE\ConstantTime; use InvalidArgumentException; +use Override; use RangeException; +use SensitiveParameter; +use SodiumException; use TypeError; +use function extension_loaded; +use function pack; +use function rtrim; +use function sodium_base642bin; +use function sodium_bin2base64; +use function strlen; +use function substr; +use function unpack; +use const SODIUM_BASE64_VARIANT_ORIGINAL; +use const SODIUM_BASE64_VARIANT_ORIGINAL_NO_PADDING; +use const SODIUM_BASE64_VARIANT_URLSAFE; +use const SODIUM_BASE64_VARIANT_URLSAFE_NO_PADDING; /** * Copyright (c) 2016 - 2022 Paragon Initiative Enterprises. @@ -47,10 +62,25 @@ abstract class Base64 implements EncoderInterface * * @throws TypeError */ + #[Override] public static function encode( - #[\SensitiveParameter] + #[SensitiveParameter] string $binString ): string { + if (extension_loaded('sodium')) { + $variant = match(static::class) { + Base64::class => SODIUM_BASE64_VARIANT_ORIGINAL, + Base64UrlSafe::class => SODIUM_BASE64_VARIANT_URLSAFE, + default => 0, + }; + if ($variant > 0) { + try { + return sodium_bin2base64($binString, $variant); + } catch (SodiumException $ex) { + throw new RangeException($ex->getMessage(), $ex->getCode(), $ex); + } + } + } return static::doEncode($binString, true); } @@ -63,11 +93,26 @@ public static function encode( * @return string * * @throws TypeError + * @api */ public static function encodeUnpadded( - #[\SensitiveParameter] + #[SensitiveParameter] string $src ): string { + if (extension_loaded('sodium')) { + $variant = match(static::class) { + Base64::class => SODIUM_BASE64_VARIANT_ORIGINAL_NO_PADDING, + Base64UrlSafe::class => SODIUM_BASE64_VARIANT_URLSAFE_NO_PADDING, + default => 0, + }; + if ($variant > 0) { + try { + return sodium_bin2base64($src, $variant); + } catch (SodiumException $ex) { + throw new RangeException($ex->getMessage(), $ex->getCode(), $ex); + } + } + } return static::doEncode($src, false); } @@ -79,16 +124,16 @@ public static function encodeUnpadded( * @throws TypeError */ protected static function doEncode( - #[\SensitiveParameter] + #[SensitiveParameter] string $src, bool $pad = true ): string { $dest = ''; - $srcLen = Binary::safeStrlen($src); + $srcLen = strlen($src); // Main loop (no padding): for ($i = 0; $i + 3 <= $srcLen; $i += 3) { /** @var array $chunk */ - $chunk = \unpack('C*', Binary::safeSubstr($src, $i, 3)); + $chunk = unpack('C*', substr($src, $i, 3)); $b0 = $chunk[1]; $b1 = $chunk[2]; $b2 = $chunk[3]; @@ -102,7 +147,7 @@ protected static function doEncode( // The last chunk, which may have padding: if ($i < $srcLen) { /** @var array $chunk */ - $chunk = \unpack('C*', Binary::safeSubstr($src, $i, $srcLen - $i)); + $chunk = unpack('C*', substr($src, $i, $srcLen - $i)); $b0 = $chunk[1]; if ($i + 1 < $srcLen) { $b1 = $chunk[2]; @@ -137,13 +182,14 @@ protected static function doEncode( * @throws RangeException * @throws TypeError */ + #[Override] public static function decode( - #[\SensitiveParameter] + #[SensitiveParameter] string $encodedString, bool $strictPadding = false ): string { // Remove padding - $srcLen = Binary::safeStrlen($encodedString); + $srcLen = strlen($encodedString); if ($srcLen === 0) { return ''; } @@ -167,9 +213,24 @@ public static function decode( 'Incorrect padding' ); } + if (extension_loaded('sodium')) { + $variant = match(static::class) { + Base64::class => SODIUM_BASE64_VARIANT_ORIGINAL_NO_PADDING, + Base64UrlSafe::class => SODIUM_BASE64_VARIANT_URLSAFE_NO_PADDING, + default => 0, + }; + if ($variant > 0) { + try { + return sodium_base642bin(substr($encodedString, 0, $srcLen), $variant); + } catch (SodiumException $ex) { + throw new RangeException($ex->getMessage(), $ex->getCode(), $ex); + } + } + } } else { - $encodedString = \rtrim($encodedString, '='); - $srcLen = Binary::safeStrlen($encodedString); + // Just remove all padding. + $encodedString = rtrim($encodedString, '='); + $srcLen = strlen($encodedString); } $err = 0; @@ -177,13 +238,13 @@ public static function decode( // Main loop (no padding): for ($i = 0; $i + 4 <= $srcLen; $i += 4) { /** @var array $chunk */ - $chunk = \unpack('C*', Binary::safeSubstr($encodedString, $i, 4)); + $chunk = unpack('C*', substr($encodedString, $i, 4)); $c0 = static::decode6Bits($chunk[1]); $c1 = static::decode6Bits($chunk[2]); $c2 = static::decode6Bits($chunk[3]); $c3 = static::decode6Bits($chunk[4]); - $dest .= \pack( + $dest .= pack( 'CCC', ((($c0 << 2) | ($c1 >> 4)) & 0xff), ((($c1 << 4) | ($c2 >> 2)) & 0xff), @@ -194,13 +255,13 @@ public static function decode( // The last chunk, which may have padding: if ($i < $srcLen) { /** @var array $chunk */ - $chunk = \unpack('C*', Binary::safeSubstr($encodedString, $i, $srcLen - $i)); + $chunk = unpack('C*', substr($encodedString, $i, $srcLen - $i)); $c0 = static::decode6Bits($chunk[1]); if ($i + 2 < $srcLen) { $c1 = static::decode6Bits($chunk[2]); $c2 = static::decode6Bits($chunk[3]); - $dest .= \pack( + $dest .= pack( 'CC', ((($c0 << 2) | ($c1 >> 4)) & 0xff), ((($c1 << 4) | ($c2 >> 2)) & 0xff) @@ -211,7 +272,7 @@ public static function decode( } } elseif ($i + 1 < $srcLen) { $c1 = static::decode6Bits($chunk[2]); - $dest .= \pack( + $dest .= pack( 'C', ((($c0 << 2) | ($c1 >> 4)) & 0xff) ); @@ -235,12 +296,13 @@ public static function decode( /** * @param string $encodedString * @return string + * @api */ public static function decodeNoPadding( - #[\SensitiveParameter] + #[SensitiveParameter] string $encodedString ): string { - $srcLen = Binary::safeStrlen($encodedString); + $srcLen = strlen($encodedString); if ($srcLen === 0) { return ''; } @@ -314,6 +376,6 @@ protected static function encode6Bits(int $src): string // if ($src > 62) $diff += 0x2f - 0x2b - 1; // 3 $diff += ((62 - $src) >> 8) & 3; - return \pack('C', $src + $diff); + return pack('C', $src + $diff); } } diff --git a/vendor/paragonie/constant_time_encoding/src/Base64DotSlash.php b/vendor/paragonie/constant_time_encoding/src/Base64DotSlash.php index 5e98a8f..8477517 100644 --- a/vendor/paragonie/constant_time_encoding/src/Base64DotSlash.php +++ b/vendor/paragonie/constant_time_encoding/src/Base64DotSlash.php @@ -2,6 +2,8 @@ declare(strict_types=1); namespace ParagonIE\ConstantTime; +use Override; + /** * Copyright (c) 2016 - 2022 Paragon Initiative Enterprises. * Copyright (c) 2014 Steve "Sc00bz" Thomas (steve at tobtu dot com) @@ -44,6 +46,7 @@ abstract class Base64DotSlash extends Base64 * @param int $src * @return int */ + #[Override] protected static function decode6Bits(int $src): int { $ret = -1; @@ -70,6 +73,7 @@ protected static function decode6Bits(int $src): int * @param int $src * @return string */ + #[Override] protected static function encode6Bits(int $src): string { $src += 0x2e; diff --git a/vendor/paragonie/constant_time_encoding/src/Base64DotSlashOrdered.php b/vendor/paragonie/constant_time_encoding/src/Base64DotSlashOrdered.php index 9780b14..2c42db3 100644 --- a/vendor/paragonie/constant_time_encoding/src/Base64DotSlashOrdered.php +++ b/vendor/paragonie/constant_time_encoding/src/Base64DotSlashOrdered.php @@ -2,6 +2,8 @@ declare(strict_types=1); namespace ParagonIE\ConstantTime; +use Override; + /** * Copyright (c) 2016 - 2022 Paragon Initiative Enterprises. * Copyright (c) 2014 Steve "Sc00bz" Thomas (steve at tobtu dot com) @@ -44,6 +46,7 @@ abstract class Base64DotSlashOrdered extends Base64 * @param int $src * @return int */ + #[Override] protected static function decode6Bits(int $src): int { $ret = -1; @@ -67,6 +70,7 @@ protected static function decode6Bits(int $src): int * @param int $src * @return string */ + #[Override] protected static function encode6Bits(int $src): string { $src += 0x2e; diff --git a/vendor/paragonie/constant_time_encoding/src/Base64UrlSafe.php b/vendor/paragonie/constant_time_encoding/src/Base64UrlSafe.php index 8192c63..845aaf6 100644 --- a/vendor/paragonie/constant_time_encoding/src/Base64UrlSafe.php +++ b/vendor/paragonie/constant_time_encoding/src/Base64UrlSafe.php @@ -2,6 +2,8 @@ declare(strict_types=1); namespace ParagonIE\ConstantTime; +use Override; + /** * Copyright (c) 2016 - 2022 Paragon Initiative Enterprises. * Copyright (c) 2014 Steve "Sc00bz" Thomas (steve at tobtu dot com) @@ -45,6 +47,7 @@ abstract class Base64UrlSafe extends Base64 * @param int $src * @return int */ + #[Override] protected static function decode6Bits(int $src): int { $ret = -1; @@ -74,6 +77,7 @@ protected static function decode6Bits(int $src): int * @param int $src * @return string */ + #[Override] protected static function encode6Bits(int $src): string { $diff = 0x41; diff --git a/vendor/paragonie/constant_time_encoding/src/Binary.php b/vendor/paragonie/constant_time_encoding/src/Binary.php index a958f2f..3695844 100644 --- a/vendor/paragonie/constant_time_encoding/src/Binary.php +++ b/vendor/paragonie/constant_time_encoding/src/Binary.php @@ -2,7 +2,10 @@ declare(strict_types=1); namespace ParagonIE\ConstantTime; +use SensitiveParameter; use TypeError; +use function strlen; +use function substr; /** * Copyright (c) 2016 - 2022 Paragon Initiative Enterprises. @@ -46,16 +49,10 @@ abstract class Binary * @return int */ public static function safeStrlen( - #[\SensitiveParameter] + #[SensitiveParameter] string $str ): int { - if (\function_exists('mb_strlen')) { - // mb_strlen in PHP 7.x can return false. - /** @psalm-suppress RedundantCast */ - return (int) \mb_strlen($str, '8bit'); - } else { - return \strlen($str); - } + return strlen($str); } /** @@ -72,7 +69,7 @@ public static function safeStrlen( * @throws TypeError */ public static function safeSubstr( - #[\SensitiveParameter] + #[SensitiveParameter] string $str, int $start = 0, ?int $length = null @@ -80,14 +77,11 @@ public static function safeSubstr( if ($length === 0) { return ''; } - if (\function_exists('mb_substr')) { - return \mb_substr($str, $start, $length, '8bit'); - } // Unlike mb_substr(), substr() doesn't accept NULL for length if ($length !== null) { - return \substr($str, $start, $length); + return substr($str, $start, $length); } else { - return \substr($str, $start); + return substr($str, $start); } } } diff --git a/vendor/paragonie/constant_time_encoding/src/EncoderInterface.php b/vendor/paragonie/constant_time_encoding/src/EncoderInterface.php index 9cafbf9..cb358ea 100644 --- a/vendor/paragonie/constant_time_encoding/src/EncoderInterface.php +++ b/vendor/paragonie/constant_time_encoding/src/EncoderInterface.php @@ -2,6 +2,8 @@ declare(strict_types=1); namespace ParagonIE\ConstantTime; +use SensitiveParameter; + /** * Copyright (c) 2016 - 2022 Paragon Initiative Enterprises. * Copyright (c) 2014 Steve "Sc00bz" Thomas (steve at tobtu dot com) @@ -38,7 +40,10 @@ interface EncoderInterface * @param string $binString (raw binary) * @return string */ - public static function encode(string $binString): string; + public static function encode( + #[SensitiveParameter] + string $binString + ): string; /** * Convert a binary string into a hexadecimal string without cache-timing @@ -48,5 +53,9 @@ public static function encode(string $binString): string; * @param bool $strictPadding Error on invalid padding * @return string (raw binary) */ - public static function decode(string $encodedString, bool $strictPadding = false): string; + public static function decode( + #[SensitiveParameter] + string $encodedString, + bool $strictPadding = false + ): string; } diff --git a/vendor/paragonie/constant_time_encoding/src/Encoding.php b/vendor/paragonie/constant_time_encoding/src/Encoding.php index 8b7e387..b28a501 100644 --- a/vendor/paragonie/constant_time_encoding/src/Encoding.php +++ b/vendor/paragonie/constant_time_encoding/src/Encoding.php @@ -2,6 +2,8 @@ declare(strict_types=1); namespace ParagonIE\ConstantTime; +use RangeException; +use SensitiveParameter; use TypeError; /** @@ -30,6 +32,7 @@ /** * Class Encoding * @package ParagonIE\ConstantTime + * @api */ abstract class Encoding { @@ -41,7 +44,7 @@ abstract class Encoding * @throws TypeError */ public static function base32Encode( - #[\SensitiveParameter] + #[SensitiveParameter] string $str ): string { return Base32::encode($str); @@ -55,7 +58,7 @@ public static function base32Encode( * @throws TypeError */ public static function base32EncodeUpper( - #[\SensitiveParameter] + #[SensitiveParameter] string $str ): string { return Base32::encodeUpper($str); @@ -69,7 +72,7 @@ public static function base32EncodeUpper( * @throws TypeError */ public static function base32Decode( - #[\SensitiveParameter] + #[SensitiveParameter] string $str ): string { return Base32::decode($str); @@ -83,7 +86,7 @@ public static function base32Decode( * @throws TypeError */ public static function base32DecodeUpper( - #[\SensitiveParameter] + #[SensitiveParameter] string $str ): string { return Base32::decodeUpper($str); @@ -97,7 +100,7 @@ public static function base32DecodeUpper( * @throws TypeError */ public static function base32HexEncode( - #[\SensitiveParameter] + #[SensitiveParameter] string $str ): string { return Base32Hex::encode($str); @@ -111,7 +114,7 @@ public static function base32HexEncode( * @throws TypeError */ public static function base32HexEncodeUpper( - #[\SensitiveParameter] + #[SensitiveParameter] string $str ): string { return Base32Hex::encodeUpper($str); @@ -125,7 +128,7 @@ public static function base32HexEncodeUpper( * @throws TypeError */ public static function base32HexDecode( - #[\SensitiveParameter] + #[SensitiveParameter] string $str ): string { return Base32Hex::decode($str); @@ -139,7 +142,7 @@ public static function base32HexDecode( * @throws TypeError */ public static function base32HexDecodeUpper( - #[\SensitiveParameter] + #[SensitiveParameter] string $str ): string { return Base32Hex::decodeUpper($str); @@ -153,7 +156,7 @@ public static function base32HexDecodeUpper( * @throws TypeError */ public static function base64Encode( - #[\SensitiveParameter] + #[SensitiveParameter] string $str ): string { return Base64::encode($str); @@ -167,7 +170,7 @@ public static function base64Encode( * @throws TypeError */ public static function base64Decode( - #[\SensitiveParameter] + #[SensitiveParameter] string $str ): string { return Base64::decode($str); @@ -182,7 +185,7 @@ public static function base64Decode( * @throws TypeError */ public static function base64EncodeDotSlash( - #[\SensitiveParameter] + #[SensitiveParameter] string $str ): string { return Base64DotSlash::encode($str); @@ -195,11 +198,11 @@ public static function base64EncodeDotSlash( * * @param string $str * @return string - * @throws \RangeException + * @throws RangeException * @throws TypeError */ public static function base64DecodeDotSlash( - #[\SensitiveParameter] + #[SensitiveParameter] string $str ): string { return Base64DotSlash::decode($str); @@ -214,7 +217,7 @@ public static function base64DecodeDotSlash( * @throws TypeError */ public static function base64EncodeDotSlashOrdered( - #[\SensitiveParameter] + #[SensitiveParameter] string $str ): string { return Base64DotSlashOrdered::encode($str); @@ -227,11 +230,11 @@ public static function base64EncodeDotSlashOrdered( * * @param string $str * @return string - * @throws \RangeException + * @throws RangeException * @throws TypeError */ public static function base64DecodeDotSlashOrdered( - #[\SensitiveParameter] + #[SensitiveParameter] string $str ): string { return Base64DotSlashOrdered::decode($str); @@ -246,7 +249,7 @@ public static function base64DecodeDotSlashOrdered( * @throws TypeError */ public static function hexEncode( - #[\SensitiveParameter] + #[SensitiveParameter] string $bin_string ): string { return Hex::encode($bin_string); @@ -258,10 +261,10 @@ public static function hexEncode( * * @param string $hex_string * @return string (raw binary) - * @throws \RangeException + * @throws RangeException */ public static function hexDecode( - #[\SensitiveParameter] + #[SensitiveParameter] string $hex_string ): string { return Hex::decode($hex_string); @@ -276,7 +279,7 @@ public static function hexDecode( * @throws TypeError */ public static function hexEncodeUpper( - #[\SensitiveParameter] + #[SensitiveParameter] string $bin_string ): string { return Hex::encodeUpper($bin_string); @@ -290,7 +293,7 @@ public static function hexEncodeUpper( * @return string */ public static function hexDecodeUpper( - #[\SensitiveParameter] + #[SensitiveParameter] string $bin_string ): string { return Hex::decode($bin_string); diff --git a/vendor/paragonie/constant_time_encoding/src/Hex.php b/vendor/paragonie/constant_time_encoding/src/Hex.php index 97c2046..b515b97 100644 --- a/vendor/paragonie/constant_time_encoding/src/Hex.php +++ b/vendor/paragonie/constant_time_encoding/src/Hex.php @@ -2,11 +2,20 @@ declare(strict_types=1); namespace ParagonIE\ConstantTime; +use Override; use RangeException; +use SensitiveParameter; +use SodiumException; use TypeError; +use function extension_loaded; +use function pack; +use function sodium_bin2hex; +use function sodium_hex2bin; +use function strlen; +use function unpack; /** - * Copyright (c) 2016 - 2022 Paragon Initiative Enterprises. + * Copyright (c) 2016 - 2025 Paragon Initiative Enterprises. * Copyright (c) 2014 Steve "Sc00bz" Thomas (steve at tobtu dot com) * * Permission is hereby granted, free of charge, to any person obtaining a copy @@ -42,19 +51,27 @@ abstract class Hex implements EncoderInterface * @return string * @throws TypeError */ + #[Override] public static function encode( - #[\SensitiveParameter] + #[SensitiveParameter] string $binString ): string { + if (extension_loaded('sodium')) { + try { + return sodium_bin2hex($binString); + } catch (SodiumException $ex) { + throw new RangeException($ex->getMessage(), $ex->getCode(), $ex); + } + } $hex = ''; - $len = Binary::safeStrlen($binString); + $len = strlen($binString); for ($i = 0; $i < $len; ++$i) { /** @var array $chunk */ - $chunk = \unpack('C', $binString[$i]); + $chunk = unpack('C', $binString[$i]); $c = $chunk[1] & 0xf; $b = $chunk[1] >> 4; - $hex .= \pack( + $hex .= pack( 'CC', (87 + $b + ((($b - 10) >> 8) & ~38)), (87 + $c + ((($c - 10) >> 8) & ~38)) @@ -72,19 +89,19 @@ public static function encode( * @throws TypeError */ public static function encodeUpper( - #[\SensitiveParameter] + #[SensitiveParameter] string $binString ): string { $hex = ''; - $len = Binary::safeStrlen($binString); + $len = strlen($binString); for ($i = 0; $i < $len; ++$i) { /** @var array $chunk */ - $chunk = \unpack('C', $binString[$i]); + $chunk = unpack('C', $binString[$i]); $c = $chunk[1] & 0xf; $b = $chunk[1] >> 4; - $hex .= \pack( + $hex .= pack( 'CC', (55 + $b + ((($b - 10) >> 8) & ~6)), (55 + $c + ((($c - 10) >> 8) & ~6)) @@ -102,15 +119,23 @@ public static function encodeUpper( * @return string (raw binary) * @throws RangeException */ + #[Override] public static function decode( - #[\SensitiveParameter] + #[SensitiveParameter] string $encodedString, bool $strictPadding = false ): string { + if (extension_loaded('sodium') && $strictPadding) { + try { + return sodium_hex2bin($encodedString); + } catch (SodiumException $ex) { + throw new RangeException($ex->getMessage(), $ex->getCode(), $ex); + } + } $hex_pos = 0; $bin = ''; $c_acc = 0; - $hex_len = Binary::safeStrlen($encodedString); + $hex_len = strlen($encodedString); $state = 0; if (($hex_len & 1) !== 0) { if ($strictPadding) { @@ -124,7 +149,7 @@ public static function decode( } /** @var array $chunk */ - $chunk = \unpack('C*', $encodedString); + $chunk = unpack('C*', $encodedString); while ($hex_pos < $hex_len) { ++$hex_pos; $c = $chunk[$hex_pos]; @@ -142,7 +167,7 @@ public static function decode( if ($state === 0) { $c_acc = $c_val * 16; } else { - $bin .= \pack('C', $c_acc | $c_val); + $bin .= pack('C', $c_acc | $c_val); } $state ^= 1; } diff --git a/vendor/paragonie/constant_time_encoding/src/RFC4648.php b/vendor/paragonie/constant_time_encoding/src/RFC4648.php index 7cd2e99..fb66f73 100644 --- a/vendor/paragonie/constant_time_encoding/src/RFC4648.php +++ b/vendor/paragonie/constant_time_encoding/src/RFC4648.php @@ -2,6 +2,7 @@ declare(strict_types=1); namespace ParagonIE\ConstantTime; +use SensitiveParameter; use TypeError; /** @@ -33,6 +34,7 @@ * This class conforms strictly to the RFC * * @package ParagonIE\ConstantTime + * @api */ abstract class RFC4648 { @@ -47,7 +49,7 @@ abstract class RFC4648 * @throws TypeError */ public static function base64Encode( - #[\SensitiveParameter] + #[SensitiveParameter] string $str ): string { return Base64::encode($str); @@ -64,7 +66,7 @@ public static function base64Encode( * @throws TypeError */ public static function base64Decode( - #[\SensitiveParameter] + #[SensitiveParameter] string $str ): string { return Base64::decode($str, true); @@ -81,7 +83,7 @@ public static function base64Decode( * @throws TypeError */ public static function base64UrlSafeEncode( - #[\SensitiveParameter] + #[SensitiveParameter] string $str ): string { return Base64UrlSafe::encode($str); @@ -98,7 +100,7 @@ public static function base64UrlSafeEncode( * @throws TypeError */ public static function base64UrlSafeDecode( - #[\SensitiveParameter] + #[SensitiveParameter] string $str ): string { return Base64UrlSafe::decode($str, true); @@ -115,7 +117,7 @@ public static function base64UrlSafeDecode( * @throws TypeError */ public static function base32Encode( - #[\SensitiveParameter] + #[SensitiveParameter] string $str ): string { return Base32::encodeUpper($str); @@ -132,7 +134,7 @@ public static function base32Encode( * @throws TypeError */ public static function base32Decode( - #[\SensitiveParameter] + #[SensitiveParameter] string $str ): string { return Base32::decodeUpper($str, true); @@ -149,7 +151,7 @@ public static function base32Decode( * @throws TypeError */ public static function base32HexEncode( - #[\SensitiveParameter] + #[SensitiveParameter] string $str ): string { return Base32::encodeUpper($str); @@ -166,7 +168,7 @@ public static function base32HexEncode( * @throws TypeError */ public static function base32HexDecode( - #[\SensitiveParameter] + #[SensitiveParameter] string $str ): string { return Base32::decodeUpper($str, true); @@ -183,7 +185,7 @@ public static function base32HexDecode( * @throws TypeError */ public static function base16Encode( - #[\SensitiveParameter] + #[SensitiveParameter] string $str ): string { return Hex::encodeUpper($str); @@ -198,7 +200,7 @@ public static function base16Encode( * @return string */ public static function base16Decode( - #[\SensitiveParameter] + #[SensitiveParameter] string $str ): string { return Hex::decode($str, true); diff --git a/vendor/phpseclib/phpseclib/phpseclib/Common/Functions/Strings.php b/vendor/phpseclib/phpseclib/phpseclib/Common/Functions/Strings.php index fa750ba..ad8f63b 100644 --- a/vendor/phpseclib/phpseclib/phpseclib/Common/Functions/Strings.php +++ b/vendor/phpseclib/phpseclib/phpseclib/Common/Functions/Strings.php @@ -126,7 +126,9 @@ public static function unpackSSH2($format, &$data) // 64-bit floats can be used to get larger numbers then 32-bit signed ints would allow // for. sure, you're not gonna get the full precision of 64-bit numbers but just because // you need > 32-bit precision doesn't mean you need the full 64-bit precision - extract(unpack('Nupper/Nlower', self::shift($data, 8))); + $unpacked = unpack('Nupper/Nlower', self::shift($data, 8)); + $upper = $unpacked['upper']; + $lower = $unpacked['lower']; $temp = $upper ? 4294967296 * $upper : 0; $temp += $lower < 0 ? ($lower & 0x7FFFFFFFF) + 0x80000000 : $lower; // $temp = hexdec(bin2hex(self::shift($data, 8))); diff --git a/vendor/phpseclib/phpseclib/phpseclib/Crypt/Blowfish.php b/vendor/phpseclib/phpseclib/phpseclib/Crypt/Blowfish.php index 3cb2b30..998cf8b 100644 --- a/vendor/phpseclib/phpseclib/phpseclib/Crypt/Blowfish.php +++ b/vendor/phpseclib/phpseclib/phpseclib/Crypt/Blowfish.php @@ -129,7 +129,7 @@ class Blowfish extends BlockCipher /** * Block Length of the cipher * - * @see \phpseclib3\Crypt\Common\SymmetricKey::block_size + * @see Common\SymmetricKey::block_size * @var int */ protected $block_size = 8; @@ -137,7 +137,7 @@ class Blowfish extends BlockCipher /** * The mcrypt specific name of the cipher * - * @see \phpseclib3\Crypt\Common\SymmetricKey::cipher_name_mcrypt + * @see Common\SymmetricKey::cipher_name_mcrypt * @var string */ protected $cipher_name_mcrypt = 'blowfish'; @@ -145,7 +145,7 @@ class Blowfish extends BlockCipher /** * Optimizing value while CFB-encrypting * - * @see \phpseclib3\Crypt\Common\SymmetricKey::cfb_init_len + * @see Common\SymmetricKey::cfb_init_len * @var int */ protected $cfb_init_len = 500; @@ -325,7 +325,7 @@ class Blowfish extends BlockCipher * derive this from $key_length or vice versa, but that'd mean we'd have to do multiple shift operations, so in lieu * of that, we'll just precompute it once.} * - * @see \phpseclib3\Crypt\Common\SymmetricKey::setKeyLength() + * @see Common\SymmetricKey::setKeyLength() * @var int */ protected $key_length = 16; @@ -368,7 +368,7 @@ public function setKeyLength($length) * * This is mainly just a wrapper to set things up for \phpseclib3\Crypt\Common\SymmetricKey::isValidEngine() * - * @see \phpseclib3\Crypt\Common\SymmetricKey::isValidEngine() + * @see Common\SymmetricKey::isValidEngine() * @param int $engine * @return bool */ @@ -394,7 +394,7 @@ protected function isValidEngineHelper($engine) /** * Setup the key (expansion) * - * @see \phpseclib3\Crypt\Common\SymmetricKey::_setupKey() + * @see Common\SymmetricKey::_setupKey() */ protected function setupKey() { @@ -755,7 +755,7 @@ protected function decryptBlock($in) /** * Setup the performance-optimized function for de/encrypt() * - * @see \phpseclib3\Crypt\Common\SymmetricKey::_setupInlineCrypt() + * @see Common\SymmetricKey::_setupInlineCrypt() */ protected function setupInlineCrypt() { diff --git a/vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/Formats/Keys/JWK.php b/vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/Formats/Keys/JWK.php index 4c761b8..98b8dac 100644 --- a/vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/Formats/Keys/JWK.php +++ b/vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/Formats/Keys/JWK.php @@ -50,6 +50,14 @@ public static function load($key, $password = '') return $key; } + if (!is_object($key)) { + throw new \RuntimeException('invalid JWK: not an object'); + } + + if (!isset($key->keys)) { + throw new \RuntimeException('invalid JWK: object has no property "keys"'); + } + if (count($key->keys) != 1) { throw new \RuntimeException('Although the JWK key format supports multiple keys phpseclib does not'); } diff --git a/vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/Formats/Keys/PKCS8.php b/vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/Formats/Keys/PKCS8.php index 6c9a650..2211a87 100644 --- a/vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/Formats/Keys/PKCS8.php +++ b/vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/Formats/Keys/PKCS8.php @@ -361,7 +361,9 @@ protected static function load($key, $password = '') if (!$temp) { throw new \RuntimeException('Unable to decode BER'); } - extract(ASN1::asn1map($temp[0], Maps\PBEParameter::MAP)); + $map = ASN1::asn1map($temp[0], Maps\PBEParameter::MAP); + $salt = $map['salt']; + $iterationCount = $map['iterationCount']; $iterationCount = (int) $iterationCount->toString(); $cipher->setPassword($password, $kdf, $hash, $salt, $iterationCount); $key = $cipher->decrypt($decrypted['encryptedData']); @@ -379,7 +381,8 @@ protected static function load($key, $password = '') throw new \RuntimeException('Unable to decode BER'); } $temp = ASN1::asn1map($temp[0], Maps\PBES2params::MAP); - extract($temp); + $keyDerivationFunc = $temp['keyDerivationFunc']; + $encryptionScheme = $temp['encryptionScheme']; $cipher = self::getPBES2EncryptionObject($encryptionScheme['algorithm']); $meta['meta']['cipher'] = $encryptionScheme['algorithm']; @@ -389,7 +392,8 @@ protected static function load($key, $password = '') throw new \RuntimeException('Unable to decode BER'); } $temp = ASN1::asn1map($temp[0], Maps\PBES2params::MAP); - extract($temp); + $keyDerivationFunc = $temp['keyDerivationFunc']; + $encryptionScheme = $temp['encryptionScheme']; if (!$cipher instanceof RC2) { $cipher->setIV($encryptionScheme['parameters']['octetString']); @@ -398,7 +402,9 @@ protected static function load($key, $password = '') if (!$temp) { throw new \RuntimeException('Unable to decode BER'); } - extract(ASN1::asn1map($temp[0], Maps\RC2CBCParameter::MAP)); + $map = ASN1::asn1map($temp[0], Maps\RC2CBCParameter::MAP); + $rc2ParametersVersion = $map['rc2ParametersVersion']; + $iv = $map['iv']; $effectiveKeyLength = (int) $rc2ParametersVersion->toString(); switch ($effectiveKeyLength) { case 160: @@ -423,9 +429,13 @@ protected static function load($key, $password = '') if (!$temp) { throw new \RuntimeException('Unable to decode BER'); } - $prf = ['algorithm' => 'id-hmacWithSHA1']; $params = ASN1::asn1map($temp[0], Maps\PBKDF2params::MAP); - extract($params); + if (empty($params['prf'])) { + $params['prf'] = ['algorithm' => 'id-hmacWithSHA1']; + } + $salt = $params['salt']; + $iterationCount = $params['iterationCount']; + $prf = $params['prf']; $meta['meta']['prf'] = $prf['algorithm']; $hash = str_replace('-', '/', substr($prf['algorithm'], 11)); $params = [ diff --git a/vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/Formats/Keys/PuTTY.php b/vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/Formats/Keys/PuTTY.php index 85da83a..ff4a95a 100644 --- a/vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/Formats/Keys/PuTTY.php +++ b/vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/Formats/Keys/PuTTY.php @@ -199,7 +199,7 @@ public static function load($key, $password) $source = Strings::packSSH2('ssss', $type, $encryption, $components['comment'], $public); - extract(unpack('Nlength', Strings::shift($public, 4))); + $length = unpack('Nlength', Strings::shift($public, 4))['length']; $newtype = Strings::shift($public, $length); if ($newtype != $type) { throw new \RuntimeException('The binary type does not match the human readable type field'); @@ -227,7 +227,10 @@ public static function load($key, $password) $parallelism = trim(preg_replace('#Argon2-Parallelism: (\d+)#', '$1', $key[$offset++])); $salt = Strings::hex2bin(trim(preg_replace('#Argon2-Salt: ([0-9a-f]+)#', '$1', $key[$offset++]))); - extract(self::generateV3Key($password, $flavour, $memory, $passes, $salt)); + $v3key = self::generateV3Key($password, $flavour, $memory, $passes, $salt); + $symkey = $v3key['symkey']; + $symiv = $v3key['symiv']; + $hashkey = $v3key['hashkey']; break; case 2: @@ -323,7 +326,10 @@ protected static function wrapPrivateKey($public, $private, $type, $password, ar $key .= "Argon2-Passes: 13\r\n"; $key .= "Argon2-Parallelism: 1\r\n"; $key .= "Argon2-Salt: " . Strings::bin2hex($salt) . "\r\n"; - extract(self::generateV3Key($password, 'Argon2id', 8192, 13, $salt)); + $v3key = self::generateV3Key($password, 'Argon2id', 8192, 13, $salt); + $symkey = $v3key['symkey']; + $symiv = $v3key['symiv']; + $hashkey = $v3key['hashkey']; $hash = new Hash('sha256'); $hash->setKey($hashkey); diff --git a/vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/StreamCipher.php b/vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/StreamCipher.php index 0d96908..c7c080f 100644 --- a/vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/StreamCipher.php +++ b/vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/StreamCipher.php @@ -26,7 +26,7 @@ abstract class StreamCipher extends SymmetricKey * * Stream ciphers do not have a block size * - * @see \phpseclib3\Crypt\Common\SymmetricKey::block_size + * @see SymmetricKey::block_size * @var int */ protected $block_size = 0; diff --git a/vendor/phpseclib/phpseclib/phpseclib/Crypt/DES.php b/vendor/phpseclib/phpseclib/phpseclib/Crypt/DES.php index 3b03830..93d7ad2 100644 --- a/vendor/phpseclib/phpseclib/phpseclib/Crypt/DES.php +++ b/vendor/phpseclib/phpseclib/phpseclib/Crypt/DES.php @@ -68,7 +68,7 @@ class DES extends BlockCipher /** * Block Length of the cipher * - * @see \phpseclib3\Crypt\Common\SymmetricKey::block_size + * @see Common\SymmetricKey::block_size * @var int */ protected $block_size = 8; @@ -76,7 +76,7 @@ class DES extends BlockCipher /** * Key Length (in bytes) * - * @see \phpseclib3\Crypt\Common\SymmetricKey::setKeyLength() + * @see Common\SymmetricKey::setKeyLength() * @var int */ protected $key_length = 8; @@ -84,7 +84,7 @@ class DES extends BlockCipher /** * The mcrypt specific name of the cipher * - * @see \phpseclib3\Crypt\Common\SymmetricKey::cipher_name_mcrypt + * @see Common\SymmetricKey::cipher_name_mcrypt * @var string */ protected $cipher_name_mcrypt = 'des'; @@ -92,7 +92,7 @@ class DES extends BlockCipher /** * The OpenSSL names of the cipher / modes * - * @see \phpseclib3\Crypt\Common\SymmetricKey::openssl_mode_names + * @see Common\SymmetricKey::openssl_mode_names * @var array */ protected $openssl_mode_names = [ @@ -106,7 +106,7 @@ class DES extends BlockCipher /** * Optimizing value while CFB-encrypting * - * @see \phpseclib3\Crypt\Common\SymmetricKey::cfb_init_len + * @see Common\SymmetricKey::cfb_init_len * @var int */ protected $cfb_init_len = 500; @@ -586,7 +586,7 @@ public function __construct($mode) * * This is mainly just a wrapper to set things up for \phpseclib3\Crypt\Common\SymmetricKey::isValidEngine() * - * @see \phpseclib3\Crypt\Common\SymmetricKey::isValidEngine() + * @see Common\SymmetricKey::isValidEngine() * @param int $engine * @return bool */ @@ -615,7 +615,7 @@ protected function isValidEngineHelper($engine) * * DES also requires that every eighth bit be a parity bit, however, we'll ignore that. * - * @see \phpseclib3\Crypt\Common\SymmetricKey::setKey() + * @see Common\SymmetricKey::setKey() * @param string $key */ public function setKey($key) @@ -631,8 +631,8 @@ public function setKey($key) /** * Encrypts a block * - * @see \phpseclib3\Crypt\Common\SymmetricKey::encryptBlock() - * @see \phpseclib3\Crypt\Common\SymmetricKey::encrypt() + * @see Common\SymmetricKey::encryptBlock() + * @see Common\SymmetricKey::encrypt() * @see self::encrypt() * @param string $in * @return string @@ -645,8 +645,8 @@ protected function encryptBlock($in) /** * Decrypts a block * - * @see \phpseclib3\Crypt\Common\SymmetricKey::decryptBlock() - * @see \phpseclib3\Crypt\Common\SymmetricKey::decrypt() + * @see Common\SymmetricKey::decryptBlock() + * @see Common\SymmetricKey::decrypt() * @see self::decrypt() * @param string $in * @return string @@ -747,7 +747,7 @@ private function processBlock($block, $mode) /** * Creates the key schedule * - * @see \phpseclib3\Crypt\Common\SymmetricKey::setupKey() + * @see Common\SymmetricKey::setupKey() */ protected function setupKey() { @@ -1281,7 +1281,7 @@ protected function setupKey() /** * Setup the performance-optimized function for de/encrypt() * - * @see \phpseclib3\Crypt\Common\SymmetricKey::setupInlineCrypt() + * @see Common\SymmetricKey::setupInlineCrypt() */ protected function setupInlineCrypt() { diff --git a/vendor/phpseclib/phpseclib/phpseclib/Crypt/DSA/Formats/Keys/PuTTY.php b/vendor/phpseclib/phpseclib/phpseclib/Crypt/DSA/Formats/Keys/PuTTY.php index f6177f4..8549a2e 100644 --- a/vendor/phpseclib/phpseclib/phpseclib/Crypt/DSA/Formats/Keys/PuTTY.php +++ b/vendor/phpseclib/phpseclib/phpseclib/Crypt/DSA/Formats/Keys/PuTTY.php @@ -56,7 +56,10 @@ public static function load($key, $password = '') if (!isset($components['private'])) { return $components; } - extract($components); + $type = $components['type']; + $comment = $components['comment']; + $public = $components['public']; + $private = $components['private']; unset($components['public'], $components['private']); list($p, $q, $g, $y) = Strings::unpackSSH2('iiii', $public); diff --git a/vendor/phpseclib/phpseclib/phpseclib/Crypt/DSA/PrivateKey.php b/vendor/phpseclib/phpseclib/phpseclib/Crypt/DSA/PrivateKey.php index 87cd77a..9025213 100644 --- a/vendor/phpseclib/phpseclib/phpseclib/Crypt/DSA/PrivateKey.php +++ b/vendor/phpseclib/phpseclib/phpseclib/Crypt/DSA/PrivateKey.php @@ -88,7 +88,9 @@ public function sign($message) return $signature; } - extract(ASN1Signature::load($signature)); + $loaded = ASN1Signature::load($signature); + $r = $loaded['r']; + $s = $loaded['s']; return $format::save($r, $s); } diff --git a/vendor/phpseclib/phpseclib/phpseclib/Crypt/DSA/PublicKey.php b/vendor/phpseclib/phpseclib/phpseclib/Crypt/DSA/PublicKey.php index c14ffbd..3e16762 100644 --- a/vendor/phpseclib/phpseclib/phpseclib/Crypt/DSA/PublicKey.php +++ b/vendor/phpseclib/phpseclib/phpseclib/Crypt/DSA/PublicKey.php @@ -40,7 +40,8 @@ public function verify($message, $signature) if ($params === false || count($params) != 2) { return false; } - extract($params); + $r = $params['r']; + $s = $params['s']; if (self::$engines['OpenSSL'] && in_array($this->hash->getHash(), openssl_get_md_methods())) { $sig = $format != 'ASN1' ? ASN1Signature::save($r, $s) : $signature; diff --git a/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/BaseCurves/Montgomery.php b/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/BaseCurves/Montgomery.php index b792e16..431f957 100644 --- a/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/BaseCurves/Montgomery.php +++ b/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/BaseCurves/Montgomery.php @@ -246,7 +246,7 @@ public function multiplyPoint(array $p, BigInteger $d) * * x=X/Z * - * @return \phpseclib3\Math\PrimeField\Integer[] + * @return PrimeInteger[] */ public function convertToInternal(array $p) { @@ -266,7 +266,7 @@ public function convertToInternal(array $p) /** * Returns the affine point * - * @return \phpseclib3\Math\PrimeField\Integer[] + * @return PrimeInteger[] */ public function convertToAffine(array $p) { diff --git a/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/BaseCurves/Prime.php b/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/BaseCurves/Prime.php index 6200401..b197055 100644 --- a/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/BaseCurves/Prime.php +++ b/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/BaseCurves/Prime.php @@ -751,7 +751,7 @@ private static function getJSFPoints(Integer $k1, Integer $k2) * To convert a Jacobian Coordinate to an Affine Point * you do (x / z^2, y / z^3) * - * @return \phpseclib3\Math\PrimeField\Integer[] + * @return PrimeInteger[] */ public function convertToAffine(array $p) { @@ -770,7 +770,7 @@ public function convertToAffine(array $p) /** * Converts an affine point to a jacobian coordinate * - * @return \phpseclib3\Math\PrimeField\Integer[] + * @return PrimeInteger[] */ public function convertToInternal(array $p) { diff --git a/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/BaseCurves/TwistedEdwards.php b/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/BaseCurves/TwistedEdwards.php index 004406a..99aa38b 100644 --- a/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/BaseCurves/TwistedEdwards.php +++ b/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/BaseCurves/TwistedEdwards.php @@ -171,7 +171,7 @@ public function getBasePoint() /** * Returns the affine point * - * @return PrimeField\Integer[] + * @return PrimeInteger[] */ public function convertToAffine(array $p) { diff --git a/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Formats/Keys/XML.php b/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Formats/Keys/XML.php index b0cb126..7f6cf63 100644 --- a/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Formats/Keys/XML.php +++ b/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Formats/Keys/XML.php @@ -71,6 +71,10 @@ public static function load($key, $password = '') $use_errors = libxml_use_internal_errors(true); + if (substr($key, 0, 5) != '' . $key . ''; + } + $temp = self::isolateNamespace($key, 'http://www.w3.org/2009/xmldsig11#'); if ($temp) { $key = $temp; @@ -82,9 +86,6 @@ public static function load($key, $password = '') } $dom = new \DOMDocument(); - if (substr($key, 0, 5) != '' . $key . ''; - } if (!$dom->loadXML($key)) { libxml_use_internal_errors($use_errors); diff --git a/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/PrivateKey.php b/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/PrivateKey.php index 91253b8..9947bb7 100644 --- a/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/PrivateKey.php +++ b/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/PrivateKey.php @@ -157,7 +157,10 @@ public function sign($message) return $signature; } - extract(ASN1Signature::load($signature)); + $loaded = ASN1Signature::load($signature); + $r = $loaded['r']; + $s = $loaded['s']; + return $this->formatSignature($r, $s); } diff --git a/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/PublicKey.php b/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/PublicKey.php index 4558ce3..d34c6c4 100644 --- a/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/PublicKey.php +++ b/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/PublicKey.php @@ -115,7 +115,8 @@ public function verify($message, $signature) if ($params === false || count($params) != 2) { return false; } - extract($params); + $r = $params['r']; + $s = $params['s']; if (self::$engines['OpenSSL'] && in_array($this->hash->getHash(), openssl_get_md_methods())) { $sig = $format != 'ASN1' ? ASN1Signature::save($r, $s) : $signature; diff --git a/vendor/phpseclib/phpseclib/phpseclib/Crypt/Hash.php b/vendor/phpseclib/phpseclib/phpseclib/Crypt/Hash.php index 09e48f9..cc5b42c 100644 --- a/vendor/phpseclib/phpseclib/phpseclib/Crypt/Hash.php +++ b/vendor/phpseclib/phpseclib/phpseclib/Crypt/Hash.php @@ -194,6 +194,15 @@ class Hash private static $maxwordrange128; /**#@-*/ + /**#@+ + * AES_CMAC variables + * + * @var string + */ + private $k1; + private $k2; + /**#@-*/ + /** * Default Constructor. * @@ -299,6 +308,14 @@ public function setHash($hash) $this->length = abs(substr($hash, -3)) >> 3; $this->algo = 'umac'; return; + case 'aes_cmac': + if ($oldHash != $this->hashParam) { + $this->recomputeAESKey = true; + } + $this->blockSize = 128; + $this->length = 16; + $this->algo = 'aes_cmac'; + return; case 'md2-96': case 'md5-96': case 'sha1-96': @@ -977,6 +994,69 @@ private static function L3Hash($k1, $k2, $m) public function hash($text) { $algo = $this->algo; + // https://www.rfc-editor.org/rfc/rfc4493.html + // https://en.wikipedia.org/wiki/One-key_MAC + if ($algo == 'aes_cmac') { + $constZero = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"; + if ($this->recomputeAESKey) { + if (!is_string($this->key)) { + throw new InsufficientSetupException('No key has been set'); + } + if (strlen($this->key) != 16) { + throw new \LengthException('Key must be 16 bytes long'); + } + // Algorithm Generate_Subkey + $constRb = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x87"; + $this->c = new AES('ecb'); + $this->c->setKey($this->key); + $this->c->disablePadding(); + $l = $this->c->encrypt($constZero); + $msb = ($l & "\x80") == "\x80"; + $l = new BigInteger($l, 256); + $l->setPrecision(128); + $l = $l->bitwise_leftShift(1)->toBytes(); + // make it constant time + $k1 = $msb ? $l ^ $constRb : $l | $constZero; + + $msb = ($k1 & "\x80") == "\x80"; + $k2 = new BigInteger($k1, 256); + $k2->setPrecision(128); + $k2 = $k2->bitwise_leftShift(1)->toBytes(); + // make it constant time + $k2 = $msb ? $k2 ^ $constRb : $k2 | $constZero; + + $this->k1 = $k1; + $this->k2 = $k2; + } + + $len = strlen($text); + $const_Bsize = 16; + $M = strlen($text) ? str_split($text, $const_Bsize) : ['']; + + // Step 2 + $n = ceil($len / $const_Bsize); + // Step 3 + if ($n == 0) { + $n = 1; + $flag = false; + } else { + $flag = $len % $const_Bsize == 0; + } + // Step 4 + $M_last = $flag ? + $M[$n - 1] ^ $k1 : + self::OMAC_padding($M[$n - 1], $const_Bsize) ^ $k2; + // Step 5 + $x = $constZero; + // Step 6 + $c = &$this->c; + for ($i = 0; $i < $n - 1; $i++) { + $y = $x ^ $M[$i]; + $x = $c->encrypt($y); + } + $y = $M_last ^ $x; + return $c->encrypt($y); + } if ($algo == 'umac') { if ($this->recomputeAESKey) { if (!is_string($this->nonce)) { @@ -1790,6 +1870,17 @@ private static function sha512_64($m, $hash) return pack('J*', ...$hash); } + /** + * OMAC Padding + * + * @link https://www.rfc-editor.org/rfc/rfc4493.html#section-2.4 + */ + private static function OMAC_padding($m, $length) + { + $count = $length - strlen($m) - 1; + return "$m\x80" . str_repeat("\0", $count); + } + /** * __toString() magic method */ diff --git a/vendor/phpseclib/phpseclib/phpseclib/Crypt/PublicKeyLoader.php b/vendor/phpseclib/phpseclib/phpseclib/Crypt/PublicKeyLoader.php index 61afbae..3626408 100644 --- a/vendor/phpseclib/phpseclib/phpseclib/Crypt/PublicKeyLoader.php +++ b/vendor/phpseclib/phpseclib/phpseclib/Crypt/PublicKeyLoader.php @@ -32,6 +32,7 @@ abstract class PublicKeyLoader * @return AsymmetricKey * @param string|array $key * @param string $password optional + * @throws NoKeyLoadedException if key is not valid */ public static function load($key, $password = false) { diff --git a/vendor/phpseclib/phpseclib/phpseclib/Crypt/RC2.php b/vendor/phpseclib/phpseclib/phpseclib/Crypt/RC2.php index 654c906..175c52e 100644 --- a/vendor/phpseclib/phpseclib/phpseclib/Crypt/RC2.php +++ b/vendor/phpseclib/phpseclib/phpseclib/Crypt/RC2.php @@ -45,7 +45,7 @@ class RC2 extends BlockCipher /** * Block Length of the cipher * - * @see \phpseclib3\Crypt\Common\SymmetricKey::block_size + * @see Common\SymmetricKey::block_size * @var int */ protected $block_size = 8; @@ -53,7 +53,7 @@ class RC2 extends BlockCipher /** * The Key * - * @see \phpseclib3\Crypt\Common\SymmetricKey::key + * @see Common\SymmetricKey::key * @see self::setKey() * @var string */ @@ -62,7 +62,7 @@ class RC2 extends BlockCipher /** * The Original (unpadded) Key * - * @see \phpseclib3\Crypt\Common\SymmetricKey::key + * @see Common\SymmetricKey::key * @see self::setKey() * @see self::encrypt() * @see self::decrypt() @@ -81,7 +81,7 @@ class RC2 extends BlockCipher /** * The mcrypt specific name of the cipher * - * @see \phpseclib3\Crypt\Common\SymmetricKey::cipher_name_mcrypt + * @see Common\SymmetricKey::cipher_name_mcrypt * @var string */ protected $cipher_name_mcrypt = 'rc2'; @@ -89,7 +89,7 @@ class RC2 extends BlockCipher /** * Optimizing value while CFB-encrypting * - * @see \phpseclib3\Crypt\Common\SymmetricKey::cfb_init_len + * @see Common\SymmetricKey::cfb_init_len * @var int */ protected $cfb_init_len = 500; @@ -261,7 +261,7 @@ public function __construct($mode) * * This is mainly just a wrapper to set things up for \phpseclib3\Crypt\Common\SymmetricKey::isValidEngine() * - * @see \phpseclib3\Crypt\Common\SymmetricKey::__construct() + * @see Common\SymmetricKey::__construct() * @param int $engine * @return bool */ @@ -323,7 +323,7 @@ public function getKeyLength() * has more then 128 bytes in it, and set $key to a single null byte if * it is empty. * - * @see \phpseclib3\Crypt\Common\SymmetricKey::setKey() + * @see Common\SymmetricKey::setKey() * @param string $key * @param int|boolean $t1 optional Effective key length in bits. * @throws \LengthException if the key length isn't supported @@ -426,8 +426,8 @@ public function decrypt($ciphertext) /** * Encrypts a block * - * @see \phpseclib3\Crypt\Common\SymmetricKey::encryptBlock() - * @see \phpseclib3\Crypt\Common\SymmetricKey::encrypt() + * @see Common\SymmetricKey::encryptBlock() + * @see Common\SymmetricKey::encrypt() * @param string $in * @return string */ @@ -470,8 +470,8 @@ protected function encryptBlock($in) /** * Decrypts a block * - * @see \phpseclib3\Crypt\Common\SymmetricKey::decryptBlock() - * @see \phpseclib3\Crypt\Common\SymmetricKey::decrypt() + * @see Common\SymmetricKey::decryptBlock() + * @see Common\SymmetricKey::decrypt() * @param string $in * @return string */ @@ -514,7 +514,7 @@ protected function decryptBlock($in) /** * Creates the key schedule * - * @see \phpseclib3\Crypt\Common\SymmetricKey::setupKey() + * @see Common\SymmetricKey::setupKey() */ protected function setupKey() { @@ -534,7 +534,7 @@ protected function setupKey() /** * Setup the performance-optimized function for de/encrypt() * - * @see \phpseclib3\Crypt\Common\SymmetricKey::setupInlineCrypt() + * @see Common\SymmetricKey::setupInlineCrypt() */ protected function setupInlineCrypt() { diff --git a/vendor/phpseclib/phpseclib/phpseclib/Crypt/RC4.php b/vendor/phpseclib/phpseclib/phpseclib/Crypt/RC4.php index 5f3bff2..98cf011 100644 --- a/vendor/phpseclib/phpseclib/phpseclib/Crypt/RC4.php +++ b/vendor/phpseclib/phpseclib/phpseclib/Crypt/RC4.php @@ -72,7 +72,7 @@ class RC4 extends StreamCipher /** * The mcrypt specific name of the cipher * - * @see \phpseclib3\Crypt\Common\SymmetricKey::cipher_name_mcrypt + * @see Common\SymmetricKey::cipher_name_mcrypt * @var string */ protected $cipher_name_mcrypt = 'arcfour'; @@ -98,7 +98,7 @@ class RC4 extends StreamCipher * * This is mainly just a wrapper to set things up for \phpseclib3\Crypt\Common\SymmetricKey::isValidEngine() * - * @see \phpseclib3\Crypt\Common\SymmetricKey::__construct() + * @see Common\SymmetricKey::__construct() * @param int $engine * @return bool */ @@ -159,7 +159,7 @@ public function setKey($key) /** * Encrypts a message. * - * @see \phpseclib3\Crypt\Common\SymmetricKey::decrypt() + * @see Common\SymmetricKey::decrypt() * @see self::crypt() * @param string $plaintext * @return string $ciphertext @@ -178,7 +178,7 @@ public function encrypt($plaintext) * $this->decrypt($this->encrypt($plaintext)) == $this->encrypt($this->encrypt($plaintext)). * At least if the continuous buffer is disabled. * - * @see \phpseclib3\Crypt\Common\SymmetricKey::encrypt() + * @see Common\SymmetricKey::encrypt() * @see self::crypt() * @param string $ciphertext * @return string $plaintext @@ -214,7 +214,7 @@ protected function decryptBlock($in) /** * Setup the key (expansion) * - * @see \phpseclib3\Crypt\Common\SymmetricKey::_setupKey() + * @see Common\SymmetricKey::_setupKey() */ protected function setupKey() { diff --git a/vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA.php b/vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA.php index 9cbe6bf..0a11957 100644 --- a/vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA.php +++ b/vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA.php @@ -357,10 +357,9 @@ public static function createKey($bits = 2048) if ($i != $num_primes) { $primes[$i] = BigInteger::randomPrime($regSize); } else { - extract(BigInteger::minMaxBits($bits)); - /** @var BigInteger $min - * @var BigInteger $max - */ + $minMax = BigInteger::minMaxBits($bits); + $min = $minMax['min']; + $max = $minMax['max']; list($min) = $min->divide($n); $min = $min->add(self::$one); list($max) = $max->divide($n); diff --git a/vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA/Formats/Keys/MSBLOB.php b/vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA/Formats/Keys/MSBLOB.php index b60e48e..035fc8c 100644 --- a/vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA/Formats/Keys/MSBLOB.php +++ b/vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA/Formats/Keys/MSBLOB.php @@ -88,13 +88,11 @@ public static function load($key, $password = '') // PUBLICKEYSTRUC publickeystruc // https://msdn.microsoft.com/en-us/library/windows/desktop/aa387453(v=vs.85).aspx - extract(unpack('atype/aversion/vreserved/Valgo', Strings::shift($key, 8))); - /** - * @var string $type - * @var string $version - * @var integer $reserved - * @var integer $algo - */ + $unpacked = unpack('atype/aversion/vreserved/Valgo', Strings::shift($key, 8)); + $type = $unpacked['type']; + $version = $unpacked['version']; + $reserved = $unpacked['reserved']; + $algo = $unpacked['algo']; switch (ord($type)) { case self::PUBLICKEYBLOB: case self::PUBLICKEYBLOBEX: @@ -121,12 +119,10 @@ public static function load($key, $password = '') // RSAPUBKEY rsapubkey // https://msdn.microsoft.com/en-us/library/windows/desktop/aa387685(v=vs.85).aspx // could do V for pubexp but that's unsigned 32-bit whereas some PHP installs only do signed 32-bit - extract(unpack('Vmagic/Vbitlen/a4pubexp', Strings::shift($key, 12))); - /** - * @var integer $magic - * @var integer $bitlen - * @var string $pubexp - */ + $unpacked = unpack('Vmagic/Vbitlen/a4pubexp', Strings::shift($key, 12)); + $magic = $unpacked['magic']; + $bitlen = $unpacked['bitlen']; + $pubexp = $unpacked['pubexp']; switch ($magic) { case self::RSA2: $components['isPublicKey'] = false; diff --git a/vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA/Formats/Keys/PKCS1.php b/vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA/Formats/Keys/PKCS1.php index 7633556..68d9270 100644 --- a/vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA/Formats/Keys/PKCS1.php +++ b/vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA/Formats/Keys/PKCS1.php @@ -96,6 +96,20 @@ public static function load($key, $password = '') $components['isPublicKey'] = true; } + $components = $components + $key; + foreach ($components as &$val) { + if ($val instanceof BigInteger) { + $val = self::makePositive($val); + } + if (is_array($val)) { + foreach ($val as &$subval) { + if ($subval instanceof BigInteger) { + $subval = self::makePositive($subval); + } + } + } + } + return $components + $key; } @@ -157,4 +171,17 @@ public static function savePublicKey(BigInteger $n, BigInteger $e) return self::wrapPublicKey($key, 'RSA'); } + + /** + * Negative numbers make no sense in RSA so convert them to positive + * + * @param BigInteger $x + * @return string + */ + private static function makePositive(BigInteger $x) + { + return $x->isNegative() ? + new BigInteger($x->toBytes(true), 256) : + $x; + } } diff --git a/vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA/Formats/Keys/PuTTY.php b/vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA/Formats/Keys/PuTTY.php index 293903c..8416758 100644 --- a/vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA/Formats/Keys/PuTTY.php +++ b/vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA/Formats/Keys/PuTTY.php @@ -56,7 +56,10 @@ public static function load($key, $password = '') if (!isset($components['private'])) { return $components; } - extract($components); + $type = $components['type']; + $comment = $components['comment']; + $public = $components['public']; + $private = $components['private']; unset($components['public'], $components['private']); $isPublicKey = false; diff --git a/vendor/phpseclib/phpseclib/phpseclib/Crypt/Rijndael.php b/vendor/phpseclib/phpseclib/phpseclib/Crypt/Rijndael.php index ff31f9c..5ba7cf7 100644 --- a/vendor/phpseclib/phpseclib/phpseclib/Crypt/Rijndael.php +++ b/vendor/phpseclib/phpseclib/phpseclib/Crypt/Rijndael.php @@ -74,8 +74,8 @@ class Rijndael extends BlockCipher * or not for the current $block_size/$key_length. * In case of, $cipher_name_mcrypt will be set dynamically at run time accordingly. * - * @see \phpseclib3\Crypt\Common\SymmetricKey::cipher_name_mcrypt - * @see \phpseclib3\Crypt\Common\SymmetricKey::engine + * @see Common\SymmetricKey::cipher_name_mcrypt + * @see Common\SymmetricKey::engine * @see self::isValidEngine() * @var string */ diff --git a/vendor/phpseclib/phpseclib/phpseclib/Crypt/TripleDES.php b/vendor/phpseclib/phpseclib/phpseclib/Crypt/TripleDES.php index 1ff5ed0..932b7c6 100644 --- a/vendor/phpseclib/phpseclib/phpseclib/Crypt/TripleDES.php +++ b/vendor/phpseclib/phpseclib/phpseclib/Crypt/TripleDES.php @@ -66,8 +66,8 @@ class TripleDES extends DES /** * The mcrypt specific name of the cipher * - * @see \phpseclib3\Crypt\DES::cipher_name_mcrypt - * @see \phpseclib3\Crypt\Common\SymmetricKey::cipher_name_mcrypt + * @see DES::cipher_name_mcrypt + * @see Common\SymmetricKey::cipher_name_mcrypt * @var string */ protected $cipher_name_mcrypt = 'tripledes'; @@ -75,7 +75,7 @@ class TripleDES extends DES /** * Optimizing value while CFB-encrypting * - * @see \phpseclib3\Crypt\Common\SymmetricKey::cfb_init_len + * @see Common\SymmetricKey::cfb_init_len * @var int */ protected $cfb_init_len = 750; @@ -84,7 +84,7 @@ class TripleDES extends DES * max possible size of $key * * @see self::setKey() - * @see \phpseclib3\Crypt\DES::setKey() + * @see DES::setKey() * @var string */ protected $key_length_max = 24; @@ -126,8 +126,8 @@ class TripleDES extends DES * * - cbc3 (same as cbc) * - * @see \phpseclib3\Crypt\DES::__construct() - * @see \phpseclib3\Crypt\Common\SymmetricKey::__construct() + * @see Crypt\DES::__construct() + * @see Common\SymmetricKey::__construct() * @param string $mode */ public function __construct($mode) @@ -169,7 +169,7 @@ public function __construct($mode) * * This is mainly just a wrapper to set things up for \phpseclib3\Crypt\Common\SymmetricKey::isValidEngine() * - * @see \phpseclib3\Crypt\Common\SymmetricKey::__construct() + * @see Common\SymmetricKey::__construct() * @param int $engine * @return bool */ @@ -189,7 +189,7 @@ protected function isValidEngineHelper($engine) * * SetIV is not required when \phpseclib3\Crypt\Common\SymmetricKey::MODE_ECB is being used. * - * @see \phpseclib3\Crypt\Common\SymmetricKey::setIV() + * @see Common\SymmetricKey::setIV() * @param string $iv */ public function setIV($iv) @@ -209,7 +209,7 @@ public function setIV($iv) * * If you want to use a 64-bit key use DES.php * - * @see \phpseclib3\Crypt\Common\SymmetricKey:setKeyLength() + * @see Common\SymmetricKey:setKeyLength() * @throws \LengthException if the key length is invalid * @param int $length */ @@ -233,8 +233,8 @@ public function setKeyLength($length) * * DES also requires that every eighth bit be a parity bit, however, we'll ignore that. * - * @see \phpseclib3\Crypt\DES::setKey() - * @see \phpseclib3\Crypt\Common\SymmetricKey::setKey() + * @see DES::setKey() + * @see Common\SymmetricKey::setKey() * @throws \LengthException if the key length is invalid * @param string $key */ @@ -270,7 +270,7 @@ public function setKey($key) /** * Encrypts a message. * - * @see \phpseclib3\Crypt\Common\SymmetricKey::encrypt() + * @see Common\SymmetricKey::encrypt() * @param string $plaintext * @return string $cipertext */ @@ -296,7 +296,7 @@ public function encrypt($plaintext) /** * Decrypts a message. * - * @see \phpseclib3\Crypt\Common\SymmetricKey::decrypt() + * @see Common\SymmetricKey::decrypt() * @param string $ciphertext * @return string $plaintext */ @@ -351,7 +351,7 @@ public function decrypt($ciphertext) * continuous buffers not be used. They do offer better security and are, in fact, sometimes required (SSH uses them), * however, they are also less intuitive and more likely to cause you problems. * - * @see \phpseclib3\Crypt\Common\SymmetricKey::enableContinuousBuffer() + * @see Common\SymmetricKey::enableContinuousBuffer() * @see self::disableContinuousBuffer() */ public function enableContinuousBuffer() @@ -369,7 +369,7 @@ public function enableContinuousBuffer() * * The default behavior. * - * @see \phpseclib3\Crypt\Common\SymmetricKey::disableContinuousBuffer() + * @see Common\SymmetricKey::disableContinuousBuffer() * @see self::enableContinuousBuffer() */ public function disableContinuousBuffer() @@ -385,8 +385,8 @@ public function disableContinuousBuffer() /** * Creates the key schedule * - * @see \phpseclib3\Crypt\DES::setupKey() - * @see \phpseclib3\Crypt\Common\SymmetricKey::setupKey() + * @see DES::setupKey() + * @see Common\SymmetricKey::setupKey() */ protected function setupKey() { @@ -419,8 +419,8 @@ protected function setupKey() /** * Sets the internal crypt engine * - * @see \phpseclib3\Crypt\Common\SymmetricKey::__construct() - * @see \phpseclib3\Crypt\Common\SymmetricKey::setPreferredEngine() + * @see Common\SymmetricKey::__construct() + * @see Common\SymmetricKey::setPreferredEngine() * @param int $engine */ public function setPreferredEngine($engine) diff --git a/vendor/phpseclib/phpseclib/phpseclib/Crypt/Twofish.php b/vendor/phpseclib/phpseclib/phpseclib/Crypt/Twofish.php index bf76563..141ad01 100644 --- a/vendor/phpseclib/phpseclib/phpseclib/Crypt/Twofish.php +++ b/vendor/phpseclib/phpseclib/phpseclib/Crypt/Twofish.php @@ -49,7 +49,7 @@ class Twofish extends BlockCipher /** * The mcrypt specific name of the cipher * - * @see \phpseclib3\Crypt\Common\SymmetricKey::cipher_name_mcrypt + * @see Common\SymmetricKey::cipher_name_mcrypt * @var string */ protected $cipher_name_mcrypt = 'twofish'; @@ -57,7 +57,7 @@ class Twofish extends BlockCipher /** * Optimizing value while CFB-encrypting * - * @see \phpseclib3\Crypt\Common\SymmetricKey::cfb_init_len + * @see Common\SymmetricKey::cfb_init_len * @var int */ protected $cfb_init_len = 800; @@ -431,7 +431,7 @@ public function setKey($key) /** * Setup the key (expansion) * - * @see \phpseclib3\Crypt\Common\SymmetricKey::_setupKey() + * @see Common\SymmetricKey::_setupKey() */ protected function setupKey() { @@ -700,7 +700,7 @@ protected function decryptBlock($in) /** * Setup the performance-optimized function for de/encrypt() * - * @see \phpseclib3\Crypt\Common\SymmetricKey::_setupInlineCrypt() + * @see Common\SymmetricKey::_setupInlineCrypt() */ protected function setupInlineCrypt() { diff --git a/vendor/phpseclib/phpseclib/phpseclib/File/ASN1.php b/vendor/phpseclib/phpseclib/phpseclib/File/ASN1.php index c4b06a5..2f1fb8a 100644 --- a/vendor/phpseclib/phpseclib/phpseclib/File/ASN1.php +++ b/vendor/phpseclib/phpseclib/phpseclib/File/ASN1.php @@ -273,8 +273,7 @@ private static function decode_ber($encoded, $start = 0, $encoded_pos = 0) // tags of indefinte length don't really have a header length; this length includes the tag $current += ['headerlength' => $length + 2]; $start += $length; - extract(unpack('Nlength', substr(str_pad($temp, 4, chr(0), STR_PAD_LEFT), -4))); - /** @var integer $length */ + $length = unpack('Nlength', substr(str_pad($temp, 4, chr(0), STR_PAD_LEFT), -4))['length']; } else { $current += ['headerlength' => 2]; } @@ -931,7 +930,19 @@ private static function encode_der($source, array $mapping, $idx = null, array $ an untagged "DummyReference" (see ITU-T Rec. X.683 | ISO/IEC 8824-4, 8.3)." */ if (isset($child['explicit']) || $child['type'] == self::TYPE_CHOICE) { - $subtag = chr((self::CLASS_CONTEXT_SPECIFIC << 6) | 0x20 | $child['constant']); + if ($child['constant'] <= 30) { + $subtag = chr((self::CLASS_CONTEXT_SPECIFIC << 6) | 0x20 | $child['constant']); + } else { + $constant = $child['constant']; + $subtag = ''; + while ($constant > 0) { + $subtagvalue = $constant & 0x7F; + $subtag = (chr(0x80 | $subtagvalue)) . $subtag; + $constant = $constant >> 7; + } + $subtag[strlen($subtag) - 1] = $subtag[strlen($subtag) - 1] & chr(0x7F); + $subtag = chr((self::CLASS_CONTEXT_SPECIFIC << 6) | 0x20 | 0x1f) . $subtag; + } $temp = $subtag . self::encodeLength(strlen($temp)) . $temp; } else { $subtag = chr((self::CLASS_CONTEXT_SPECIFIC << 6) | (ord($temp[0]) & 0x20) | $child['constant']); @@ -1140,6 +1151,8 @@ private static function encode_der($source, array $mapping, $idx = null, array $ */ public static function decodeOID($content) { + // BigInteger's are used because of OIDs like 2.25.329800735698586629295641978511506172918 + // https://healthcaresecprivacy.blogspot.com/2011/02/creating-and-using-unique-id-uuid-oid.html elaborates. static $eighty; if (!$eighty) { $eighty = new BigInteger(80); diff --git a/vendor/phpseclib/phpseclib/phpseclib/File/X509.php b/vendor/phpseclib/phpseclib/phpseclib/File/X509.php index 00504f1..80e0bab 100644 --- a/vendor/phpseclib/phpseclib/phpseclib/File/X509.php +++ b/vendor/phpseclib/phpseclib/phpseclib/File/X509.php @@ -626,7 +626,9 @@ private function mapOutExtensions(array &$root, $path) $extensions = &$this->subArray($root, $path, !empty($this->extensionValues)); foreach ($this->extensionValues as $id => $data) { - extract($data); + $critical = $data['critical']; + $replace = $data['replace']; + $value = $data['value']; $newext = [ 'extnId' => $id, 'extnValue' => $value, @@ -1858,7 +1860,7 @@ public function getDN($format = self::DN_ARRAY, $dn = null) $dn = $this->getDN(self::DN_CANON, $dn); $hash = new Hash('sha1'); $hash = $hash->hash($dn); - extract(unpack('Vhash', $hash)); + $hash = unpack('Vhash', $hash)['hash']; return strtolower(Strings::bin2hex(pack('N', $hash))); } diff --git a/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger.php b/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger.php index 2a9cc0b..965d7ff 100644 --- a/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger.php +++ b/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger.php @@ -143,6 +143,11 @@ private static function initialize_static_variables() ['PHP64', ['DefaultEngine']], ['PHP32', ['DefaultEngine']] ]; + // per https://phpseclib.com/docs/speed PHP 8.4.0+ _significantly_ sped up BCMath + if (version_compare(PHP_VERSION, '8.4.0') >= 0) { + $engines[1][0] = 'BCMath'; + $engines[2][0] = 'PHP64'; + } foreach ($engines as $engine) { try { @@ -333,12 +338,10 @@ public function modInverse(BigInteger $n) */ public function extendedGCD(BigInteger $n) { - extract($this->value->extendedGCD($n->value)); - /** - * @var BigInteger $gcd - * @var BigInteger $x - * @var BigInteger $y - */ + $extended = $this->value->extendedGCD($n->value); + $gcd = $extended['gcd']; + $x = $extended['x']; + $y = $extended['y']; return [ 'gcd' => new static($gcd), 'x' => new static($x), @@ -617,10 +620,9 @@ public static function minMaxBits($bits) self::initialize_static_variables(); $class = self::$mainEngine; - extract($class::minMaxBits($bits)); - /** @var BigInteger $min - * @var BigInteger $max - */ + $minMax = $class::minMaxBits($bits); + $min = $minMax['min']; + $max = $minMax['max']; return [ 'min' => new static($min), 'max' => new static($max) diff --git a/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/BCMath.php b/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/BCMath.php index e3a4990..7b62830 100644 --- a/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/BCMath.php +++ b/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/BCMath.php @@ -38,6 +38,11 @@ class BCMath extends Engine */ const ENGINE_DIR = 'BCMath'; + /** + * Test to see if bcmod() accepts 2 or 3 parameters + */ + const BCMOD_THREE_PARAMS = PHP_VERSION_ID >= 72000; + /** * Test for engine validity * @@ -148,7 +153,7 @@ public function toBytes($twos_compliment = false) } while (bccomp($current, '0', 0) > 0) { - $temp = bcmod($current, '16777216'); + $temp = self::BCMOD_THREE_PARAMS ? bcmod($current, '16777216', 0) : bcmod($current, '16777216'); $value = chr($temp >> 16) . chr($temp >> 8) . chr($temp) . $value; $current = bcdiv($current, '16777216', 0); } @@ -167,7 +172,7 @@ public function toBytes($twos_compliment = false) public function add(BCMath $y) { $temp = new self(); - $temp->value = bcadd($this->value, $y->value); + $temp->value = bcadd($this->value, $y->value, 0); return $this->normalize($temp); } @@ -181,7 +186,7 @@ public function add(BCMath $y) public function subtract(BCMath $y) { $temp = new self(); - $temp->value = bcsub($this->value, $y->value); + $temp->value = bcsub($this->value, $y->value, 0); return $this->normalize($temp); } @@ -195,7 +200,7 @@ public function subtract(BCMath $y) public function multiply(BCMath $x) { $temp = new self(); - $temp->value = bcmul($this->value, $x->value); + $temp->value = bcmul($this->value, $x->value, 0); return $this->normalize($temp); } @@ -217,7 +222,7 @@ public function divide(BCMath $y) $remainder = new self(); $quotient->value = bcdiv($this->value, $y->value, 0); - $remainder->value = bcmod($this->value, $y->value); + $remainder->value = self::BCMOD_THREE_PARAMS ? bcmod($this->value, $y->value, 0) : bcmod($this->value, $y->value); if ($remainder->value[0] == '-') { $remainder->value = bcadd($remainder->value, $y->value[0] == '-' ? substr($y->value, 1) : $y->value, 0); @@ -297,8 +302,7 @@ public function extendedGCD(BCMath $n) */ public function gcd(BCMath $n) { - extract($this->extendedGCD($n)); - /** @var BCMath $gcd */ + $gcd = $this->extendedGCD($n)['gcd']; return $gcd; } @@ -475,7 +479,7 @@ protected function normalize(BCMath $result) $result->bitmask = $this->bitmask; if ($result->bitmask !== false) { - $result->value = bcmod($result->value, $result->bitmask->value); + $result->value = self::BCMOD_THREE_PARAMS ? bcmod($result->value, $result->bitmask->value, 0) : bcmod($result->value, $result->bitmask->value); } return $result; @@ -523,7 +527,7 @@ public static function randomRange(BCMath $min, BCMath $max) protected function make_odd() { if (!$this->isOdd()) { - $this->value = bcadd($this->value, '1'); + $this->value = bcadd($this->value, '1', 0); } } @@ -547,7 +551,7 @@ protected function testSmallPrimes() $value = $this->value; foreach (self::PRIMES as $prime) { - $r = bcmod($this->value, $prime); + $r = self::BCMOD_THREE_PARAMS ? bcmod($this->value, $prime, 0) : bcmod($this->value, $prime); if ($r == '0') { return $this->value == $prime; } @@ -587,7 +591,7 @@ public static function scan1divide(BCMath $r) public function pow(BCMath $n) { $temp = new self(); - $temp->value = bcpow($this->value, $n->value); + $temp->value = bcpow($this->value, $n->value, 0); return $this->normalize($temp); } @@ -656,8 +660,9 @@ public function isOdd() */ public function testBit($x) { + $divisor = bcpow('2', $x + 1, 0); return bccomp( - bcmod($this->value, bcpow('2', $x + 1, 0)), + self::BCMOD_THREE_PARAMS ? bcmod($this->value, $divisor, 0) : bcmod($this->value, $divisor), bcpow('2', $x, 0), 0 ) >= 0; diff --git a/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/BCMath/Base.php b/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/BCMath/Base.php index fe21e04..88cd93e 100644 --- a/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/BCMath/Base.php +++ b/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/BCMath/Base.php @@ -91,7 +91,7 @@ protected static function prepareReduce($x, $n, $class) */ protected static function multiplyReduce($x, $y, $n, $class) { - return static::reduce(bcmul($x, $y), $n); + return static::reduce(bcmul($x, $y, 0), $n); } /** @@ -105,6 +105,6 @@ protected static function multiplyReduce($x, $y, $n, $class) */ protected static function squareReduce($x, $n, $class) { - return static::reduce(bcmul($x, $x), $n); + return static::reduce(bcmul($x, $x, 0), $n); } } diff --git a/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/BCMath/BuiltIn.php b/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/BCMath/BuiltIn.php index b7ca8a2..f8bbcfa 100644 --- a/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/BCMath/BuiltIn.php +++ b/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/BCMath/BuiltIn.php @@ -33,7 +33,7 @@ abstract class BuiltIn extends BCMath protected static function powModHelper(BCMath $x, BCMath $e, BCMath $n) { $temp = new BCMath(); - $temp->value = bcpowmod($x->value, $e->value, $n->value); + $temp->value = bcpowmod($x->value, $e->value, $n->value, 0); return $x->normalize($temp); } diff --git a/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/BCMath/Reductions/Barrett.php b/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/BCMath/Reductions/Barrett.php index 9e01bf0..1bec0a1 100644 --- a/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/BCMath/Reductions/Barrett.php +++ b/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/BCMath/Reductions/Barrett.php @@ -67,7 +67,7 @@ protected static function reduce($n, $m) $m_length = strlen($m); if (strlen($n) > 2 * $m_length) { - return bcmod($n, $m); + return self::BCMOD_THREE_PARAMS ? bcmod($n, $m, 0) : bcmod($n, $m); } // if (m.length >> 1) + 2 <= m.length then m is too small and n can't be reduced @@ -89,14 +89,16 @@ protected static function reduce($n, $m) $lhs = '1' . str_repeat('0', $m_length + ($m_length >> 1)); $u = bcdiv($lhs, $m, 0); - $m1 = bcsub($lhs, bcmul($u, $m)); + $m1 = bcsub($lhs, bcmul($u, $m, 0), 0); $cache[self::DATA][] = [ 'u' => $u, // m.length >> 1 (technically (m.length >> 1) + 1) 'm1' => $m1 // m.length ]; } else { - extract($cache[self::DATA][$key]); + $cacheValues = $cache[self::DATA][$key]; + $u = $cacheValues['u']; + $m1 = $cacheValues['m1']; } $cutoff = $m_length + ($m_length >> 1); @@ -104,8 +106,8 @@ protected static function reduce($n, $m) $lsd = substr($n, -$cutoff); $msd = substr($n, 0, -$cutoff); - $temp = bcmul($msd, $m1); // m.length + (m.length >> 1) - $n = bcadd($lsd, $temp); // m.length + (m.length >> 1) + 1 (so basically we're adding two same length numbers) + $temp = bcmul($msd, $m1, 0); // m.length + (m.length >> 1) + $n = bcadd($lsd, $temp, 0); // m.length + (m.length >> 1) + 1 (so basically we're adding two same length numbers) //if ($m_length & 1) { // return self::regularBarrett($n, $m); //} @@ -114,31 +116,31 @@ protected static function reduce($n, $m) $temp = substr($n, 0, -$m_length + 1); // if even: ((m.length >> 1) + 2) + (m.length >> 1) == m.length + 2 // if odd: ((m.length >> 1) + 2) + (m.length >> 1) == (m.length - 1) + 2 == m.length + 1 - $temp = bcmul($temp, $u); + $temp = bcmul($temp, $u, 0); // if even: (m.length + 2) - ((m.length >> 1) + 1) = m.length - (m.length >> 1) + 1 // if odd: (m.length + 1) - ((m.length >> 1) + 1) = m.length - (m.length >> 1) $temp = substr($temp, 0, -($m_length >> 1) - 1); // if even: (m.length - (m.length >> 1) + 1) + m.length = 2 * m.length - (m.length >> 1) + 1 // if odd: (m.length - (m.length >> 1)) + m.length = 2 * m.length - (m.length >> 1) - $temp = bcmul($temp, $m); + $temp = bcmul($temp, $m, 0); // at this point, if m had an odd number of digits, we'd be subtracting a 2 * m.length - (m.length >> 1) digit // number from a m.length + (m.length >> 1) + 1 digit number. ie. there'd be an extra digit and the while loop // following this comment would loop a lot (hence our calling _regularBarrett() in that situation). - $result = bcsub($n, $temp); + $result = bcsub($n, $temp, 0); //if (bccomp($result, '0') < 0) { if ($result[0] == '-') { $temp = '1' . str_repeat('0', $m_length + 1); - $result = bcadd($result, $temp); + $result = bcadd($result, $temp, 0); } - while (bccomp($result, $m) >= 0) { - $result = bcsub($result, $m); + while (bccomp($result, $m, 0) >= 0) { + $result = bcsub($result, $m, 0); } - return $correctionNeeded ? substr($result, 0, -1) : $result; + return $correctionNeeded && $result != '0' ? substr($result, 0, -1) : $result; } /** @@ -161,7 +163,7 @@ private static function regularBarrett($x, $n) $n_length = strlen($n); if (strlen($x) > 2 * $n_length) { - return bcmod($x, $n); + return self::BCMOD_THREE_PARAMS ? bcmod($x, $n, 0) : bcmod($x, $n); } if (($key = array_search($n, $cache[self::VARIABLE])) === false) { @@ -172,21 +174,21 @@ private static function regularBarrett($x, $n) } $temp = substr($x, 0, -$n_length + 1); - $temp = bcmul($temp, $cache[self::DATA][$key]); + $temp = bcmul($temp, $cache[self::DATA][$key], 0); $temp = substr($temp, 0, -$n_length - 1); $r1 = substr($x, -$n_length - 1); - $r2 = substr(bcmul($temp, $n), -$n_length - 1); + $r2 = substr(bcmul($temp, $n, 0), -$n_length - 1); $result = bcsub($r1, $r2); //if (bccomp($result, '0') < 0) { if ($result[0] == '-') { $q = '1' . str_repeat('0', $n_length + 1); - $result = bcadd($result, $q); + $result = bcadd($result, $q, 0); } - while (bccomp($result, $n) >= 0) { - $result = bcsub($result, $n); + while (bccomp($result, $n, 0) >= 0) { + $result = bcsub($result, $n, 0); } return $result; diff --git a/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/BCMath/Reductions/EvalBarrett.php b/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/BCMath/Reductions/EvalBarrett.php index e033ba5..040d7b5 100644 --- a/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/BCMath/Reductions/EvalBarrett.php +++ b/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/BCMath/Reductions/EvalBarrett.php @@ -58,7 +58,7 @@ protected static function generateCustomReduction(BCMath $m, $class) $m_length = strlen($m); if ($m_length < 5) { - $code = 'return bcmod($x, $n);'; + $code = 'return self::BCMOD_THREE_PARAMS ? bcmod($x, $n, 0) : bcmod($x, $n);'; eval('$func = function ($n) { ' . $code . '};'); self::$custom_reduction = $func; return; @@ -66,7 +66,7 @@ protected static function generateCustomReduction(BCMath $m, $class) $lhs = '1' . str_repeat('0', $m_length + ($m_length >> 1)); $u = bcdiv($lhs, $m, 0); - $m1 = bcsub($lhs, bcmul($u, $m)); + $m1 = bcsub($lhs, bcmul($u, $m, 0), 0); $cutoff = $m_length + ($m_length >> 1); @@ -78,23 +78,23 @@ protected static function generateCustomReduction(BCMath $m, $class) $lsd = substr($n, -' . $cutoff . '); $msd = substr($n, 0, -' . $cutoff . '); - $temp = bcmul($msd, ' . $m1 . '); - $n = bcadd($lsd, $temp); + $temp = bcmul($msd, ' . $m1 . ', 0); + $n = bcadd($lsd, $temp, 0); $temp = substr($n, 0, ' . (-$m_length + 1) . '); - $temp = bcmul($temp, ' . $u . '); + $temp = bcmul($temp, ' . $u . ', 0); $temp = substr($temp, 0, ' . (-($m_length >> 1) - 1) . '); - $temp = bcmul($temp, ' . $m . '); + $temp = bcmul($temp, ' . $m . ', 0); - $result = bcsub($n, $temp); + $result = bcsub($n, $temp, 0); if ($result[0] == \'-\') { $temp = \'1' . str_repeat('0', $m_length + 1) . '\'; - $result = bcadd($result, $temp); + $result = bcadd($result, $temp, 0); } while (bccomp($result, ' . $m . ') >= 0) { - $result = bcsub($result, ' . $m . '); + $result = bcsub($result, ' . $m . ', 0); } return $result;'; diff --git a/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/Engine.php b/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/Engine.php index 474abe1..1892042 100644 --- a/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/Engine.php +++ b/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/Engine.php @@ -316,11 +316,9 @@ protected function modInverseHelper(Engine $n) return $this->normalize($n->subtract($temp)); } - extract($this->extendedGCD($n)); - /** - * @var Engine $gcd - * @var Engine $x - */ + $extended = $this->extendedGCD($n); + $gcd = $extended['gcd']; + $x = $extended['x']; if (!$gcd->equals(static::$one[static::class])) { return false; @@ -644,7 +642,7 @@ protected function powModOuter(Engine $e, Engine $n) return $this->normalize($temp->powModInner($e, $n)); } - if ($this->compare($n) > 0) { + if ($this->compare($n) > 0 || $this->isNegative()) { list(, $temp) = $this->divide($n); return $temp->powModInner($e, $n); } @@ -740,11 +738,9 @@ protected static function slidingWindow(Engine $x, Engine $e, Engine $n, $class) */ public static function random($size) { - extract(static::minMaxBits($size)); - /** - * @var BigInteger $min - * @var BigInteger $max - */ + $minMax = static::minMaxBits($size); + $min = $minMax['min']; + $max = $minMax['max']; return static::randomRange($min, $max); } @@ -758,11 +754,9 @@ public static function random($size) */ public static function randomPrime($size) { - extract(static::minMaxBits($size)); - /** - * @var static $min - * @var static $max - */ + $minMax = static::minMaxBits($size); + $min = $minMax['min']; + $max = $minMax['max']; return static::randomRangePrime($min, $max); } diff --git a/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/GMP.php b/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/GMP.php index f616362..0db43ae 100644 --- a/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/GMP.php +++ b/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/GMP.php @@ -296,7 +296,10 @@ public function modInverse(GMP $n) */ public function extendedGCD(GMP $n) { - extract(gmp_gcdext($this->value, $n->value)); + $extended = gmp_gcdext($this->value, $n->value); + $g = $extended['g']; + $s = $extended['s']; + $t = $extended['t']; return [ 'gcd' => $this->normalize(new self($g)), diff --git a/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/PHP.php b/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/PHP.php index 2d89595..de556a3 100644 --- a/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/PHP.php +++ b/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/PHP.php @@ -533,6 +533,9 @@ protected function divideHelper(PHP $y) $quotient = new static(); $remainder = new static(); $quotient->value = $q; + if ($this->is_negative) { + $r = $y->value[0] - $r; + } $remainder->value = [$r]; $quotient->is_negative = $this->is_negative != $y->is_negative; return [$this->normalize($quotient), $this->normalize($remainder)]; diff --git a/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/PHP/Reductions/Barrett.php b/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/PHP/Reductions/Barrett.php index 8868966..e624f3c 100644 --- a/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/PHP/Reductions/Barrett.php +++ b/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/PHP/Reductions/Barrett.php @@ -98,7 +98,9 @@ protected static function reduce(array $n, array $m, $class) 'm1' => $m1 // m.length ]; } else { - extract($cache[self::DATA][$key]); + $cacheValues = $cache[self::DATA][$key]; + $u = $cacheValues['u']; + $m1 = $cacheValues['m1']; } $cutoff = $m_length + ($m_length >> 1); diff --git a/vendor/phpseclib/phpseclib/phpseclib/Math/PrimeField/Integer.php b/vendor/phpseclib/phpseclib/phpseclib/Math/PrimeField/Integer.php index 15eb99c..1ebb2f5 100644 --- a/vendor/phpseclib/phpseclib/phpseclib/Math/PrimeField/Integer.php +++ b/vendor/phpseclib/phpseclib/phpseclib/Math/PrimeField/Integer.php @@ -54,10 +54,24 @@ class Integer extends Base /** * Zero * - * @var BigInteger + * @var BigInteger[] */ protected static $zero; + /** + * One + * + * @var BigInteger[] + */ + protected static $one; + + /** + * Two + * + * @var BigInteger[] + */ + protected static $two; + /** * Default constructor * @@ -68,7 +82,7 @@ public function __construct($instanceID, $num = null) { $this->instanceID = $instanceID; if (!isset($num)) { - $this->value = clone static::$zero[static::class]; + $this->value = clone static::$zero[$instanceID]; } else { $reduce = static::$reduce[$instanceID]; $this->value = $reduce($num); @@ -95,8 +109,8 @@ public static function setModulo($instanceID, BigInteger $modulo) public static function setRecurringModuloFunction($instanceID, callable $function) { static::$reduce[$instanceID] = $function; - if (!isset(static::$zero[static::class])) { - static::$zero[static::class] = new BigInteger(); + if (!isset(static::$zero[$instanceID])) { + static::$zero[$instanceID] = new BigInteger(); } } @@ -107,6 +121,9 @@ public static function cleanupCache($instanceID) { unset(static::$modulo[$instanceID]); unset(static::$reduce[$instanceID]); + unset(static::$zero[$instanceID]); + unset(static::$one[$instanceID]); + unset(static::$two[$instanceID]); } /** @@ -240,32 +257,35 @@ public function pow(BigInteger $x) */ public function squareRoot() { - static $one, $two; - if (!isset($one)) { - $one = new BigInteger(1); - $two = new BigInteger(2); + if (!isset(static::$one[$this->instanceID])) { + static::$one[$this->instanceID] = new BigInteger(1); + static::$two[$this->instanceID] = new BigInteger(2); } - $reduce = static::$reduce[$this->instanceID]; - $p_1 = static::$modulo[$this->instanceID]->subtract($one); + $one = &static::$one[$this->instanceID]; + $two = &static::$two[$this->instanceID]; + $modulo = &static::$modulo[$this->instanceID]; + $reduce = &static::$reduce[$this->instanceID]; + + $p_1 = $modulo->subtract($one); $q = clone $p_1; $s = BigInteger::scan1divide($q); list($pow) = $p_1->divide($two); - for ($z = $one; !$z->equals(static::$modulo[$this->instanceID]); $z = $z->add($one)) { - $temp = $z->powMod($pow, static::$modulo[$this->instanceID]); + for ($z = $one; !$z->equals($modulo); $z = $z->add($one)) { + $temp = $z->powMod($pow, $modulo); if ($temp->equals($p_1)) { break; } } $m = new BigInteger($s); - $c = $z->powMod($q, static::$modulo[$this->instanceID]); - $t = $this->value->powMod($q, static::$modulo[$this->instanceID]); + $c = $z->powMod($q, $modulo); + $t = $this->value->powMod($q, $modulo); list($temp) = $q->add($one)->divide($two); - $r = $this->value->powMod($temp, static::$modulo[$this->instanceID]); + $r = $this->value->powMod($temp, $modulo); while (!$t->equals($one)) { for ($i = clone $one; $i->compare($m) < 0; $i = $i->add($one)) { - if ($t->powMod($two->pow($i), static::$modulo[$this->instanceID])->equals($one)) { + if ($t->powMod($two->pow($i), $modulo)->equals($one)) { break; } } @@ -273,7 +293,7 @@ public function squareRoot() if ($i->compare($m) == 0) { return false; } - $b = $c->powMod($two->pow($m->subtract($i)->subtract($one)), static::$modulo[$this->instanceID]); + $b = $c->powMod($two->pow($m->subtract($i)->subtract($one)), $modulo); $m = $i; $c = $reduce($b->multiply($b)); $t = $reduce($t->multiply($c)); @@ -356,6 +376,8 @@ public function getNAF($w = 1) { $w++; + $zero = &static::$zero[$this->instanceID]; + $mask = new BigInteger((1 << $w) - 1); $sub = new BigInteger(1 << $w); //$sub = new BigInteger(1 << ($w - 1)); @@ -363,7 +385,7 @@ public function getNAF($w = 1) $d_i = []; $i = 0; - while ($d->compare(static::$zero[static::class]) > 0) { + while ($d->compare($zero) > 0) { if ($d->isOdd()) { // start mods @@ -377,7 +399,7 @@ public function getNAF($w = 1) } else { $d_i[$i] = 0; } - $shift = !$d->equals(static::$zero[static::class]) && $d->bitwise_and($mask)->equals(static::$zero[static::class]) ? $w : 1; // $w or $w + 1? + $shift = !$d->equals($zero) && $d->bitwise_and($mask)->equals($zero) ? $w : 1; // $w or $w + 1? $d = $d->bitwise_rightShift($shift); while (--$shift > 0) { $d_i[++$i] = 0; diff --git a/vendor/phpseclib/phpseclib/phpseclib/Net/SFTP.php b/vendor/phpseclib/phpseclib/phpseclib/Net/SFTP.php index 47dac48..7e25544 100644 --- a/vendor/phpseclib/phpseclib/phpseclib/Net/SFTP.php +++ b/vendor/phpseclib/phpseclib/phpseclib/Net/SFTP.php @@ -836,6 +836,8 @@ public function realpath($path) return false; } + $path = (string) $path; + if (!$this->canonicalize_paths) { if ($this->pwd === true) { return '.'; @@ -923,6 +925,8 @@ public function chdir($dir) return false; } + $dir = (string) $dir; + // assume current dir if $dir is empty if ($dir === '') { $dir = './'; @@ -3355,8 +3359,7 @@ private function get_sftp_packet($request_id = null) if (strlen($this->packet_buffer) < 4) { throw new \RuntimeException('Packet is too small'); } - extract(unpack('Nlength', Strings::shift($this->packet_buffer, 4))); - /** @var integer $length */ + $length = unpack('Nlength', Strings::shift($this->packet_buffer, 4))['length']; $tempLength = $length; $tempLength -= strlen($this->packet_buffer); @@ -3386,7 +3389,7 @@ private function get_sftp_packet($request_id = null) $this->packet_type = ord(Strings::shift($this->packet_buffer)); if ($this->use_request_id) { - extract(unpack('Npacket_id', Strings::shift($this->packet_buffer, 4))); // remove the request id + $packet_id = unpack('Npacket_id', Strings::shift($this->packet_buffer, 4))['packet_id']; // remove the request id $length -= 5; // account for the request id and the packet type } else { $length -= 1; // account for the packet type diff --git a/vendor/phpseclib/phpseclib/phpseclib/Net/SFTP/Stream.php b/vendor/phpseclib/phpseclib/phpseclib/Net/SFTP/Stream.php index 24047b4..a1f2fa2 100644 --- a/vendor/phpseclib/phpseclib/phpseclib/Net/SFTP/Stream.php +++ b/vendor/phpseclib/phpseclib/phpseclib/Net/SFTP/Stream.php @@ -139,7 +139,15 @@ public function __construct() protected function parse_path($path) { $orig = $path; - extract(parse_url($path) + ['port' => 22]); + $url = parse_url($path) + ['port' => 22]; + + $keys = ['scheme', 'host', 'port', 'user', 'pass', 'path', 'query', 'fragment']; + foreach ($keys as $key) { + if (isset($url[$key])) { + $$key = $url[$key]; + } + } + if (isset($query)) { $path .= '?' . $query; } elseif (preg_match('/(\?|\?#)$/', $orig)) { diff --git a/vendor/phpseclib/phpseclib/phpseclib/Net/SSH2.php b/vendor/phpseclib/phpseclib/phpseclib/Net/SSH2.php index ac44eaa..1c8a0e2 100644 --- a/vendor/phpseclib/phpseclib/phpseclib/Net/SSH2.php +++ b/vendor/phpseclib/phpseclib/phpseclib/Net/SSH2.php @@ -1477,7 +1477,7 @@ private function connect() } if (defined('NET_SSH2_LOGGING')) { - $this->append_log('<- (network: ' . round($totalElapsed, 4) . ')', $line); + $this->append_log('<- (network: ' . round($totalElapsed, 4) . ')', $data); } if (feof($this->fsock)) { @@ -1487,7 +1487,13 @@ private function connect() $extra = $matches[1]; - $this->server_identifier = trim($data, "\r\n"); + // earlier the SSH specs were quoted. + // "The server MAY send other lines of data before sending the version string." they said. + // the implication of this is that the lines of data before the server string are *not* a part of it + // getting this right is important because the correct server identifier needs to be fed into the + // exchange hash for the shared keys to be calculated correctly + $data = explode("\r\n", trim($data, "\r\n")); + $this->server_identifier = $data[count($data) - 1]; if (strlen($extra)) { $this->errors[] = $data; } @@ -1677,7 +1683,6 @@ private function key_exchange($kexinit_payload_server = false) case NET_SSH2_MSG_DISCONNECT: return $this->handleDisconnect($kexinit_payload_server); } - $this->kex_buffer[] = $kexinit_payload_server; } @@ -2977,7 +2982,7 @@ public function getOpenChannelCount() */ protected function open_channel($channel, $skip_extended = false) { - if (isset($this->channel_status[$channel]) && $this->channel_status[$channel] != NET_SSH2_MSG_CHANNEL_CLOSE) { + if (isset($this->channel_status[$channel])) { throw new \RuntimeException('Please close the channel (' . $channel . ') before trying to open it again'); } @@ -3346,6 +3351,27 @@ public function reset($channel = null) } } + /** + * Send EOF on a channel + * + * Sends an EOF to the stream; this is typically used to close standard + * input, while keeping output and error alive. + * + * @param int|null $channel Channel id returned by self::getInteractiveChannelId() + * @return void + */ + public function sendEOF($channel = null) + { + if ($channel === null) { + $channel = $this->get_interactive_channel(); + } + + $excludeStatuses = [NET_SSH2_MSG_CHANNEL_EOF, NET_SSH2_MSG_CHANNEL_CLOSE]; + if (isset($this->channel_status[$channel]) && !in_array($this->channel_status[$channel], $excludeStatuses)) { + $this->send_binary_packet(pack('CN', NET_SSH2_MSG_CHANNEL_EOF, $this->server_channels[$channel])); + } + } + /** * Is timeout? * @@ -3722,7 +3748,7 @@ private function get_binary_packet() } $padding_length = 0; $payload = $packet->plain; - extract(unpack('Cpadding_length', Strings::shift($payload, 1))); + $padding_length = unpack('Cpadding_length', Strings::shift($payload, 1))['padding_length']; if ($padding_length > 0) { Strings::pop($payload, $padding_length); } @@ -3788,8 +3814,7 @@ private function get_binary_packet() $this->key_exchange(); } - // don't filter if we're in the middle of a key exchange (since _filter might send out packets) - return $this->keyExchangeInProgress ? $payload : $this->filter($payload); + return $this->filter($payload); } /** @@ -3809,13 +3834,13 @@ private function get_binary_packet_size(&$packet) switch ($this->decryptName) { case 'aes128-gcm@openssh.com': case 'aes256-gcm@openssh.com': - extract(unpack('Npacket_length', substr($packet->raw, 0, $packet_length_header_size))); + $packet_length = unpack('Npacket_length', substr($packet->raw, 0, $packet_length_header_size))['packet_length']; $packet->size = $packet_length_header_size + $packet_length + $this->decrypt_block_size; // expect tag break; case 'chacha20-poly1305@openssh.com': $this->lengthDecrypt->setNonce(pack('N2', 0, $this->get_seq_no)); $packet_length_header = $this->lengthDecrypt->decrypt(substr($packet->raw, 0, $packet_length_header_size)); - extract(unpack('Npacket_length', $packet_length_header)); + $packet_length = unpack('Npacket_length', $packet_length_header)['packet_length']; $packet->size = $packet_length_header_size + $packet_length + 16; // expect tag break; default: @@ -3824,17 +3849,17 @@ private function get_binary_packet_size(&$packet) return; } $packet->plain = $this->decrypt->decrypt(substr($packet->raw, 0, $this->decrypt_block_size)); - extract(unpack('Npacket_length', Strings::shift($packet->plain, $packet_length_header_size))); + $packet_length = unpack('Npacket_length', Strings::shift($packet->plain, $packet_length_header_size))['packet_length']; $packet->size = $packet_length_header_size + $packet_length; $added_validation_length = $packet_length_header_size; } else { - extract(unpack('Npacket_length', substr($packet->raw, 0, $packet_length_header_size))); + $packet_length = unpack('Npacket_length', substr($packet->raw, 0, $packet_length_header_size))['packet_length']; $packet->size = $packet_length_header_size + $packet_length; } break; } } else { - extract(unpack('Npacket_length', substr($packet->raw, 0, $packet_length_header_size))); + $packet_length = unpack('Npacket_length', substr($packet->raw, 0, $packet_length_header_size))['packet_length']; $packet->size = $packet_length_header_size + $packet_length; $added_validation_length = $packet_length_header_size; } @@ -3884,9 +3909,15 @@ private function handleDisconnect($payload) */ private function filter($payload) { + if (ord($payload[0]) == NET_SSH2_MSG_DISCONNECT) { + return $this->handleDisconnect($payload); + } + + if ($this->session_id === false && $this->keyExchangeInProgress) { + return $payload; + } + switch (ord($payload[0])) { - case NET_SSH2_MSG_DISCONNECT: - return $this->handleDisconnect($payload); case NET_SSH2_MSG_IGNORE: $payload = $this->get_binary_packet(); break; @@ -3900,7 +3931,7 @@ private function filter($payload) break; // return payload case NET_SSH2_MSG_KEXINIT: // this is here for server initiated key re-exchanges after the initial key exchange - if ($this->session_id !== false) { + if (!$this->keyExchangeInProgress && $this->session_id !== false) { if (!$this->key_exchange($payload)) { $this->disconnect_helper(NET_SSH2_DISCONNECT_KEY_EXCHANGE_FAILED); throw new ConnectionClosedException('Key exchange failed'); @@ -3920,6 +3951,26 @@ private function filter($payload) $payload = $this->get_binary_packet(); } + /* + Once a party has sent a SSH_MSG_KEXINIT message for key exchange or + re-exchange, until it has sent a SSH_MSG_NEWKEYS message (Section + 7.3), it MUST NOT send any messages other than: + + o Transport layer generic messages (1 to 19) (but + SSH_MSG_SERVICE_REQUEST and SSH_MSG_SERVICE_ACCEPT MUST NOT be + sent); + + o Algorithm negotiation messages (20 to 29) (but further + SSH_MSG_KEXINIT messages MUST NOT be sent); + + o Specific key exchange method messages (30 to 49). + + -- https://www.rfc-editor.org/rfc/rfc4253#section-7.1 + */ + if ($this->keyExchangeInProgress) { + return $payload; + } + // see http://tools.ietf.org/html/rfc4252#section-5.4; only called when the encryption has been activated and when we haven't already logged in if (($this->bitmap & self::MASK_CONNECTED) && !$this->isAuthenticated() && ord($payload[0]) == NET_SSH2_MSG_USERAUTH_BANNER) { Strings::shift($payload, 1); @@ -3932,7 +3983,10 @@ private function filter($payload) switch (ord($payload[0])) { case NET_SSH2_MSG_CHANNEL_REQUEST: if (strlen($payload) == 31) { - extract(unpack('cpacket_type/Nchannel/Nlength', $payload)); + $unpacked = unpack('cpacket_type/Nchannel/Nlength', $payload); + $packet_type = $unpacked['packet_type']; + $channel = $unpacked['channel']; + $length = $unpacked['length']; if (substr($payload, 9, $length) == 'keepalive@openssh.com' && isset($this->server_channels[$channel])) { if (ord(substr($payload, 9 + $length))) { // want reply $this->send_binary_packet(pack('CN', NET_SSH2_MSG_CHANNEL_SUCCESS, $this->server_channels[$channel])); @@ -4096,7 +4150,8 @@ public function isPTYEnabled() protected function get_channel_packet($client_channel, $skip_extended = false) { if (!empty($this->channel_buffers[$client_channel])) { - switch ($this->channel_status[$client_channel]) { + // in phpseclib 4.0 this should be changed to $this->channel_status[$client_channel] ?? null + switch (isset($this->channel_status[$client_channel]) ? $this->channel_status[$client_channel] : null) { case NET_SSH2_MSG_CHANNEL_REQUEST: foreach ($this->channel_buffers[$client_channel] as $i => $packet) { switch (ord($packet[0])) { @@ -4164,7 +4219,7 @@ protected function get_channel_packet($client_channel, $skip_extended = false) continue 2; case NET_SSH2_MSG_CHANNEL_REQUEST: - if ($this->channel_status[$channel] == NET_SSH2_MSG_CHANNEL_CLOSE) { + if (!isset($this->channel_status[$channel])) { continue 2; } list($value) = Strings::unpackSSH2('s', $response); @@ -4182,10 +4237,14 @@ protected function get_channel_packet($client_channel, $skip_extended = false) $this->errors[count($this->errors) - 1] .= "\r\n$error_message"; } - $this->send_binary_packet(pack('CN', NET_SSH2_MSG_CHANNEL_EOF, $this->server_channels[$client_channel])); - $this->send_binary_packet(pack('CN', NET_SSH2_MSG_CHANNEL_CLOSE, $this->server_channels[$channel])); + if (isset($this->channel_status[$channel]) && $this->channel_status[$channel] != NET_SSH2_MSG_CHANNEL_CLOSE) { + if ($this->channel_status[$channel] != NET_SSH2_MSG_CHANNEL_EOF) { + $this->send_binary_packet(pack('CN', NET_SSH2_MSG_CHANNEL_EOF, $this->server_channels[$channel])); + } + $this->send_binary_packet(pack('CN', NET_SSH2_MSG_CHANNEL_CLOSE, $this->server_channels[$channel])); - $this->channel_status[$channel] = NET_SSH2_MSG_CHANNEL_EOF; + $this->channel_status[$channel] = NET_SSH2_MSG_CHANNEL_CLOSE; + } continue 3; case 'exit-status': @@ -4286,11 +4345,11 @@ protected function get_channel_packet($client_channel, $skip_extended = false) $this->close_channel_bitmap($channel); - if ($this->channel_status[$channel] != NET_SSH2_MSG_CHANNEL_EOF) { + if ($this->channel_status[$channel] != NET_SSH2_MSG_CHANNEL_CLOSE) { $this->send_binary_packet(pack('CN', NET_SSH2_MSG_CHANNEL_CLOSE, $this->server_channels[$channel])); } - $this->channel_status[$channel] = NET_SSH2_MSG_CHANNEL_CLOSE; + unset($this->channel_status[$channel]); $this->channelCount--; if ($client_channel == $channel) { @@ -4515,7 +4574,7 @@ private function append_log($message_number, $message) protected function append_log_helper($constant, $message_number, $message, array &$message_number_log, array &$message_log, &$log_size, &$realtime_log_file, &$realtime_log_wrap, &$realtime_log_size) { // remove the byte identifying the message type from all but the first two messages (ie. the identification strings) - if (strlen($message_number) > 2) { + if (!in_array(substr($message_number, 0, 4), ['<- (', '-> (']) && strlen($message_number) > 2) { Strings::shift($message); } @@ -4655,27 +4714,24 @@ protected function send_channel_packet($client_channel, $data) * @param bool $want_reply * @return void */ - private function close_channel($client_channel, $want_reply = false) + private function close_channel($client_channel) { // see http://tools.ietf.org/html/rfc4254#section-5.3 - $this->send_binary_packet(pack('CN', NET_SSH2_MSG_CHANNEL_EOF, $this->server_channels[$client_channel])); - - if (!$want_reply) { - $this->send_binary_packet(pack('CN', NET_SSH2_MSG_CHANNEL_CLOSE, $this->server_channels[$client_channel])); + if ($this->channel_status[$client_channel] != NET_SSH2_MSG_CHANNEL_EOF) { + $this->send_binary_packet(pack('CN', NET_SSH2_MSG_CHANNEL_EOF, $this->server_channels[$client_channel])); } + $this->send_binary_packet(pack('CN', NET_SSH2_MSG_CHANNEL_CLOSE, $this->server_channels[$client_channel])); $this->channel_status[$client_channel] = NET_SSH2_MSG_CHANNEL_CLOSE; + $this->channelCount--; $this->curTimeout = 5; - while (!is_bool($this->get_channel_packet($client_channel))) { } - if ($want_reply) { - $this->send_binary_packet(pack('CN', NET_SSH2_MSG_CHANNEL_CLOSE, $this->server_channels[$client_channel])); - } + unset($this->channel_status[$client_channel]); $this->close_channel_bitmap($client_channel); } diff --git a/vendor/unzerdev/php-sdk/CHANGELOG.md b/vendor/unzerdev/php-sdk/CHANGELOG.md index 384135b..468e50c 100644 --- a/vendor/unzerdev/php-sdk/CHANGELOG.md +++ b/vendor/unzerdev/php-sdk/CHANGELOG.md @@ -5,6 +5,29 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [3.13.1](https://github.com/unzerdev/php-sdk/compare/3.13.0..3.13.1) + +### Added + +* Added support for payment method `Wero`. + +## [3.13.0](https://github.com/unzerdev/php-sdk/compare/3.12.0..3.13.0) + +### Changed + +* Ensure type hints of nullable function parameters are explicitly defined as such to address deprecation warnings. +* Change paypage v2 test domain ending from ".io" to ".com". + +## [3.12.0](https://github.com/unzerdev/php-sdk/compare/3.11.0..3.12.0) + +### Added + +* Add Styling properties for v2 Paypage `\UnzerSDK\Resources\V2\Paypage`: + * `basketBackgroundColor` + * `paymentFormBackgroundColor` +* Add prototypes for v2 Customer: `\UnzerSDK\Resources\V2\Customer`. +* Add prototypes for v3 Basket: `\UnzerSDK\Resources\V3\Basket`. + ## [3.11.0](https://github.com/unzerdev/php-sdk/compare/3.10.0..3.11.0) ### Added diff --git a/vendor/unzerdev/php-sdk/src/Adapter/ApplepayAdapter.php b/vendor/unzerdev/php-sdk/src/Adapter/ApplepayAdapter.php index 824650a..b23a463 100644 --- a/vendor/unzerdev/php-sdk/src/Adapter/ApplepayAdapter.php +++ b/vendor/unzerdev/php-sdk/src/Adapter/ApplepayAdapter.php @@ -67,7 +67,7 @@ public function validMerchantValidationDomain(string $merchantValidationURL): bo * This is necessary if the ssl cert file doesn't contain key already. * @param string|null $caCert Path to CA certificate. */ - public function init(string $sslCert, string $sslKey = null, string $caCert = null): void + public function init(string $sslCert, ?string $sslKey = null, ?string $caCert = null): void { $timeout = EnvironmentService::getTimeout(); $curlVerbose = EnvironmentService::isCurlVerbose(); diff --git a/vendor/unzerdev/php-sdk/src/Adapter/CurlAdapter.php b/vendor/unzerdev/php-sdk/src/Adapter/CurlAdapter.php index e3ddd2b..5535eb4 100644 --- a/vendor/unzerdev/php-sdk/src/Adapter/CurlAdapter.php +++ b/vendor/unzerdev/php-sdk/src/Adapter/CurlAdapter.php @@ -10,11 +10,10 @@ namespace UnzerSDK\Adapter; -use UnzerSDK\Unzer; -use UnzerSDK\Services\EnvironmentService; -use UnzerSDK\Exceptions\UnzerApiException; use RuntimeException; - +use UnzerSDK\Exceptions\UnzerApiException; +use UnzerSDK\Services\EnvironmentService; +use UnzerSDK\Unzer; use function extension_loaded; use function in_array; @@ -37,7 +36,7 @@ public function __construct() /** * {@inheritDoc} */ - public function init(string $url, string $payload = null, string $httpMethod = HttpAdapterInterface::REQUEST_GET): void + public function init(string $url, ?string $payload = null, string $httpMethod = HttpAdapterInterface::REQUEST_GET): void { $timeout = EnvironmentService::getTimeout(); $curlVerbose = EnvironmentService::isCurlVerbose(); diff --git a/vendor/unzerdev/php-sdk/src/Adapter/HttpAdapterInterface.php b/vendor/unzerdev/php-sdk/src/Adapter/HttpAdapterInterface.php index 4e238b8..2e2bd0a 100644 --- a/vendor/unzerdev/php-sdk/src/Adapter/HttpAdapterInterface.php +++ b/vendor/unzerdev/php-sdk/src/Adapter/HttpAdapterInterface.php @@ -25,7 +25,7 @@ interface HttpAdapterInterface * @param string|null $payload Json encoded payload string. * @param string $httpMethod The Http method to perform. */ - public function init(string $url, string $payload = null, string $httpMethod = HttpAdapterInterface::REQUEST_GET): void; + public function init(string $url, ?string $payload = null, string $httpMethod = HttpAdapterInterface::REQUEST_GET): void; /** * Executes the request and returns the response. diff --git a/vendor/unzerdev/php-sdk/src/Apis/PaymentApiConfigBearerAuth.php b/vendor/unzerdev/php-sdk/src/Apis/PaymentApiConfigBearerAuth.php new file mode 100644 index 0000000..b0d166e --- /dev/null +++ b/vendor/unzerdev/php-sdk/src/Apis/PaymentApiConfigBearerAuth.php @@ -0,0 +1,17 @@ +clientMessage = empty($clientMessage) ? static::CLIENT_MESSAGE : $clientMessage; diff --git a/vendor/unzerdev/php-sdk/src/Interfaces/CancelServiceInterface.php b/vendor/unzerdev/php-sdk/src/Interfaces/CancelServiceInterface.php index efa5314..5400380 100644 --- a/vendor/unzerdev/php-sdk/src/Interfaces/CancelServiceInterface.php +++ b/vendor/unzerdev/php-sdk/src/Interfaces/CancelServiceInterface.php @@ -8,13 +8,13 @@ namespace UnzerSDK\Interfaces; +use RuntimeException; use UnzerSDK\Constants\CancelReasonCodes; use UnzerSDK\Exceptions\UnzerApiException; use UnzerSDK\Resources\Payment; use UnzerSDK\Resources\TransactionTypes\Authorization; use UnzerSDK\Resources\TransactionTypes\Cancellation; use UnzerSDK\Resources\TransactionTypes\Charge; -use RuntimeException; interface CancelServiceInterface { @@ -30,7 +30,7 @@ interface CancelServiceInterface * @throws UnzerApiException An UnzerApiException is thrown if there is an error returned on API-request. * @throws RuntimeException A RuntimeException is thrown when there is an error while using the SDK. */ - public function cancelAuthorization(Authorization $authorization, float $amount = null): Cancellation; + public function cancelAuthorization(Authorization $authorization, ?float $amount = null): Cancellation; /** * Performs a Cancellation transaction for the Authorization of the given Payment object. @@ -44,7 +44,7 @@ public function cancelAuthorization(Authorization $authorization, float $amount * @throws UnzerApiException An UnzerApiException is thrown if there is an error returned on API-request. * @throws RuntimeException A RuntimeException is thrown when there is an error while using the SDK. */ - public function cancelAuthorizationByPayment($payment, float $amount = null): Cancellation; + public function cancelAuthorizationByPayment($payment, ?float $amount = null): Cancellation; /** * Performs a Cancellation transaction for the given Charge and returns the resulting Cancellation object. @@ -67,11 +67,11 @@ public function cancelAuthorizationByPayment($payment, float $amount = null): Ca public function cancelChargeById( $payment, string $chargeId, - float $amount = null, - string $reasonCode = null, - string $referenceText = null, - float $amountNet = null, - float $amountVat = null + ?float $amount = null, + ?string $reasonCode = null, + ?string $referenceText = null, + ?float $amountNet = null, + ?float $amountVat = null ): Cancellation; /** @@ -93,11 +93,11 @@ public function cancelChargeById( */ public function cancelCharge( Charge $charge, - float $amount = null, - string $reasonCode = null, - string $referenceText = null, - float $amountNet = null, - float $amountVat = null + ?float $amount = null, + ?string $reasonCode = null, + ?string $referenceText = null, + ?float $amountNet = null, + ?float $amountVat = null ): Cancellation; /** @@ -119,11 +119,11 @@ public function cancelCharge( */ public function cancelPayment( $payment, - float $amount = null, + ?float $amount = null, ?string $reasonCode = CancelReasonCodes::REASON_CODE_CANCEL, - string $referenceText = null, - float $amountNet = null, - float $amountVat = null + ?string $referenceText = null, + ?float $amountNet = null, + ?float $amountVat = null ): array; /** @@ -167,5 +167,5 @@ public function cancelChargedPayment($payment, ?Cancellation $cancellation = nul * @throws UnzerApiException An UnzerApiException is thrown if there is an error returned on API-request. * @throws RuntimeException A RuntimeException is thrown when there is a error while using the SDK. */ - public function cancelPaymentAuthorization($payment, float $amount = null): ?Cancellation; + public function cancelPaymentAuthorization($payment, ?float $amount = null): ?Cancellation; } diff --git a/vendor/unzerdev/php-sdk/src/Interfaces/PaymentServiceInterface.php b/vendor/unzerdev/php-sdk/src/Interfaces/PaymentServiceInterface.php index 477e03e..d461397 100644 --- a/vendor/unzerdev/php-sdk/src/Interfaces/PaymentServiceInterface.php +++ b/vendor/unzerdev/php-sdk/src/Interfaces/PaymentServiceInterface.php @@ -9,6 +9,7 @@ namespace UnzerSDK\Interfaces; use DateTime; +use RuntimeException; use UnzerSDK\Exceptions\UnzerApiException; use UnzerSDK\Resources\AbstractUnzerResource; use UnzerSDK\Resources\Basket; @@ -24,7 +25,6 @@ use UnzerSDK\Resources\TransactionTypes\Charge; use UnzerSDK\Resources\TransactionTypes\Payout; use UnzerSDK\Resources\TransactionTypes\Shipment; -use RuntimeException; interface PaymentServiceInterface { @@ -48,8 +48,8 @@ public function performAuthorization( Authorization $authorization, $paymentType, $customer = null, - Metadata $metadata = null, - Basket $basket = null + ?Metadata $metadata = null, + ?Basket $basket = null ): Authorization; /** @@ -130,8 +130,8 @@ public function performCharge( Charge $charge, $paymentType, $customer = null, - Metadata $metadata = null, - Basket $basket = null + ?Metadata $metadata = null, + ?Basket $basket = null ): Charge; /** @@ -229,9 +229,9 @@ public function performChargeOnPayment( */ public function chargeAuthorization( $payment, - float $amount = null, - string $orderId = null, - string $invoiceId = null + ?float $amount = null, + ?string $orderId = null, + ?string $invoiceId = null ): Charge; /** @@ -252,9 +252,9 @@ public function chargeAuthorization( */ public function chargePayment( $payment, - float $amount = null, - string $orderId = null, - string $invoiceId = null + ?float $amount = null, + ?string $orderId = null, + ?string $invoiceId = null ): Charge; /** @@ -284,11 +284,11 @@ public function payout( $paymentType, string $returnUrl, $customer = null, - string $orderId = null, - Metadata $metadata = null, - Basket $basket = null, - string $invoiceId = null, - string $referenceText = null + ?string $orderId = null, + ?Metadata $metadata = null, + ?Basket $basket = null, + ?string $invoiceId = null, + ?string $referenceText = null ): Payout; /** @@ -303,7 +303,7 @@ public function payout( * @throws UnzerApiException An UnzerApiException is thrown if there is an error returned on API-request. * @throws RuntimeException A RuntimeException is thrown when there is an error while using the SDK. */ - public function ship($payment, string $invoiceId = null, string $orderId = null): Shipment; + public function ship($payment, ?string $invoiceId = null, ?string $orderId = null): Shipment; /** * Initializes a PayPage for charge transaction and returns the PayPage resource. @@ -328,9 +328,9 @@ public function ship($payment, string $invoiceId = null, string $orderId = null) */ public function initPayPageCharge( Paypage $paypage, - Customer $customer = null, - Basket $basket = null, - Metadata $metadata = null + ?Customer $customer = null, + ?Basket $basket = null, + ?Metadata $metadata = null ): Paypage; /** @@ -356,9 +356,9 @@ public function initPayPageCharge( */ public function initPayPageAuthorize( Paypage $paypage, - Customer $customer = null, - Basket $basket = null, - Metadata $metadata = null + ?Customer $customer = null, + ?Basket $basket = null, + ?Metadata $metadata = null ): Paypage; /** @@ -378,7 +378,7 @@ public function fetchInstallmentPlans( float $amount, string $currency, float $effectiveInterest, - DateTime $orderDate = null + ?DateTime $orderDate = null ): InstalmentPlans; /** diff --git a/vendor/unzerdev/php-sdk/src/Interfaces/ResourceServiceInterface.php b/vendor/unzerdev/php-sdk/src/Interfaces/ResourceServiceInterface.php index a95fe3e..6f26b0a 100644 --- a/vendor/unzerdev/php-sdk/src/Interfaces/ResourceServiceInterface.php +++ b/vendor/unzerdev/php-sdk/src/Interfaces/ResourceServiceInterface.php @@ -30,7 +30,7 @@ interface ResourceServiceInterface { /** - * Retrieves an Payout resource via the API using the corresponding Payment or paymentId. + * Retrieves a Payout resource via the API using the corresponding Payment or paymentId. * The Payout resource can not be fetched using its id since they are unique only within the Payment. * A Payment can have zero or one Payouts. * @@ -57,7 +57,7 @@ public function fetchPayout($payment): Payout; * @throws UnzerApiException An UnzerApiException is thrown if there is an error returned on API-request. * @throws RuntimeException A RuntimeException is thrown when there is an error while using the SDK. */ - public function activateRecurringPayment($paymentType, string $returnUrl, string $recurrenceType = null): Recurring; + public function activateRecurringPayment($paymentType, string $returnUrl, ?string $recurrenceType = null): Recurring; /** * Fetch and return payment by given payment id or payment object. @@ -162,7 +162,7 @@ public function createBasket(Basket $basket): Basket; public function fetchBasket($basket): Basket; /** - * Update the a basket resource with the given basket object (id must be set). + * Update a basket resource with the given basket object (id must be set). * * @param Basket $basket * @@ -195,12 +195,12 @@ public function createPaymentType(BasePaymentType $paymentType): BasePaymentType * @return BasePaymentType|AbstractUnzerResource The updated PaymentType object. * * @throws UnzerApiException An UnzerApiException is thrown if there is an error returned on API-request. - * @throws RuntimeException A RuntimeException is thrown when there is a error while using the SDK. + * @throws RuntimeException A RuntimeException is thrown when there is an error while using the SDK. */ public function updatePaymentType(BasePaymentType $paymentType): BasePaymentType; /** - * Fetch the payment type with the given Id from the API. + * Fetch the payment type with the given ID from the API. * * @param string $typeId * @@ -257,7 +257,7 @@ public function fetchCustomer($customer): Customer; * @throws UnzerApiException An UnzerApiException is thrown if there is an error returned on API-request. * @throws RuntimeException A RuntimeException is thrown when there is an error while using the SDK. */ - public function fetchCustomerByExtCustomerId(string $customerId): Customer; + public function fetchCustomerByExtCustomerId(string $customerId, int $version): Customer; /** * Update and return a Customer object via API. @@ -325,8 +325,8 @@ public function fetchCharge(Charge $charge): Charge; * Fetch a chargeback object by combination of payment id, chargeback id and charge id. * Chargeback ids are not unique to a merchant but to the payment. * - * @param Payment|string $payment The payment object or payment id to fetch the authorization from. - * @param string $chargebackId The id of the chargeback to fetch. + * @param string $paymentId The payment object or payment id to fetch the authorization from. + * @param string $chargebackId The id of the chargeback to fetch. * * @return Chargeback|AbstractUnzerResource The fetched chargeback. * diff --git a/vendor/unzerdev/php-sdk/src/Interfaces/WebhookServiceInterface.php b/vendor/unzerdev/php-sdk/src/Interfaces/WebhookServiceInterface.php index 48c89e2..8ae6b5a 100644 --- a/vendor/unzerdev/php-sdk/src/Interfaces/WebhookServiceInterface.php +++ b/vendor/unzerdev/php-sdk/src/Interfaces/WebhookServiceInterface.php @@ -8,10 +8,10 @@ namespace UnzerSDK\Interfaces; +use RuntimeException; use UnzerSDK\Exceptions\UnzerApiException; use UnzerSDK\Resources\AbstractUnzerResource; use UnzerSDK\Resources\Webhook; -use RuntimeException; interface WebhookServiceInterface { @@ -106,5 +106,5 @@ public function registerMultipleWebhooks(string $url, array $events): array; * @throws UnzerApiException An UnzerApiException is thrown if there is an error returned on API-request. * @throws RuntimeException A RuntimeException is thrown when there is an error while using the SDK. */ - public function fetchResourceFromEvent(string $eventJson = null): AbstractUnzerResource; + public function fetchResourceFromEvent(?string $eventJson = null): AbstractUnzerResource; } diff --git a/vendor/unzerdev/php-sdk/src/Resources/Basket.php b/vendor/unzerdev/php-sdk/src/Resources/Basket.php index 007af2b..3397f90 100644 --- a/vendor/unzerdev/php-sdk/src/Resources/Basket.php +++ b/vendor/unzerdev/php-sdk/src/Resources/Basket.php @@ -4,8 +4,9 @@ use stdClass; use UnzerSDK\Adapter\HttpAdapterInterface; +use UnzerSDK\Constants\ApiVersions; use UnzerSDK\Resources\EmbeddedResources\BasketItem; -use function count; +use UnzerSDK\Resources\V2\BasketProperties as BasketV2Properties; /** * This represents the basket resource. @@ -15,6 +16,8 @@ */ class Basket extends AbstractUnzerResource { + use BasketV2Properties; + /** * @var float $amountTotalGross * @@ -36,21 +39,6 @@ class Basket extends AbstractUnzerResource */ protected $amountTotalVat = 0.0; - /** @var float $totalValueGross */ - protected $totalValueGross = 0.0; - - /** @var string $currencyCode */ - protected $currencyCode; - - /** @var string $orderId */ - protected $orderId = ''; - - /** @var string $note */ - protected $note; - - /** @var BasketItem[] $basketItems */ - private $basketItems; - /** * Basket constructor. * @@ -86,9 +74,9 @@ public function getAmountTotalGross(): float /** * @param float $amountTotalGross * + * @return Basket * @deprecated since 1.1.5.0 @see setTotalValueGross(). * - * @return Basket */ public function setAmountTotalGross(float $amountTotalGross): Basket { @@ -96,25 +84,6 @@ public function setAmountTotalGross(float $amountTotalGross): Basket return $this; } - /** - * @return float - */ - public function getTotalValueGross(): float - { - return $this->totalValueGross; - } - - /** - * @param float $totalValueGross - * - * @return Basket - */ - public function setTotalValueGross(float $totalValueGross): Basket - { - $this->totalValueGross = $totalValueGross; - return $this; - } - /** * @return float * @@ -128,9 +97,9 @@ public function getAmountTotalDiscount(): float /** * @param float $amountTotalDiscount * + * @return Basket * @deprecated since 1.1.5.0 Property is redundant and is no longer needed. * - * @return Basket */ public function setAmountTotalDiscount(float $amountTotalDiscount): Basket { @@ -151,9 +120,9 @@ public function getAmountTotalVat(): float /** * @param float $amountTotalVat * + * @return Basket * @deprecated since 1.1.5.0 Property is redundant and is no longer needed. * - * @return Basket */ public function setAmountTotalVat(float $amountTotalVat): Basket { @@ -162,122 +131,6 @@ public function setAmountTotalVat(float $amountTotalVat): Basket } /** - * @return string - */ - public function getCurrencyCode(): string - { - return $this->currencyCode; - } - - /** - * @param string $currencyCode - * - * @return Basket - */ - public function setCurrencyCode(string $currencyCode): Basket - { - $this->currencyCode = $currencyCode; - return $this; - } - - /** - * @return int - */ - public function getItemCount(): int - { - return count($this->basketItems); - } - - /** - * @return string|null - */ - public function getNote(): ?string - { - return $this->note; - } - - /** - * @param string|null $note - * - * @return Basket - */ - public function setNote(?string $note): Basket - { - $this->note = $note; - return $this; - } - - /** - * @return string - */ - public function getOrderId(): string - { - return $this->orderId; - } - - /** - * @param string $orderId - * - * @return Basket - */ - public function setOrderId(string $orderId): Basket - { - $this->orderId = $orderId; - return $this; - } - - /** - * @return array - */ - public function getBasketItems(): array - { - return $this->basketItems; - } - - /** - * @param array $basketItems - * - * @return Basket - */ - public function setBasketItems(array $basketItems): Basket - { - $this->basketItems = []; - - foreach ($basketItems as $basketItem) { - $this->addBasketItem($basketItem); - } - - return $this; - } - - /** - * Adds the given BasketItem to the Basket. - * - * @param BasketItem $basketItem - * - * @return Basket - */ - public function addBasketItem(BasketItem $basketItem): Basket - { - $this->basketItems[] = $basketItem; - if ($basketItem->getBasketItemReferenceId() === null) { - $basketItem->setBasketItemReferenceId((string)$this->getKeyOfLastBasketItemAdded()); - } - return $this; - } - - /** - * @param int $index - * - * @return BasketItem|null - */ - public function getBasketItemByIndex(int $index): ?BasketItem - { - return $this->basketItems[$index] ?? null; - } - - /** - * Add the dynamically set meta data. * {@inheritDoc} */ public function expose(): array @@ -301,7 +154,7 @@ public function expose(): array public function getApiVersion(): string { if (!empty($this->getTotalValueGross())) { - return 'v2'; + return ApiVersions::V2; } return parent::getApiVersion(); } diff --git a/vendor/unzerdev/php-sdk/src/Resources/CustomerFactory.php b/vendor/unzerdev/php-sdk/src/Resources/CustomerFactory.php index 777c142..b353644 100644 --- a/vendor/unzerdev/php-sdk/src/Resources/CustomerFactory.php +++ b/vendor/unzerdev/php-sdk/src/Resources/CustomerFactory.php @@ -6,6 +6,7 @@ use UnzerSDK\Constants\CompanyRegistrationTypes; use UnzerSDK\Resources\EmbeddedResources\Address; use UnzerSDK\Resources\EmbeddedResources\CompanyInfo; +use UnzerSDK\Resources\V2\Customer as CustomerV2; /** * Creates the different Customer objects. @@ -15,6 +16,18 @@ */ class CustomerFactory { + private static int $version = 1; + + public static function setVersion(int $version): void + { + self::$version = $version; + } + + public static function getVersion(): int + { + return self::$version; + } + /** * Creates a local Customer object for B2C transactions. * Please use Unzer::createCustomer(...) to create the customer resource on the API side. @@ -26,7 +39,7 @@ class CustomerFactory */ public static function createCustomer(string $firstname, string $lastname): Customer { - return (new Customer())->setFirstname($firstname)->setLastname($lastname); + return self::getCustomer()->setFirstname($firstname)->setLastname($lastname); } /** @@ -58,7 +71,7 @@ public static function createNotRegisteredB2bCustomer( ->setFunction('OWNER') ->setCommercialSector($commercialSector); - return (new Customer()) + return self::getCustomer() ->setFirstname($firstname) ->setLastname($lastname) ->setBirthDate($birthDate) @@ -89,9 +102,17 @@ public static function createRegisteredB2bCustomer( ->setCommercialRegisterNumber($commercialRegisterNumber) ->setCommercialSector($commercialSector); - return (new Customer()) + return self::getCustomer() ->setCompany($company) ->setBillingAddress($billingAddress) ->setCompanyInfo($companyInfo); } + + /** + * @return Customer + */ + protected static function getCustomer(): Customer + { + return (self::$version == 2) ? new CustomerV2() : new Customer(); + } } diff --git a/vendor/unzerdev/php-sdk/src/Resources/EmbeddedResources/BasketItem.php b/vendor/unzerdev/php-sdk/src/Resources/EmbeddedResources/BasketItem.php index bffe0eb..feaa2b3 100644 --- a/vendor/unzerdev/php-sdk/src/Resources/EmbeddedResources/BasketItem.php +++ b/vendor/unzerdev/php-sdk/src/Resources/EmbeddedResources/BasketItem.php @@ -3,6 +3,7 @@ namespace UnzerSDK\Resources\EmbeddedResources; use UnzerSDK\Resources\AbstractUnzerResource; +use UnzerSDK\Resources\V2\BasketItemProperties as BasketV2ItemProperties; /** * This trait adds amount properties to a class. @@ -12,14 +13,7 @@ */ class BasketItem extends AbstractUnzerResource { - /** @var string $basketItemReferenceId */ - protected $basketItemReferenceId; - - /** @var int $quantity */ - protected $quantity = 1; - - /** @var float $vat */ - protected $vat = 0.0; + use BasketV2ItemProperties; /** * @var float $amountDiscount @@ -28,9 +22,6 @@ class BasketItem extends AbstractUnzerResource */ protected $amountDiscount = 0.0; - /** @var float $amountDiscountPerUnitGross */ - protected $amountDiscountPerUnitGross = 0.0; - /** * @var float $amountGross * @@ -52,9 +43,6 @@ class BasketItem extends AbstractUnzerResource */ protected $amountPerUnit = 0.0; - /** @var float $amountPerUnitGross */ - protected $amountPerUnitGross = 0.0; - /** * @var float $amountNet * @@ -62,98 +50,27 @@ class BasketItem extends AbstractUnzerResource */ protected $amountNet = 0.0; - /** @var string $unit */ - protected $unit; - - /** @var string $title */ - protected $title = ''; - - /** @var string|null $subTitle */ - protected $subTitle; - - /** @var string|null $imageUrl */ - protected $imageUrl; - - /** @var string|null $type */ - protected $type; - /** * BasketItem constructor. * + * @param string $title + * @param float $amountNet + * @param float $amountPerUnit + * @param int $quantity * @deprecated since 1.1.5.0 Please call constructor without parameters and use setter functions instead. * - * @param string $title - * @param float $amountNet - * @param float $amountPerUnit - * @param int $quantity */ public function __construct( string $title = '', float $amountNet = 0.0, float $amountPerUnit = 0.0, - int $quantity = 1 - ) { - $this->title = $title; - $this->quantity = $quantity; - $this->setAmountNet($amountNet); - $this->setAmountPerUnit($amountPerUnit); - } - - /** - * @return string|null - */ - public function getBasketItemReferenceId(): ?string - { - return $this->basketItemReferenceId; - } - - /** - * @param string|null $basketItemReferenceId - * - * @return BasketItem - */ - public function setBasketItemReferenceId(?string $basketItemReferenceId): BasketItem - { - $this->basketItemReferenceId = $basketItemReferenceId; - return $this; - } - - /** - * @return int - */ - public function getQuantity(): int - { - return $this->quantity; - } - - /** - * @param int $quantity - * - * @return BasketItem - */ - public function setQuantity(int $quantity): BasketItem + int $quantity = 1 + ) { + $this->title = $title; $this->quantity = $quantity; - return $this; - } - - /** - * @return float - */ - public function getVat(): float - { - return $this->vat; - } - - /** - * @param float $vat - * - * @return BasketItem - */ - public function setVat(float $vat): BasketItem - { - $this->vat = $vat; - return $this; + $this->setAmountNet($amountNet); + $this->setAmountPerUnit($amountPerUnit); } /** @@ -169,9 +86,9 @@ public function getAmountDiscount(): float /** * @param float $amountDiscount * + * @return BasketItem * @deprecated since 1.1.5.0 @see $setAmountDiscountPerUnitGross. * - * @return BasketItem */ public function setAmountDiscount(float $amountDiscount): BasketItem { @@ -192,9 +109,9 @@ public function getAmountGross(): float /** * @param float $amountGross * + * @return BasketItem * @deprecated since 1.1.5.0 Property is redundant and is no longer needed. * - * @return BasketItem */ public function setAmountGross(float $amountGross): BasketItem { @@ -202,43 +119,6 @@ public function setAmountGross(float $amountGross): BasketItem return $this; } - /** - * @return float - */ - public function getAmountDiscountPerUnitGross(): float - { - return $this->amountDiscountPerUnitGross; - } - - /** - * @param float $amountDiscountPerUnitGross - * - * @return BasketItem - */ - public function setAmountDiscountPerUnitGross(float $amountDiscountPerUnitGross): BasketItem - { - $this->amountDiscountPerUnitGross = $amountDiscountPerUnitGross; - return $this; - } - - /** - * @return float - */ - public function getAmountPerUnitGross(): float - { - return $this->amountPerUnitGross; - } - - /** - * @param float $amountPerUnitGross - * - * @return BasketItem - */ - public function setAmountPerUnitGross(float $amountPerUnitGross): BasketItem - { - $this->amountPerUnitGross = $amountPerUnitGross; - return $this; - } /** * @return float @@ -253,9 +133,9 @@ public function getAmountVat(): float /** * @param float $amountVat * + * @return BasketItem * @deprecated since 1.1.5.0 Property is redundant and is no longer needed. * - * @return BasketItem */ public function setAmountVat(float $amountVat): BasketItem { @@ -276,9 +156,9 @@ public function getAmountPerUnit(): float /** * @param float $amountPerUnit * + * @return BasketItem * @deprecated since 1.1.5.0 @see setAmountPerUnitGross * - * @return BasketItem */ public function setAmountPerUnit(float $amountPerUnit): BasketItem { @@ -299,111 +179,13 @@ public function getAmountNet(): float /** * @param float $amountNet * + * @return BasketItem * @deprecated since 1.1.5.0 Property is redundant and is no longer needed. * - * @return BasketItem */ public function setAmountNet(float $amountNet): BasketItem { $this->amountNet = $amountNet; return $this; } - - /** - * @return string|null - */ - public function getUnit(): ?string - { - return $this->unit; - } - - /** - * @param string|null $unit - * - * @return BasketItem - */ - public function setUnit(?string $unit): BasketItem - { - $this->unit = $unit; - return $this; - } - - /** - * @return string - */ - public function getTitle(): string - { - return $this->title; - } - - /** - * @param string $title - * - * @return BasketItem - */ - public function setTitle(string $title): BasketItem - { - $this->title = $title; - return $this; - } - - /** - * @return string|null - */ - public function getImageUrl(): ?string - { - return $this->imageUrl; - } - - /** - * @param string|null $imageUrl - * - * @return BasketItem - */ - public function setImageUrl(?string $imageUrl): BasketItem - { - $this->imageUrl = $imageUrl; - return $this; - } - - /** - * @return string|null - */ - public function getSubTitle(): ?string - { - return $this->subTitle; - } - - /** - * @param string|null $subTitle - * - * @return BasketItem - */ - public function setSubTitle(?string $subTitle): BasketItem - { - $this->subTitle = $subTitle; - return $this; - } - - /** - * @return string|null - */ - public function getType(): ?string - { - return $this->type; - } - - /** - * The type of the basket item. - * Please refer to UnzerSDK\Constants\BasketItemTypes for available type constants. - * - * @param string|null $type - * - * @return BasketItem - */ - public function setType(?string $type): BasketItem - { - $this->type = $type; - return $this; - } } diff --git a/vendor/unzerdev/php-sdk/src/Resources/EmbeddedResources/GooglePay/SignedMessage.php b/vendor/unzerdev/php-sdk/src/Resources/EmbeddedResources/GooglePay/SignedMessage.php index 647474d..31dfa91 100644 --- a/vendor/unzerdev/php-sdk/src/Resources/EmbeddedResources/GooglePay/SignedMessage.php +++ b/vendor/unzerdev/php-sdk/src/Resources/EmbeddedResources/GooglePay/SignedMessage.php @@ -15,12 +15,7 @@ class SignedMessage extends AbstractUnzerResource /** @var string */ protected $encryptedMessage; - /** - * @param string $tag - * @param string $ephemeralPublicKey - * @param string $encryptedMessage - */ - public function __construct(string $tag = null, string $ephemeralPublicKey = null, string $encryptedMessage = null) + public function __construct(?string $tag = null, ?string $ephemeralPublicKey = null, ?string $encryptedMessage = null) { $this->tag = $tag; $this->ephemeralPublicKey = $ephemeralPublicKey; diff --git a/vendor/unzerdev/php-sdk/src/Resources/EmbeddedResources/Paypage/PaymentMethodConfig.php b/vendor/unzerdev/php-sdk/src/Resources/EmbeddedResources/Paypage/PaymentMethodConfig.php index e63914c..1f75a8d 100644 --- a/vendor/unzerdev/php-sdk/src/Resources/EmbeddedResources/Paypage/PaymentMethodConfig.php +++ b/vendor/unzerdev/php-sdk/src/Resources/EmbeddedResources/Paypage/PaymentMethodConfig.php @@ -3,6 +3,7 @@ namespace UnzerSDK\Resources\EmbeddedResources\Paypage; use UnzerSDK\Resources\AbstractUnzerResource; +use UnzerSDK\Resources\EmbeddedResources\WeroEventDependentPayment; class PaymentMethodConfig extends AbstractUnzerResource { @@ -15,6 +16,19 @@ class PaymentMethodConfig extends AbstractUnzerResource protected ?bool $credentialOnFile = null; // card only. protected ?string $exemption = null; // card only. + protected ?WeroEventDependentPayment $eventDependentPayment = null; + + public function getEventDependentPayment(): ?WeroEventDependentPayment + { + return $this->eventDependentPayment; + } + + public function setEventDependentPayment(?WeroEventDependentPayment $eventDependentPayment): PaymentMethodConfig + { + $this->eventDependentPayment = $eventDependentPayment; + return $this; + } + /** * @param bool|null $enabled * @param int|null $order @@ -80,4 +94,4 @@ public function setExemption(?string $exemption): PaymentMethodConfig $this->exemption = $exemption; return $this; } -} \ No newline at end of file +} diff --git a/vendor/unzerdev/php-sdk/src/Resources/EmbeddedResources/Paypage/PaymentMethodsConfigs.php b/vendor/unzerdev/php-sdk/src/Resources/EmbeddedResources/Paypage/PaymentMethodsConfigs.php index cb150f3..312e865 100644 --- a/vendor/unzerdev/php-sdk/src/Resources/EmbeddedResources/Paypage/PaymentMethodsConfigs.php +++ b/vendor/unzerdev/php-sdk/src/Resources/EmbeddedResources/Paypage/PaymentMethodsConfigs.php @@ -11,6 +11,7 @@ class PaymentMethodsConfigs extends AbstractUnzerResource const PAYPAGE_TYPE_NAME_MAPPING = [ 'card' => 'cards', 'eps' => 'eps', + 'openbankingpis' => 'openbankingpis', 'payu' => 'payu', 'postfinanceefinance' => 'pfefinance', 'postfinancecard' => 'pfcard' diff --git a/vendor/unzerdev/php-sdk/src/Resources/EmbeddedResources/Paypage/Style.php b/vendor/unzerdev/php-sdk/src/Resources/EmbeddedResources/Paypage/Style.php index 492a47d..1b27cff 100644 --- a/vendor/unzerdev/php-sdk/src/Resources/EmbeddedResources/Paypage/Style.php +++ b/vendor/unzerdev/php-sdk/src/Resources/EmbeddedResources/Paypage/Style.php @@ -20,6 +20,30 @@ class Style extends AbstractUnzerResource protected ?string $logoImage = null; protected ?string $linkColor = null; protected ?string $textColor = null; + protected ?string $basketBackgroundColor = null; + protected ?string $paymentFormBackgroundColor = null; + + public function getBasketBackgroundColor(): ?string + { + return $this->basketBackgroundColor; + } + + public function setBasketBackgroundColor(?string $basketBackgroundColor): Style + { + $this->basketBackgroundColor = $basketBackgroundColor; + return $this; + } + + public function getPaymentFormBackgroundColor(): ?string + { + return $this->paymentFormBackgroundColor; + } + + public function setPaymentFormBackgroundColor(?string $paymentFormBackgroundColor): Style + { + $this->paymentFormBackgroundColor = $paymentFormBackgroundColor; + return $this; + } public function getHideBasket(): ?bool { diff --git a/vendor/unzerdev/php-sdk/src/Resources/EmbeddedResources/WeroEventDependentPayment.php b/vendor/unzerdev/php-sdk/src/Resources/EmbeddedResources/WeroEventDependentPayment.php new file mode 100644 index 0000000..71e32eb --- /dev/null +++ b/vendor/unzerdev/php-sdk/src/Resources/EmbeddedResources/WeroEventDependentPayment.php @@ -0,0 +1,70 @@ +captureTrigger; + } + + /** + * @see WeroCaptureTriggers for allowed values + */ + public function setCaptureTrigger(?string $captureTrigger): WeroEventDependentPayment + { + $this->captureTrigger = $captureTrigger; + return $this; + } + + public function getAmountPaymentType(): ?string + { + return $this->amountPaymentType; + } + + /** + * @see WeroAmountPaymentTypes for allowed values + */ + public function setAmountPaymentType(?string $amountPaymentType): WeroEventDependentPayment + { + $this->amountPaymentType = $amountPaymentType; + return $this; + } + + public function getMaxAuthToCaptureTime(): ?int + { + return $this->maxAuthToCaptureTime; + } + + public function setMaxAuthToCaptureTime(?int $maxAuthToCaptureTime): WeroEventDependentPayment + { + $this->maxAuthToCaptureTime = $maxAuthToCaptureTime; + return $this; + } + + public function getMultiCapturesAllowed(): ?bool + { + return $this->multiCapturesAllowed; + } + + public function setMultiCapturesAllowed(?bool $multiCapturesAllowed): WeroEventDependentPayment + { + $this->multiCapturesAllowed = $multiCapturesAllowed; + return $this; + } +} diff --git a/vendor/unzerdev/php-sdk/src/Resources/EmbeddedResources/WeroTransactionData.php b/vendor/unzerdev/php-sdk/src/Resources/EmbeddedResources/WeroTransactionData.php new file mode 100644 index 0000000..e172e4e --- /dev/null +++ b/vendor/unzerdev/php-sdk/src/Resources/EmbeddedResources/WeroTransactionData.php @@ -0,0 +1,48 @@ +eventDependentPayment; + } + + /** + * @param WeroEventDependentPayment|null $eventDependentPayment + * @return WeroTransactionData + */ + public function setEventDependentPayment(?WeroEventDependentPayment $eventDependentPayment): WeroTransactionData + { + $this->eventDependentPayment = $eventDependentPayment; + return $this; + } + + /** + * @inheritDoc + */ + public function handleResponse($response, string $method = HttpAdapterInterface::REQUEST_GET): void + { + parent::handleResponse($response, $method); + if ($response instanceof stdClass && isset($response->eventDependentPayment)) { + $edp = $this->getEventDependentPayment() ?? new WeroEventDependentPayment(); + $edp->handleResponse($response->eventDependentPayment); + $this->setEventDependentPayment($edp); + } + } +} diff --git a/vendor/unzerdev/php-sdk/src/Resources/InstalmentPlan.php b/vendor/unzerdev/php-sdk/src/Resources/InstalmentPlan.php index bcdcf85..3c97695 100644 --- a/vendor/unzerdev/php-sdk/src/Resources/InstalmentPlan.php +++ b/vendor/unzerdev/php-sdk/src/Resources/InstalmentPlan.php @@ -3,10 +3,10 @@ namespace UnzerSDK\Resources; use DateTime; +use stdClass; use UnzerSDK\Adapter\HttpAdapterInterface; use UnzerSDK\Resources\PaymentTypes\BasePaymentType; use UnzerSDK\Traits\CanAuthorizeWithCustomer; -use stdClass; /** * Resource representing the installment plan for Installment Secured. @@ -77,17 +77,17 @@ class InstalmentPlan extends BasePaymentType * @param float|null $lastRate */ public function __construct( - int $numberOfRates = null, - string $dayOfPurchase = null, - float $totalPurchaseAmount = null, - float $totalInterestAmount = null, - float $totalAmount = null, - float $effectiveInterestRate = null, - float $nominalInterestRate = null, - float $feeFirstRate = null, - float $feePerRate = null, - float $monthlyRate = null, - float $lastRate = null + ?int $numberOfRates = null, + ?string $dayOfPurchase = null, + ?float $totalPurchaseAmount = null, + ?float $totalInterestAmount = null, + ?float $totalAmount = null, + ?float $effectiveInterestRate = null, + ?float $nominalInterestRate = null, + ?float $feeFirstRate = null, + ?float $feePerRate = null, + ?float $monthlyRate = null, + ?float $lastRate = null ) { $this->numberOfRates = $numberOfRates; $this->dayOfPurchase = $dayOfPurchase; diff --git a/vendor/unzerdev/php-sdk/src/Resources/Payment.php b/vendor/unzerdev/php-sdk/src/Resources/Payment.php index 20f956d..4a75656 100644 --- a/vendor/unzerdev/php-sdk/src/Resources/Payment.php +++ b/vendor/unzerdev/php-sdk/src/Resources/Payment.php @@ -829,11 +829,11 @@ public function getExternalId(): ?string * @throws RuntimeException A RuntimeException is thrown when there is an error while using the SDK. */ public function cancelAmount( - float $amount = null, + ?float $amount = null, ?string $reasonCode = CancelReasonCodes::REASON_CODE_CANCEL, - string $paymentReference = null, - float $amountNet = null, - float $amountVat = null + ?string $paymentReference = null, + ?float $amountNet = null, + ?float $amountVat = null ): array { return $this->getUnzerObject()->cancelPayment($this, $amount, $reasonCode, $paymentReference, $amountNet, $amountVat); } @@ -850,7 +850,7 @@ public function cancelAmount( * @throws UnzerApiException An UnzerApiException is thrown if there is an error returned on API-request. * @throws RuntimeException A RuntimeException is thrown when there is an error while using the SDK. */ - public function cancelAuthorizationAmount(float $amount = null): ?Cancellation + public function cancelAuthorizationAmount(?float $amount = null): ?Cancellation { return $this->getUnzerObject()->cancelPaymentAuthorization($this, $amount); } @@ -865,7 +865,7 @@ public function cancelAuthorizationAmount(float $amount = null): ?Cancellation * @throws UnzerApiException An UnzerApiException is thrown if there is an error returned on API-request. * @throws RuntimeException A RuntimeException is thrown when there is an error while using the SDK. */ - public function charge(float $amount = null): Charge + public function charge(?float $amount = null): Charge { return $this->getUnzerObject()->chargePayment($this, $amount); } @@ -881,7 +881,7 @@ public function charge(float $amount = null): Charge * @throws UnzerApiException An UnzerApiException is thrown if there is an error returned on API-request. * @throws RuntimeException A RuntimeException is thrown when there is an error while using the SDK. */ - public function ship(string $invoiceId = null, string $orderId = null) + public function ship(?string $invoiceId = null, ?string $orderId = null) { return $this->getUnzerObject()->ship($this, $invoiceId, $orderId); } diff --git a/vendor/unzerdev/php-sdk/src/Resources/PaymentTypes/Card.php b/vendor/unzerdev/php-sdk/src/Resources/PaymentTypes/Card.php index 3a68888..3ada8c5 100644 --- a/vendor/unzerdev/php-sdk/src/Resources/PaymentTypes/Card.php +++ b/vendor/unzerdev/php-sdk/src/Resources/PaymentTypes/Card.php @@ -2,6 +2,8 @@ namespace UnzerSDK\Resources\PaymentTypes; +use RuntimeException; +use stdClass; use UnzerSDK\Adapter\HttpAdapterInterface; use UnzerSDK\Resources\EmbeddedResources\CardDetails; use UnzerSDK\Traits\CanAuthorize; @@ -9,8 +11,6 @@ use UnzerSDK\Traits\CanPayout; use UnzerSDK\Traits\CanRecur; use UnzerSDK\Validators\ExpiryDateValidator; -use RuntimeException; -use stdClass; /** * This represents the card payment type which supports credit card as well as debit card payments. @@ -56,7 +56,7 @@ class Card extends BasePaymentType * @param string|null $expiryDate * @param string|null $email */ - public function __construct(?string $number, ?string $expiryDate, string $email = null) + public function __construct(?string $number, ?string $expiryDate, ?string $email = null) { $this->setNumber($number); $this->setExpiryDate($expiryDate); diff --git a/vendor/unzerdev/php-sdk/src/Resources/PaymentTypes/InstallmentSecured.php b/vendor/unzerdev/php-sdk/src/Resources/PaymentTypes/InstallmentSecured.php index 1410d71..15a1dd0 100644 --- a/vendor/unzerdev/php-sdk/src/Resources/PaymentTypes/InstallmentSecured.php +++ b/vendor/unzerdev/php-sdk/src/Resources/PaymentTypes/InstallmentSecured.php @@ -34,7 +34,7 @@ class InstallmentSecured extends InstalmentPlan * @param null|DateTime|string $invoiceDate * @param null|DateTime|string $invoiceDueDate */ - public function __construct(InstalmentPlan $selectedPlan = null, $iban = null, $accountHolder = null, $orderDate = null, $bic = null, $invoiceDate = null, $invoiceDueDate = null) + public function __construct(?InstalmentPlan $selectedPlan = null, $iban = null, $accountHolder = null, $orderDate = null, $bic = null, $invoiceDate = null, $invoiceDueDate = null) { parent::__construct(); diff --git a/vendor/unzerdev/php-sdk/src/Resources/PaymentTypes/OpenbankingPis.php b/vendor/unzerdev/php-sdk/src/Resources/PaymentTypes/OpenbankingPis.php index f8e07de..c7fa5af 100644 --- a/vendor/unzerdev/php-sdk/src/Resources/PaymentTypes/OpenbankingPis.php +++ b/vendor/unzerdev/php-sdk/src/Resources/PaymentTypes/OpenbankingPis.php @@ -9,7 +9,7 @@ class OpenbankingPis extends BasePaymentType /** @var string|null $ibanCountry */ protected $ibanCountry; - public function __construct(string $ibanCountry = null) + public function __construct(?string $ibanCountry = null) { $this->ibanCountry = $ibanCountry; } diff --git a/vendor/unzerdev/php-sdk/src/Resources/PaymentTypes/PaylaterDirectDebit.php b/vendor/unzerdev/php-sdk/src/Resources/PaymentTypes/PaylaterDirectDebit.php index fb7c3a1..8c89b59 100644 --- a/vendor/unzerdev/php-sdk/src/Resources/PaymentTypes/PaylaterDirectDebit.php +++ b/vendor/unzerdev/php-sdk/src/Resources/PaymentTypes/PaylaterDirectDebit.php @@ -12,7 +12,7 @@ class PaylaterDirectDebit extends BasePaymentType /** @var string $holder */ protected $holder; - public function __construct(string $iban = null, string $holder = null) + public function __construct(?string $iban = null, ?string $holder = null) { $this->iban = $iban; $this->holder = $holder; diff --git a/vendor/unzerdev/php-sdk/src/Resources/PaymentTypes/Wero.php b/vendor/unzerdev/php-sdk/src/Resources/PaymentTypes/Wero.php new file mode 100644 index 0000000..93a3f04 --- /dev/null +++ b/vendor/unzerdev/php-sdk/src/Resources/PaymentTypes/Wero.php @@ -0,0 +1,7 @@ +handleRiskData($additionalTransactionData); $this->handleShipping($additionalTransactionData); $this->handleCardTransactionData($additionalTransactionData); + $this->handleWeroTransactionData($additionalTransactionData); } } @@ -223,4 +225,21 @@ protected function handleCardTransactionData(stdClass $additionalTransactionData $this->setCardTransactionData($cardTransactionData); } } + + /** + * Handle WeroTransactionData object contained in additional transaction data from API response. + * + * @param stdClass $additionalTransactionData + * + * @return void + */ + protected function handleWeroTransactionData(stdClass $additionalTransactionData): void + { + $wero = $additionalTransactionData->wero ?? null; + if ($wero !== null) { + $weroTransactionData = $this->getWeroTransactionData() ?? new WeroTransactionData(); + $weroTransactionData->handleResponse($wero); + $this->setWeroTransactionData($weroTransactionData); + } + } } diff --git a/vendor/unzerdev/php-sdk/src/Resources/TransactionTypes/Authorization.php b/vendor/unzerdev/php-sdk/src/Resources/TransactionTypes/Authorization.php index b37ac71..6936b8b 100644 --- a/vendor/unzerdev/php-sdk/src/Resources/TransactionTypes/Authorization.php +++ b/vendor/unzerdev/php-sdk/src/Resources/TransactionTypes/Authorization.php @@ -2,6 +2,7 @@ namespace UnzerSDK\Resources\TransactionTypes; +use RuntimeException; use UnzerSDK\Adapter\HttpAdapterInterface; use UnzerSDK\Exceptions\UnzerApiException; use UnzerSDK\Resources\Payment; @@ -9,7 +10,6 @@ use UnzerSDK\Traits\HasCancellations; use UnzerSDK\Traits\HasDescriptor; use UnzerSDK\Traits\HasRecurrenceType; -use RuntimeException; /** * This represents the authorization transaction. @@ -55,7 +55,7 @@ class Authorization extends AbstractTransactionType * @param string|null $currency * @param string|null $returnUrl */ - public function __construct(float $amount = null, string $currency = null, string $returnUrl = null) + public function __construct(?float $amount = null, ?string $currency = null, ?string $returnUrl = null) { $this->setAmount($amount); $this->setCurrency($currency); @@ -250,7 +250,7 @@ protected function getResourcePath(string $httpMethod = HttpAdapterInterface::RE * @throws UnzerApiException An UnzerApiException is thrown if there is an error returned on API-request. * @throws RuntimeException A RuntimeException is thrown when there is an error while using the SDK. */ - public function cancel(float $amount = null): Cancellation + public function cancel(?float $amount = null): Cancellation { return $this->getUnzerObject()->cancelAuthorization($this, $amount); } @@ -265,7 +265,7 @@ public function cancel(float $amount = null): Cancellation * @throws UnzerApiException An UnzerApiException is thrown if there is an error returned on API-request. * @throws RuntimeException A RuntimeException is thrown when there is an error while using the SDK. */ - public function charge(float $amount = null): Charge + public function charge(?float $amount = null): Charge { $payment = $this->getPayment(); if (!$payment instanceof Payment) { diff --git a/vendor/unzerdev/php-sdk/src/Resources/TransactionTypes/Cancellation.php b/vendor/unzerdev/php-sdk/src/Resources/TransactionTypes/Cancellation.php index 26d92e8..ad41d1c 100644 --- a/vendor/unzerdev/php-sdk/src/Resources/TransactionTypes/Cancellation.php +++ b/vendor/unzerdev/php-sdk/src/Resources/TransactionTypes/Cancellation.php @@ -6,7 +6,6 @@ use UnzerSDK\Constants\CancelReasonCodes; use UnzerSDK\Resources\Payment; use UnzerSDK\Resources\PaymentTypes\InstallmentSecured; - use function in_array; /** @@ -49,7 +48,7 @@ class Cancellation extends AbstractTransactionType * * @param float|null $amount The amount to be cancelled, is transferred as grossAmount in case of Installment Secured. */ - public function __construct(float $amount = null) + public function __construct(?float $amount = null) { $this->setAmount($amount); } diff --git a/vendor/unzerdev/php-sdk/src/Resources/TransactionTypes/Charge.php b/vendor/unzerdev/php-sdk/src/Resources/TransactionTypes/Charge.php index d7f1685..278cc9c 100644 --- a/vendor/unzerdev/php-sdk/src/Resources/TransactionTypes/Charge.php +++ b/vendor/unzerdev/php-sdk/src/Resources/TransactionTypes/Charge.php @@ -2,6 +2,7 @@ namespace UnzerSDK\Resources\TransactionTypes; +use RuntimeException; use UnzerSDK\Adapter\HttpAdapterInterface; use UnzerSDK\Exceptions\UnzerApiException; use UnzerSDK\Traits\HasAccountInformation; @@ -9,7 +10,6 @@ use UnzerSDK\Traits\HasChargebacks; use UnzerSDK\Traits\HasDescriptor; use UnzerSDK\Traits\HasRecurrenceType; -use RuntimeException; /** * This represents the charge transaction. @@ -47,7 +47,7 @@ class Charge extends AbstractTransactionType * @param string|null $currency * @param string|null $returnUrl */ - public function __construct(float $amount = null, string $currency = null, string $returnUrl = null) + public function __construct(?float $amount = null, ?string $currency = null, ?string $returnUrl = null) { $this->setAmount($amount); $this->setCurrency($currency); @@ -199,11 +199,11 @@ protected function getResourcePath(string $httpMethod = HttpAdapterInterface::RE * @throws RuntimeException A RuntimeException is thrown when there is an error while using the SDK. */ public function cancel( - float $amount = null, - string $reasonCode = null, - string $paymentReference = null, - float $amountNet = null, - float $amountVat = null + ?float $amount = null, + ?string $reasonCode = null, + ?string $paymentReference = null, + ?float $amountNet = null, + ?float $amountVat = null ): Cancellation { return $this->getUnzerObject()->cancelCharge( $this, diff --git a/vendor/unzerdev/php-sdk/src/Resources/TransactionTypes/Chargeback.php b/vendor/unzerdev/php-sdk/src/Resources/TransactionTypes/Chargeback.php index 7c0c592..2ef22d0 100644 --- a/vendor/unzerdev/php-sdk/src/Resources/TransactionTypes/Chargeback.php +++ b/vendor/unzerdev/php-sdk/src/Resources/TransactionTypes/Chargeback.php @@ -24,7 +24,7 @@ class Chargeback extends AbstractTransactionType /** * @param float|null $amount The amount to be cancelled, is transferred as grossAmount in case of Installment Secured. */ - public function __construct(float $amount = null) + public function __construct(?float $amount = null) { $this->setAmount($amount); } diff --git a/vendor/unzerdev/php-sdk/src/Resources/TransactionTypes/Payout.php b/vendor/unzerdev/php-sdk/src/Resources/TransactionTypes/Payout.php index 39f6a93..15f0767 100644 --- a/vendor/unzerdev/php-sdk/src/Resources/TransactionTypes/Payout.php +++ b/vendor/unzerdev/php-sdk/src/Resources/TransactionTypes/Payout.php @@ -24,14 +24,7 @@ class Payout extends AbstractTransactionType /** @var string $paymentReference */ protected $paymentReference; - /** - * Payout constructor. - * - * @param float|null $amount - * @param string|null $currency - * @param null $returnUrl - */ - public function __construct(float $amount = null, string $currency = null, $returnUrl = null) + public function __construct(?float $amount = null, ?string $currency = null, $returnUrl = null) { $this->setAmount($amount); $this->setCurrency($currency); diff --git a/vendor/unzerdev/php-sdk/src/Resources/V2/BasketItemProperties.php b/vendor/unzerdev/php-sdk/src/Resources/V2/BasketItemProperties.php new file mode 100644 index 0000000..fb5dc95 --- /dev/null +++ b/vendor/unzerdev/php-sdk/src/Resources/V2/BasketItemProperties.php @@ -0,0 +1,254 @@ +title = $title; + $this->quantity = $quantity; + $this->setAmountPerUnitGross($amountNet); + $this->setAmountPerUnit($amountPerUnit); + } + + /** + * @return string|null + */ + public function getBasketItemReferenceId(): ?string + { + return $this->basketItemReferenceId; + } + + /** + * @param string|null $basketItemReferenceId + * + * @return BasketItem + */ + public function setBasketItemReferenceId(?string $basketItemReferenceId): BasketItem + { + $this->basketItemReferenceId = $basketItemReferenceId; + return $this; + } + + /** + * @return int + */ + public function getQuantity(): int + { + return $this->quantity; + } + + /** + * @param int $quantity + * + * @return BasketItem + */ + public function setQuantity(int $quantity): self + { + $this->quantity = $quantity; + return $this; + } + + /** + * @return float + */ + public function getVat(): float + { + return $this->vat; + } + + /** + * @param float $vat + * + * @return BasketItem + */ + public function setVat(float $vat): BasketItem + { + $this->vat = $vat; + return $this; + } + + /** + * @return float + */ + public function getAmountDiscountPerUnitGross(): float + { + return $this->amountDiscountPerUnitGross; + } + + /** + * @param float $amountDiscountPerUnitGross + * + * @return BasketItem + */ + public function setAmountDiscountPerUnitGross(float $amountDiscountPerUnitGross): BasketItem + { + $this->amountDiscountPerUnitGross = $amountDiscountPerUnitGross; + return $this; + } + + /** + * @return float + */ + public function getAmountPerUnitGross(): float + { + return $this->amountPerUnitGross; + } + + /** + * @param float $amountPerUnitGross + * + * @return BasketItem + */ + public function setAmountPerUnitGross(float $amountPerUnitGross): BasketItem + { + $this->amountPerUnitGross = $amountPerUnitGross; + return $this; + } + + /** + * @return string|null + */ + public function getUnit(): ?string + { + return $this->unit; + } + + /** + * @param string|null $unit + * + * @return BasketItem + */ + public function setUnit(?string $unit): self + { + $this->unit = $unit; + return $this; + } + + /** + * @return string + */ + public function getTitle(): string + { + return $this->title; + } + + /** + * @param string $title + * + * @return BasketItem + */ + public function setTitle(string $title): self + { + $this->title = $title; + return $this; + } + + /** + * @return string|null + */ + public function getImageUrl(): ?string + { + return $this->imageUrl; + } + + /** + * @param string|null $imageUrl + * + * @return BasketItem + */ + public function setImageUrl(?string $imageUrl): self + { + $this->imageUrl = $imageUrl; + return $this; + } + + /** + * @return string|null + */ + public function getSubTitle(): ?string + { + return $this->subTitle; + } + + /** + * @param string|null $subTitle + * + * @return BasketItem + */ + public function setSubTitle(?string $subTitle): self + { + $this->subTitle = $subTitle; + return $this; + } + + /** + * @return string|null + */ + public function getType(): ?string + { + return $this->type; + } + + /** + * The type of the basket item. + * Please refer to UnzerSDK\Constants\BasketItemTypes for available type constants. + * + * @param string|null $type + * + * @return BasketItem + */ + public function setType(?string $type): BasketItem + { + $this->type = $type; + return $this; + } +} \ No newline at end of file diff --git a/vendor/unzerdev/php-sdk/src/Resources/V2/BasketProperties.php b/vendor/unzerdev/php-sdk/src/Resources/V2/BasketProperties.php new file mode 100644 index 0000000..d19c17a --- /dev/null +++ b/vendor/unzerdev/php-sdk/src/Resources/V2/BasketProperties.php @@ -0,0 +1,158 @@ +totalValueGross; + } + + /** + * @param float $totalValueGross + * + * @return Basket + */ + public function setTotalValueGross(float $totalValueGross): Basket + { + $this->totalValueGross = $totalValueGross; + return $this; + } + + /** + * @return string + */ + public function getCurrencyCode(): string + { + return $this->currencyCode; + } + + /** + * @param string $currencyCode + * + * @return Basket + */ + public function setCurrencyCode(string $currencyCode): Basket + { + $this->currencyCode = $currencyCode; + return $this; + } + + /** + * @return int + */ + public function getItemCount(): int + { + return count($this->basketItems); + } + + /** + * @return string|null + */ + public function getNote(): ?string + { + return $this->note; + } + + /** + * @param string|null $note + * + * @return Basket + */ + public function setNote(?string $note): Basket + { + $this->note = $note; + return $this; + } + + /** + * @return string + */ + public function getOrderId(): string + { + return $this->orderId; + } + + /** + * @param string $orderId + * + * @return Basket + */ + public function setOrderId(string $orderId): Basket + { + $this->orderId = $orderId; + return $this; + } + + /** + * @return array + */ + public function getBasketItems(): array + { + return $this->basketItems; + } + + /** + * @param array $basketItems + * + * @return Basket + */ + public function setBasketItems(array $basketItems): Basket + { + $this->basketItems = []; + + foreach ($basketItems as $basketItem) { + $this->addBasketItem($basketItem); + } + + return $this; + } + + /** + * Adds the given BasketItem to the Basket. + * + * @param BasketItem $basketItem + * + * @return Basket + */ + public function addBasketItem(BasketItem $basketItem): Basket + { + $this->basketItems[] = $basketItem; + if ($basketItem->getBasketItemReferenceId() === null) { + $basketItem->setBasketItemReferenceId((string)$this->getKeyOfLastBasketItemAdded()); + } + return $this; + } + + /** + * @param int $index + * + * @return BasketItem|null + */ + public function getBasketItemByIndex(int $index): ?BasketItem + { + return $this->basketItems[$index] ?? null; + } +} diff --git a/vendor/unzerdev/php-sdk/src/Resources/V2/Customer.php b/vendor/unzerdev/php-sdk/src/Resources/V2/Customer.php new file mode 100644 index 0000000..528b1d7 --- /dev/null +++ b/vendor/unzerdev/php-sdk/src/Resources/V2/Customer.php @@ -0,0 +1,31 @@ +orderId = $orderId; + $this->setTotalValueGross($totalValueGross); + $this->currencyCode = $currencyCode; + $this->setBasketItems($basketItems); + } + + public function getApiVersion(): string + { + return ApiVersions::V3; + } + + public function getApiConfig(): string + { + return PaymentApiConfigBearerAuth::class; + } +} diff --git a/vendor/unzerdev/php-sdk/src/Services/CancelService.php b/vendor/unzerdev/php-sdk/src/Services/CancelService.php index 354cb90..3710617 100644 --- a/vendor/unzerdev/php-sdk/src/Services/CancelService.php +++ b/vendor/unzerdev/php-sdk/src/Services/CancelService.php @@ -12,7 +12,6 @@ use UnzerSDK\Resources\TransactionTypes\Cancellation; use UnzerSDK\Resources\TransactionTypes\Charge; use UnzerSDK\Unzer; - use function in_array; use function is_string; @@ -67,7 +66,7 @@ public function getResourceService(): ResourceService /** * {@inheritDoc} */ - public function cancelAuthorization(Authorization $authorization, float $amount = null): Cancellation + public function cancelAuthorization(Authorization $authorization, ?float $amount = null): Cancellation { $cancellation = new Cancellation($amount); $cancellation->setPayment($authorization->getPayment())->setParentResource($authorization); @@ -80,7 +79,7 @@ public function cancelAuthorization(Authorization $authorization, float $amount /** * {@inheritDoc} */ - public function cancelAuthorizationByPayment($payment, float $amount = null): Cancellation + public function cancelAuthorizationByPayment($payment, ?float $amount = null): Cancellation { $authorization = $this->getResourceService()->fetchAuthorization($payment); return $this->cancelAuthorization($authorization, $amount); @@ -92,11 +91,11 @@ public function cancelAuthorizationByPayment($payment, float $amount = null): Ca public function cancelChargeById( $payment, string $chargeId, - float $amount = null, - string $reasonCode = null, - string $referenceText = null, - float $amountNet = null, - float $amountVat = null + ?float $amount = null, + ?string $reasonCode = null, + ?string $referenceText = null, + ?float $amountNet = null, + ?float $amountVat = null ): Cancellation { $charge = $this->getResourceService()->fetchChargeById($payment, $chargeId); return $this->cancelCharge($charge, $amount, $reasonCode, $referenceText, $amountNet, $amountVat); @@ -107,11 +106,11 @@ public function cancelChargeById( */ public function cancelCharge( Charge $charge, - float $amount = null, - string $reasonCode = null, - string $referenceText = null, - float $amountNet = null, - float $amountVat = null + ?float $amount = null, + ?string $reasonCode = null, + ?string $referenceText = null, + ?float $amountNet = null, + ?float $amountVat = null ): Cancellation { $cancellation = new Cancellation($amount); $cancellation @@ -131,11 +130,11 @@ public function cancelCharge( */ public function cancelPayment( $payment, - float $amount = null, + ?float $amount = null, ?string $reasonCode = CancelReasonCodes::REASON_CODE_CANCEL, - string $referenceText = null, - float $amountNet = null, - float $amountVat = null + ?string $referenceText = null, + ?float $amountNet = null, + ?float $amountVat = null ): array { $paymentObject = $payment; if (is_string($payment)) { @@ -186,7 +185,7 @@ public function cancelPayment( /** * {@inheritDoc} */ - public function cancelPaymentAuthorization($payment, float $amount = null): ?Cancellation + public function cancelPaymentAuthorization($payment, ?float $amount = null): ?Cancellation { $cancellation = null; $completeCancel = $amount === null; diff --git a/vendor/unzerdev/php-sdk/src/Services/HttpService.php b/vendor/unzerdev/php-sdk/src/Services/HttpService.php index e8b4866..cce644c 100644 --- a/vendor/unzerdev/php-sdk/src/Services/HttpService.php +++ b/vendor/unzerdev/php-sdk/src/Services/HttpService.php @@ -18,7 +18,6 @@ * This service provides for functionalities concerning http transactions. * * @link https://docs.unzer.com/ - * */ class HttpService { @@ -82,32 +81,32 @@ public function setEnvironmentService(EnvironmentService $environmentService): H } /** - * @deprecated use sendRequest() instead. - * * send post request to payment server * - * @param $uri string|null uri of the target system - * @param ?AbstractUnzerResource $resource - * @param string $httpMethod - * @param string $apiVersion + * @param string|null $uri uri of the target system + * @param AbstractUnzerResource|null $resource + * @param string $httpMethod + * @param string|null $apiVersion * * @return string * * @throws UnzerApiException An UnzerApiException is thrown if there is an error returned on API-request. * @throws RuntimeException A RuntimeException is thrown when there is an error while using the SDK. + * @deprecated use sendRequest() instead. */ public function send( ?string $uri = null, ?AbstractUnzerResource $resource = null, string $httpMethod = HttpAdapterInterface::REQUEST_GET, - string $apiVersion = Unzer::API_VERSION - ): string { + ?string $apiVersion = null + ): string + { if (!$resource instanceof AbstractUnzerResource) { throw new RuntimeException('Transfer object is empty!'); } $unzerObj = $resource->getUnzerObject(); - $apiRequest = (new ApiRequest($uri, $resource, $httpMethod, $unzerObj, $apiVersion)); + $apiRequest = (new ApiRequest($uri, $resource, $httpMethod, $unzerObj, $apiVersion ?? $resource->getApiVersion())); return $this->sendRequest($apiRequest); } @@ -115,15 +114,11 @@ public function send( /** * send post request to payment server * - * @param ApiRequest $request - * @return string - * * @throws UnzerApiException An UnzerApiException is thrown if there is an error returned on API-request. * @throws RuntimeException A RuntimeException is thrown when there is an error while using the SDK. */ - public function sendRequest( - ApiRequest $request - ): string { + public function sendRequest(ApiRequest $request): string + { $unzerObj = $request->getResource()->getUnzerObject(); $apiConfig = $request->getResource()->getApiConfig(); @@ -137,8 +132,8 @@ public function sendRequest( $headers = $this->composeHttpHeaders($unzerObj, $apiConfig::getAuthorizationMethod()); $httpMethod = $request->getHttpMethod(); $this->initRequest($requestUrl, $payload, $httpMethod, $headers); - $httpAdapter = $this->getAdapter(); - $response = $httpAdapter->execute(); + $httpAdapter = $this->getAdapter(); + $response = $httpAdapter->execute(); $responseCode = $httpAdapter->getResponseCode(); $httpAdapter->close(); @@ -158,7 +153,7 @@ public function sendRequest( * @param string $uri * @param string $payload * @param string $httpMethod - * @param array $httpHeaders + * @param array $httpHeaders * * @throws RuntimeException */ @@ -174,7 +169,7 @@ private function initRequest(string $uri, string $payload, string $httpMethod, a * Handles error responses by throwing an UnzerApiException with the returned messages and error code. * Returns doing nothing if no error occurred. * - * @param string $responseCode + * @param string $responseCode * @param string|null $response * * @throws UnzerApiException @@ -187,15 +182,15 @@ private function handleErrors(string $responseCode, ?string $response): void $responseObject = json_decode($response, false); if (!is_numeric($responseCode) || (int)$responseCode >= 400 || isset($responseObject->errors)) { - $code = null; - $errorId = null; + $code = null; + $errorId = null; $customerMessage = $code; $merchantMessage = $customerMessage; if (isset($responseObject->errors[0])) { - $errors = $responseObject->errors[0]; + $errors = $responseObject->errors[0]; $merchantMessage = $errors->merchantMessage ?? ''; $customerMessage = $errors->customerMessage ?? ''; - $code = $errors->code ?? ''; + $code = $errors->code ?? ''; } if (isset($responseObject->id)) { $errorId = $responseObject->id; @@ -209,23 +204,24 @@ private function handleErrors(string $responseCode, ?string $response): void } /** - * @param Unzer $unzerObj - * @param string $payload - * @param mixed $headers - * @param string $responseCode - * @param string $httpMethod - * @param string $url + * @param Unzer $unzerObj + * @param string $payload + * @param mixed $headers + * @param string $responseCode + * @param string $httpMethod + * @param string $url * @param string|null $response */ public function debugLog( Unzer $unzerObj, string $payload, - $headers, - string $responseCode, + $headers, + string $responseCode, string $httpMethod, string $url, ?string $response - ): void { + ): void + { // mask auth string $authHeader = explode(' ', $headers['Authorization']); $authHeader[1] = ValueService::maskValue($authHeader[1]); @@ -275,16 +271,16 @@ private function buildRequestUrl(ApiRequest $request): string */ public function composeHttpHeaders(Unzer $unzer, string $authorizationMethod = AuthorizationMethods::BASIC): array { - $locale = $unzer->getLocale(); - $clientIp = $unzer->getClientIp(); - $key = $unzer->getKey(); + $locale = $unzer->getLocale(); + $clientIp = $unzer->getClientIp(); + $key = $unzer->getKey(); $httpHeaders = [ 'Authorization' => $this->findAuthentication($unzer, $authorizationMethod), - 'Content-Type' => 'application/json', - 'SDK-VERSION' => Unzer::SDK_VERSION, - 'SDK-TYPE' => Unzer::SDK_TYPE, - 'PHP-VERSION' => PHP_VERSION + 'Content-Type' => 'application/json', + 'SDK-VERSION' => Unzer::SDK_VERSION, + 'SDK-TYPE' => Unzer::SDK_TYPE, + 'PHP-VERSION' => PHP_VERSION ]; if (!empty($locale)) { $httpHeaders['Accept-Language'] = $locale; @@ -347,6 +343,7 @@ public function isApiConfig($className): bool /** * @param Unzer $unzer + * * @return string */ private function findAuthentication(Unzer $unzer, string $authorizationMethod = AuthorizationMethods::BASIC): string diff --git a/vendor/unzerdev/php-sdk/src/Services/IdService.php b/vendor/unzerdev/php-sdk/src/Services/IdService.php index aecb23b..231ba17 100644 --- a/vendor/unzerdev/php-sdk/src/Services/IdService.php +++ b/vendor/unzerdev/php-sdk/src/Services/IdService.php @@ -3,7 +3,6 @@ namespace UnzerSDK\Services; use RuntimeException; - use function count; /** @@ -22,7 +21,7 @@ class IdService * * @param string $url * @param string $idString - * @param bool $onlyLast + * @param bool $onlyLast * * @return string * @@ -31,7 +30,7 @@ class IdService public static function getResourceIdFromUrl(string $url, string $idString, bool $onlyLast = false): string { $matches = []; - $pattern = '/\/([s|p]{1}-' . $idString . '-[a-z\d]+)\/?' . ($onlyLast ? '$' : '') . '/'; + $pattern = '/\/([s|p]{1}-' . $idString . '-[a-z\d-]+)\/?' . ($onlyLast ? '$' : '') . '/'; preg_match($pattern, $url, $matches); if (count($matches) < 2) { @@ -76,7 +75,7 @@ public static function isPaymentChargeback(string $url): string * * @param string $url * @param string $idString - * @param bool $onlyLast + * @param bool $onlyLast * * @return string|null */ @@ -117,4 +116,10 @@ public static function getResourceTypeFromIdString(string $typeId): ?string return $typeIdString; } + + public static function isUUIDResource(string $id): bool + { + preg_match('/^[sp]-([a-z]{3}|p24)-[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/', $id, $matches); + return count($matches) > 0; + } } diff --git a/vendor/unzerdev/php-sdk/src/Services/JwtService.php b/vendor/unzerdev/php-sdk/src/Services/JwtService.php index 57bdee9..2d12f96 100644 --- a/vendor/unzerdev/php-sdk/src/Services/JwtService.php +++ b/vendor/unzerdev/php-sdk/src/Services/JwtService.php @@ -9,12 +9,11 @@ class JwtService public static function validateExpiryTime(string $jwt, int $expiryBufferSeconds = self::Expiry_Buffer): bool { $jwtData = self::extractPayload($jwt); - $expireTime = $jwtData['exp']; - $currentTime = time(); - return ($expireTime - $expiryBufferSeconds) > $currentTime; + $expireTime = $jwtData['exp'] ?? 0; + return ($expireTime - $expiryBufferSeconds) > time(); } - private static function extractPayload(string $jwt) + private static function extractPayload(string $jwt): ?array { $tokenSegments = explode('.', $jwt); return json_decode(base64_decode($tokenSegments[1]), true); diff --git a/vendor/unzerdev/php-sdk/src/Services/PaymentService.php b/vendor/unzerdev/php-sdk/src/Services/PaymentService.php index c59cd81..8eefc35 100644 --- a/vendor/unzerdev/php-sdk/src/Services/PaymentService.php +++ b/vendor/unzerdev/php-sdk/src/Services/PaymentService.php @@ -73,12 +73,15 @@ public function getResourceService(): ResourceService return $this->getUnzer()->getResourceService(); } + /** + * {@inheritDoc} + */ public function performAuthorization( Authorization $authorization, $paymentType, $customer = null, - Metadata $metadata = null, - Basket $basket = null + ?Metadata $metadata = null, + ?Basket $basket = null ): Authorization { $payment = $this->createPayment($paymentType); $paymentType = $payment->getPaymentType(); @@ -144,7 +147,7 @@ public function authorize( /** * {@inheritDoc} */ - public function performCharge(Charge $charge, $paymentType, $customer = null, Metadata $metadata = null, Basket $basket = null): Charge + public function performCharge(Charge $charge, $paymentType, $customer = null, ?Metadata $metadata = null, ?Basket $basket = null): Charge { $payment = $this->createPayment($paymentType); $paymentType = $payment->getPaymentType(); @@ -214,9 +217,9 @@ public function charge( */ public function chargeAuthorization( $payment, - float $amount = null, - string $orderId = null, - string $invoiceId = null + ?float $amount = null, + ?string $orderId = null, + ?string $invoiceId = null ): Charge { return $this->chargePayment($payment, $amount, $orderId, $invoiceId); } @@ -226,9 +229,9 @@ public function chargeAuthorization( */ public function chargePayment( $payment, - float $amount = null, - string $orderId = null, - string $invoiceId = null + ?float $amount = null, + ?string $orderId = null, + ?string $invoiceId = null ): Charge { $charge = new Charge($amount); @@ -263,11 +266,11 @@ public function payout( $paymentType, string $returnUrl, $customer = null, - string $orderId = null, - Metadata $metadata = null, - Basket $basket = null, - string $invoiceId = null, - string $referenceText = null + ?string $orderId = null, + ?Metadata $metadata = null, + ?Basket $basket = null, + ?string $invoiceId = null, + ?string $referenceText = null ): Payout { $payment = $this->createPayment($paymentType); $payout = (new Payout($amount, $currency, $returnUrl)) @@ -283,7 +286,7 @@ public function payout( /** * {@inheritDoc} */ - public function ship($payment, string $invoiceId = null, string $orderId = null): Shipment + public function ship($payment, ?string $invoiceId = null, ?string $orderId = null): Shipment { $shipment = new Shipment(); $shipment->setInvoiceId($invoiceId)->setOrderId($orderId); @@ -297,9 +300,9 @@ public function ship($payment, string $invoiceId = null, string $orderId = null) */ public function initPayPageCharge( Paypage $paypage, - Customer $customer = null, - Basket $basket = null, - Metadata $metadata = null + ?Customer $customer = null, + ?Basket $basket = null, + ?Metadata $metadata = null ): Paypage { return $this->initPayPage($paypage, TransactionTypes::CHARGE, $customer, $basket, $metadata); } @@ -309,9 +312,9 @@ public function initPayPageCharge( */ public function initPayPageAuthorize( Paypage $paypage, - Customer $customer = null, - Basket $basket = null, - Metadata $metadata = null + ?Customer $customer = null, + ?Basket $basket = null, + ?Metadata $metadata = null ): Paypage { return $this->initPayPage($paypage, TransactionTypes::AUTHORIZATION, $customer, $basket, $metadata); } @@ -323,7 +326,7 @@ public function fetchInstallmentPlans( float $amount, string $currency, float $effectiveInterest, - DateTime $orderDate = null + ?DateTime $orderDate = null ): InstalmentPlans { $ins = (new InstallmentSecured(null, null, null))->setParentResource($this->unzer); $plans = (new InstalmentPlans($amount, $currency, $effectiveInterest, $orderDate))->setParentResource($ins); @@ -365,9 +368,9 @@ public function fetchPaylaterInstallmentPlans( private function initPayPage( Paypage $paypage, string $action, - Customer $customer = null, - Basket $basket = null, - Metadata $metadata = null + ?Customer $customer = null, + ?Basket $basket = null, + ?Metadata $metadata = null ): Paypage { $paypage->setAction($action)->setParentResource($this->unzer); $payment = $this->createPayment($paypage)->setBasket($basket)->setCustomer($customer)->setMetadata($metadata)->setPayPage($paypage); diff --git a/vendor/unzerdev/php-sdk/src/Services/ResourceService.php b/vendor/unzerdev/php-sdk/src/Services/ResourceService.php index 6de8c08..b4bedfe 100644 --- a/vendor/unzerdev/php-sdk/src/Services/ResourceService.php +++ b/vendor/unzerdev/php-sdk/src/Services/ResourceService.php @@ -9,6 +9,7 @@ use UnzerSDK\Adapter\HttpAdapterInterface; use UnzerSDK\Apis\Constants\AuthorizationMethods; use UnzerSDK\Constants\ApiResponseCodes; +use UnzerSDK\Constants\ApiVersions; use UnzerSDK\Constants\IdStrings; use UnzerSDK\Exceptions\UnzerApiException; use UnzerSDK\Interfaces\ResourceServiceInterface; @@ -51,6 +52,7 @@ use UnzerSDK\Resources\PaymentTypes\Sofort; use UnzerSDK\Resources\PaymentTypes\Twint; use UnzerSDK\Resources\PaymentTypes\Wechatpay; +use UnzerSDK\Resources\PaymentTypes\Wero; use UnzerSDK\Resources\Recurring; use UnzerSDK\Resources\TransactionTypes\Authorization; use UnzerSDK\Resources\TransactionTypes\Cancellation; @@ -58,7 +60,9 @@ use UnzerSDK\Resources\TransactionTypes\Chargeback; use UnzerSDK\Resources\TransactionTypes\Payout; use UnzerSDK\Resources\TransactionTypes\Shipment; +use UnzerSDK\Resources\V2\Customer as CustomerV2; use UnzerSDK\Resources\V2\Paypage as PaypageV2; +use UnzerSDK\Resources\V3\Basket as BasketV3; use UnzerSDK\Traits\CanRecur; use UnzerSDK\Unzer; use function in_array; @@ -106,8 +110,8 @@ public function setUnzer(Unzer $unzer): ResourceServiceInterface * Send request to API. * * @param AbstractUnzerResource $resource - * @param string $httpMethod - * @param string $apiVersion + * @param string $httpMethod + * @param string|null $apiVersion * * @return stdClass * @@ -117,15 +121,16 @@ public function setUnzer(Unzer $unzer): ResourceServiceInterface public function send( AbstractUnzerResource $resource, string $httpMethod = HttpAdapterInterface::REQUEST_GET, - string $apiVersion = Unzer::API_VERSION - ): stdClass { - $configClass = $resource->getApiConfig(); - if (!$resource instanceof Token && $configClass::getAuthorizationMethod() === AuthorizationMethods::BEARER) { + ?string $apiVersion = null + ): stdClass + { + $apiConfig = $resource->getApiConfig(); + if (!$resource instanceof Token && $apiConfig::getAuthorizationMethod() === AuthorizationMethods::BEARER) { $this->unzer->prepareJwtToken(); } - $appendId = $httpMethod !== HttpAdapterInterface::REQUEST_POST; - $uri = $resource->getUri($appendId, $httpMethod); + $appendId = $httpMethod !== HttpAdapterInterface::REQUEST_POST; + $uri = $resource->getUri($appendId, $httpMethod); $responseJson = $resource->getUnzerObject()->getHttpService()->send($uri, $resource, $httpMethod, $apiVersion); return !empty($responseJson) ? json_decode($responseJson, false) : new stdClass(); } @@ -159,9 +164,9 @@ public function getResource(AbstractUnzerResource $resource): AbstractUnzerResou public function fetchResourceByUrl($url) { $resource = null; - $unzer = $this->unzer; + $unzer = $this->unzer; - $resourceId = IdService::getLastResourceIdFromUrlString($url); + $resourceId = IdService::getLastResourceIdFromUrlString($url); if (empty($resourceId)) { return null; } @@ -187,8 +192,8 @@ public function fetchResourceByUrl($url) ); break; case $resourceType === IdStrings::CANCEL: - $paymentId = IdService::getResourceIdFromUrl($url, IdStrings::PAYMENT); - $chargeId = IdService::getResourceIdOrNullFromUrl($url, IdStrings::CHARGE); + $paymentId = IdService::getResourceIdFromUrl($url, IdStrings::PAYMENT); + $chargeId = IdService::getResourceIdOrNullFromUrl($url, IdStrings::CHARGE); if (IdService::isPaymentCancellation($url)) { $isRefund = preg_match('/charge/', $url) === 1; if ($isRefund) { @@ -333,8 +338,8 @@ public function deleteResource(AbstractUnzerResource &$resource): ?AbstractUnzer /** * Updates the given local resource object (id must be set) * - * @param AbstractUnzerResource $resource The local resource object to update. - * @param string $apiVersion + * @param AbstractUnzerResource $resource The local resource object to update. + * @param string|null $apiVersion * * @return AbstractUnzerResource The updated resource object. * @@ -342,7 +347,7 @@ public function deleteResource(AbstractUnzerResource &$resource): ?AbstractUnzer * @throws RuntimeException A RuntimeException is thrown when there is an error while using the SDK. * @throws Exception */ - public function fetchResource(AbstractUnzerResource $resource, string $apiVersion = Unzer::API_VERSION): AbstractUnzerResource + public function fetchResource(AbstractUnzerResource $resource, ?string $apiVersion = null): AbstractUnzerResource { $method = HttpAdapterInterface::REQUEST_GET; $response = $this->send($resource, $method, $apiVersion); @@ -375,7 +380,7 @@ public function fetchPayout($payment): Payout /** * {@inheritDoc} */ - public function activateRecurringPayment($paymentType, string $returnUrl, string $recurrenceType = null): Recurring + public function activateRecurringPayment($paymentType, string $returnUrl, ?string $recurrenceType = null): Recurring { $paymentTypeObject = $paymentType; if (is_string($paymentType)) { @@ -549,15 +554,20 @@ public function createBasket(Basket $basket): Basket public function fetchBasket($basket): Basket { $basketObj = $basket; + if (is_string($basket)) { - $basketObj = (new Basket())->setId($basket); + $isV3Basket = IdService::isUUIDResource($basket); + $basketObj = $isV3Basket ? new BasketV3() : new Basket(); + $basketObj->setId($basket); } + $basketObj->setParentResource($this->unzer); + $basketVersion = $basketObj->getApiVersion() === ApiVersions::V3 ? ApiVersions::V3 : ApiVersions::V2; try { - $this->fetchResource($basketObj, 'v2'); + $this->fetchResource($basketObj, $basketVersion); } catch (UnzerApiException $exception) { - if ($exception->getCode() !== ApiResponseCodes::API_ERROR_BASKET_NOT_FOUND) { + if ($exception->getCode() !== ApiResponseCodes::API_ERROR_BASKET_NOT_FOUND || $basketVersion === ApiVersions::V3) { throw $exception; } $this->fetchResource($basketObj); @@ -648,7 +658,9 @@ public function fetchCustomer($customer): Customer $customerObject = $customer; if (is_string($customer)) { - $customerObject = (new Customer())->setId($customer); + $isUUID = IdService::isUUIDResource($customer); + $customerObject = $isUUID ? new CustomerV2() : new Customer(); + $customerObject->setId($customer); } $this->fetchResource($customerObject->setParentResource($this->unzer)); @@ -658,7 +670,7 @@ public function fetchCustomer($customer): Customer /** * {@inheritDoc} */ - public function fetchCustomerByExtCustomerId(string $customerId): Customer + public function fetchCustomerByExtCustomerId(string $customerId, int $version = 1): Customer { $customerObject = (new Customer())->setCustomerId($customerId); $this->fetchResource($customerObject->setParentResource($this->unzer)); @@ -946,6 +958,9 @@ public static function getTypeInstanceFromIdString($typeId): BasePaymentType case IdStrings::WECHATPAY: $paymentType = new Wechatpay(); break; + case IdStrings::WERO: + $paymentType = new Wero(); + break; case IdStrings::OPEN_BANKING: $paymentType = new OpenbankingPis(); break; diff --git a/vendor/unzerdev/php-sdk/src/Services/WebhookService.php b/vendor/unzerdev/php-sdk/src/Services/WebhookService.php index c8117d1..a273bb5 100644 --- a/vendor/unzerdev/php-sdk/src/Services/WebhookService.php +++ b/vendor/unzerdev/php-sdk/src/Services/WebhookService.php @@ -2,14 +2,13 @@ namespace UnzerSDK\Services; -use UnzerSDK\Unzer; +use RuntimeException; use UnzerSDK\Interfaces\ResourceServiceInterface; use UnzerSDK\Interfaces\WebhookServiceInterface; use UnzerSDK\Resources\AbstractUnzerResource; use UnzerSDK\Resources\Webhook; use UnzerSDK\Resources\Webhooks; -use RuntimeException; - +use UnzerSDK\Unzer; use function is_string; /** @@ -165,7 +164,7 @@ public function registerMultipleWebhooks(string $url, array $events): array /** * {@inheritDoc} */ - public function fetchResourceFromEvent(string $eventJson = null): AbstractUnzerResource + public function fetchResourceFromEvent(?string $eventJson = null): AbstractUnzerResource { $resourceObject = null; $eventData = json_decode($eventJson ?? $this->readInputStream(), false); diff --git a/vendor/unzerdev/php-sdk/src/Traits/CanPayout.php b/vendor/unzerdev/php-sdk/src/Traits/CanPayout.php index 4458e68..f03042d 100644 --- a/vendor/unzerdev/php-sdk/src/Traits/CanPayout.php +++ b/vendor/unzerdev/php-sdk/src/Traits/CanPayout.php @@ -8,13 +8,13 @@ namespace UnzerSDK\Traits; +use RuntimeException; use UnzerSDK\Exceptions\UnzerApiException; use UnzerSDK\Interfaces\UnzerParentInterface; use UnzerSDK\Resources\Basket; use UnzerSDK\Resources\Customer; use UnzerSDK\Resources\Metadata; use UnzerSDK\Resources\TransactionTypes\Payout; -use RuntimeException; trait CanPayout { @@ -44,11 +44,11 @@ public function payout( string $currency, string $returnUrl, $customer = null, - string $orderId = null, + ?string $orderId = null, $metadata = null, - Basket $basket = null, - string $invoiceId = null, - string $paymentReference = null + ?Basket $basket = null, + ?string $invoiceId = null, + ?string $paymentReference = null ): Payout { if ($this instanceof UnzerParentInterface) { return $this->getUnzerObject()->payout( diff --git a/vendor/unzerdev/php-sdk/src/Traits/CanPayoutWithCustomer.php b/vendor/unzerdev/php-sdk/src/Traits/CanPayoutWithCustomer.php index 389a4bf..76c5673 100644 --- a/vendor/unzerdev/php-sdk/src/Traits/CanPayoutWithCustomer.php +++ b/vendor/unzerdev/php-sdk/src/Traits/CanPayoutWithCustomer.php @@ -8,13 +8,13 @@ namespace UnzerSDK\Traits; +use RuntimeException; use UnzerSDK\Exceptions\UnzerApiException; use UnzerSDK\Interfaces\UnzerParentInterface; use UnzerSDK\Resources\Basket; use UnzerSDK\Resources\Customer; use UnzerSDK\Resources\Metadata; use UnzerSDK\Resources\TransactionTypes\Payout; -use RuntimeException; trait CanPayoutWithCustomer { @@ -42,9 +42,9 @@ public function payout( string $currency, string $returnUrl, $customer, - string $orderId = null, + ?string $orderId = null, $metadata = null, - Basket $basket = null + ?Basket $basket = null ): Payout { if ($this instanceof UnzerParentInterface) { return $this->getUnzerObject()->payout( diff --git a/vendor/unzerdev/php-sdk/src/Traits/HasAdditionalTransactionData.php b/vendor/unzerdev/php-sdk/src/Traits/HasAdditionalTransactionData.php index 3dcd4b2..ff8ced7 100644 --- a/vendor/unzerdev/php-sdk/src/Traits/HasAdditionalTransactionData.php +++ b/vendor/unzerdev/php-sdk/src/Traits/HasAdditionalTransactionData.php @@ -14,6 +14,7 @@ use UnzerSDK\Resources\EmbeddedResources\CardTransactionData; use UnzerSDK\Resources\EmbeddedResources\RiskData; use UnzerSDK\Resources\EmbeddedResources\ShippingData; +use UnzerSDK\Resources\EmbeddedResources\WeroTransactionData; use UnzerSDK\Resources\PaymentTypes\BasePaymentType; use UnzerSDK\Resources\TransactionTypes\AbstractTransactionType; use UnzerSDK\Services\ResourceService; @@ -221,4 +222,29 @@ public function setCardTransactionData(?CardTransactionData $cardTransactionData $this->addAdditionalTransactionData(AdditionalTransactionDataKeys::CARD, $cardTransactionData); return $this; } + + /** + * Get the wero field from additional transaction Data. + * + * @return WeroTransactionData|null "wero" object of additionalTransaction data. + */ + public function getWeroTransactionData(): ?WeroTransactionData + { + $key = AdditionalTransactionDataKeys::WERO; + $wero = $this->getAdditionalTransactionData()->$key ?? null; + return $wero instanceof WeroTransactionData ? $wero : null; + } + + /** + * Sets WeroTransactionData object as "wero" field of additionalTransactionData. + * + * @param WeroTransactionData|null $weroTransactionData + * + * @return self + */ + public function setWeroTransactionData(?WeroTransactionData $weroTransactionData): self + { + $this->addAdditionalTransactionData(AdditionalTransactionDataKeys::WERO, $weroTransactionData); + return $this; + } } diff --git a/vendor/unzerdev/php-sdk/src/Unzer.php b/vendor/unzerdev/php-sdk/src/Unzer.php index 733b7e3..b4dc186 100644 --- a/vendor/unzerdev/php-sdk/src/Unzer.php +++ b/vendor/unzerdev/php-sdk/src/Unzer.php @@ -5,6 +5,7 @@ use DateTime; use RuntimeException; use UnzerSDK\Adapter\HttpAdapterInterface; +use UnzerSDK\Constants\ApiVersions; use UnzerSDK\Constants\CancelReasonCodes; use UnzerSDK\Exceptions\UnzerApiException; use UnzerSDK\Interfaces\CancelServiceInterface; @@ -55,9 +56,9 @@ class Unzer implements CancelServiceInterface { public const BASE_URL = 'api.unzer.com'; - public const API_VERSION = 'v1'; + public const API_VERSION = ApiVersions::V1; public const SDK_TYPE = 'UnzerPHP'; - public const SDK_VERSION = '3.11.0'; + public const SDK_VERSION = '3.13.1'; /** @var string $key */ private $key; @@ -94,7 +95,7 @@ class Unzer implements * Construct a new Unzer object. * * @param string $key The private key your received from your Unzer contact person. - * @param ?string $locale The locale of the customer defining defining the translation (e.g. 'en-GB' or 'de-DE'). + * @param string|null $locale The locale of the customer defining defining the translation (e.g. 'en-GB' or 'de-DE'). * * @throws RuntimeException A RuntimeException will be thrown if the key is not of type private. * @@ -357,7 +358,7 @@ public function getUri(bool $appendId = true, string $httpMethod = HttpAdapterIn /** * {@inheritDoc} */ - public function activateRecurringPayment($paymentType, string $returnUrl, string $recurrenceType = null): Recurring + public function activateRecurringPayment($paymentType, string $returnUrl, ?string $recurrenceType = null): Recurring { return $this->resourceService->activateRecurringPayment($paymentType, $returnUrl, $recurrenceType); } @@ -485,9 +486,9 @@ public function fetchCustomer($customer): Customer /** * {@inheritDoc} */ - public function fetchCustomerByExtCustomerId(string $customerId): Customer + public function fetchCustomerByExtCustomerId(string $customerId, int $version = 1): Customer { - return $this->resourceService->fetchCustomerByExtCustomerId($customerId); + return $this->resourceService->fetchCustomerByExtCustomerId($customerId, $version); } /** @@ -666,7 +667,7 @@ public function registerMultipleWebhooks(string $url, array $events): array /** * {@inheritDoc} */ - public function fetchResourceFromEvent(string $eventJson = null): AbstractUnzerResource + public function fetchResourceFromEvent(?string $eventJson = null): AbstractUnzerResource { return $this->webhookService->fetchResourceFromEvent($eventJson); } @@ -678,8 +679,8 @@ public function performAuthorization( Authorization $authorization, $paymentType, $customer = null, - Metadata $metadata = null, - Basket $basket = null + ?Metadata $metadata = null, + ?Basket $basket = null ): Authorization { return $this->paymentService->performAuthorization($authorization, $paymentType, $customer, $metadata, $basket); @@ -734,8 +735,8 @@ public function performCharge( Charge $charge, $paymentType, $customer = null, - Metadata $metadata = null, - Basket $basket = null + ?Metadata $metadata = null, + ?Basket $basket = null ): Charge { return $this->paymentService->performCharge($charge, $paymentType, $customer, $metadata, $basket); @@ -785,9 +786,9 @@ public function charge( */ public function chargeAuthorization( $payment, - float $amount = null, - string $orderId = null, - string $invoiceId = null + ?float $amount = null, + ?string $orderId = null, + ?string $invoiceId = null ): Charge { return $this->paymentService->chargeAuthorization($payment, $amount, $orderId, $invoiceId); @@ -798,9 +799,9 @@ public function chargeAuthorization( */ public function chargePayment( $payment, - float $amount = null, - string $orderId = null, - string $invoiceId = null + ?float $amount = null, + ?string $orderId = null, + ?string $invoiceId = null ): Charge { return $this->paymentService->chargePayment($payment, $amount, $orderId, $invoiceId); @@ -814,7 +815,7 @@ public function performChargeOnPayment($payment, Charge $charge): Charge /** * {@inheritDoc} */ - public function cancelAuthorization(Authorization $authorization, float $amount = null): Cancellation + public function cancelAuthorization(Authorization $authorization, ?float $amount = null): Cancellation { return $this->cancelService->cancelAuthorization($authorization, $amount); } @@ -822,7 +823,7 @@ public function cancelAuthorization(Authorization $authorization, float $amount /** * {@inheritDoc} */ - public function cancelAuthorizationByPayment($payment, float $amount = null): Cancellation + public function cancelAuthorizationByPayment($payment, ?float $amount = null): Cancellation { return $this->cancelService->cancelAuthorizationByPayment($payment, $amount); } @@ -832,11 +833,11 @@ public function cancelAuthorizationByPayment($payment, float $amount = null): Ca */ public function cancelPayment( $payment, - float $amount = null, + ?float $amount = null, ?string $reasonCode = CancelReasonCodes::REASON_CODE_CANCEL, - string $referenceText = null, - float $amountNet = null, - float $amountVat = null + ?string $referenceText = null, + ?float $amountNet = null, + ?float $amountVat = null ): array { return $this->cancelService @@ -846,7 +847,7 @@ public function cancelPayment( /** * {@inheritDoc} */ - public function cancelPaymentAuthorization($payment, float $amount = null): ?Cancellation + public function cancelPaymentAuthorization($payment, ?float $amount = null): ?Cancellation { return $this->cancelService->cancelPaymentAuthorization($payment, $amount); } @@ -857,11 +858,11 @@ public function cancelPaymentAuthorization($payment, float $amount = null): ?Can public function cancelChargeById( $payment, string $chargeId, - float $amount = null, - string $reasonCode = null, - string $referenceText = null, - float $amountNet = null, - float $amountVat = null + ?float $amount = null, + ?string $reasonCode = null, + ?string $referenceText = null, + ?float $amountNet = null, + ?float $amountVat = null ): Cancellation { return $this->cancelService @@ -873,11 +874,11 @@ public function cancelChargeById( */ public function cancelCharge( Charge $charge, - float $amount = null, - string $reasonCode = null, - string $referenceText = null, - float $amountNet = null, - float $amountVat = null + ?float $amount = null, + ?string $reasonCode = null, + ?string $referenceText = null, + ?float $amountNet = null, + ?float $amountVat = null ): Cancellation { return $this->cancelService @@ -916,7 +917,7 @@ public function createAuthToken(): Token /** * {@inheritDoc} */ - public function ship($payment, string $invoiceId = null, string $orderId = null): Shipment + public function ship($payment, ?string $invoiceId = null, ?string $orderId = null): Shipment { return $this->paymentService->ship($payment, $invoiceId, $orderId); } @@ -930,11 +931,11 @@ public function payout( $paymentType, string $returnUrl, $customer = null, - string $orderId = null, - Metadata $metadata = null, - Basket $basket = null, - string $invoiceId = null, - string $referenceText = null + ?string $orderId = null, + ?Metadata $metadata = null, + ?Basket $basket = null, + ?string $invoiceId = null, + ?string $referenceText = null ): Payout { return $this->paymentService->payout( @@ -1003,9 +1004,9 @@ public function fetchPaypageV2($paypage): PaypageV2 */ public function initPayPageCharge( Paypage $paypage, - Customer $customer = null, - Basket $basket = null, - Metadata $metadata = null + ?Customer $customer = null, + ?Basket $basket = null, + ?Metadata $metadata = null ): Paypage { return $this->paymentService->initPayPageCharge($paypage, $customer, $basket, $metadata); @@ -1016,9 +1017,9 @@ public function initPayPageCharge( */ public function initPayPageAuthorize( Paypage $paypage, - Customer $customer = null, - Basket $basket = null, - Metadata $metadata = null + ?Customer $customer = null, + ?Basket $basket = null, + ?Metadata $metadata = null ): Paypage { return $this->paymentService->initPayPageAuthorize($paypage, $customer, $basket, $metadata); @@ -1031,7 +1032,7 @@ public function fetchInstallmentPlans( float $amount, string $currency, float $effectiveInterest, - DateTime $orderDate = null + ?DateTime $orderDate = null ): InstalmentPlans { return $this->paymentService @@ -1070,16 +1071,24 @@ public function debugLog($message): void /** * Request a JWT token from the Token Service and stores it for following request. - * If the token is already set, it will not be requested again. + * Manual call of this method should only be necessary if already existing Token needs to be provided. + * If an active token is already set, it will not be requested again. + * Token will automaically be renewed if it is expired. * + * @param string|null $jwtToken If set, the given token will be used instead as long it is valid. * @throws UnzerApiException */ - public function prepareJwtToken() + public function prepareJwtToken(?string $jwtToken = null): string { + if ($jwtToken !== null && JwtService::validateExpiryTime($jwtToken)) { + $this->jwtToken = $jwtToken; + } + if ($this->jwtToken !== null && JwtService::validateExpiryTime($this->jwtToken)) { - return; + return $this->getJwtToken(); } $this->jwtToken = $this->createAuthToken()->getAccessToken(); + return $this->jwtToken; } public function getJwtToken() diff --git a/vendor/unzerdev/php-sdk/test/BasePaymentTest.php b/vendor/unzerdev/php-sdk/test/BasePaymentTest.php index 54da6b6..c96bd0d 100644 --- a/vendor/unzerdev/php-sdk/test/BasePaymentTest.php +++ b/vendor/unzerdev/php-sdk/test/BasePaymentTest.php @@ -25,6 +25,7 @@ use UnzerSDK\Resources\TransactionTypes\AbstractTransactionType; use UnzerSDK\Resources\TransactionTypes\Authorization; use UnzerSDK\Resources\TransactionTypes\Charge; +use UnzerSDK\Resources\V3\Basket as BasketV3; use UnzerSDK\test\Fixtures\CustomerFixtureTrait; use UnzerSDK\Unzer; @@ -33,6 +34,7 @@ class BasePaymentTest extends TestCase use CustomerFixtureTrait; protected const RETURN_URL = 'https://dev.unzer.com'; public const API_VERSION_2 = 'v2'; + public const API_VERSION_3 = 'v3'; /** @var Unzer $unzer */ protected $unzer; @@ -206,6 +208,28 @@ public function createV2Basket(): Basket return $basket; } + /** + * Creates a v2 Basket resource and returns it. + * + * @return Basket + */ + public function createV3Basket(): Basket + { + $orderId = 'b' . self::generateRandomId(); + $basket = new BasketV3($orderId); + $basket->setTotalValueGross(99.99) + ->setCurrencyCode('EUR'); + + $basketItem = (new BasketItem()) + ->setAmountPerUnitGross(99.99) + ->setQuantity(1) + ->setBasketItemReferenceId('item1') + ->setTitle('title'); + $basket->addBasketItem($basketItem); + $this->unzer->createBasket($basket); + return $basket; + } + /** * Creates a Card object for tests. * @@ -268,7 +292,7 @@ public function createCharge($amount = 100.0): Charge */ public static function generateRandomId(): string { - return str_replace('.', '', microtime(true)); + return str_replace('.', '', microtime(true)) . random_int(1000, 9999); } /** diff --git a/vendor/unzerdev/php-sdk/test/integration/PaymentTypes/PaylaterInstallmentTest.php b/vendor/unzerdev/php-sdk/test/integration/PaymentTypes/PaylaterInstallmentTest.php index 3770a9a..bb98d74 100644 --- a/vendor/unzerdev/php-sdk/test/integration/PaymentTypes/PaylaterInstallmentTest.php +++ b/vendor/unzerdev/php-sdk/test/integration/PaymentTypes/PaylaterInstallmentTest.php @@ -13,18 +13,18 @@ namespace UnzerSDK\test\integration\PaymentTypes; use UnzerSDK\Constants\CustomerTypes; +use UnzerSDK\Constants\ShippingTypes; use UnzerSDK\Exceptions\UnzerApiException; use UnzerSDK\Resources\Customer; use UnzerSDK\Resources\CustomerFactory; use UnzerSDK\Resources\EmbeddedResources\Address; -use UnzerSDK\Resources\EmbeddedResources\Paylater\InstallmentPlansQuery; use UnzerSDK\Resources\EmbeddedResources\Paylater\InstallmentPlan; +use UnzerSDK\Resources\EmbeddedResources\Paylater\InstallmentPlansQuery; use UnzerSDK\Resources\PaymentTypes\PaylaterInstallment; use UnzerSDK\Resources\TransactionTypes\Authorization; use UnzerSDK\Resources\TransactionTypes\Cancellation; use UnzerSDK\Resources\TransactionTypes\Charge; use UnzerSDK\test\BaseIntegrationTest; - use function count; class PaylaterInstallmentTest extends BaseIntegrationTest @@ -232,7 +232,7 @@ protected function createAuthorizeTransaction(): Authorization $ins = new PaylaterInstallment($plans->getId(), $selectedPlan->getNumberOfRates(), 'DE89370400440532013000', 'DE', 'Peter Mustermann'); $this->unzer->createPaymentType($ins); - $customer = $this->getCustomer()->setFirstname('Peter')->setLastname('Mustermann'); + $customer = $this->getCustomer(); $basket = $this->createBasket(); $authorization = new Authorization(99.99, 'EUR', self::RETURN_URL); @@ -244,17 +244,22 @@ protected function createAuthorizeTransaction(): Authorization */ public function getCustomer(): Customer { - $customer = CustomerFactory::createCustomer('Manuel', 'Weißmann'); + $customer = CustomerFactory::createCustomer('Maximilian', 'Mustermann'); $address = (new Address()) - ->setStreet('Hugo-Junckers-Straße 3') + ->setName('Maximilian Mustermann') + ->setStreet('Hugo-Junkers-Str. 3') ->setState('DE-BO') ->setZip('60386') ->setCity('Frankfurt am Main') ->setCountry('DE'); $customer + ->setSalutation('mr') ->setBillingAddress($address) - ->setBirthDate('2000-12-12') - ->setEmail('manuel-weissmann@unzer.com'); + ->setCustomerId('c' . substr(self::generateRandomId(), 0, 7)) + ->setShippingAddress((clone $address)->setShippingType(ShippingTypes::EQUALS_BILLING)) + ->setLanguage('de') + ->setBirthDate('1974-10-02') + ->setEmail('accept@unzer.com'); return $customer; } diff --git a/vendor/unzerdev/php-sdk/test/integration/PaymentTypes/WeroTest.php b/vendor/unzerdev/php-sdk/test/integration/PaymentTypes/WeroTest.php new file mode 100644 index 0000000..a7c08e8 --- /dev/null +++ b/vendor/unzerdev/php-sdk/test/integration/PaymentTypes/WeroTest.php @@ -0,0 +1,105 @@ +unzer->createPaymentType(new Wero()); + $this->assertInstanceOf(Wero::class, $wero); + $this->assertNotEmpty($wero->getId()); + + $fetched = $this->unzer->fetchPaymentType($wero->getId()); + $this->assertInstanceOf(Wero::class, $fetched); + $this->assertNotSame($wero, $fetched); + $this->assertEquals($wero->expose(), $fetched->expose()); + + return $fetched; + } + + /** + * Verify Wero can authorize. + * + * @test + * + * @depends weroShouldBeCreatableAndFetchable + */ + public function weroShouldBeAuthorizable(Wero $wero): void + { + $authorization = new Authorization(100.0, 'EUR', self::RETURN_URL); + + // Add Wero additional transaction data + $weroData = (new WeroTransactionData()) + ->setEventDependentPayment( + (new WeroEventDependentPayment()) + ->setCaptureTrigger(WeroCaptureTriggers::SERVICEFULFILMENT) + ->setAmountPaymentType(WeroAmountPaymentTypes::PAY) + ->setMaxAuthToCaptureTime(300) + ->setMultiCapturesAllowed(false) + ); + $authorization->setWeroTransactionData($weroData); + + $authorization = $this->unzer->performAuthorization($authorization, $wero); + $this->assertNotNull($authorization); + $this->assertNotEmpty($authorization->getId()); + $this->assertNotEmpty($authorization->getRedirectUrl()); + + $payment = $authorization->getPayment(); + $this->assertNotNull($payment); + $this->assertTrue($payment->isPending()); + } + + /** + * Verify Wero can charge. + * + * @test + * + * @depends weroShouldBeCreatableAndFetchable + */ + public function weroShouldBeChargeable(Wero $wero): void + { + $charge = new Charge(100.0, 'EUR', self::RETURN_URL); + + // Add Wero additional transaction data + $weroData = (new WeroTransactionData()) + ->setEventDependentPayment( + (new WeroEventDependentPayment()) + ->setCaptureTrigger(WeroCaptureTriggers::SERVICEFULFILMENT) + ->setAmountPaymentType(WeroAmountPaymentTypes::PAY) + ->setMaxAuthToCaptureTime(300) + ->setMultiCapturesAllowed(false) + ); + $charge->setWeroTransactionData($weroData); + + $charge = $this->unzer->performCharge($charge, $wero); + $this->assertNotNull($charge); + $this->assertNotEmpty($charge->getId()); + $this->assertNotEmpty($charge->getRedirectUrl()); + + $fetched = $this->unzer->fetchChargeById($charge->getPayment()->getId(), $charge->getId()); + + $this->assertEquals(($charge->getPaymentId()), $fetched->getPaymentId()); + $this->assertEquals(($charge->getAmount()), $fetched->getAmount()); + $this->assertEquals(($charge->getId()), $fetched->getId()); + } +} diff --git a/vendor/unzerdev/php-sdk/test/integration/Resources/BasketV2Test.php b/vendor/unzerdev/php-sdk/test/integration/Resources/BasketV2Test.php index 677f691..ec9a666 100644 --- a/vendor/unzerdev/php-sdk/test/integration/Resources/BasketV2Test.php +++ b/vendor/unzerdev/php-sdk/test/integration/Resources/BasketV2Test.php @@ -21,8 +21,6 @@ class BasketV2Test extends BaseIntegrationTest { - // - /** * Verify basket can be created and fetched. * @@ -299,10 +297,6 @@ public function chargeTransactionsShouldCreateBasketIfItDoesNotExistYet(): void $this->assertEquals($basket->expose(), $fetchedPayment->getBasket()->expose()); } - // - - // - /** * @return array */ @@ -315,6 +309,4 @@ public function basketItemWithInvalidUrlWillThrowAnErrorDP(): array 'invalid not available' => [true, 'https://files.readme.io/does-not-exist.jpg', ApiResponseCodes::API_ERROR_BASKET_ITEM_IMAGE_INVALID_URL] ]; } - - // } diff --git a/vendor/unzerdev/php-sdk/test/integration/Resources/BasketV3Test.php b/vendor/unzerdev/php-sdk/test/integration/Resources/BasketV3Test.php new file mode 100644 index 0000000..55f60d9 --- /dev/null +++ b/vendor/unzerdev/php-sdk/test/integration/Resources/BasketV3Test.php @@ -0,0 +1,299 @@ +unzer->prepareJwtToken(self::$token); + } + + /** + * Verify basket can be created and fetched. + * + * @test + */ + public function minV3BasketShouldBeCreatableAndFetchable(): void + { + $orderId = 'b' . self::generateRandomId(); + $basket = new Basket($orderId, 99.99, 'EUR'); + + $basketItem = new BasketItem(); + $basketItem->setBasketItemReferenceId('item1') + ->setQuantity(1) + ->setAmountPerUnitGross(99.99) + ->setTitle('title'); + $basket->addBasketItem($basketItem); + $this->assertEmpty($basket->getId()); + + $this->unzer->createBasket($basket); + $this->assertNotEmpty($basket->getId()); + $this->unzer->prepareJwtToken(); + + $fetchedBasket = $this->unzer->fetchBasket($basket->getId())->setOrderId($orderId); + $this->assertEquals($basket->expose(), $fetchedBasket->expose()); + } + + /** + * Verify basket can be created and fetched. + * + * @test + */ + public function BasketShouldBeCreatableAndFetchable(): void + { + $orderId = microtime(true); + $basket = new Basket(); + $basket->setTotalValueGross(100) + ->setOrderId('testOrderId') + ->setCurrencyCode('EUR'); + $basketItem = new BasketItem(); + $basketItem->setBasketItemReferenceId('item1') + ->setQuantity(1) + ->setAmountPerUnitGross(100) + ->setTitle('title'); + $basket->addBasketItem($basketItem); + $this->assertEmpty($basket->getId()); + + $this->unzer->createBasket($basket); + $this->assertNotEmpty($basket->getId()); + + $fetchedBasket = $this->unzer->fetchBasket($basket->getId()); + $this->assertEquals($basket->expose(), $fetchedBasket->expose()); + } + + /** + * Verify basket can be created and fetched. + * + * @test + */ + public function maxBasketShouldBeCreatableAndFetchable(): void + { + $orderId = 'o' . self::generateRandomId(); + $basket = new Basket(); + $basket->setOrderId($orderId) + ->setCurrencyCode('EUR') + ->setNote('note this!') + ->setTotalValueGross(133.33); + + $basketItem = (new BasketItem()) + ->setBasketItemReferenceId('refIdOne') + ->setQuantity(10) + ->setAmountPerUnitGross(10.11) + ->setVat(19) + ->setTitle('Item Title 1') + ->setUnit('ert') + ->setAmountDiscountPerUnitGross(0.11) + ->setSubTitle('This is some subtitle for this item') + ->setImageUrl('https://docs.unzer.com/card/card.png') + ->setType('this is some type'); + $basket->addBasketItem($basketItem); + + $basketItem = (new BasketItem()) + ->setBasketItemReferenceId('refIdtwo') + ->setQuantity(1) + ->setAmountPerUnitGross(33.33) + ->setVat(19.5) + ->setTitle('Item Title 1') + ->setUnit('ert') + ->setAmountDiscountPerUnitGross(0.0) + ->setSubTitle('This is some subtitle for this item') + ->setImageUrl('https://docs.unzer.com/card/card.png') + ->setType('this is some type'); + $basket->addBasketItem($basketItem); + + $this->assertEmpty($basket->getId()); + + $this->unzer->createBasket($basket); + $this->assertNotEmpty($basket->getId()); + + $fetchedBasket = $this->unzer->fetchBasket($basket->getId()); + $exposedBasket = $basket->expose(); + unset($exposedBasket['note']); + $this->assertEquals($exposedBasket, $fetchedBasket->expose()); + $this->assertEquals( + $basket->getBasketItemByIndex(0)->expose(), + $fetchedBasket->getBasketItemByIndex(0)->expose() + ); + } + + /** + * Verify basketItem with invalid imageUrl will return an error. + * + * @test + * + * @dataProvider basketItemWithInvalidUrlWillThrowAnErrorDP + * + * @param $expectException + * @param $imageUrl + * @param null $exceptionCode + */ + public function basketItemWithInvalidUrlWillThrowAnError($expectException, $imageUrl, $exceptionCode = null): void + { + $basket = new Basket('b' . self::generateRandomId()); + $basket->setTotalValueGross(100) + ->setCurrencyCode('EUR'); + + $basketItem = (new BasketItem()) + ->setImageUrl($imageUrl) + ->setAmountPerUnitGross(100) + ->setQuantity(1) + ->setBasketItemReferenceId('item1') + ->setTitle('title'); + $basket->addBasketItem($basketItem); + + try { + $this->unzer->createBasket($basket); + $this->assertFalse( + $expectException, + 'Failed asserting that exception of type "UnzerSDK\Exceptions\UnzerApiException" is thrown.' + ); + } catch (UnzerApiException $e) { + $this->assertTrue($expectException); + $this->assertEquals($exceptionCode, $e->getCode()); + $this->assertNotNull($e->getErrorId()); + } + } + + /** + * Verify the Basket can be updated. + * + * @test + */ + public function basketShouldBeUpdateable(): void + { + $orderId = 'b' . self::generateRandomId(); + $basket = new Basket($orderId, 99.99, 'EUR'); + + $basketItem = (new BasketItem()) + ->setAmountPerUnitGross(99.99) + ->setQuantity(1) + ->setBasketItemReferenceId('item1') + ->setTitle('title'); + + $basket->addBasketItem($basketItem); + $this->unzer->createBasket($basket); + + $updateBasket = $this->unzer->fetchBasket($basket->getId()); + $updateBasket->setTotalValueGross(123.45) + ->getBasketItemByIndex(0) + ->setAmountPerUnitGross(123.45) + ->setTitle('This item can also be updated!'); + $this->unzer->updateBasket($updateBasket); + + $this->unzer->fetchBasket($basket); + $this->assertEquals($orderId, $basket->getOrderId()); + $this->assertEquals(123.45, $basket->getTotalValueGross()); + $this->assertNotEquals($basket->getBasketItemByIndex(0)->expose(), $basketItem->expose()); + } + + /** + * Verify basket can be passed to the payment on authorize. + * + * @test + */ + public function authorizeTransactionsShouldPassAlongTheBasketIdIfSet(): void + { + $basket = $this->createV3Basket(); + $this->assertNotEmpty($basket->getId()); + + /** @var Paypal $paypal */ + $paypal = $this->unzer->createPaymentType(new Paypal()); + $authorize = $paypal->authorize(123.4, 'EUR', 'https://unzer.com', null, null, null, $basket); + + $fetchedPayment = $this->unzer->fetchPayment($authorize->getPaymentId()); + $this->assertEquals($basket->expose(), $fetchedPayment->getBasket()->expose()); + } + + /** + * Verify basket will be created and passed to the payment on authorize if it does not exist yet. + * + * @test + */ + public function authorizeTransactionsShouldCreateBasketIfItDoesNotExistYet(): void + { + $orderId = 'b' . self::generateRandomId(); + $basket = new Basket($orderId); + $basket->setTotalValueGross(99.99) + ->setCurrencyCode('EUR'); + + $basketItem = (new BasketItem()) + ->setAmountPerUnitGross(99.99) + ->setQuantity(1) + ->setBasketItemReferenceId('item1') + ->setTitle('title'); + $basket->addBasketItem($basketItem); + $this->assertEmpty($basket->getId()); + + /** @var Paypal $paypal */ + $paypal = $this->unzer->createPaymentType(new Paypal()); + $authorize = $paypal->authorize(123.4, 'EUR', 'https://unzer.com', null, null, null, $basket); + $this->assertNotEmpty($basket->getId()); + + $fetchedPayment = $this->unzer->fetchPayment($authorize->getPaymentId()); + $this->assertEquals($basket->expose(), $fetchedPayment->getBasket()->expose()); + } + + /** + * Verify basket will be created and passed to the payment on charge if it does not exist yet. + * + * @test + */ + public function chargeTransactionsShouldCreateBasketIfItDoesNotExistYet(): void + { + $orderId = 'b' . self::generateRandomId(); + $basket = new Basket($orderId); + $basket->setTotalValueGross(99.99) + ->setCurrencyCode('EUR'); + + $basketItem = (new BasketItem()) + ->setAmountPerUnitGross(99.99) + ->setQuantity(1) + ->setBasketItemReferenceId('item1') + ->setTitle('title'); + $basket->addBasketItem($basketItem); + $this->assertEmpty($basket->getId()); + + /** @var Paypal $paypal */ + $paypal = $this->unzer->createPaymentType(new Paypal()); + $charge = $paypal->charge(123.4, 'EUR', 'https://unzer.com', null, null, null, $basket); + $this->assertNotEmpty($basket->getId()); + + $fetchedPayment = $this->unzer->fetchPayment($charge->getPaymentId()); + $this->assertEquals($basket->expose(), $fetchedPayment->getBasket()->expose()); + } + + /** + * @return array + */ + public function basketItemWithInvalidUrlWillThrowAnErrorDP(): array + { + return [ + 'valid ' => [false, 'https://docs.unzer.com/card/card.png'], + 'valid null' => [false, null], + 'valid empty' => [false, ''], + 'invalid not available' => [true, 'https://files.readme.io/does-not-exist.jpg', ApiResponseCodes::API_ERROR_BASKET_ITEM_IMAGE_INVALID_URL] + ]; + } +} diff --git a/vendor/unzerdev/php-sdk/test/integration/Resources/CustomerV2Test.php b/vendor/unzerdev/php-sdk/test/integration/Resources/CustomerV2Test.php new file mode 100644 index 0000000..f49d74b --- /dev/null +++ b/vendor/unzerdev/php-sdk/test/integration/Resources/CustomerV2Test.php @@ -0,0 +1,456 @@ +getMinimalCustomer(); + $this->assertEmpty($customer->getId()); + $this->getUnzerObject()->createCustomer($customer); + $this->assertNotEmpty($customer->getId()); + + $geoLocation = $customer->getGeoLocation(); + $this->assertNull($geoLocation->getClientIp()); + $this->assertNull($geoLocation->getCountryCode()); + + $fetchedCustomer = $this->getUnzerObject()->fetchCustomer($customer->getId()); + $exposeArray = $customer->expose(); + $exposeArray['salutation'] = Salutations::UNKNOWN; + $this->assertEquals($exposeArray, $fetchedCustomer->expose()); + + $geoLocation = $fetchedCustomer->getGeoLocation(); + $this->assertNotEmpty($geoLocation->getClientIp()); + $this->assertNotEmpty($geoLocation->getCountryCode()); + + return $customer; + } + + /** + * Max customer should be creatable via the sdk. + * + * @test + * + * @return Customer + */ + public function maxCustomerCanBeCreatedAndFetched(): Customer + { + $customer = $this->getMaximumCustomer(); + $this->assertEmpty($customer->getId()); + $this->getUnzerObject()->createCustomer($customer); + $this->assertNotEmpty($customer->getId()); + + $fetchedCustomer = $this->getUnzerObject()->fetchCustomer($customer->getId()); + $this->assertEquals($customer->expose(), $fetchedCustomer->expose()); + + return $customer; + } + + /** + * Verify shipping type can be set for shipping address of customer resource. + * + * @test + */ + public function customerWithShippingTypeCanBeCreatedAndFetched() + { + $customer = $this->getMaximumCustomerInclShippingAddress(); + $customer->getShippingAddress()->setShippingType('shippingType'); + + $this->getUnzerObject()->createCustomer($customer); + $fetchedCustomer = $this->getUnzerObject()->fetchCustomer($customer->getId()); + $this->assertEquals('shippingType', $fetchedCustomer->getShippingAddress()->getShippingType()); + } + + /** + * @param Customer $customer + * + * @depends maxCustomerCanBeCreatedAndFetched + * + * @test + */ + public function customerCanBeFetchedById(Customer $customer): void + { + $fetchedCustomer = $this->getUnzerObject()->fetchCustomer($customer->getId()); + $this->assertEquals($customer->getId(), $fetchedCustomer->getId()); + } + + /** + * @depends maxCustomerCanBeCreatedAndFetched + * + * @test + */ + public function customerCanBeFetchedByCustomerId(): void + { + $customerId = 'c' . self::generateRandomId(); + $customer = $this->getMaximumCustomer()->setCustomerId($customerId); + $this->getUnzerObject()->createCustomer($customer); + + $fetchedCustomer = $this->getUnzerObject()->fetchCustomerByExtCustomerId($customer->getCustomerId()); + $this->assertEquals($customer->expose(), $fetchedCustomer->expose()); + } + + /** + * @param Customer $customer + * + * @depends maxCustomerCanBeCreatedAndFetched + * + * @test + */ + public function customerCanBeFetchedByObject(Customer $customer): void + { + $customerToFetch = (new Customer())->setId($customer->getId()); + $fetchedCustomer = $this->getUnzerObject()->fetchCustomer($customerToFetch); + $this->assertEquals($customer->getId(), $fetchedCustomer->getId()); + } + + /** + * @param Customer $customer + * + * @depends maxCustomerCanBeCreatedAndFetched + * + * @test + */ + public function customerCanBeFetchedByObjectWithData(Customer $customer): void + { + $customerToFetch = $this->getMinimalCustomer()->setId($customer->getId()); + $this->assertNotEquals($customer->getFirstname(), $customerToFetch->getFirstname()); + + $fetchedCustomer = $this->getUnzerObject()->fetchCustomer($customerToFetch); + $this->assertEquals($customer->getFirstname(), $fetchedCustomer->getFirstname()); + } + + /** + * Customer can be referenced by payment. + * + * @test + */ + public function transactionShouldCreateAndReferenceCustomerIfItDoesNotExistYet(): void + { + $customerId = 'c' . self::generateRandomId(); + $customer = $this->getMaximumCustomerInclShippingAddress()->setCustomerId($customerId); + + /** @var Paypal $paypal */ + $paypal = $this->getUnzerObject()->createPaymentType(new Paypal()); + $authorization = $paypal->authorize(12.0, 'EUR', self::RETURN_URL, $customer); + + $secPayment = $this->getUnzerObject()->fetchPayment($authorization->getPayment()->getId()); + + /** @var Customer $secCustomer */ + $secCustomer = $secPayment->getCustomer(); + $this->assertNotNull($secCustomer); + $this->assertEquals($customer->expose(), $secCustomer->expose()); + } + + /** + * Customer can be referenced by payment. + * + * @test + */ + public function transactionShouldReferenceCustomerIfItExist(): void + { + $customer = $this->getMaximumCustomer(); + $this->getUnzerObject()->createCustomer($customer); + + /** @var Paypal $paypal */ + $paypal = $this->getUnzerObject()->createPaymentType(new Paypal()); + $authorization = $paypal->authorize(12.0, 'EUR', self::RETURN_URL, $customer); + + $secPayment = $this->getUnzerObject()->fetchPayment($authorization->getPayment()->getId()); + + /** @var Customer $secCustomer */ + $secCustomer = $secPayment->getCustomer(); + $this->assertNotNull($secCustomer); + $this->assertEquals($customer->expose(), $secCustomer->expose()); + } + + /** + * Customer can be referenced by payment. + * + * @test + */ + public function transactionShouldReferenceCustomerIfItExistAndItsIdHasBeenPassed(): void + { + $customer = $this->getMaximumCustomer(); + $this->getUnzerObject()->createCustomer($customer); + + /** @var Paypal $paypal */ + $paypal = $this->getUnzerObject()->createPaymentType(new Paypal()); + $authorization = $paypal->authorize(12.0, 'EUR', self::RETURN_URL, $customer->getId()); + + $secPayment = $this->getUnzerObject()->fetchPayment($authorization->getPayment()->getId()); + + /** @var Customer $secCustomer */ + $secCustomer = $secPayment->getCustomer(); + $this->assertNotNull($secCustomer); + $this->assertEquals($customer->expose(), $secCustomer->expose()); + } + + /** + * Customer can be updated. + * + * @depends maxCustomerCanBeCreatedAndFetched + * + * @test + * + * @param Customer $customer + */ + public function customerShouldBeUpdateable(Customer $customer): void + { + $this->assertEquals('Peter', $customer->getFirstname()); + $customer->setFirstname('Not Peter'); + $this->getUnzerObject()->updateCustomer($customer); + $this->assertEquals('Not Peter', $customer->getFirstname()); + + $fetchedCustomer = $this->getUnzerObject()->fetchCustomer($customer->getId()); + $this->assertEquals($customer->getId(), $fetchedCustomer->getId()); + $this->assertEquals('Not Peter', $fetchedCustomer->getFirstname()); + } + + /** + * Customer can be deleted. + * + * @depends maxCustomerCanBeCreatedAndFetched + * + * @test + * + * @param Customer $customer + */ + public function customerShouldBeDeletableById(Customer $customer): void + { + $this->assertNotNull($customer); + $this->assertNotNull($customer->getId()); + + $this->getUnzerObject()->deleteCustomer($customer->getId()); + + $this->expectException(UnzerApiException::class); + $this->expectExceptionCode(ApiResponseCodes::API_ERROR_CUSTOMER_DOES_NOT_EXIST); + $this->getUnzerObject()->fetchCustomer($customer->getId()); + } + + /** + * Customer can be deleted. + * + * @test + */ + public function customerShouldBeDeletableByObject(): void + { + $customer = $this->getUnzerObject()->createCustomer($this->getMaximumCustomer()); + + $fetchedCustomer = $this->getUnzerObject()->fetchCustomer($customer->getId()); + $this->assertNotNull($customer); + $this->assertNotNull($customer->getId()); + + $this->getUnzerObject()->deleteCustomer($customer); + + $this->expectException(UnzerApiException::class); + $this->expectExceptionCode(ApiResponseCodes::API_ERROR_CUSTOMER_DOES_NOT_EXIST); + $this->getUnzerObject()->fetchCustomer($fetchedCustomer->getId()); + } + + /** + * Verify an Exception is thrown if the customerId already exists. + * + * @test + */ + public function apiShouldReturnErrorIfCustomerAlreadyExists(): void + { + $customerId = str_replace(' ', '', microtime()); + + // create customer with api + $customer = $this->getUnzerObject()->createCustomer($this->getMaximumCustomer()->setCustomerId($customerId)); + $this->assertNotEmpty($customer->getCustomerId()); + + $this->expectException(UnzerApiException::class); + $this->expectExceptionCode(ApiResponseCodes::API_ERROR_CUSTOMER_ID_ALREADY_EXISTS); + + // create new customer with the same customerId + $this->getUnzerObject()->createCustomer($this->getMaximumCustomer()->setCustomerId($customerId)); + } + + /** + * Verify a Customer is fetched and updated when its customerId already exist. + * + * @test + */ + public function customerShouldBeFetchedByCustomerIdAndUpdatedIfItAlreadyExists(): void + { + $customerId = str_replace(' ', '', microtime()); + + try { + // fetch non-existing customer by customerId + $this->getUnzerObject()->fetchCustomerByExtCustomerId($customerId, 2); + $this->assertTrue(false, 'Exception should be thrown here.'); + } catch (UnzerApiException $e) { + $this->assertEquals(ApiResponseCodes::API_ERROR_CUSTOMER_CAN_NOT_BE_FOUND, $e->getCode()); + $this->assertNotNull($e->getErrorId()); + } + + // create customer with api + $customer = $this->getUnzerObject()->createOrUpdateCustomer($this->getMaximumCustomer()->setCustomerId($customerId)); + $this->assertNotEmpty($customer->getCustomerId()); + $this->assertEquals($customerId, $customer->getCustomerId()); + $this->assertEquals('Peter', $customer->getFirstname()); + + $newCustomerData = $this->getMaximumCustomer()->setCustomerId($customerId)->setFirstname('Petra'); + $this->getUnzerObject()->createOrUpdateCustomer($newCustomerData); + + $this->assertEquals('Petra', $newCustomerData->getFirstname()); + $this->assertEquals($customerId, $newCustomerData->getCustomerId()); + $this->assertEquals($customer->getId(), $newCustomerData->getId()); + } + + /** + * Verify customer address can take a name as long as both first and lastname concatenated. + * + * @test + */ + public function addressNameCanHoldFirstAndLastNameConcatenated(): void + { + $customerId = 'c' . self::generateRandomId(); + $customer = $this->getMaximumCustomerInclShippingAddress()->setCustomerId($customerId); + $longName = 'firstfirstfirstfirstfirstfirstfirstfirst lastlastlastlastlastlastlastlastlastlast'; + $customer->getShippingAddress()->setName($longName); + $this->getUnzerObject()->createCustomer($customer); + $this->assertEquals($longName, $customer->getShippingAddress()->getName()); + + $veryLongName = $longName . 'X'; + $customer->getShippingAddress()->setName($veryLongName); + $this->expectException(UnzerApiException::class); + $this->expectExceptionCode(ApiResponseCodes::API_ERROR_ADDRESS_NAME_TO_LONG); + $this->getUnzerObject()->updateCustomer($customer); + } + + /** + * Not registered B2B customer should be creatable. + * + * @test + * + * @return Customer + */ + public function minNotRegisteredB2bCustomerCanBeCreatedAndFetched(): Customer + { + $customer = $this->getMinimalNotRegisteredB2bCustomer(); + $this->assertEmpty($customer->getId()); + $this->getUnzerObject()->createCustomer($customer); + $this->assertNotEmpty($customer->getId()); + + $fetchedCustomer = $this->getUnzerObject()->fetchCustomer($customer->getId()); + $exposeArray = $customer->expose(); + $exposeArray['salutation'] = Salutations::UNKNOWN; + $this->assertEquals($exposeArray, $fetchedCustomer->expose()); + + return $customer; + } + + /** + * Max not registered customer should be creatable. + * + * @test + */ + public function maxNotRegisteredB2bCustomerCanBeCreatedAndFetched(): void + { + $customer = $this->getMaximalNotRegisteredB2bCustomer(); + $this->assertEmpty($customer->getId()); + $this->getUnzerObject()->createCustomer($customer); + $this->assertNotEmpty($customer->getId()); + + $fetchedCustomer = $this->getUnzerObject()->fetchCustomer($customer->getId()); + $this->assertEquals($customer->expose(), $fetchedCustomer->expose()); + } + + /** + * Registered B2B customer should be creatable. + * + * @test + * + * @return Customer + */ + public function minRegisteredB2bCustomerCanBeCreatedAndFetched(): Customer + { + $customer = $this->getMinimalRegisteredB2bCustomer(); + $this->assertEmpty($customer->getId()); + $this->getUnzerObject()->createCustomer($customer); + $this->assertNotEmpty($customer->getId()); + + $fetchedCustomer = $this->getUnzerObject()->fetchCustomer($customer->getId()); + $exposeArray = $customer->expose(); + $exposeArray['salutation'] = Salutations::UNKNOWN; + $this->assertEquals($exposeArray, $fetchedCustomer->expose()); + + return $customer; + } + + /** + * Max registered customer should be creatable. + * + * @test + */ + public function maxRegisteredB2bCustomerCanBeCreatedAndFetched(): void + { + $customer = $this->getMaximalRegisteredB2bCustomer(); + $this->assertEmpty($customer->getId()); + $this->getUnzerObject()->createCustomer($customer); + $this->assertNotEmpty($customer->getId()); + + $fetchedCustomer = $this->getUnzerObject()->fetchCustomer($customer->getId()); + $this->assertEquals($customer->expose(), $fetchedCustomer->expose()); + } + + /** + * Customer should contain clientIp set via header. + * + * @test + */ + public function customerShouldContainClientIpSetViaHeader() + { + $customer = $this->getMinimalCustomer(); + $clientIp = '123.123.123.123'; + $this->getUnzerObject()->setClientIp($clientIp); + $this->getUnzerObject()->createCustomer($customer); + + $fetchedCustomer = $this->getUnzerObject()->fetchCustomer($customer->getId()); + $this->assertEquals($clientIp, $fetchedCustomer->getGeoLocation()->getClientIp()); + } +} diff --git a/vendor/unzerdev/php-sdk/test/integration/Resources/LinkpayV2Test.php b/vendor/unzerdev/php-sdk/test/integration/Resources/LinkpayV2Test.php index 38486b1..949c35a 100644 --- a/vendor/unzerdev/php-sdk/test/integration/Resources/LinkpayV2Test.php +++ b/vendor/unzerdev/php-sdk/test/integration/Resources/LinkpayV2Test.php @@ -12,6 +12,14 @@ */ class LinkpayV2Test extends BaseIntegrationTest { + private static ?string $token = null; + + protected function setUp(): void + { + parent::setUp(); + self::$token = $this->unzer->prepareJwtToken(self::$token); + } + /** * @test */ @@ -128,7 +136,8 @@ public function updateLinkpayExpiryDate() $this->assertEquals($paypage->getCurrency(), $updatePaypage->getCurrency()); $this->assertEquals($paypage->getAlias(), $updatePaypage->getAlias()); $this->assertEquals($paypage->getAmountSettings(), $updatePaypage->getAmountSettings()); - $this->assertEquals($paypage->getResources(), $updatePaypage->getResources()); + + $this->assertNotEmpty($updatePaypage->getResources()->getMetadataId()); } /** @@ -167,8 +176,11 @@ public function updateLinkpayAmount() $this->assertEquals($paypage->getCurrency(), $updatePaypage->getCurrency()); $this->assertEquals($paypage->getAlias(), $updatePaypage->getAlias()); $this->assertEquals($paypage->getAmountSettings(), $updatePaypage->getAmountSettings()); - $this->assertEquals($paypage->getResources(), $updatePaypage->getResources()); $this->assertEquals($paypage->getExpiresAt(), $updatePaypage->getExpiresAt()); + + $this->assertNotEmpty($updatePaypage->getResources()->getMetadataId()); + $this->assertEmpty($updatePaypage->getResources()->getCustomerId()); + $this->assertEmpty($updatePaypage->getResources()->getBasketId()); } /** @@ -208,8 +220,11 @@ public function updateLinkpayAmountSettings() $this->assertEquals($paypage->getAmount(), $updatePaypage->getAmount()); $this->assertEquals($paypage->getCurrency(), $updatePaypage->getCurrency()); $this->assertEquals($paypage->getExpiresAt(), $updatePaypage->getExpiresAt()); - $this->assertEquals($paypage->getResources(), $updatePaypage->getResources()); $this->assertEquals('linkpay', $paypage->getType()); + + $this->assertNotEmpty($updatePaypage->getResources()->getMetadataId()); + $this->assertEmpty($updatePaypage->getResources()->getCustomerId()); + $this->assertEmpty($updatePaypage->getResources()->getBasketId()); } /** diff --git a/vendor/unzerdev/php-sdk/test/integration/Resources/PaypageV2Test.php b/vendor/unzerdev/php-sdk/test/integration/Resources/PaypageV2Test.php index 0a92acd..18ca4ac 100644 --- a/vendor/unzerdev/php-sdk/test/integration/Resources/PaypageV2Test.php +++ b/vendor/unzerdev/php-sdk/test/integration/Resources/PaypageV2Test.php @@ -2,14 +2,18 @@ namespace UnzerSDK\test\integration\Resources; +use UnzerSDK\Constants\CustomerGroups; use UnzerSDK\Constants\ExemptionType; use UnzerSDK\Constants\PaypageCheckoutTypes; +use UnzerSDK\Constants\WeroAmountPaymentTypes; +use UnzerSDK\Constants\WeroCaptureTriggers; use UnzerSDK\Resources\EmbeddedResources\Paypage\PaymentMethodConfig; use UnzerSDK\Resources\EmbeddedResources\Paypage\PaymentMethodsConfigs; use UnzerSDK\Resources\EmbeddedResources\Paypage\Resources; use UnzerSDK\Resources\EmbeddedResources\Paypage\Style; use UnzerSDK\Resources\EmbeddedResources\Paypage\Urls; use UnzerSDK\Resources\EmbeddedResources\Risk; +use UnzerSDK\Resources\EmbeddedResources\WeroEventDependentPayment; use UnzerSDK\Resources\Metadata; use UnzerSDK\Resources\PaymentTypes\Alipay; use UnzerSDK\Resources\PaymentTypes\Applepay; @@ -41,6 +45,14 @@ */ class PaypageV2Test extends BaseIntegrationTest { + private static ?string $token = null; + + protected function setUp(): void + { + parent::setUp(); + self::$token = $this->unzer->prepareJwtToken(self::$token); + } + /** * @test */ @@ -99,7 +111,6 @@ public function JwtTokenShouldBeReusedForMultipleRequests() $this->assertNull($paypageSecond->getRedirectUrl()); // Create Firt paypage - $this->assertNull($unzer->getJwtToken()); $unzer->createPaypage($paypageFirst); $InitialJwtToken = $unzer->getJwtToken(); $this->assertNotNull($InitialJwtToken); @@ -181,6 +192,8 @@ public function createPaypageWithStyle() ->setLinkColor('#1f1f1f') ->setLogoImage('https://logoimage.com') ->setShadows(true) + ->setBasketBackgroundColor('#1f1f1f') + ->setPaymentFormBackgroundColor('#1f1f1f') ->setTextColor('#1f1f1f'); $paypage = new Paypage(9.99, 'EUR', 'charge'); @@ -226,7 +239,7 @@ public function createPaypageWithRiskData() $unzer = $this->getUnzerObject(); $risk = new Risk(); - $risk->setCustomerGroup('neutral') + $risk->setCustomerGroup(CustomerGroups::NEUTRAL) ->setConfirmedAmount('1234') ->setConfirmedOrders('42') ->setRegistrationLevel('1') @@ -239,6 +252,18 @@ public function createPaypageWithRiskData() $this->assertCreatedPaypage($paypage); } + /** @test + */ + public function createPaypageWithZeroAmount() + { + $unzer = $this->getUnzerObject(); + + $paypage = new Paypage(0, 'EUR', 'preauthorize'); + $unzer->createPaypage($paypage); + + $this->assertCreatedPaypage($paypage); + } + /** * @param Paypage $paypage * @return void @@ -272,6 +297,18 @@ public function paymentMethodsConfigsDataProvider() 'paypal' => $enabledConfig ]); + $withWeroConfig = new PaymentMethodsConfigs(); + $withWeroConfig->setMethodConfigs([ + 'wero' => (new PaymentMethodConfig()) + ->setEnabled(true) + ->setEventDependentPayment($edp = (new WeroEventDependentPayment()) + ->setCaptureTrigger(WeroCaptureTriggers::SERVICEFULFILMENT) + ->setAmountPaymentType(WeroAmountPaymentTypes::PAY) + ->setMaxAuthToCaptureTime(300) + ->setMultiCapturesAllowed(false) + ) + ]); + $withCardSpecificConfig = (new PaymentMethodsConfigs())->addMethodConfig(Card::class, $cardConfig); @@ -297,8 +334,7 @@ public function paymentMethodsConfigsDataProvider() ->addMethodConfig(PostFinanceEfinance::class, $enabledConfig) ->addMethodConfig(PostFinanceCard::class, $enabledConfig) ->addMethodConfig(Twint::class, $enabledConfig) - ->addMethodConfig(OpenbankingPis::class, $enabledConfig) - ; + ->addMethodConfig(OpenbankingPis::class, $enabledConfig); $withPaylaterConfig = (new PaymentMethodsConfigs()) ->addMethodConfig(PaylaterInvoice::class, $paylaterConfig); @@ -310,7 +346,8 @@ public function paymentMethodsConfigsDataProvider() 'Method Configs' => [$withMethodConfigs], 'CardSpecificConfig' => [$withCardSpecificConfig], 'ClassNames' => [$withClassNames], - 'PaylaterConfig' => [$withPaylaterConfig] + 'PaylaterConfig' => [$withPaylaterConfig], + 'WeroConfig' => [$withWeroConfig] ]; } } diff --git a/vendor/unzerdev/php-sdk/test/unit/Resources/EmbeddedResources/WeroTransactionDataTest.php b/vendor/unzerdev/php-sdk/test/unit/Resources/EmbeddedResources/WeroTransactionDataTest.php new file mode 100644 index 0000000..feca25e --- /dev/null +++ b/vendor/unzerdev/php-sdk/test/unit/Resources/EmbeddedResources/WeroTransactionDataTest.php @@ -0,0 +1,40 @@ +setCaptureTrigger(WeroCaptureTriggers::SERVICEFULFILMENT) + ->setAmountPaymentType(WeroAmountPaymentTypes::PAY) + ->setMaxAuthToCaptureTime(300) + ->setMultiCapturesAllowed(false); + + $wtd = (new WeroTransactionData()) + ->setEventDependentPayment($edp); + + // Getters + $this->assertInstanceOf(WeroEventDependentPayment::class, $wtd->getEventDependentPayment()); + $this->assertEquals(WeroCaptureTriggers::SERVICEFULFILMENT, $wtd->getEventDependentPayment()->getCaptureTrigger()); + + // Expose + $exposed = $wtd->expose(); + $this->assertArrayHasKey('eventDependentPayment', $exposed); + $this->assertEquals(WeroCaptureTriggers::SERVICEFULFILMENT, $exposed['eventDependentPayment']['captureTrigger']); + $this->assertEquals(WeroAmountPaymentTypes::PAY, $exposed['eventDependentPayment']['amountPaymentType']); + $this->assertSame(300, $exposed['eventDependentPayment']['maxAuthToCaptureTime']); + $this->assertSame(false, $exposed['eventDependentPayment']['multiCapturesAllowed']); + $this->assertArrayNotHasKey('enabled', $exposed); + } +} diff --git a/vendor/unzerdev/php-sdk/test/unit/Services/DummyAdapter.php b/vendor/unzerdev/php-sdk/test/unit/Services/DummyAdapter.php index 399d50c..a377870 100644 --- a/vendor/unzerdev/php-sdk/test/unit/Services/DummyAdapter.php +++ b/vendor/unzerdev/php-sdk/test/unit/Services/DummyAdapter.php @@ -18,7 +18,7 @@ class DummyAdapter implements HttpAdapterInterface /** * {@inheritDoc} */ - public function init(string $url, string $payload = null, string $httpMethod = HttpAdapterInterface::REQUEST_GET): void + public function init(string $url, ?string $payload = null, string $httpMethod = HttpAdapterInterface::REQUEST_GET): void { // do nothing } diff --git a/vendor/unzerdev/php-sdk/test/unit/Services/IdServiceTest.php b/vendor/unzerdev/php-sdk/test/unit/Services/IdServiceTest.php new file mode 100644 index 0000000..cd3c023 --- /dev/null +++ b/vendor/unzerdev/php-sdk/test/unit/Services/IdServiceTest.php @@ -0,0 +1,58 @@ +assertTrue($isUUID); + } + + /** + * @test + * + * @dataProvider invalidUUIDsDP + * + * @param string $id + */ + public function shortIdShouldReturnFalse(string $id) + { + $isUUID = IdService::isUUIDResource($id); + $this->assertFalse($isUUID); + } + + public function validUUIDsDP(): array + { + return [ + ['s-bsk-123e4567-e89b-12d3-a456-426614174000'], + ['s-cst-123e4567-e89b-12d3-a456-426614174001'], + ['p-bsk-123e4567-e89b-12d3-a456-426614174000'], + ['p-cst-123e4567-e89b-12d3-a456-426614174001'], + ]; + } + + public function invalidUUIDsDP(): array + { + return [ + [''], + ['s-cst'], + ['s-bsk-123e4567-e89b-12d3-a456-426614174000-'], + ['-s-bsk-123e4567-e89b-12d3-a456-426614174000'], + ['s-bskt-123e4567-e89b-12d3-a456-426614174000'], + ['a-bsk-123e4567-e89b-12d3-a456-426614174000'], + ['s-cst-123456abcdef'], + ]; + } +} diff --git a/vendor/unzerdev/php-sdk/test/unit/Services/JwtServiceTest.php b/vendor/unzerdev/php-sdk/test/unit/Services/JwtServiceTest.php new file mode 100644 index 0000000..d65d794 --- /dev/null +++ b/vendor/unzerdev/php-sdk/test/unit/Services/JwtServiceTest.php @@ -0,0 +1,46 @@ + - - /**^^ + /** * Verify setters and getters work properly. * * @test @@ -93,7 +94,7 @@ public function gettersAndSettersShouldWorkProperly(): void * * @param string $method * @param string $uri - * @param bool $appendId + * @param bool $appendId */ public function sendShouldCallSendOnHttpService(string $method, string $uri, bool $appendId): void { @@ -128,7 +129,7 @@ public function sendShouldCallSendOnHttpService(string $method, string $uri, boo * * @param string $method * @param string $uri - * @param bool $appendId + * @param bool $appendId */ public function AuthTokenShouldBeRequestedAutomatically(string $method, string $uri, bool $appendId): void { @@ -151,9 +152,47 @@ public function AuthTokenShouldBeRequestedAutomatically(string $method, string $ $this->assertEquals('paypage response', $response->response); } - // + /** + * Verify send will call send on httpService. + * + * @group CC-1309 + * @group CC-1376 + * + * @test + * + * @dataProvider customerV2CreationShouldCallV2EnpointDP + * + * @param string $method + * @param string $uri + * @param bool $appendId + */ + public function customerV2CreationShouldCallV2Enpoint(string $uri, bool $appendId): void + { + $unzer = new Unzer('s-priv-1234'); + $httpMethod = HttpAdapterInterface::REQUEST_POST; + $customer = new CustomerV2(); + $customer->setParentResource($unzer); + + //prepare http service mock. + $method = 'send'; + $httpSrvMock = $this->getMockBuilder(HttpService::class)->setMethods([$method])->getMock(); + $resourceSrv = new ResourceService($unzer); + + /** @var HttpService $httpSrvMock */ + $unzer->setHttpService($httpSrvMock); - // + $httpSrvMock->expects($this->exactly(2))->method($method)->withConsecutive( + ['/auth/token'], + [$uri, $customer, $method] + ) + ->willReturnOnConsecutiveCalls( + '{"accessToken": "jwt.auth.token"}', + '{"response": "paypage response"}' + ); + + $response = $resourceSrv->send($customer, $method); + $this->assertEquals('paypage response', $response->response); + } /** * Verify getResourceIdFromUrl works correctly. @@ -170,7 +209,8 @@ public function getResourceIdFromUrlShouldIdentifyAndReturnTheIdStringFromAGiven $expected, $uri, $idString - ): void { + ): void + { $this->assertEquals($expected, IdService::getResourceIdFromUrl($uri, $idString)); } @@ -190,10 +230,6 @@ public function getResourceIdFromUrlShouldThrowExceptionIfTheIdCanNotBeFound($ur IdService::getResourceIdFromUrl($uri, $idString); } - // - - // - /** * Verify fetchResource calls fetch if its id is set and it has never been fetched before. * @@ -400,7 +436,7 @@ public function fetchShouldCallSendWithGetUpdateFetchedAtAndCallHandleResponse() * @dataProvider fetchResourceByUrlShouldFetchTheDesiredResourceDP * * @param string $fetchMethod - * @param mixed $arguments + * @param mixed $arguments * @param string $resourceUrl */ public function fetchResourceByUrlShouldFetchTheDesiredResource($fetchMethod, $arguments, $resourceUrl): void @@ -455,8 +491,8 @@ public function fetchResourceByUrlForAPaymentTypeShouldReturnNullIfTheTypeIsUnkn * @dataProvider fetchShouldCallFetchResourceDP * * @param string $fetchMethod - * @param array $arguments - * @param mixed $callback + * @param array $arguments + * @param mixed $callback */ public function fetchShouldCallFetchResource(string $fetchMethod, array $arguments, $callback): void { @@ -478,10 +514,6 @@ static function ($resource) use ($callback, $unzer) { $this->assertEquals($unzer, $resource->getUnzerObject()); } - // - - // - /** * Verify createPaymentType method will set parentResource to Unzer object and call create. * @@ -545,10 +577,6 @@ public function updatePaymentTypeShouldCallUpdateMethod(): void $this->assertSame($paymentType, $returnedPaymentType); } - // - - // - /** * Verify createCustomer calls create with customer object and the Unzer resource is set. * @@ -604,8 +632,8 @@ public function createOrUpdateCustomerShouldFetchAndUpdateCustomerIfItAlreadyExi ->with($this->callback(static function ($customerToUpdate) use ($customer) { /** @var Customer $customerToUpdate */ return $customerToUpdate === $customer && - $customerToUpdate->getId() === $customer->getId() && - $customerToUpdate->getEmail() === 'customer@email.de'; + $customerToUpdate->getId() === $customer->getId() && + $customerToUpdate->getEmail() === 'customer@email.de'; })); // Make the call and assertions. @@ -722,10 +750,6 @@ public function deleteCustomerShouldFetchCustomerByIdIfTheIdIsGiven(): void $resourceSrvMock->deleteCustomer('myCustomerId'); } - // - - // - /** * Verify fetchAuthorization fetches payment object and returns its authorization. * @@ -769,10 +793,6 @@ public function fetchAuthorizationShouldThrowExceptionIfNoAuthorizationIsPresent $resourceSrvMock->fetchAuthorization('paymentId'); } - // - - // - /** * Verify fetchPayout fetches payment object and returns its payout. * @@ -795,10 +815,6 @@ public function fetchPayoutShouldFetchPaymentAndReturnItsPayout(): void $this->assertSame($payout, $returnedPayout); } - // - - // - /** * Verify fetchChargeById fetches payment object and gets and returns the charge object from it. * @@ -862,10 +878,6 @@ public function fetchChargeByIdShouldThrowExceptionIfChargeDoesNotExist(): void $resourceSrvMock->fetchChargeById($paymentMock, 'chargeId'); } - // - - // - /** * Verify fetchReversalByAuthorization fetches authorization and gets and returns the reversal object from it. * @@ -947,15 +959,11 @@ public function fetchRefundShouldGetAndFetchDesiredChargeCancellation(): void /** @noinspection PhpParamsInspection */ $resourceSrvMock->expects($this->once())->method('fetchResource')->with($cancel)->willReturn($cancel); - /** @var Charge $chargeMock*/ + /** @var Charge $chargeMock */ $returnedCancellation = $resourceSrvMock->fetchRefund($chargeMock, 'cancellationId'); $this->assertSame($cancel, $returnedCancellation); } - // - - // - /** * Verify fetchShipment fetches payment object and returns the desired shipment from it. * @@ -972,15 +980,11 @@ public function fetchShipmentShouldFetchPaymentAndReturnTheDesiredShipmentFromIt /** @noinspection PhpParamsInspection */ $paymentMock->expects($this->once())->method('getShipment')->with('shipmentId', false)->willReturn($shipment); - /** @var Payment $paymentMock */ + /** @var Payment $paymentMock */ $returnedShipment = $resourceSrvMock->fetchShipment('paymentId', 'shipmentId'); $this->assertSame($shipment, $returnedShipment); } - // - - // - /** * Verify createMetadata calls create with the given metadata object. * @@ -997,10 +1001,6 @@ public function createMetadataShouldCallCreateWithTheGivenMetadataObject(): void $this->assertSame($metadata, $resourceSrvMock->createMetadata($metadata)); } - // - - // - /** * Verify createBasket will set parentResource and call create with the given basket. * @@ -1063,7 +1063,7 @@ public function fetchBasketShouldCallV1EnpointIfBasketWasNotFound(): void $resourceServiceMock->expects(self::exactly(2)) ->method('fetchResource') - ->withConsecutive([$basket, BasePaymentTest::API_VERSION_2], [$basket, Unzer::API_VERSION]) + ->withConsecutive([$basket, BasePaymentTest::API_VERSION_2], [$basket]) ->will($this->returnCallback(function ($basket, $version) { if ($version === BasePaymentTest::API_VERSION_2) { throw new UnzerApiException(null, null, ApiResponseCodes::API_ERROR_BASKET_NOT_FOUND); @@ -1092,7 +1092,7 @@ public function fetchBasketShouldCallFetchResourceMaxTwoTimes(): void $resourceServiceMock->expects(self::exactly(2)) ->method('fetchResource') - ->withConsecutive([$basket, BasePaymentTest::API_VERSION_2], [$basket, Unzer::API_VERSION]) + ->withConsecutive([$basket, BasePaymentTest::API_VERSION_2], [$basket]) ->willThrowException(new UnzerApiException(null, null, ApiResponseCodes::API_ERROR_BASKET_NOT_FOUND)); $this->expectException(UnzerApiException::class); @@ -1147,9 +1147,108 @@ public function fetchBasketShouldNotCallFetchResourcheMethodIfAnyOtherExceptionI $resourceServiceMock->fetchBasket($basket); } - // + /** + * Verify createBasket will set parentResource and call create with the given basket. + * + * @test + */ + public function createV3BasketShouldCallV3Endpoint(): void + { + $unzer = new Unzer('s-priv-123'); + /** @var ResourceServiceInterface|MockObject $resourceSrvMock */ + $resourceSrvMock = $this->getMockBuilder(ResourceService::class)->setConstructorArgs([$unzer])->setMethods(['send'])->getMock(); + $basket = new BasketV3(); + $resourceSrvMock->expects($this->once()) + ->method('send') + ->with($basket, 'POST', BasePaymentTest::API_VERSION_3); - // + try { + $basket->getParentResource(); + $this->assertTrue(false, 'This exception should have been thrown!'); + } catch (RuntimeException $e) { + $this->assertEquals('Parent resource reference is not set!', $e->getMessage()); + } + + $this->assertSame($basket, $resourceSrvMock->createBasket($basket)); + $this->assertSame($unzer, $basket->getParentResource()); + } + + /** + * Verify updateBasket calls update with the given basket and returns it. + * + * @test + */ + public function updateV3BasketShouldCallSendMethodWithV3Version(): void + { + $unzer = new Unzer('s-priv-123'); + /** @var ResourceServiceInterface|MockObject $resourceSrvMock */ + $resourceSrvMock = $this->getMockBuilder(ResourceService::class)->setConstructorArgs([$unzer])->setMethods(['send'])->getMock(); + $basket = new BasketV3(); + /** @noinspection PhpParamsInspection */ + $resourceSrvMock->expects($this->once())->method('send')->with($basket, 'PUT', ApiVersions::V3); + + $returnedBasket = $resourceSrvMock->updateBasket($basket); + + $this->assertSame($basket, $returnedBasket); + $this->assertEquals($unzer, $basket->getParentResource()); + $this->assertEquals($unzer, $basket->getUnzerObject()); + } + + /** + * @test + */ + public function fetchV3BasketIdShouldFetchV3Basket(): void + { + $unzer = new Unzer('s-priv-123'); + $basket = (new BasketV3()); + $basket->setId('s-bsk-123e4567-e89b-12d3-a456-426614174000'); + $basket->setParentResource($unzer); + + /** @var ResourceServiceInterface|MockObject $resourceServiceMock */ + $resourceServiceMock = $this->getMockBuilder(ResourceService::class) + ->setConstructorArgs([$unzer]) + ->setMethods(['send'])->getMock(); + + $result = (object)$basket->expose(); + $result->orderId = 'orderId'; + $resourceServiceMock->expects(self::once()) + ->method('send') + ->with($basket, 'GET', BasePaymentTest::API_VERSION_3) + ->willReturn($result); + + $resourceServiceMock->fetchBasket('s-bsk-123e4567-e89b-12d3-a456-426614174000'); + } + + /** + * @test + */ + public function fetchUnknownV3BasketIdShouldFetchV3Basket(): void + { + $unzer = new Unzer('s-priv-123'); + $basket = (new BasketV3()); + $basket->setId('s-bsk-123e4567-e89b-12d3-a456-426614174000'); + $basket->setParentResource($unzer); + + /** @var ResourceServiceInterface|MockObject $resourceServiceMock */ + $resourceServiceMock = $this->getMockBuilder(ResourceService::class) + ->setConstructorArgs([$unzer]) + ->setMethods(['send'])->getMock(); + + $result = (object)$basket->expose(); + $result->orderId = 'orderId'; + $resourceServiceMock->expects(self::once()) + ->method('send') + ->with($basket, 'GET', BasePaymentTest::API_VERSION_3) + ->willThrowException(new UnzerApiException( + 'Basket not found', + 'Basket not found', + ApiResponseCodes::API_ERROR_BASKET_NOT_FOUND + )); + + $this->expectException(UnzerApiException::class); + $this->expectExceptionCode(ApiResponseCodes::API_ERROR_BASKET_NOT_FOUND); + $resourceServiceMock->fetchBasket('s-bsk-123e4567-e89b-12d3-a456-426614174000'); + } /** * Verify createRecurring calls fetch for the payment type if it is given the id. @@ -1210,10 +1309,6 @@ public function createRecurringShouldThrowExceptionWhenRecurringPaymentIsNotSupp $resourceService->activateRecurringPayment(new Sofort(), 'returnUrl', null); } - // - - // - /** * Data provider for getResourceIdFromUrlShouldIdentifyAndReturnTheIdStringFromAGivenString. * @@ -1235,7 +1330,7 @@ public function urlIdStringProvider(): array */ public function failingUrlIdStringProvider(): array { - return[ + return [ ['https://myurl.test/s-test-1234', 'aut'], ['https://myurl.test/authorizep-aut-99988776655', 'foo'], ['https://myurl.test/s-test-1234/z-bar-123456787', 'bar'] @@ -1284,18 +1379,19 @@ public function fetchResourceByUrlShouldFetchTheDesiredResourceDP(): array { return [ 'Authorization' => ['fetchAuthorization', ['s-pay-100746'], 'https://api.unzer.com/v1/payments/s-pay-100746/authorize/s-aut-1/'], - 'Charge' => ['fetchChargeById', ['s-pay-100798', 's-chg-1'], 'https://api.unzer.com/v1/payments/s-pay-100798/charges/s-chg-1/'], - 'Shipment' => ['fetchShipment', ['s-pay-100801', 's-shp-1'], 'https://api.unzer.com/v1/payments/s-pay-100801/shipments/s-shp-1/'], - 'Refund' => ['fetchRefundById', ['s-pay-100802', 's-chg-1', 's-cnl-1'], 'https://api.unzer.com/v1/payments/s-pay-100802/charges/s-chg-1/cancels/s-cnl-1/'], + 'Charge' => ['fetchChargeById', ['s-pay-100798', 's-chg-1'], 'https://api.unzer.com/v1/payments/s-pay-100798/charges/s-chg-1/'], + 'Shipment' => ['fetchShipment', ['s-pay-100801', 's-shp-1'], 'https://api.unzer.com/v1/payments/s-pay-100801/shipments/s-shp-1/'], + 'Refund' => ['fetchRefundById', ['s-pay-100802', 's-chg-1', 's-cnl-1'], 'https://api.unzer.com/v1/payments/s-pay-100802/charges/s-chg-1/cancels/s-cnl-1/'], 'Payment Refund' => ['fetchPaymentRefund', ['s-pay-100802', 's-cnl-1'], 'https://api.unzer.com/v1/payments/s-pay-100802/charges/cancels/s-cnl-1/'], - 'Reversal' => ['fetchReversal', ['s-pay-100803', 's-cnl-1'], 'https://api.unzer.com/v1/payments/s-pay-100803/authorize/s-aut-1/cancels/s-cnl-1/'], + 'Reversal' => ['fetchReversal', ['s-pay-100803', 's-cnl-1'], 'https://api.unzer.com/v1/payments/s-pay-100803/authorize/s-aut-1/cancels/s-cnl-1/'], 'Payment Reversal' => ['fetchPaymentReversal', ['s-pay-100803', 's-cnl-1'], 'https://api.unzer.com/v1/payments/s-pay-100803/authorize/cancels/s-cnl-1/'], - 'Payment' => ['fetchPayment', ['s-pay-100801'], 'https://api.unzer.com/v1/payments/s-pay-100801'], - 'Metadata' => ['fetchMetadata', ['s-mtd-6glqv9axjpnc'], 'https://api.unzer.com/v1/metadata/s-mtd-6glqv9axjpnc/'], - 'Customer' => ['fetchCustomer', ['s-cst-50c14d49e2fe'], 'https://api.unzer.com/v1/customers/s-cst-50c14d49e2fe'], - 'v1Basket' => ['fetchBasket', ['s-bsk-1254'], 'https://api.unzer.com/v1/baskets/s-bsk-1254/'], - 'v2Basket' => ['fetchBasket', ['s-bsk-1254'], 'https://api.unzer.com/v2/baskets/s-bsk-1254/'], - 'Payout' => ['fetchPayout', ['s-pay-100746'], 'https://api.unzer.com/v1/payments/s-pay-100746/payout/s-out-1/'] + 'Payment' => ['fetchPayment', ['s-pay-100801'], 'https://api.unzer.com/v1/payments/s-pay-100801'], + 'Metadata' => ['fetchMetadata', ['s-mtd-6glqv9axjpnc'], 'https://api.unzer.com/v1/metadata/s-mtd-6glqv9axjpnc/'], + 'Customer' => ['fetchCustomer', ['s-cst-50c14d49e2fe'], 'https://api.unzer.com/v1/customers/s-cst-50c14d49e2fe'], + 'v2Customer' => ['fetchCustomer', ['s-cst-123e4567-e89b-12d3-a456-426614174000'], 'https://api.unzer.com/v2/customers/s-cst-123e4567-e89b-12d3-a456-426614174000'], + 'v1Basket' => ['fetchBasket', ['s-bsk-1254'], 'https://api.unzer.com/v1/baskets/s-bsk-1254/'], + 'v2Basket' => ['fetchBasket', ['s-bsk-1254'], 'https://api.unzer.com/v2/baskets/s-bsk-1254/'], + 'Payout' => ['fetchPayout', ['s-pay-100746'], 'https://api.unzer.com/v1/payments/s-pay-100746/payout/s-out-1/'] ]; } @@ -1307,30 +1403,31 @@ public function fetchResourceByUrlShouldFetchTheDesiredResourceDP(): array public function fetchResourceByUrlForAPaymentTypeShouldCallFetchPaymentTypeDP(): array { return [ - 'ALIPAY' => ['s-ali-xen2ybcovn56', 'https://api.unzer.com/v1/types/alipay/s-ali-xen2ybcovn56/'], - 'APPLEPAY' => ['s-apl-xen2ybcovn56', 'https://api.unzer.com/v1/types/appelpay/s-apl-xen2ybcovn56/'], - 'BANCONTACT' => ['s-bct-xen2ybcovn56', 'https://api.unzer.com/v1/types/bancontact/s-bct-xen2ybcovn56/'], - 'CARD' => ['s-crd-xen2ybcovn56', 'https://api.unzer.com/v1/types/card/s-crd-xen2ybcovn56/'], - 'EPS' => ['s-eps-xen2ybcovn56', 'https://api.unzer.com/v1/types/eps/s-eps-xen2ybcovn56/'], - 'GIROPAY' => ['s-gro-xen2ybcovn56', 'https://api.unzer.com/v1/types/giropay/s-gro-xen2ybcovn56/'], - 'HIRE_PURCHASE_DIRECT_DEBIT' => ['s-hdd-xen2ybcovn56', 'https://api.unzer.com/v1/types/hire-purchase-direct-debit/s-hdd-xen2ybcovn56/'], - 'IDEAL' => ['s-idl-xen2ybcovn56', 'https://api.unzer.com/v1/types/ideal/s-idl-xen2ybcovn56/'], - 'INVOICE' => ['s-ivc-xen2ybcovn56', 'https://api.unzer.com/v1/types/invoice/s-ivc-xen2ybcovn56/'], - 'INVOICE_FACTORING' => ['s-ivf-xen2ybcovn56', 'https://api.unzer.com/v1/types/wechatpay/s-ivf-xen2ybcovn56/'], - 'INVOICE_GUARANTEED' => ['s-ivg-xen2ybcovn56', 'https://api.unzer.com/v1/types/invoice-guaranteed/s-ivg-xen2ybcovn56/'], - 'INVOICE_SECURED' => ['s-ivs-xen2ybcovn56', 'https://api.unzer.com/v1/types/invoice-secured/s-ivs-xen2ybcovn56/'], - 'Installment_SECURED' => ['s-ins-xen2ybcovn56', 'https://api.unzer.com/v1/types/installment-secured/s-ins-xen2ybcovn56/'], - 'PAYLATER_INVOICE' => ['s-piv-xen2ybcovn56', 'https://api.unzer.com/v1/types/paylater-invoice/s-piv-xen2ybcovn56/'], - 'PAYPAL' => ['s-ppl-xen2ybcovn56', 'https://api.unzer.com/v1/types/paypal/s-ppl-xen2ybcovn56/'], - 'PIS' => ['s-pis-xen2ybcovn56', 'https://api.unzer.com/v1/types/pis/s-pis-xen2ybcovn56/'], - 'POST_FINANCE_EFINANCE' => ['s-pfe-xen2ybcovn56', 'https://api.unzer.com/v1/types/pfe/s-pfe-xen2ybcovn56/'], - 'POST_FINANCE_CARD' => ['s-pfc-xen2ybcovn56', 'https://api.unzer.com/v1/types/pfc/s-pfc-xen2ybcovn56/'], - 'PREPAYMENT' => ['s-ppy-xen2ybcovn56', 'https://api.unzer.com/v1/types/prepayment/s-ppy-xen2ybcovn56/'], - 'PRZELEWY24' => ['s-p24-xen2ybcovn56', 'https://api.unzer.com/v1/types/przelewy24/s-p24-xen2ybcovn56/'], - 'SEPA_DIRECT_DEBIT' => ['s-sdd-xen2ybcovn56', 'https://api.unzer.com/v1/types/direct-debit/s-sdd-xen2ybcovn56/'], + 'ALIPAY' => ['s-ali-xen2ybcovn56', 'https://api.unzer.com/v1/types/alipay/s-ali-xen2ybcovn56/'], + 'APPLEPAY' => ['s-apl-xen2ybcovn56', 'https://api.unzer.com/v1/types/appelpay/s-apl-xen2ybcovn56/'], + 'BANCONTACT' => ['s-bct-xen2ybcovn56', 'https://api.unzer.com/v1/types/bancontact/s-bct-xen2ybcovn56/'], + 'CARD' => ['s-crd-xen2ybcovn56', 'https://api.unzer.com/v1/types/card/s-crd-xen2ybcovn56/'], + 'EPS' => ['s-eps-xen2ybcovn56', 'https://api.unzer.com/v1/types/eps/s-eps-xen2ybcovn56/'], + 'GIROPAY' => ['s-gro-xen2ybcovn56', 'https://api.unzer.com/v1/types/giropay/s-gro-xen2ybcovn56/'], + 'HIRE_PURCHASE_DIRECT_DEBIT' => ['s-hdd-xen2ybcovn56', 'https://api.unzer.com/v1/types/hire-purchase-direct-debit/s-hdd-xen2ybcovn56/'], + 'IDEAL' => ['s-idl-xen2ybcovn56', 'https://api.unzer.com/v1/types/ideal/s-idl-xen2ybcovn56/'], + 'INVOICE' => ['s-ivc-xen2ybcovn56', 'https://api.unzer.com/v1/types/invoice/s-ivc-xen2ybcovn56/'], + 'INVOICE_FACTORING' => ['s-ivf-xen2ybcovn56', 'https://api.unzer.com/v1/types/wechatpay/s-ivf-xen2ybcovn56/'], + 'INVOICE_GUARANTEED' => ['s-ivg-xen2ybcovn56', 'https://api.unzer.com/v1/types/invoice-guaranteed/s-ivg-xen2ybcovn56/'], + 'INVOICE_SECURED' => ['s-ivs-xen2ybcovn56', 'https://api.unzer.com/v1/types/invoice-secured/s-ivs-xen2ybcovn56/'], + 'Installment_SECURED' => ['s-ins-xen2ybcovn56', 'https://api.unzer.com/v1/types/installment-secured/s-ins-xen2ybcovn56/'], + 'PAYLATER_INVOICE' => ['s-piv-xen2ybcovn56', 'https://api.unzer.com/v1/types/paylater-invoice/s-piv-xen2ybcovn56/'], + 'PAYPAL' => ['s-ppl-xen2ybcovn56', 'https://api.unzer.com/v1/types/paypal/s-ppl-xen2ybcovn56/'], + 'PIS' => ['s-pis-xen2ybcovn56', 'https://api.unzer.com/v1/types/pis/s-pis-xen2ybcovn56/'], + 'POST_FINANCE_EFINANCE' => ['s-pfe-xen2ybcovn56', 'https://api.unzer.com/v1/types/pfe/s-pfe-xen2ybcovn56/'], + 'POST_FINANCE_CARD' => ['s-pfc-xen2ybcovn56', 'https://api.unzer.com/v1/types/pfc/s-pfc-xen2ybcovn56/'], + 'PREPAYMENT' => ['s-ppy-xen2ybcovn56', 'https://api.unzer.com/v1/types/prepayment/s-ppy-xen2ybcovn56/'], + 'PRZELEWY24' => ['s-p24-xen2ybcovn56', 'https://api.unzer.com/v1/types/przelewy24/s-p24-xen2ybcovn56/'], + 'SEPA_DIRECT_DEBIT' => ['s-sdd-xen2ybcovn56', 'https://api.unzer.com/v1/types/direct-debit/s-sdd-xen2ybcovn56/'], 'SEPA_DIRECT_DEBIT_GUARANTEED' => ['s-ddg-xen2ybcovn56', 'https://api.unzer.com/v1/types/direct-debit-guaranteed/s-ddg-xen2ybcovn56/'], - 'SOFORT' => ['s-sft-xen2ybcovn56', 'https://api.unzer.com/v1/types/sofort/s-sft-xen2ybcovn56/'], - 'WECHATPAY' => ['s-wcp-xen2ybcovn56', 'https://api.unzer.com/v1/types/wechatpay/s-wcp-xen2ybcovn56/'] + 'SOFORT' => ['s-sft-xen2ybcovn56', 'https://api.unzer.com/v1/types/sofort/s-sft-xen2ybcovn56/'], + 'WECHATPAY' => ['s-wcp-xen2ybcovn56', 'https://api.unzer.com/v1/types/wechatpay/s-wcp-xen2ybcovn56/'], + 'WERO' => ['s-wro-xen2ybcovn56', 'https://api.unzer.com/v1/types/wero/s-wro-xen2ybcovn56/'] ]; } @@ -1340,10 +1437,10 @@ public function fetchResourceByUrlForAPaymentTypeShouldCallFetchPaymentTypeDP(): public function sendShouldCallSendOnHttpServiceDP(): array { return [ - HttpAdapterInterface::REQUEST_GET => [HttpAdapterInterface::REQUEST_GET, '/my/get/uri', true], - HttpAdapterInterface::REQUEST_PATCH => [HttpAdapterInterface::REQUEST_PATCH, '/my/patch/uri', true], - HttpAdapterInterface::REQUEST_POST => [HttpAdapterInterface::REQUEST_POST, '/my/post/uri', false], - HttpAdapterInterface::REQUEST_PUT => [HttpAdapterInterface::REQUEST_PUT, '/my/put/uri', true], + HttpAdapterInterface::REQUEST_GET => [HttpAdapterInterface::REQUEST_GET, '/my/get/uri', true], + HttpAdapterInterface::REQUEST_PATCH => [HttpAdapterInterface::REQUEST_PATCH, '/my/patch/uri', true], + HttpAdapterInterface::REQUEST_POST => [HttpAdapterInterface::REQUEST_POST, '/my/post/uri', false], + HttpAdapterInterface::REQUEST_PUT => [HttpAdapterInterface::REQUEST_PUT, '/my/put/uri', true], HttpAdapterInterface::REQUEST_DELETE => [HttpAdapterInterface::REQUEST_DELETE, '/my/delete/uri', true], ]; } @@ -1354,7 +1451,7 @@ public function sendShouldCallSendOnHttpServiceDP(): array public function AuthTokenShouldBeRequestedAutomaticallyDP(): array { return [ - HttpAdapterInterface::REQUEST_POST => [HttpAdapterInterface::REQUEST_POST, '/auth/token', false], + HttpAdapterInterface::REQUEST_POST => [HttpAdapterInterface::REQUEST_POST, '/auth/token', false], ]; } @@ -1363,22 +1460,22 @@ public function AuthTokenShouldBeRequestedAutomaticallyDP(): array */ public function fetchShouldCallFetchResourceDP(): array { - $fetchPaymentCB = static function ($payment) { + $fetchPaymentCB = static function ($payment) { return $payment instanceof Payment && $payment->getId() === 'myPaymentId'; }; $fetchPaymentByOrderIdCB = static function ($payment) { return $payment instanceof Payment && $payment->getOrderId() === 'myOrderId'; }; - $fetchKeypairCB = static function ($keypair) { + $fetchKeypairCB = static function ($keypair) { return $keypair instanceof Keypair; }; - $fetchCustomerCB = static function ($customer) { + $fetchCustomerCB = static function ($customer) { return $customer instanceof Customer && $customer->getId() === 'myCustomerId'; }; - $fetchMetadataCB = static function ($metadata) { + $fetchMetadataCB = static function ($metadata) { return $metadata instanceof Metadata && $metadata->getId() === 's-mtd-1234'; }; - $fetchBasketCB = static function ($basket) { + $fetchBasketCB = static function ($basket) { return $basket instanceof Basket && $basket->getId() === 'myBasketId'; }; @@ -1452,5 +1549,10 @@ public function fetchShouldCallFetchResourceDP(): array ]; } - // + public function customerV2CreationShouldCallV2EnpointDP() + { + return [ + 'Customer' => ['/customers', false] + ]; + } } diff --git a/vendor/unzerdev/php-sdk/test/unit/Traits/HasAdditionalTransactionDataTest.php b/vendor/unzerdev/php-sdk/test/unit/Traits/HasAdditionalTransactionDataTest.php index 2a926e8..9370719 100644 --- a/vendor/unzerdev/php-sdk/test/unit/Traits/HasAdditionalTransactionDataTest.php +++ b/vendor/unzerdev/php-sdk/test/unit/Traits/HasAdditionalTransactionDataTest.php @@ -11,9 +11,13 @@ namespace UnzerSDK\test\unit\Traits; +use UnzerSDK\Constants\WeroAmountPaymentTypes; +use UnzerSDK\Constants\WeroCaptureTriggers; use UnzerSDK\Resources\EmbeddedResources\CardTransactionData; use UnzerSDK\Resources\EmbeddedResources\RiskData; use UnzerSDK\Resources\EmbeddedResources\ShippingData; +use UnzerSDK\Resources\EmbeddedResources\WeroEventDependentPayment; +use UnzerSDK\Resources\EmbeddedResources\WeroTransactionData; use UnzerSDK\Resources\PaymentTypes\Paypal; use UnzerSDK\test\BasePaymentTest; @@ -110,6 +114,69 @@ public function exposeCardDataAsExpected(): void $this->assertEquals('exemptionType', $additionalTransactionData->card['exemptionType']); } + /** + * WeroData setters/getters should work as expected. + * + * @test + */ + public function setAndGetWeroData(): void + { + $dummy = new TraitDummyHasAdditionalTransactionData(); + $this->assertNull($dummy->getWeroTransactionData()); + + $edp = (new WeroEventDependentPayment()) + ->setCaptureTrigger(WeroCaptureTriggers::SERVICEFULFILMENT) + ->setAmountPaymentType(WeroAmountPaymentTypes::PAY) + ->setMaxAuthToCaptureTime(300) + ->setMultiCapturesAllowed(false); + + $weroTransactionData = (new WeroTransactionData()) + ->setEventDependentPayment($edp); + + $dummy->setWeroTransactionData($weroTransactionData); + + $wero = $dummy->getWeroTransactionData(); + $this->assertNotNull($wero); + $this->assertInstanceOf(WeroTransactionData::class, $wero); + $this->assertInstanceOf(WeroEventDependentPayment::class, $wero->getEventDependentPayment()); + $this->assertEquals(WeroCaptureTriggers::SERVICEFULFILMENT, $wero->getEventDependentPayment()->getCaptureTrigger()); + $this->assertEquals(WeroAmountPaymentTypes::PAY, $wero->getEventDependentPayment()->getAmountPaymentType()); + $this->assertSame(300, $wero->getEventDependentPayment()->getMaxAuthToCaptureTime()); + $this->assertSame(false, $wero->getEventDependentPayment()->getMultiCapturesAllowed()); + } + + /** + * WeroData should be exposed correctly. + * + * @test + */ + public function exposeWeroDataAsExpected(): void + { + $dummy = new TraitDummyHasAdditionalTransactionData(); + $this->assertNull($dummy->getWeroTransactionData()); + + $edp = (new WeroEventDependentPayment()) + ->setCaptureTrigger(WeroCaptureTriggers::SERVICEFULFILMENT) + ->setAmountPaymentType(WeroAmountPaymentTypes::PAY) + ->setMaxAuthToCaptureTime(300) + ->setMultiCapturesAllowed(false); + + $weroTransactionData = (new WeroTransactionData()) + ->setEventDependentPayment($edp); + + $dummy->setWeroTransactionData($weroTransactionData); + + $exposedResource = $dummy->expose(); + $this->assertNotNull($exposedResource['additionalTransactionData']); + $additionalTransactionData = $exposedResource['additionalTransactionData']; + + $this->assertArrayHasKey('eventDependentPayment', $additionalTransactionData->wero); + $this->assertEquals(WeroCaptureTriggers::SERVICEFULFILMENT, $additionalTransactionData->wero['eventDependentPayment']['captureTrigger']); + $this->assertEquals(WeroAmountPaymentTypes::PAY, $additionalTransactionData->wero['eventDependentPayment']['amountPaymentType']); + $this->assertSame(300, $additionalTransactionData->wero['eventDependentPayment']['maxAuthToCaptureTime']); + $this->assertSame(false, $additionalTransactionData->wero['eventDependentPayment']['multiCapturesAllowed']); + } + /** * Verify checkoutType can be set via typeId correctly. *