diff --git a/.gitignore b/.gitignore index fe32b8a..c430163 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ .idea -/.php_cs.cache -/composer.lock +.php_cs.cache +composer.lock +composer.phar diff --git a/CHANGELOG.md b/CHANGELOG.md index a2457d5..86d10be 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,24 @@ # Release Notes - heidelpay extension for JTL Shop +##114 + +###18.06.26 + +###Added +- basket for secured invoice and secured direct debit to increase the acceptance rate of the insurance provider. +- info about the used shop and plugin version are in the payment request. +- support for asynchronously incoming payments via push notification. +- send uniqueId to WAWI for an easier way to map the payment transactions. + +###Changed +- secured invoice is no longer available for the time of the actual session after user was denied by insurance provider. + That behaviour should avoid repetitive payment requests which will fail. +- "sofortueberweisung" was renamed "Sofort". (Reconfiguration necessary) +- Heidelberger Payment GmbH was renamed heidelpay GmbH. + +###Fixed +- added Switch for secured direct debit to choose between booking modes authorize and debit(default). + ## v113 ###17.12.01 @@ -13,7 +32,7 @@ ####Changed - disabled Santander invoice in info.xml - replaced heidelpay/php-api with heidelpay/php-payment-api -- replaced heidelpay/php-customer-messages with eidelpay/php-message-code-mapper +- replaced heidelpay/php-customer-messages with heidelpay/php-message-code-mapper - changed namespaces according to new packages - modified getIp() for proxy cases diff --git a/LICENSE.txt b/LICENSE.txt index 436193f..e1cd396 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -3,51 +3,51 @@ Lizenzvereinbarung Plug-in -I. Präambel +I. Pr�ambel - Diese Lizenzvereinbarung Plug-in (nachfolgend – „Vereinbarung“) bildet einen Vertrag zwischen dem Nutzer des Plug-ins und der Heidelberger Payment GmbH (nachfolgend „heidelpay“). + Diese Lizenzvereinbarung Plug-in (nachfolgend � �Vereinbarung�) bildet einen Vertrag zwischen dem Nutzer des Plug-ins und der heidelpay GmbH (nachfolgend �heidelpay�). Das Plug-in von heidelpay ist ein Software-Programm, welches die Schnittstelle zum Payment-System von heidelpay mit einer Anwendung (zum Beispiel: Shopsystem, Warenwirtschaft, Debitorenmanagement etc.) verbindet. Das Plug-in dient dem Datenaustausch zwischen dem Payment-System von heidelpay und der Anwendung. Das Plug-in erweitert den Funktionsumfang der Anwendung hinsichtlich der mit heidelpay gesondert vertraglich vereinbarten Leistungen. - Diese Vereinbarung regelt die Bestimmungen unter denen heidelpay die Nutzung des zur Verfügung gestellten Plug-in gestattet. + Diese Vereinbarung regelt die Bestimmungen unter denen heidelpay die Nutzung des zur Verf�gung gestellten Plug-in gestattet. Dies vorausgeschickt, treffen der Nutzer und heidelpay die folgende Vereinbarung: II. Begriffsbestimmungen - Object Code Die maschinenlesbare, übersetzte Form des Plug-ins. + Object Code Die maschinenlesbare, �bersetzte Form des Plug-ins. - Plug-in Das unter dieser Lizenzvereinbarung angebotene Programm, das von heidelpay nach den Bestim-mungen dieser Lizenzvereinbarung verbreitet oder öffentlich zugänglich gemacht hat. + Plug-in Das unter dieser Lizenzvereinbarung angebotene Programm, das von heidelpay nach den Bestim-mungen dieser Lizenzvereinbarung verbreitet oder �ffentlich zug�nglich gemacht hat. - Source Code Die für Menschen lesbare, in Programmiersprache dargestellte Form des Plug-in. + Source Code Die f�r Menschen lesbare, in Programmiersprache dargestellte Form des Plug-in. - Verändern Jede Erweiterung, Kürzung und Bearbeitung des Plug-ins, insbesondere Weiterentwicklungen + Ver�ndern Jede Erweiterung, K�rzung und Bearbeitung des Plug-ins, insbesondere Weiterentwicklungen - Verbreiten Die öffentliche Weitergabe des Plug-ins, biespielsweise das Bereitstellen zum Download auf öffent-lich zugänglichen Internetseiten. + Verbreiten Die �ffentliche Weitergabe des Plug-ins, biespielsweise das Bereitstellen zum Download auf �ffent-lich zug�nglichen Internetseiten. III. Geltenden Bestimmungen - Im Falle eines zwischen dem Nutzer und heidelpay abgeschlossenen Händlervertrages für die Abwicklung der dort bestimmten Leistungen, gilt der Händlervertrag ab Vertragsschluss und gilt in diesem Fall zusätzlich zu dieser Ver-einbarung. Im Falle des Widerspruchs zwischen dieser Vereinbarung und dem Händlervertrag hat der Händlerver-trag Vorrang. + Im Falle eines zwischen dem Nutzer und heidelpay abgeschlossenen H�ndlervertrages f�r die Abwicklung der dort bestimmten Leistungen, gilt der H�ndlervertrag ab Vertragsschluss und gilt in diesem Fall zus�tzlich zu dieser Ver-einbarung. Im Falle des Widerspruchs zwischen dieser Vereinbarung und dem H�ndlervertrag hat der H�ndlerver-trag Vorrang. IV. Lizenz - 1. Diese Vereinbarung räumt nur solchen Nutzern Nutzungsrechte ein, die Unternehmer im Sinne des BGB sind. Eine Nutzung durch Verbraucher ist nicht gestattet. - 2. Die von heidelpay im Rahmen dieser Vereinbarung gewährte Lizenz, ist für den Nutzer unentgeltlich. - 3. Unter der Voraussetzung der Einhaltung der Bestimmungen dieser Vereinbarung, erteilt heidelpay dem Nut-zer das zeitlich unbefristete, widerrufliche, räumlich auf Europa begrenzte Recht, das Plug-in zu verändern, unverändert oder in veränderter Form zu dem in der Präambel dargestellten Zweck für geschäftliche Zwecke zu nutzen, d.h. das Plug-in zu speichern, ablaufen zu lassen, zu vervielfältigen, zu verbreiten und öffentlich zugänglich zu machen. - 4. Heidelpay kann neue Versionen/Updates des Plug-ins anbieten, die zum Beispiel Fehlerbehebungen und neue Funktionalitäten beinhalten können. Heidelpay empfiehlt daher die regelmässige Überprüfung der Ak-tualität des Plug-in, dies wird auf der Seite http://dev.heidelpay.de veröffentlicht. Auch diese neuen Versio-nen/Updates unterliegen den Bedingungen dieser Vereinbarung. + 1. Diese Vereinbarung r�umt nur solchen Nutzern Nutzungsrechte ein, die Unternehmer im Sinne des BGB sind. Eine Nutzung durch Verbraucher ist nicht gestattet. + 2. Die von heidelpay im Rahmen dieser Vereinbarung gew�hrte Lizenz, ist f�r den Nutzer unentgeltlich. + 3. Unter der Voraussetzung der Einhaltung der Bestimmungen dieser Vereinbarung, erteilt heidelpay dem Nut-zer das zeitlich unbefristete, widerrufliche, r�umlich auf Europa begrenzte Recht, das Plug-in zu ver�ndern, unver�ndert oder in ver�nderter Form zu dem in der Pr�ambel dargestellten Zweck f�r gesch�ftliche Zwecke zu nutzen, d.h. das Plug-in zu speichern, ablaufen zu lassen, zu vervielf�ltigen, zu verbreiten und �ffentlich zug�nglich zu machen. + 4. heidelpay kann neue Versionen/Updates des Plug-ins anbieten, die zum Beispiel Fehlerbehebungen und neue Funktionalit�ten beinhalten k�nnen. heidelpay empfiehlt daher die regelm�ssige �berpr�fung der Ak-tualit�t des Plug-in, dies wird auf der Seite http://dev.heidelpay.de ver�ffentlicht. Auch diese neuen Versio-nen/Updates unterliegen den Bedingungen dieser Vereinbarung. -V. Beschränkungen +V. Beschr�nkungen - 1. Durch diese Vereinbarung erfolgt keine Übertragung jedweder Schutzrechte von heidelpay. - 2. Das Recht, das Plug-in zu verändern und diese veränderte Version zu vervielfältigen, zu verbreiten oder öf-fentlich zugänglich zu machen, setzt voraus, dass + 1. Durch diese Vereinbarung erfolgt keine �bertragung jedweder Schutzrechte von heidelpay. + 2. Das Recht, das Plug-in zu ver�ndern und diese ver�nderte Version zu vervielf�ltigen, zu verbreiten oder �f-fentlich zug�nglich zu machen, setzt voraus, dass a. die im Source Code bzw. Object Code enthaltenen Hinweise auf diese Lizenz erhalten bleiben; und - b. alle Hinweise und Vermerke im Source Code bzw. Object Code, hinsichtlich des Urhebers des Plug-in un-verändert bleiben; und - c. ein deutlicher Hinweis erteilt wird, dass es sich um eine veränderte Version des Plug-in handelt, eine Do-kumentation darüber, welche Teile verändert wurden, mitgeliefert wird; und - d. Heidelpay für sämtliche aus der Veränderung resultierende Ansprüche freigestellt wird und zudem das veränderte Plug-in mit einer Klarstellung versehen wird, dass heidelpay für das Plug-in in der veränderten Form keine Haftung übernimmt; und - e. das veränderte Plug-in unter einer Lizenzvereinbarung zur Verfügung gestellt wird, die das Interesse von heidelpay entsprechend den Bedingungen dieser Vereinbarung schützt; und - f. die im Zusammenhang mit dem Plug-in angezeigten rechtlichen Hinweise nicht entfernt, verdeckt oder abgeändert werden. - 3. Der Nutzer sichert zu, dass er bei der Nutzung des Plug-in von heidelpay die geltenden nationalen und inter-nationalen Gesetze einhält; - 4. Der Nutzer sichert zu, heidelpay unverzüglich zu informieren, wenn Dritte ihm gegenüber Ansprüche im Zu-sammenhang mit dem Plug-in anmelden und/oder behaupten, das Plug-in verletze Rechte Dritter, und hei-delpay alle Dokumente und/oder Informationen zur Verfügung zu stellen, die der Nutzer im Zusammenhang mit einem solchen Anspruch erhält. + b. alle Hinweise und Vermerke im Source Code bzw. Object Code, hinsichtlich des Urhebers des Plug-in un-ver�ndert bleiben; und + c. ein deutlicher Hinweis erteilt wird, dass es sich um eine ver�nderte Version des Plug-in handelt, eine Do-kumentation dar�ber, welche Teile ver�ndert wurden, mitgeliefert wird; und + d. heidelpay f�r s�mtliche aus der Ver�nderung resultierende Anspr�che freigestellt wird und zudem das ver�nderte Plug-in mit einer Klarstellung versehen wird, dass heidelpay f�r das Plug-in in der ver�nderten Form keine Haftung �bernimmt; und + e. das ver�nderte Plug-in unter einer Lizenzvereinbarung zur Verf�gung gestellt wird, die das Interesse von heidelpay entsprechend den Bedingungen dieser Vereinbarung sch�tzt; und + f. die im Zusammenhang mit dem Plug-in angezeigten rechtlichen Hinweise nicht entfernt, verdeckt oder abge�ndert werden. + 3. Der Nutzer sichert zu, dass er bei der Nutzung des Plug-in von heidelpay die geltenden nationalen und inter-nationalen Gesetze einh�lt; + 4. Der Nutzer sichert zu, heidelpay unverz�glich zu informieren, wenn Dritte ihm gegen�ber Anspr�che im Zu-sammenhang mit dem Plug-in anmelden und/oder behaupten, das Plug-in verletze Rechte Dritter, und hei-delpay alle Dokumente und/oder Informationen zur Verf�gung zu stellen, die der Nutzer im Zusammenhang mit einem solchen Anspruch erh�lt. VI. Datenschutz @@ -55,34 +55,34 @@ VI. Datenschutz VII. FREISTELLUNG - Der Nutzer erklärt sich einverstanden, heidelpay, deren Tochtergesellschaften, angeschlossenen Unternehmen, Geschäftsführer, leitenden Angestellten, Mitarbeiter, Vertreter, Geschäftspartner und Lizenzgeber gegen alle An-sprüche oder Forderungen Dritter, einschließlich Gerichtskosten, angemessener Anwaltsgebühren und Sachver-ständigenkosten, freizustellen, die entstehen weil: + Der Nutzer erkl�rt sich einverstanden, heidelpay, deren Tochtergesellschaften, angeschlossenen Unternehmen, Gesch�ftsf�hrer, leitenden Angestellten, Mitarbeiter, Vertreter, Gesch�ftspartner und Lizenzgeber gegen alle An-spr�che oder Forderungen Dritter, einschlie�lich Gerichtskosten, angemessener Anwaltsgeb�hren und Sachver-st�ndigenkosten, freizustellen, die entstehen weil: (a) die Nutzung des Plug-ins von heidelpay unter Verletzung der Bestimmungen dieser Vereinbarung erfolgt; oder - (b) der Nutzer gegen geltende Gesetze oder aufsichtsrechtliche Bestimmungen verstösst oder - (c) der Nutzer seine Identität in einer falschen, betrügerischen, böswilligen oder unzutreffenden Weise dar-stellt. + (b) der Nutzer gegen geltende Gesetze oder aufsichtsrechtliche Bestimmungen verst�sst oder + (c) der Nutzer seine Identit�t in einer falschen, betr�gerischen, b�swilligen oder unzutreffenden Weise dar-stellt. VIII. TECHNISCHER SUPPORT - Heidelpay kann dem Nutzer, welcher das Plug-in in unverändertem Zustand nutzt, Support zur Verfügung stellen. Hierzu bedarf es einer gesonderten Vereinbarung zwischen dem Nutzer und heidelpay. + heidelpay kann dem Nutzer, welcher das Plug-in in unver�ndertem Zustand nutzt, Support zur Verf�gung stellen. Hierzu bedarf es einer gesonderten Vereinbarung zwischen dem Nutzer und heidelpay. -IX.LAUFZEIT UND KÜNDIGUNG +IX.LAUFZEIT UND K�NDIGUNG - 1. Diese Vereinbarung kann von den Parteien jederzeit fristlos gekündigt werden. + 1. Diese Vereinbarung kann von den Parteien jederzeit fristlos gek�ndigt werden. 2. Es steht heidelpay frei, das Downloadangebot jederzeit einzustellen. - 3. Alle Rechte des Nutzers aus dieser Vereinbarung erlöschen unmittelbar, sobald der Nutzer wesentliche Best-immungen dieser Vereinbarung verletzt. - 4. Sobald diese Vereinbarung beendet ist oder der Nutzer seine Rechte gemäss Ziffer 3 verliert, hat der Nutzer sämtliche Kopien des Plug-ins (und alle entsprechenden Sicherungen) zu löschen. + 3. Alle Rechte des Nutzers aus dieser Vereinbarung erl�schen unmittelbar, sobald der Nutzer wesentliche Best-immungen dieser Vereinbarung verletzt. + 4. Sobald diese Vereinbarung beendet ist oder der Nutzer seine Rechte gem�ss Ziffer 3 verliert, hat der Nutzer s�mtliche Kopien des Plug-ins (und alle entsprechenden Sicherungen) zu l�schen. X. HAFTUNG - 1. Da die Lizenz unentgeltlich zur Verfügung gestellt wird, handelt es sich um einen Schenkungsvertrag, Daher haftet heidelpay für etwaige Schäden nur gem. § 524 BGB. - 2. Soweit ein Schaden - unmittelbar oder mittelbar - auf einem Datenverlust beruht und heidelpay nach Ziffer 1 hierfür haftbar gemacht werden kann, ist die Haftung von heidelpay auf den Wiederherstellungsaufwand be-schränkt, der bei regelmäßiger gefahrentsprechender Datensicherung eingetreten wäre. - 3. Ansprüche auf Schadensersatz, ausgenommen solche aus einer vorsätzlichen oder grob fahrlässigen Pflicht-verletzung, einer Verletzung des Lebens, des Körpers, der Gesundheit, unerlaubter Handlung oder aus dem Produkthaftungsgesetz, verjähren spätestens in einem Jahr von dem Zeitpunkt an, an dem die geschädigte Partei von dem Schaden und den Umständen, aus denen sich die Anspruchsberechtigung ergibt, Kenntnis er-langt, ohne Rücksicht auf Kenntnis drei Jahre ab dem schädigenden Ereignis. Kürzere gesetzliche Verjäh-rungsfristen bleiben unberührt. + 1. Da die Lizenz unentgeltlich zur Verf�gung gestellt wird, handelt es sich um einen Schenkungsvertrag, Daher haftet heidelpay f�r etwaige Sch�den nur gem. � 524 BGB. + 2. Soweit ein Schaden - unmittelbar oder mittelbar - auf einem Datenverlust beruht und heidelpay nach Ziffer 1 hierf�r haftbar gemacht werden kann, ist die Haftung von heidelpay auf den Wiederherstellungsaufwand be-schr�nkt, der bei regelm��iger gefahrentsprechender Datensicherung eingetreten w�re. + 3. Anspr�che auf Schadensersatz, ausgenommen solche aus einer vors�tzlichen oder grob fahrl�ssigen Pflicht-verletzung, einer Verletzung des Lebens, des K�rpers, der Gesundheit, unerlaubter Handlung oder aus dem Produkthaftungsgesetz, verj�hren sp�testens in einem Jahr von dem Zeitpunkt an, an dem die gesch�digte Partei von dem Schaden und den Umst�nden, aus denen sich die Anspruchsberechtigung ergibt, Kenntnis er-langt, ohne R�cksicht auf Kenntnis drei Jahre ab dem sch�digenden Ereignis. K�rzere gesetzliche Verj�h-rungsfristen bleiben unber�hrt. XI. Schlussbestimmungen - 1. Diese Vereinbarung unterliegt den Gesetzen der Bundesrepublik Deutschland unter Ausschluss des UN-Kaufrechts. Der ausschließliche Gerichtsstand ist das Landgericht Heidelberg. - 2. In einige Länder, inklusive der Vereinigten Staaten von Amerika, gelten Exportbeschränkungen. Das Plug-in kann solchen Beschränkungen unterliegen. Diese sind insbesondere zu beachten, als das Plug-in in andere Länder exportiert wird. Wenn der Nutzer das Plug-in exportiert, ist allein er für die Einhaltung der maßgebli-chen Regelungen verantwortlich. In jedem Fall ist es untersagt, das Plug-in in ein Land zu exportieren, wel-ches einem Embargo der Vereinigten Staaten von Amerika oder der Europäischen Union unterliegt, oder ei-ner Person zu überlassen, an die eine Lieferung nach U.S. amerikanischen oder europäischen Regelung un-tersagt ist. - 3. Diese Bestimmungen oder die Nutzung des Plug-ins begründet kein Joint Venture, keine Teilhaberschaft, kei-ne Beschäftigung mit heidelpay und keine Befugnis zur Vertretung von heidelpay. - 4. Die Bestimmungen der Abschnitte IV, V, VI, VII, X, XI. überdauern die Beendigung dieser Bestimmungen, gleich aus welchem Grund. + 1. Diese Vereinbarung unterliegt den Gesetzen der Bundesrepublik Deutschland unter Ausschluss des UN-Kaufrechts. Der ausschlie�liche Gerichtsstand ist das Landgericht Heidelberg. + 2. In einige L�nder, inklusive der Vereinigten Staaten von Amerika, gelten Exportbeschr�nkungen. Das Plug-in kann solchen Beschr�nkungen unterliegen. Diese sind insbesondere zu beachten, als das Plug-in in andere L�nder exportiert wird. Wenn der Nutzer das Plug-in exportiert, ist allein er f�r die Einhaltung der ma�gebli-chen Regelungen verantwortlich. In jedem Fall ist es untersagt, das Plug-in in ein Land zu exportieren, wel-ches einem Embargo der Vereinigten Staaten von Amerika oder der Europ�ischen Union unterliegt, oder ei-ner Person zu �berlassen, an die eine Lieferung nach U.S. amerikanischen oder europ�ischen Regelung un-tersagt ist. + 3. Diese Bestimmungen oder die Nutzung des Plug-ins begr�ndet kein Joint Venture, keine Teilhaberschaft, kei-ne Besch�ftigung mit heidelpay und keine Befugnis zur Vertretung von heidelpay. + 4. Die Bestimmungen der Abschnitte IV, V, VI, VII, X, XI. �berdauern die Beendigung dieser Bestimmungen, gleich aus welchem Grund. ==== ENGLISH VERSION ==== @@ -90,7 +90,7 @@ Plug-in Licence Agreement I. Introduction - This Plug-in Licence Agreement (hereinafter 'Agreement') constitutes a contract between the plug-in user and Heidelberger Payment GmbH (hereinafter 'heidelpay'). + This Plug-in Licence Agreement (hereinafter 'Agreement') constitutes a contract between the plug-in user and heidelpay GmbH (hereinafter 'heidelpay'). The plug-in from heidelpay is a software programme which links the heidelpay payment system interface to an application (for example, shop system, merchandise management, debtor management etc.). The plug-in is used to exchange data between the heidelpay payment system and the application. The plug-in expands the range of features in the application with regard to the services agreed separately with heidelpay. diff --git a/README.md b/README.md index 53c5577..7d27437 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,8 @@ Payment extension for JTL Shop To use this extension please create a folder named 'heidelpay_standard' in includes/plugins/ and paste the downloaded files there. +From version 113 to 114 "Sofortüberweisung" will be replaced "Sofort". Therefore "Sofort" has to be assigned to the affected shipping methods and has to be reconfigured. + Documentation can be found at https://dev.heidelpay.de/jtl ## Currently supported payment methods: @@ -31,7 +33,6 @@ Documentation can be found at https://dev.heidelpay.de/jtl * invoice * invoice secured b2c * direct debit secured b2c -* Santander invoice ### SYSTEM REQUIREMENTS diff --git a/composer.json b/composer.json index 2a182e4..2efff78 100644 --- a/composer.json +++ b/composer.json @@ -7,8 +7,10 @@ "require" : { "php" : "~5.6.0|~7.0.0|~7.1.0", "zendframework/zend-http" : "2.*", - "heidelpay/php-payment-api" : "v1.2.0", - "heidelpay/php-message-code-mapper": "v1.0.0" + "heidelpay/php-payment-api" : "v1.*", + "heidelpay/php-message-code-mapper": "v1.0.0", + "heidelpay/php-basket-api": "1.*" + }, "require-dev": { "friendsofphp/php-cs-fixer": "^2.0", @@ -16,6 +18,12 @@ }, "authors" : [{ "name" : "Ronja Wann" + }, + { + "name" : "Florian Evertz" + }, + { + "name" : "David Owusu" } ], "support" : { diff --git a/info.xml b/info.xml index 594dd35..5fd71a2 100644 --- a/info.xml +++ b/info.xml @@ -1,900 +1,973 @@ - Heidelpay Standard - Heidelpay Standard Modul. - Ronja Wann/Jens Richter + heidelpay Standard + heidelpay Standard Modul. + Ronja Wann/Jens Richter/David Owusu http://www.heidelpay.de 101 300 - 400 + 400 heidelpay_standard - - - 2011-05-26 - - - 2011-12-20 - - - 2013-04-02 - - - 2013-12-02 - - - 2014-02-17 - - - 2014-07-02 - - - 2014-07-10 - - - 2014-10-30 - - - 2014-11-13 - - - 2015-09-23 - - - 2015-12-17 - - - 2016-02-16 - - - 2016-03-31 - - - 2017-11-08 - - - heidelpay.hook140.php - heidelpay.hook153.php - heidelpay.hook181.php - - - - Heidelpay Kreditkarte Plugin - template/heidelpay.png - 3 - 0 - Heidelpay - CREDIT_CARD - 0 - 0 - 1 - 0 - heidelpay_standard.class.php - heidelpay_standard - template/heidelpay_CreditDebitCard.tpl - - Kreditkarte - Kreditkarte - Sicher zahlen per Kreditkarte - - - Creditcard - Creditcard - pay safely with Creditcard - - - Channel - Transaction Channel ID: - channel - - - Buchungsmodus - Wählen Sie hier den Buchungsmodus zwischen Sofortbuchung und Reservierung. - bookingmode - - - - - - - Transaktionsmodus - Wählen Sie hier den Transaktionsmodus zwischen LIVE und TEST - transmode - - - - - - - Payment Code - Code ID der Paymentmethode - paycode - - + + + 2011-05-26 + + + 2011-12-20 + + + 2013-04-02 + + + 2013-12-02 + + + 2014-02-17 + + + 2014-07-02 + + + 2014-07-10 + + + 2014-10-30 + + + 2014-11-13 + + + 2015-09-23 + + + 2015-12-17 + + + 2016-02-16 + + + 2016-03-31 + + + 2017-11-08 + + + 2018-06-26 + install.sql + + + heidelpay.hook008.php + heidelpay.hook140.php + heidelpay.hook153.php + heidelpay.hook181.php + heidelpay.hook207.php + + + + heidelpay Kreditkarte Plugin + template/heidelpay.png + 3 + 0 + heidelpay + CREDIT_CARD + 0 + 0 + 1 + 0 + heidelpay_cc.class.php + heidelpay_cc + template/heidelpay_CreditDebitCard.tpl + + Kreditkarte + Kreditkarte + Sicher zahlen per Kreditkarte + + + Creditcard + Creditcard + pay safely with Creditcard + + + Channel + Transaction Channel ID: + channel + + + Buchungsmodus + Wählen Sie hier den Buchungsmodus zwischen Sofortbuchung und Reservierung. + + bookingmode + + + + + + + Transaktionsmodus + Wählen Sie hier den Transaktionsmodus zwischen LIVE und TEST + transmode + + + + + + + Payment Code + Code ID der Paymentmethode + paycode + + - - Heidelpay Debitkarte Plugin - template/heidelpay.png - 3 - 0 - Heidelpay - CREDIT_CARD - 0 - 0 - 1 - 0 - heidelpay_standard.class.php - heidelpay_standard - template/heidelpay_CreditDebitCard.tpl - - Debitkarte - Debitkarte - Sicher zahlen per Debitkarte - - - Debitcard - Debitcard - pay safely with Debitcard - - - Channel - Transaction Channel ID: - channel - - - Buchungsmodus - Wählen Sie hier den Buchungsmodus zwischen Sofortbuchung und Reservierung. - bookingmode - - - - - - - Transaktionsmodus - Wählen Sie hier den Transaktionsmodus zwischen LIVE und TEST - transmode - - - - - - - Payment Code - Code ID der Paymentmethode - paycode - - + + heidelpay Debitkarte Plugin + template/heidelpay.png + 3 + 0 + heidelpay + CREDIT_CARD + 0 + 0 + 1 + 0 + heidelpay_dc.class.php + heidelpay_dc + template/heidelpay_CreditDebitCard.tpl + + Debitkarte + Debitkarte + Sicher zahlen per Debitkarte + + + Debitcard + Debitcard + pay safely with Debitcard + + + Channel + Transaction Channel ID: + channel + + + Buchungsmodus + Wählen Sie hier den Buchungsmodus zwischen Sofortbuchung und Reservierung. + + bookingmode + + + + + + + Transaktionsmodus + Wählen Sie hier den Transaktionsmodus zwischen LIVE und TEST + transmode + + + + + + + Payment Code + Code ID der Paymentmethode + paycode + + - - Heidelpay Lastschrift Plugin - template/heidelpay.png - 3 - 0 - Heidelpay - DIRECT_DEBIT - 0 - 0 - 1 - 0 - heidelpay_standard.class.php - heidelpay_standard - template/heidelpay_DirectDebit.tpl - - Lastschrift - Lastschrift - Sicher zahlen per Lastschrift - - - DirectDebit - DirectDebit - pay safely with DirectDebit - - - Channel - Transaction Channel ID: - channel - - - Transaktionsmodus - Wählen Sie hier den Transaktionsmodus zwischen LIVE und TEST - transmode - - - - - - - Payment Code - Code ID der Paymentmethode - paycode - - + + heidelpay Lastschrift Plugin + template/heidelpay.png + 3 + 0 + heidelpay + DIRECT_DEBIT + 0 + 0 + 1 + 0 + heidelpay_dd.class.php + heidelpay_dd + template/heidelpay_DirectDebit.tpl + + Lastschrift + Lastschrift + Sicher zahlen per Lastschrift + + + DirectDebit + DirectDebit + pay safely with DirectDebit + + + Channel + Transaction Channel ID: + channel + + + Transaktionsmodus + Wählen Sie hier den Transaktionsmodus zwischen LIVE und TEST + transmode + + + + + + + Payment Code + Code ID der Paymentmethode + paycode + + - - Heidelpay Sofortüberweisung Plugin - template/heidelpay.png - 3 - 0 - Heidelpay - DIRECT_E_BANKING - 0 - 0 - 1 - 0 - heidelpay_standard.class.php - heidelpay_standard - template/new_bestellabschluss.tpl - - Sofortüberweisung - Sofortüberweisung - Sicher zahlen per Sofortüberweisung - - - SofortBanking - SofortBanking - pay safely with SofortBanking - - - Channel - Transaction Channel ID: - channel - - - Transaktionsmodus - Wählen Sie hier den Transaktionsmodus zwischen LIVE und TEST - transmode - - - - - - - Payment Code - Code ID der Paymentmethode - paycode - - + + heidelpay Sofort Plugin + template/heidelpay.png + 3 + 0 + heidelpay + DIRECT_E_BANKING + 0 + 0 + 1 + 0 + heidelpay_su.class.php + heidelpay_su + template/new_bestellabschluss.tpl + + Sofort + Sofort + Sicher zahlen per Sofort + + + SofortBanking + SofortBanking + pay safely with SofortBanking + + + Channel + Transaction Channel ID: + channel + + + Transaktionsmodus + Wählen Sie hier den Transaktionsmodus zwischen LIVE und TEST + transmode + + + + + + + Payment Code + Code ID der Paymentmethode + paycode + + - - Heidelpay Giropay Plugin - template/heidelpay.png - 3 - 0 - Heidelpay - GIROPAY - 0 - 0 - 1 - 0 - heidelpay_standard.class.php - heidelpay_standard - template/new_bestellabschluss.tpl - - Giropay - Giropay - Sicher zahlen per Giropay - - - Giropay - Giropay - pay safely with Giropay - - - Channel - Transaction Channel ID: - channel - - - Transaktionsmodus - Wählen Sie hier den Transaktionsmodus zwischen LIVE und TEST - transmode - - - - - - - Payment Code - Code ID der Paymentmethode - paycode - - + + heidelpay Giropay Plugin + template/heidelpay.png + 3 + 0 + heidelpay + GIROPAY + 0 + 0 + 1 + 0 + heidelpay_gp.class.php + heidelpay_gp + template/new_bestellabschluss.tpl + + Giropay + Giropay + Sicher zahlen per Giropay + + + Giropay + Giropay + pay safely with Giropay + + + Channel + Transaction Channel ID: + channel + + + Transaktionsmodus + Wählen Sie hier den Transaktionsmodus zwischen LIVE und TEST + transmode + + + + + + + Payment Code + Code ID der Paymentmethode + paycode + + - - Heidelpay iDeal Plugin - template/heidelpay.png - 3 - 0 - Heidelpay - DIRECT_E_BANKING - 0 - 0 - 1 - 0 - heidelpay_standard.class.php - heidelpay_standard - template/heidelpay_iDealEPS_Bank.tpl - - iDeal - iDeal - Sicher zahlen per iDeal - - - iDeal - iDeal - pay safely with iDeal - - - Channel - Transaction Channel ID: - channel - - - Transaktionsmodus - Wählen Sie hier den Transaktionsmodus zwischen LIVE und TEST - transmode - - - - - - - Payment Code - Code ID der Paymentmethode - paycode - - + + heidelpay iDeal Plugin + template/heidelpay.png + 3 + 0 + heidelpay + DIRECT_E_BANKING + 0 + 0 + 1 + 0 + heidelpay_idl.class.php + heidelpay_idl + template/heidelpay_iDealEPS_Bank.tpl + + iDeal + iDeal + Sicher zahlen per iDeal + + + iDeal + iDeal + pay safely with iDeal + + + Channel + Transaction Channel ID: + channel + + + Transaktionsmodus + Wählen Sie hier den Transaktionsmodus zwischen LIVE und TEST + transmode + + + + + + + Payment Code + Code ID der Paymentmethode + paycode + + - - Heidelpay EPS Plugin - template/heidelpay.png - 3 - 0 - Heidelpay - DIRECT_E_BANKING - 0 - 0 - 1 - 0 - heidelpay_standard.class.php - heidelpay_standard - template/new_bestellabschluss.tpl - - EPS - EPS - Sicher zahlen per EPS - - - EPS - EPS - pay safely with EPS - - - Channel - Transaction Channel ID: - channel - - - Transaktionsmodus - Wählen Sie hier den Transaktionsmodus zwischen LIVE und TEST - transmode - - - - - - - Payment Code - Code ID der Paymentmethode - paycode - - + + heidelpay EPS Plugin + template/heidelpay.png + 3 + 0 + heidelpay + DIRECT_E_BANKING + 0 + 0 + 1 + 0 + heidelpay_eps.class.php + heidelpay_eps + template/new_bestellabschluss.tpl + + EPS + EPS + Sicher zahlen per EPS + + + EPS + EPS + pay safely with EPS + + + Channel + Transaction Channel ID: + channel + + + Transaktionsmodus + Wählen Sie hier den Transaktionsmodus zwischen LIVE und TEST + transmode + + + + + + + Payment Code + Code ID der Paymentmethode + paycode + + - - Heidelpay Przelewy24 Plugin - template/heidelpay.png - 3 - 0 - Heidelpay - DIRECT_E_BANKING - 0 - 0 - 1 - 0 - heidelpay_standard.class.php - heidelpay_standard - template/new_bestellabschluss.tpl - - Przelewy24 - Przelewy24 - Sicher zahlen per Przelewy24 - - - Przelewy24 - Przelewy24 - pay safely with Przelewy24 - - - Channel - Transaction Channel ID: - channel - - - Transaktionsmodus - Wählen Sie hier den Transaktionsmodus zwischen LIVE und TEST - transmode - - - - - - - Payment Code - Code ID der Paymentmethode - paycode - - + + heidelpay Przelewy24 Plugin + template/heidelpay.png + 3 + 0 + heidelpay + DIRECT_E_BANKING + 0 + 0 + 1 + 0 + heidelpay_p24.class.php + heidelpay_p24 + template/new_bestellabschluss.tpl + + Przelewy24 + Przelewy24 + Sicher zahlen per Przelewy24 + + + Przelewy24 + Przelewy24 + pay safely with Przelewy24 + + + Channel + Transaction Channel ID: + channel + + + Transaktionsmodus + Wählen Sie hier den Transaktionsmodus zwischen LIVE und TEST + transmode + + + + + + + Payment Code + Code ID der Paymentmethode + paycode + + - - Heidelpay PostFinance Card Plugin - template/heidelpay.png - 3 - 0 - Heidelpay - DIRECT_E_BANKING - 0 - 0 - 1 - 0 - heidelpay_standard.class.php - heidelpay_standard - template/new_bestellabschluss.tpl - - PostFinanceCard - PostFinanceCard - Sicher zahlen per PostFinance Card - - - PostFinanceCard - PostFinanceCard - pay safely with PostFinanceCard - - - Channel - Transaction Channel ID: - channel - - - Transaktionsmodus - Wählen Sie hier den Transaktionsmodus zwischen LIVE und TEST - transmode - - - - - - - Payment Code - Code ID der Paymentmethode - paycode - - + + heidelpay PostFinance Card Plugin + template/heidelpay.png + 3 + 0 + heidelpay + DIRECT_E_BANKING + 0 + 0 + 1 + 0 + heidelpay_pfc.class.php + heidelpay_pfc + template/new_bestellabschluss.tpl + + PostFinanceCard + PostFinanceCard + Sicher zahlen per PostFinance Card + + + PostFinanceCard + PostFinanceCard + pay safely with PostFinanceCard + + + Channel + Transaction Channel ID: + channel + + + Transaktionsmodus + Wählen Sie hier den Transaktionsmodus zwischen LIVE und TEST + transmode + + + + + + + Payment Code + Code ID der Paymentmethode + paycode + + - - Heidelpay PostFinance EFinance Plugin - template/heidelpay.png - 3 - 0 - Heidelpay - DIRECT_E_BANKING - 0 - 0 - 1 - 0 - heidelpay_standard.class.php - heidelpay_standard - template/new_bestellabschluss.tpl - - PostFinanceEFinance - PostFinanceEFinance - Sicher zahlen per PostFinance EFinance - - - PostFinanceEFinance - PostFinanceEFinance - pay safely with PostFinanceEFinance - - - Channel - Transaction Channel ID: - channel - - - Transaktionsmodus - Wählen Sie hier den Transaktionsmodus zwischen LIVE und TEST - transmode - - - - - - - Payment Code - Code ID der Paymentmethode - paycode - - + + heidelpay PostFinance EFinance Plugin + template/heidelpay.png + 3 + 0 + heidelpay + DIRECT_E_BANKING + 0 + 0 + 1 + 0 + heidelpay_pfe.class.php + heidelpay_pfe + template/new_bestellabschluss.tpl + + PostFinanceEFinance + PostFinanceEFinance + Sicher zahlen per PostFinance EFinance + + + PostFinanceEFinance + PostFinanceEFinance + pay safely with PostFinanceEFinance + + + Channel + Transaction Channel ID: + channel + + + Transaktionsmodus + Wählen Sie hier den Transaktionsmodus zwischen LIVE und TEST + transmode + + + + + + + Payment Code + Code ID der Paymentmethode + paycode + + - - Heidelpay PayPal Plugin - template/heidelpay.png - 3 - 0 - Heidelpay - PAYPAL - 0 - 0 - 1 - 0 - heidelpay_standard.class.php - heidelpay_standard - template/new_bestellabschluss.tpl - - PayPal - PayPal - Sicher zahlen per PayPal - - - PayPal - PayPal - pay safely with PayPal - - - Channel - Transaction Channel ID: - channel - - - Buchungsmodus - Wählen Sie hier den Buchungsmodus zwischen Sofortbuchung und Reservierung. - bookingmode - - - - - - - Transaktionsmodus - Wählen Sie hier den Transaktionsmodus zwischen LIVE und TEST - transmode - - - - - - - Payment Code - Code ID der Paymentmethode - paycode - - - - - Heidelpay Rechnung Plugin - template/heidelpay.png - 3 - 1 - Heidelpay - INVOICE - 1 - 0 - 1 - 0 - heidelpay_standard.class.php - heidelpay_standard - template/new_bestellabschluss.tpl - - Rechnungskauf - Rechnung - Sicher bezahlen per Rechnungskauf - - - Invoice - Invoice - pay safely with Invoice - - - Channel - Transaction Channel ID: - channel - - - Transaktionsmodus - Wählen Sie hier den Transaktionsmodus zwischen LIVE und TEST - transmode - - - - - - - Payment Code - Code ID der Paymentmethode - paycode - - - - - Heidelpay Vorkasse Plugin - template/heidelpay.png - 3 - 1 - Heidelpay - PREPAYMENT - 1 - 0 - 1 - 0 - heidelpay_standard.class.php - heidelpay_standard - template/new_bestellabschluss.tpl - - Vorkasse - Vorkasse - Einfach zahlen per Vorkasse - - - Prepayment - Prepayment - pay easily with Prepayment - - - Channel - Transaction Channel ID: - channel - - - Transaktionsmodus - Wählen Sie hier den Transaktionsmodus zwischen LIVE und TEST - transmode - - - - - - - Payment Code - Code ID der Paymentmethode - paycode - - + + heidelpay PayPal Plugin + template/heidelpay.png + 3 + 0 + heidelpay + PAYPAL + 0 + 0 + 1 + 0 + heidelpay_va.class.php + heidelpay_va + template/new_bestellabschluss.tpl + + PayPal + PayPal + Sicher zahlen per PayPal + + + PayPal + PayPal + pay safely with PayPal + + + Channel + Transaction Channel ID: + channel + + + Buchungsmodus + Wählen Sie hier den Buchungsmodus zwischen Sofortbuchung und Reservierung. + + bookingmode + + + + + + + Transaktionsmodus + Wählen Sie hier den Transaktionsmodus zwischen LIVE und TEST + transmode + + + + + + + Payment Code + Code ID der Paymentmethode + paycode + + - - - Heidelpay Gesicherte Rechnung Plugin - template/heidelpay.png - 3 - 1 - Heidelpay - INVOICE - 1 - 0 - 1 - 0 - heidelpay_standard.class.php - heidelpay_standard - template/heidelpay_InvoiceSec.tpl - - Gesicherte Rechnung - Gesicherte Rechnung - Einfach zahlen per gesicherten Rechnungskauf - - - SecuredInvoice - SecuredInvoice - pay easily with SecuredInvoice - - - Channel - Transaction Channel ID: - channel - - - Transaktionsmodus - Wählen Sie hier den Transaktionsmodus zwischen LIVE und TEST - transmode - - - - - - - Payment Code - Code ID der Paymentmethode - paycode - - + + heidelpay Rechnung Plugin + template/heidelpay.png + 3 + 1 + heidelpay + INVOICE + 1 + 0 + 1 + 0 + heidelpay_iv.class.php + heidelpay_iv + template/new_bestellabschluss.tpl + + Rechnungskauf + Rechnung + Sicher bezahlen per Rechnungskauf + + + Invoice + Invoice + pay safely with Invoice + + + Channel + Transaction Channel ID: + channel + + + Transaktionsmodus + Wählen Sie hier den Transaktionsmodus zwischen LIVE und TEST + transmode + + + + + + + Payment Code + Code ID der Paymentmethode + paycode + + + + heidelpay Vorkasse Plugin + template/heidelpay.png + 3 + 1 + heidelpay + PREPAYMENT + 1 + 0 + 1 + 0 + heidelpay_pp.class.php + heidelpay_pp + template/new_bestellabschluss.tpl + + Vorkasse + Vorkasse + Einfach zahlen per Vorkasse + + + Prepayment + Prepayment + pay easily with Prepayment + + + Channel + Transaction Channel ID: + channel + + + Transaktionsmodus + Wählen Sie hier den Transaktionsmodus zwischen LIVE und TEST + transmode + + + + + + + Payment Code + Code ID der Paymentmethode + paycode + + - - Heidelpay Gesicherte Lastschrift Plugin - template/heidelpay.png - 3 - 0 - Heidelpay - DIRECT_DEBIT - 0 - 0 - 1 - 0 - heidelpay_standard.class.php - heidelpay_standard - template/heidelpay_DirectDebit.tpl - - Gesicherte Lastschrift - Gesicherte Lastschrift - Sicher zahlen per gesicherte Lastschrift - - - SecuredDirectDebit - SecuredDirectDebit - pay safely with SecuredDirectDebit - - - Channel - Transaction Channel ID: - channel - - - Transaktionsmodus - Wählen Sie hier den Transaktionsmodus zwischen LIVE und TEST - transmode - - - - - - - Payment Code - Code ID der Paymentmethode - paycode - - + + + heidelpay Gesicherte Rechnung Plugin + template/heidelpay.png + 3 + 1 + heidelpay + INVOICE + 1 + 0 + 1 + 0 + heidelpay_ivpg.class.php + heidelpay_ivpg + template/heidelpay_InvoiceSec.tpl + + Gesicherte Rechnung + Gesicherte Rechnung + Einfach zahlen per gesicherten Rechnungskauf + + + SecuredInvoice + SecuredInvoice + pay easily with SecuredInvoice + + + Channel + Transaction Channel ID: + channel + + + Transaktionsmodus + Wählen Sie hier den Transaktionsmodus zwischen LIVE und TEST + transmode + + + + + + + Payment Code + Code ID der Paymentmethode + paycode + + - + + heidelpay Gesicherte Lastschrift Plugin + template/heidelpay.png + 3 + 0 + heidelpay + DIRECT_DEBIT + 0 + 0 + 1 + 0 + heidelpay_ddpg.class.php + heidelpay_ddpg + template/heidelpay_DirectDebit.tpl + + Gesicherte Lastschrift + Gesicherte Lastschrift + Sicher zahlen per gesicherte Lastschrift + + + SecuredDirectDebit + SecuredDirectDebit + pay safely with SecuredDirectDebit + + + Channel + Transaction Channel ID: + channel + + + Buchungsmodus + Wählen Sie hier den Buchungsmodus zwischen Sofortbuchung und Reservierung. + + bookingmode + + + + + + + Transaktionsmodus + Wählen Sie hier den Transaktionsmodus zwischen LIVE und TEST + transmode + + + + + + + Payment Code + Code ID der Paymentmethode + paycode + + - - - Einstellungen - - Heidelpay Einstellungen - - heidelpay_headline - - - Heidelpay aktivieren - Soll Heidelpay aktiviert werden? - heidelpay_aktiv - - - - - - - Security Sender - Sender ID, welche Sie von heidelpay erhalten haben - sender - - - User ID - User Login ID, welche Sie von heidelpay erhalten haben - user - - - Password - User Password, welche Sie von heidelpay erhalten haben - pass - - - - Secret - Secret Phrase zur Verschlüsselung der Serverantwort - secret - - - - Report Error Mail - E-Mailadresse für Error-Reporting - reportErrorMail - - - + - - - hp_paybutton - Beschriftung des heidelpay Zahlungsbuttons - Jetzt zahlen - Pay now - + + + Einstellungen + + heidelpay Einstellungen + + heidelpay_headline + + + heidelpay aktivieren + Soll heidelpay aktiviert werden? + heidelpay_aktiv + + + + + + + Security Sender + Sender ID, welche Sie von heidelpay erhalten haben + sender + + + User ID + User Login ID, welche Sie von heidelpay erhalten haben + user + + + Password + User Password, welche Sie von heidelpay erhalten haben + pass + + + Secret + Secret Phrase zur Verschlüsselung der Serverantwort + secret + - - hp_holderlabel - Label Kontoinhaber - Kontoinhaber - Holder - + + Report Error Mail + E-Mailadresse für Error-Reporting + reportErrorMail + + + - - hp_birthdatelabel - Label Geburtsdatum - Geburtsdatum - Birthdate - + + + pushgw.php + push-gw + + pushgw.tpl + N + N + Y + 2 + + push-gw + push-gw + + + + + + + - - hp_paytext - Text zur Durchführung des Bezahlprozesses - Bitte vervollständigen Sie die unten aufgeführten Daten und schließen Sie den Bestellprozess ab. - Please complete the following data and complete the order process. - + + + hp_paybutton + Beschriftung des heidelpay Zahlungsbuttons + Jetzt zahlen + Pay now + + + hp_holderlabel + Label Kontoinhaber + Kontoinhaber + Holder + - - hp_privacypolicylabel - Label der Datenschutzerklärung - Datenschutzerklärung - Privacy Policy - + + hp_birthdatelabel + Label Geburtsdatum + Geburtsdatum + Birthdate + - - + + hp_paytext + Text zur Durchführung des Bezahlprozesses + Bitte vervollständigen Sie die unten aufgeführten Daten und schließen Sie + den Bestellprozess ab. + + Please complete the following data and complete the order process. + + - + + hp_privacypolicylabel + Label der Datenschutzerklärung + Datenschutzerklärung + Privacy Policy + + + + hp_salutation_male + Anrede Herr + Herr + Mr + + + + hp_salutation_female + Anrede Herr + Frau + Mrs + + + + hp_b2b_denied + Meldung wenn kein B2B verfügbar + + Dieses Zahlverfahren steht nicht für Firmenkunden zur Verfügung + + + This paymentmethod is not available for corporate clients + + + + + hp_equal_address + Meldung wenn Rechnungs- und Lieferadresse identisch sein müssen + + Rechnungs- und Lieferadresse müssen identisch sein + + + Billing- and shipping address have to be equal + + + + diff --git a/vendor/composer/ClassLoader.php b/vendor/composer/ClassLoader.php index 6e8d09f..2c72175 100644 --- a/vendor/composer/ClassLoader.php +++ b/vendor/composer/ClassLoader.php @@ -379,8 +379,8 @@ private function findFileWithExtension($class, $ext) $subPath = substr($subPath, 0, $lastPos); $search = $subPath.'\\'; if (isset($this->prefixDirsPsr4[$search])) { - $length = $this->prefixLengthsPsr4[$first][$search]; foreach ($this->prefixDirsPsr4[$search] as $dir) { + $length = $this->prefixLengthsPsr4[$first][$search]; if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) { return $file; } diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php index 10aa8d6..e5cbccb 100644 --- a/vendor/composer/autoload_psr4.php +++ b/vendor/composer/autoload_psr4.php @@ -16,5 +16,6 @@ 'Psr\\Container\\' => array($vendorDir . '/psr/container/src'), 'Interop\\Container\\' => array($vendorDir . '/container-interop/container-interop/src/Interop/Container'), 'Heidelpay\\PhpPaymentApi\\' => array($vendorDir . '/heidelpay/php-payment-api/lib'), + 'Heidelpay\\PhpBasketApi\\' => array($vendorDir . '/heidelpay/php-basket-api/lib'), 'Heidelpay\\MessageCodeMapper\\' => array($vendorDir . '/heidelpay/php-message-code-mapper/lib'), ); diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index 75baf97..df5b013 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -28,6 +28,7 @@ class ComposerStaticInitbadef46de6d4939f7b7f0c55452ba087 'H' => array ( 'Heidelpay\\PhpPaymentApi\\' => 24, + 'Heidelpay\\PhpBasketApi\\' => 23, 'Heidelpay\\MessageCodeMapper\\' => 28, ), ); @@ -73,6 +74,10 @@ class ComposerStaticInitbadef46de6d4939f7b7f0c55452ba087 array ( 0 => __DIR__ . '/..' . '/heidelpay/php-payment-api/lib', ), + 'Heidelpay\\PhpBasketApi\\' => + array ( + 0 => __DIR__ . '/..' . '/heidelpay/php-basket-api/lib', + ), 'Heidelpay\\MessageCodeMapper\\' => array ( 0 => __DIR__ . '/..' . '/heidelpay/php-message-code-mapper/lib', diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 542e0cc..e24bf70 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -85,83 +85,6 @@ "php" ] }, - { - "name": "heidelpay/php-payment-api", - "version": "v1.2.0", - "version_normalized": "1.2.0.0", - "source": { - "type": "git", - "url": "https://github.com/heidelpay/php-payment-api.git", - "reference": "6fa02ca075a22e3221082ae65c0d99e6a4485402" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/heidelpay/php-payment-api/zipball/6fa02ca075a22e3221082ae65c0d99e6a4485402", - "reference": "6fa02ca075a22e3221082ae65c0d99e6a4485402", - "shasum": "" - }, - "require": { - "ext-simplexml": "*", - "lib-curl": "*", - "lib-openssl": "*", - "php": ">=5.6.0" - }, - "conflict": { - "heidelpay/php-api": "*" - }, - "replace": { - "heidelpay/php-api": "*" - }, - "require-dev": { - "codacy/coverage": "^1.4", - "codeception/aspect-mock": "^2.1", - "codeception/codeception": "^2.3", - "friendsofphp/php-cs-fixer": "^2.0", - "heidelpay/phpdocumentor": "2.9.1", - "phpunit/php-code-coverage": "<5.3" - }, - "suggest": { - "heidelpay/php-basket-api": "Use this package to transmit basket information.", - "heidelpay/php-message-code-mapper": "You can use this package to provide user-friendly messages instead of error codes." - }, - "time": "2017-12-14T12:36:17+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Heidelpay\\PhpPaymentApi\\": "lib" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file." - ], - "authors": [ - { - "name": "Jens Richter" - }, - { - "name": "Ronja Wann" - }, - { - "name": "Stephano Vogel" - }, - { - "name": "Daniel Kraut" - }, - { - "name": "Simon Gabriel" - } - ], - "description": "New client library for heidelpay payments replacing heidelpay/php-api.", - "homepage": "https://dev.heidelpay.de", - "keywords": [ - "api", - "payment-api", - "php", - "sdk" - ] - }, { "name": "psr/container", "version": "1.0.0", @@ -214,303 +137,336 @@ ] }, { - "name": "zendframework/zend-escaper", - "version": "2.5.2", - "version_normalized": "2.5.2.0", + "name": "zendframework/zend-hydrator", + "version": "1.1.0", + "version_normalized": "1.1.0.0", "source": { "type": "git", - "url": "https://github.com/zendframework/zend-escaper.git", - "reference": "2dcd14b61a72d8b8e27d579c6344e12c26141d4e" + "url": "https://github.com/zendframework/zend-hydrator.git", + "reference": "22652e1661a5a10b3f564cf7824a2206cf5a4a65" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-escaper/zipball/2dcd14b61a72d8b8e27d579c6344e12c26141d4e", - "reference": "2dcd14b61a72d8b8e27d579c6344e12c26141d4e", + "url": "https://api.github.com/repos/zendframework/zend-hydrator/zipball/22652e1661a5a10b3f564cf7824a2206cf5a4a65", + "reference": "22652e1661a5a10b3f564cf7824a2206cf5a4a65", "shasum": "" }, "require": { - "php": ">=5.5" + "php": "^5.5 || ^7.0", + "zendframework/zend-stdlib": "^2.7 || ^3.0" }, "require-dev": { - "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "~4.0" + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "^2.0@dev", + "zendframework/zend-eventmanager": "^2.6.2 || ^3.0", + "zendframework/zend-filter": "^2.6", + "zendframework/zend-inputfilter": "^2.6", + "zendframework/zend-serializer": "^2.6.1", + "zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3" + }, + "suggest": { + "zendframework/zend-eventmanager": "^2.6.2 || ^3.0, to support aggregate hydrator usage", + "zendframework/zend-filter": "^2.6, to support naming strategy hydrator usage", + "zendframework/zend-serializer": "^2.6.1, to use the SerializableStrategy", + "zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3, to support hydrator plugin manager usage" }, - "time": "2016-06-30T19:48:38+00:00", + "time": "2016-02-18T22:38:26+00:00", "type": "library", "extra": { "branch-alias": { - "dev-master": "2.5-dev", - "dev-develop": "2.6-dev" + "dev-release-1.0": "1.0-dev", + "dev-release-1.1": "1.1-dev", + "dev-master": "2.0-dev", + "dev-develop": "2.1-dev" } }, "installation-source": "dist", "autoload": { "psr-4": { - "Zend\\Escaper\\": "src/" + "Zend\\Hydrator\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], - "homepage": "https://github.com/zendframework/zend-escaper", + "homepage": "https://github.com/zendframework/zend-hydrator", "keywords": [ - "escaper", + "hydrator", "zf2" ] }, { - "name": "zendframework/zend-http", - "version": "2.7.0", - "version_normalized": "2.7.0.0", + "name": "zendframework/zend-stdlib", + "version": "2.7.7", + "version_normalized": "2.7.7.0", "source": { "type": "git", - "url": "https://github.com/zendframework/zend-http.git", - "reference": "78aa510c0ea64bfb2aa234f50c4f232c9531acfa" + "url": "https://github.com/zendframework/zend-stdlib.git", + "reference": "0e44eb46788f65e09e077eb7f44d2659143bcc1f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-http/zipball/78aa510c0ea64bfb2aa234f50c4f232c9531acfa", - "reference": "78aa510c0ea64bfb2aa234f50c4f232c9531acfa", + "url": "https://api.github.com/repos/zendframework/zend-stdlib/zipball/0e44eb46788f65e09e077eb7f44d2659143bcc1f", + "reference": "0e44eb46788f65e09e077eb7f44d2659143bcc1f", "shasum": "" }, "require": { - "php": "^5.6 || ^7.0", - "zendframework/zend-loader": "^2.5.1", - "zendframework/zend-stdlib": "^3.1 || ^2.7.7", - "zendframework/zend-uri": "^2.5.2", - "zendframework/zend-validator": "^2.10.1" + "php": "^5.5 || ^7.0", + "zendframework/zend-hydrator": "~1.1" }, "require-dev": { - "phpunit/phpunit": "^6.4.1 || ^5.7.15", - "zendframework/zend-coding-standard": "~1.0.0", - "zendframework/zend-config": "^3.1 || ^2.6" + "athletic/athletic": "~0.1", + "fabpot/php-cs-fixer": "1.7.*", + "phpunit/phpunit": "~4.0", + "zendframework/zend-config": "~2.5", + "zendframework/zend-eventmanager": "~2.5", + "zendframework/zend-filter": "~2.5", + "zendframework/zend-inputfilter": "~2.5", + "zendframework/zend-serializer": "~2.5", + "zendframework/zend-servicemanager": "~2.5" }, - "time": "2017-10-13T12:06:24+00:00", + "suggest": { + "zendframework/zend-eventmanager": "To support aggregate hydrator usage", + "zendframework/zend-filter": "To support naming strategy hydrator usage", + "zendframework/zend-serializer": "Zend\\Serializer component", + "zendframework/zend-servicemanager": "To support hydrator plugin manager usage" + }, + "time": "2016-04-12T21:17:31+00:00", "type": "library", "extra": { "branch-alias": { - "dev-master": "2.7-dev", - "dev-develop": "2.8-dev" + "dev-release-2.7": "2.7-dev", + "dev-master": "3.0-dev", + "dev-develop": "3.1-dev" } }, "installation-source": "dist", "autoload": { "psr-4": { - "Zend\\Http\\": "src/" + "Zend\\Stdlib\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], - "description": "provides an easy interface for performing Hyper-Text Transfer Protocol (HTTP) requests", - "homepage": "https://github.com/zendframework/zend-http", + "homepage": "https://github.com/zendframework/zend-stdlib", "keywords": [ - "ZendFramework", - "http", - "http client", - "zend", - "zf" + "stdlib", + "zf2" ] }, { - "name": "zendframework/zend-hydrator", - "version": "1.1.0", - "version_normalized": "1.1.0.0", + "name": "zendframework/zend-validator", + "version": "2.10.2", + "version_normalized": "2.10.2.0", "source": { "type": "git", - "url": "https://github.com/zendframework/zend-hydrator.git", - "reference": "22652e1661a5a10b3f564cf7824a2206cf5a4a65" + "url": "https://github.com/zendframework/zend-validator.git", + "reference": "38109ed7d8e46cfa71bccbe7e6ca80cdd035f8c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-hydrator/zipball/22652e1661a5a10b3f564cf7824a2206cf5a4a65", - "reference": "22652e1661a5a10b3f564cf7824a2206cf5a4a65", + "url": "https://api.github.com/repos/zendframework/zend-validator/zipball/38109ed7d8e46cfa71bccbe7e6ca80cdd035f8c9", + "reference": "38109ed7d8e46cfa71bccbe7e6ca80cdd035f8c9", "shasum": "" }, "require": { - "php": "^5.5 || ^7.0", - "zendframework/zend-stdlib": "^2.7 || ^3.0" + "container-interop/container-interop": "^1.1", + "php": "^5.6 || ^7.0", + "zendframework/zend-stdlib": "^2.7.6 || ^3.1" }, "require-dev": { - "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "^2.0@dev", - "zendframework/zend-eventmanager": "^2.6.2 || ^3.0", + "phpunit/phpunit": "^6.0.8 || ^5.7.15", + "zendframework/zend-cache": "^2.6.1", + "zendframework/zend-coding-standard": "~1.0.0", + "zendframework/zend-config": "^2.6", + "zendframework/zend-db": "^2.7", "zendframework/zend-filter": "^2.6", - "zendframework/zend-inputfilter": "^2.6", - "zendframework/zend-serializer": "^2.6.1", - "zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3" + "zendframework/zend-http": "^2.5.4", + "zendframework/zend-i18n": "^2.6", + "zendframework/zend-math": "^2.6", + "zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3", + "zendframework/zend-session": "^2.8", + "zendframework/zend-uri": "^2.5" }, "suggest": { - "zendframework/zend-eventmanager": "^2.6.2 || ^3.0, to support aggregate hydrator usage", - "zendframework/zend-filter": "^2.6, to support naming strategy hydrator usage", - "zendframework/zend-serializer": "^2.6.1, to use the SerializableStrategy", - "zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3, to support hydrator plugin manager usage" + "zendframework/zend-db": "Zend\\Db component, required by the (No)RecordExists validator", + "zendframework/zend-filter": "Zend\\Filter component, required by the Digits validator", + "zendframework/zend-i18n": "Zend\\I18n component to allow translation of validation error messages", + "zendframework/zend-i18n-resources": "Translations of validator messages", + "zendframework/zend-math": "Zend\\Math component, required by the Csrf validator", + "zendframework/zend-servicemanager": "Zend\\ServiceManager component to allow using the ValidatorPluginManager and validator chains", + "zendframework/zend-session": "Zend\\Session component, ^2.8; required by the Csrf validator", + "zendframework/zend-uri": "Zend\\Uri component, required by the Uri and Sitemap\\Loc validators" }, - "time": "2016-02-18T22:38:26+00:00", + "time": "2018-02-01T17:05:33+00:00", "type": "library", "extra": { "branch-alias": { - "dev-release-1.0": "1.0-dev", - "dev-release-1.1": "1.1-dev", - "dev-master": "2.0-dev", - "dev-develop": "2.1-dev" + "dev-master": "2.10.x-dev", + "dev-develop": "2.11.x-dev" + }, + "zf": { + "component": "Zend\\Validator", + "config-provider": "Zend\\Validator\\ConfigProvider" } }, "installation-source": "dist", "autoload": { "psr-4": { - "Zend\\Hydrator\\": "src/" + "Zend\\Validator\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], - "homepage": "https://github.com/zendframework/zend-hydrator", + "description": "provides a set of commonly needed validators", + "homepage": "https://github.com/zendframework/zend-validator", "keywords": [ - "hydrator", + "validator", "zf2" ] }, { - "name": "zendframework/zend-loader", - "version": "2.5.1", - "version_normalized": "2.5.1.0", + "name": "heidelpay/php-basket-api", + "version": "v1.0.2", + "version_normalized": "1.0.2.0", "source": { "type": "git", - "url": "https://github.com/zendframework/zend-loader.git", - "reference": "c5fd2f071bde071f4363def7dea8dec7393e135c" + "url": "https://github.com/heidelpay/php-basket-api.git", + "reference": "3029c2e705c4f5cd36f585bdb1577322b2915846" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-loader/zipball/c5fd2f071bde071f4363def7dea8dec7393e135c", - "reference": "c5fd2f071bde071f4363def7dea8dec7393e135c", + "url": "https://api.github.com/repos/heidelpay/php-basket-api/zipball/3029c2e705c4f5cd36f585bdb1577322b2915846", + "reference": "3029c2e705c4f5cd36f585bdb1577322b2915846", "shasum": "" }, "require": { - "php": ">=5.3.23" + "lib-curl": ">=7.26.0", + "lib-openssl": ">=1.0.1.5", + "php": ">=5.6.0" }, "require-dev": { - "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "~4.0" + "codacy/coverage": "~1.1.0", + "friendsofphp/php-cs-fixer": "^2.0", + "phpunit/phpunit": "~5" }, - "time": "2015-06-03T14:05:47+00:00", + "time": "2018-03-01T09:53:58+00:00", "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.5-dev", - "dev-develop": "2.6-dev" - } - }, "installation-source": "dist", "autoload": { "psr-4": { - "Zend\\Loader\\": "src/" + "Heidelpay\\PhpBasketApi\\": "lib" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "proprietary" ], - "homepage": "https://github.com/zendframework/zend-loader", + "authors": [ + { + "name": "Jens Richter", + "email": "development@heidelpay.com", + "homepage": "http://dev.heidelpay.com", + "role": "Developer" + }, + { + "name": "Stephano Vogel", + "email": "development@heidelpay.com", + "homepage": "http://dev.heidelpay.com", + "role": "Developer" + } + ], + "description": "Client library for heidelpay basket api.", + "homepage": "http://dev.heidelpay.com", "keywords": [ - "loader", - "zf2" + "api", + "basket-api", + "php", + "sdk" ] }, { - "name": "zendframework/zend-stdlib", - "version": "2.7.7", - "version_normalized": "2.7.7.0", + "name": "zendframework/zend-escaper", + "version": "2.6.0", + "version_normalized": "2.6.0.0", "source": { "type": "git", - "url": "https://github.com/zendframework/zend-stdlib.git", - "reference": "0e44eb46788f65e09e077eb7f44d2659143bcc1f" + "url": "https://github.com/zendframework/zend-escaper.git", + "reference": "31d8aafae982f9568287cb4dce987e6aff8fd074" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-stdlib/zipball/0e44eb46788f65e09e077eb7f44d2659143bcc1f", - "reference": "0e44eb46788f65e09e077eb7f44d2659143bcc1f", + "url": "https://api.github.com/repos/zendframework/zend-escaper/zipball/31d8aafae982f9568287cb4dce987e6aff8fd074", + "reference": "31d8aafae982f9568287cb4dce987e6aff8fd074", "shasum": "" }, "require": { - "php": "^5.5 || ^7.0", - "zendframework/zend-hydrator": "~1.1" + "php": "^5.6 || ^7.0" }, "require-dev": { - "athletic/athletic": "~0.1", - "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "~4.0", - "zendframework/zend-config": "~2.5", - "zendframework/zend-eventmanager": "~2.5", - "zendframework/zend-filter": "~2.5", - "zendframework/zend-inputfilter": "~2.5", - "zendframework/zend-serializer": "~2.5", - "zendframework/zend-servicemanager": "~2.5" - }, - "suggest": { - "zendframework/zend-eventmanager": "To support aggregate hydrator usage", - "zendframework/zend-filter": "To support naming strategy hydrator usage", - "zendframework/zend-serializer": "Zend\\Serializer component", - "zendframework/zend-servicemanager": "To support hydrator plugin manager usage" + "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.2", + "zendframework/zend-coding-standard": "~1.0.0" }, - "time": "2016-04-12T21:17:31+00:00", + "time": "2018-04-25T15:48:53+00:00", "type": "library", "extra": { "branch-alias": { - "dev-release-2.7": "2.7-dev", - "dev-master": "3.0-dev", - "dev-develop": "3.1-dev" + "dev-master": "2.6.x-dev", + "dev-develop": "2.7.x-dev" } }, "installation-source": "dist", "autoload": { "psr-4": { - "Zend\\Stdlib\\": "src/" + "Zend\\Escaper\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], - "homepage": "https://github.com/zendframework/zend-stdlib", + "description": "Securely and safely escape HTML, HTML attributes, JavaScript, CSS, and URLs", "keywords": [ - "stdlib", - "zf2" + "ZendFramework", + "escaper", + "zf" ] }, { "name": "zendframework/zend-uri", - "version": "2.5.2", - "version_normalized": "2.5.2.0", + "version": "2.6.1", + "version_normalized": "2.6.1.0", "source": { "type": "git", "url": "https://github.com/zendframework/zend-uri.git", - "reference": "0bf717a239432b1a1675ae314f7c4acd742749ed" + "reference": "3b6463645c6766f78ce537c70cb4fdabee1e725f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-uri/zipball/0bf717a239432b1a1675ae314f7c4acd742749ed", - "reference": "0bf717a239432b1a1675ae314f7c4acd742749ed", + "url": "https://api.github.com/repos/zendframework/zend-uri/zipball/3b6463645c6766f78ce537c70cb4fdabee1e725f", + "reference": "3b6463645c6766f78ce537c70cb4fdabee1e725f", "shasum": "" }, "require": { - "php": "^5.5 || ^7.0", + "php": "^5.6 || ^7.0", "zendframework/zend-escaper": "^2.5", - "zendframework/zend-validator": "^2.5" + "zendframework/zend-validator": "^2.10" }, "require-dev": { - "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "~4.0" + "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.4", + "zendframework/zend-coding-standard": "~1.0.0" }, - "time": "2016-02-17T22:38:51+00:00", + "time": "2018-04-30T13:40:08+00:00", "type": "library", "extra": { "branch-alias": { - "dev-master": "2.5-dev", - "dev-develop": "2.6-dev" + "dev-master": "2.6.x-dev", + "dev-develop": "2.7.x-dev" } }, "installation-source": "dist", @@ -523,84 +479,191 @@ "license": [ "BSD-3-Clause" ], - "description": "a component that aids in manipulating and validating » Uniform Resource Identifiers (URIs)", - "homepage": "https://github.com/zendframework/zend-uri", + "description": "A component that aids in manipulating and validating » Uniform Resource Identifiers (URIs)", "keywords": [ + "ZendFramework", "uri", - "zf2" + "zf" ] }, { - "name": "zendframework/zend-validator", - "version": "2.10.1", - "version_normalized": "2.10.1.0", + "name": "zendframework/zend-loader", + "version": "2.6.0", + "version_normalized": "2.6.0.0", "source": { "type": "git", - "url": "https://github.com/zendframework/zend-validator.git", - "reference": "010084ddbd33299bf51ea6f0e07f8f4e8bd832a8" + "url": "https://github.com/zendframework/zend-loader.git", + "reference": "78f11749ea340f6ca316bca5958eef80b38f9b6c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-validator/zipball/010084ddbd33299bf51ea6f0e07f8f4e8bd832a8", - "reference": "010084ddbd33299bf51ea6f0e07f8f4e8bd832a8", + "url": "https://api.github.com/repos/zendframework/zend-loader/zipball/78f11749ea340f6ca316bca5958eef80b38f9b6c", + "reference": "78f11749ea340f6ca316bca5958eef80b38f9b6c", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.4", + "zendframework/zend-coding-standard": "~1.0.0" + }, + "time": "2018-04-30T15:20:54+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.6.x-dev", + "dev-develop": "2.7.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Zend\\Loader\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Autoloading and plugin loading strategies", + "keywords": [ + "ZendFramework", + "loader", + "zf" + ] + }, + { + "name": "zendframework/zend-http", + "version": "2.8.0", + "version_normalized": "2.8.0.0", + "source": { + "type": "git", + "url": "https://github.com/zendframework/zend-http.git", + "reference": "f48b276ffa11b48dd1ae3c6bc306d6ed7958ef51" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zendframework/zend-http/zipball/f48b276ffa11b48dd1ae3c6bc306d6ed7958ef51", + "reference": "f48b276ffa11b48dd1ae3c6bc306d6ed7958ef51", "shasum": "" }, "require": { - "container-interop/container-interop": "^1.1", "php": "^5.6 || ^7.0", - "zendframework/zend-stdlib": "^2.7.6 || ^3.1" + "zendframework/zend-loader": "^2.5.1", + "zendframework/zend-stdlib": "^3.1 || ^2.7.7", + "zendframework/zend-uri": "^2.5.2", + "zendframework/zend-validator": "^2.10.1" }, "require-dev": { - "phpunit/phpunit": "^6.0.8 || ^5.7.15", - "zendframework/zend-cache": "^2.6.1", + "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.3", "zendframework/zend-coding-standard": "~1.0.0", - "zendframework/zend-config": "^2.6", - "zendframework/zend-db": "^2.7", - "zendframework/zend-filter": "^2.6", - "zendframework/zend-http": "^2.5.4", - "zendframework/zend-i18n": "^2.6", - "zendframework/zend-math": "^2.6", - "zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3", - "zendframework/zend-session": "^2.8", - "zendframework/zend-uri": "^2.5" + "zendframework/zend-config": "^3.1 || ^2.6" }, "suggest": { - "zendframework/zend-db": "Zend\\Db component, required by the (No)RecordExists validator", - "zendframework/zend-filter": "Zend\\Filter component, required by the Digits validator", - "zendframework/zend-i18n": "Zend\\I18n component to allow translation of validation error messages", - "zendframework/zend-i18n-resources": "Translations of validator messages", - "zendframework/zend-math": "Zend\\Math component, required by the Csrf validator", - "zendframework/zend-servicemanager": "Zend\\ServiceManager component to allow using the ValidatorPluginManager and validator chains", - "zendframework/zend-session": "Zend\\Session component, ^2.8; required by the Csrf validator", - "zendframework/zend-uri": "Zend\\Uri component, required by the Uri and Sitemap\\Loc validators" + "paragonie/certainty": "For automated management of cacert.pem" }, - "time": "2017-08-22T14:19:23+00:00", + "time": "2018-04-26T21:04:50+00:00", "type": "library", "extra": { "branch-alias": { - "dev-master": "2.10-dev", - "dev-develop": "2.11-dev" - }, - "zf": { - "component": "Zend\\Validator", - "config-provider": "Zend\\Validator\\ConfigProvider" + "dev-master": "2.8.x-dev", + "dev-develop": "2.9.x-dev" } }, "installation-source": "dist", "autoload": { "psr-4": { - "Zend\\Validator\\": "src/" + "Zend\\Http\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], - "description": "provides a set of commonly needed validators", - "homepage": "https://github.com/zendframework/zend-validator", + "description": "Provides an easy interface for performing Hyper-Text Transfer Protocol (HTTP) requests", "keywords": [ - "validator", - "zf2" + "ZendFramework", + "http", + "http client", + "zend", + "zf" + ] + }, + { + "name": "heidelpay/php-payment-api", + "version": "v1.5.0", + "version_normalized": "1.5.0.0", + "source": { + "type": "git", + "url": "https://github.com/heidelpay/php-payment-api.git", + "reference": "f3bea9bb5af0f0fc498f9d20c58e1c04efac13a9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/heidelpay/php-payment-api/zipball/f3bea9bb5af0f0fc498f9d20c58e1c04efac13a9", + "reference": "f3bea9bb5af0f0fc498f9d20c58e1c04efac13a9", + "shasum": "" + }, + "require": { + "ext-simplexml": "*", + "lib-curl": "*", + "lib-openssl": "*", + "php": ">=5.6.0" + }, + "conflict": { + "heidelpay/php-api": "*" + }, + "replace": { + "heidelpay/php-api": "*" + }, + "require-dev": { + "codacy/coverage": "^1.4", + "codeception/aspect-mock": "~2.1.1", + "codeception/codeception": "~2.3.9", + "friendsofphp/php-cs-fixer": "^2.0", + "heidelpay/phpdocumentor": "2.9.1" + }, + "suggest": { + "heidelpay/php-basket-api": "Use this package to transmit basket information.", + "heidelpay/php-message-code-mapper": "You can use this package to provide user-friendly messages instead of error codes." + }, + "time": "2018-04-13T07:21:22+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Heidelpay\\PhpPaymentApi\\": "lib" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "proprietary" + ], + "authors": [ + { + "name": "Jens Richter" + }, + { + "name": "Ronja Wann" + }, + { + "name": "Stephano Vogel" + }, + { + "name": "Daniel Kraut" + }, + { + "name": "Simon Gabriel" + } + ], + "description": "New client library for heidelpay payments replacing heidelpay/php-api.", + "homepage": "http://dev.heidelpay.com", + "keywords": [ + "api", + "payment-api", + "php", + "sdk" ] } ] diff --git a/vendor/heidelpay/php-basket-api/.codacy.yml b/vendor/heidelpay/php-basket-api/.codacy.yml new file mode 100644 index 0000000..2acb25c --- /dev/null +++ b/vendor/heidelpay/php-basket-api/.codacy.yml @@ -0,0 +1,2 @@ +exclude_paths: + - tests/** \ No newline at end of file diff --git a/vendor/heidelpay/php-basket-api/.gitignore b/vendor/heidelpay/php-basket-api/.gitignore new file mode 100644 index 0000000..0640e4c --- /dev/null +++ b/vendor/heidelpay/php-basket-api/.gitignore @@ -0,0 +1,4 @@ +docs/ +vendor +composer.lock +.idea/ \ No newline at end of file diff --git a/vendor/heidelpay/php-basket-api/.php_cs b/vendor/heidelpay/php-basket-api/.php_cs new file mode 100644 index 0000000..52595f8 --- /dev/null +++ b/vendor/heidelpay/php-basket-api/.php_cs @@ -0,0 +1,30 @@ +in(__DIR__.'/lib') + ->in(__DIR__.'/tests'); + +return PhpCsFixer\Config::create() + ->setUsingCache(false) + ->setRules( + array( + '@PSR2' => true, + 'no_blank_lines_after_phpdoc' => true, + 'phpdoc_add_missing_param_annotation' => true, + 'native_function_casing' => true, + 'method_separation' => true, + 'method_argument_space' => true, + 'no_empty_statement' => true, + 'no_leading_import_slash' => true, + 'no_multiline_whitespace_around_double_arrow' => true, + 'no_multiline_whitespace_before_semicolons' => true, + 'no_singleline_whitespace_before_semicolons' => true, + 'no_spaces_around_offset' => true, + 'no_trailing_comma_in_singleline_array' => true, + 'no_unused_imports' => true, + 'normalize_index_brace' => true, + 'phpdoc_align' => true, + 'phpdoc_separation' => true, + ) + ) + ->setFinder($finder); \ No newline at end of file diff --git a/vendor/heidelpay/php-basket-api/.travis.yml b/vendor/heidelpay/php-basket-api/.travis.yml new file mode 100644 index 0000000..e4ff346 --- /dev/null +++ b/vendor/heidelpay/php-basket-api/.travis.yml @@ -0,0 +1,39 @@ +language: php +dist: trusty + +matrix: + fast_finish: true + include: + - php: 5.6 + env: deps=no + - php: 7 + env: deps=no + - php: 7 + env: deps=high + - php: 7.1 + env: deps=no + - php: 7.1 + env: deps=high + - php: 7.2 + env: deps=no + - php: 7.2 + env: deps=high + +cache: + directories: + - $HOME/.composer/cache + - $HOME/.php-cs-fixer + - $HOME/.local + +before_script: + - mkdir -p "$HOME/.php-cs-fixer" + - composer self-update + - if [ "$deps" = "no" ]; then composer --prefer-dist install; fi; + - if [ "$deps" = "high" ]; then composer --prefer-source update; fi; + +script: + - php vendor/bin/phpunit --coverage-clover build/logs/clover.xml + - php vendor/bin/php-cs-fixer fix --dry-run --diff --verbose + +after_script: + - php vendor/bin/codacycoverage clover build/logs/clover.xml \ No newline at end of file diff --git a/vendor/heidelpay/php-basket-api/LICENSE.txt b/vendor/heidelpay/php-basket-api/LICENSE.txt new file mode 100644 index 0000000..0a4a8a8 --- /dev/null +++ b/vendor/heidelpay/php-basket-api/LICENSE.txt @@ -0,0 +1,83 @@ + +Lizenzvereinbarung Plug-in + +I. Präambel + +Diese Lizenzvereinbarung Plug-in (nachfolgend – „Vereinbarung“) bildet einen Vertrag zwischen dem Nutzer des Plug-ins und der heidelpay GmbH (nachfolgend „heidelpay“). + +Das Plug-in von heidelpay ist ein Software-Programm, welches die Schnittstelle zum Payment-System von heidelpay mit einer Anwendung (zum Beispiel: Shopsystem, Warenwirtschaft, Debitorenmanagement etc.) verbindet. Das Plug-in dient dem Datenaustausch zwischen dem Payment-System von heidelpay und der Anwendung. Das Plug-in erweitert den Funktionsumfang der Anwendung hinsichtlich der mit heidelpay gesondert vertraglich vereinbarten Leistungen. + +Diese Vereinbarung regelt die Bestimmungen unter denen heidelpay die Nutzung des zur Verfügung gestellten Plug-in gestattet. + +Dies vorausgeschickt, treffen der Nutzer und heidelpay die folgende Vereinbarung: + +II. Begriffsbestimmungen + + Object Code Die maschinenlesbare, übersetzte Form des Plug-ins. + + Plug-in Das unter dieser Lizenzvereinbarung angebotene Programm, das von heidelpay nach den Bestim-mungen dieser Lizenzvereinbarung verbreitet oder öffentlich zugänglich gemacht hat. + + Source Code Die für Menschen lesbare, in Programmiersprache dargestellte Form des Plug-in. + + Verändern Jede Erweiterung, Kürzung und Bearbeitung des Plug-ins, insbesondere Weiterentwicklungen + + Verbreiten Die öffentliche Weitergabe des Plug-ins, biespielsweise das Bereitstellen zum Download auf öffent-lich zugänglichen Internetseiten. + +III. Geltenden Bestimmungen + +Im Falle eines zwischen dem Nutzer und heidelpay abgeschlossenen Händlervertrages für die Abwicklung der dort bestimmten Leistungen, gilt der Händlervertrag ab Vertragsschluss und gilt in diesem Fall zusätzlich zu dieser Ver-einbarung. Im Falle des Widerspruchs zwischen dieser Vereinbarung und dem Händlervertrag hat der Händlerver-trag Vorrang. + +IV. Lizenz + + 1. Diese Vereinbarung räumt nur solchen Nutzern Nutzungsrechte ein, die Unternehmer im Sinne des BGB sind. Eine Nutzung durch Verbraucher ist nicht gestattet. + 2. Die von heidelpay im Rahmen dieser Vereinbarung gewährte Lizenz, ist für den Nutzer unentgeltlich. + 3. Unter der Voraussetzung der Einhaltung der Bestimmungen dieser Vereinbarung, erteilt heidelpay dem Nut-zer das zeitlich unbefristete, widerrufliche, räumlich auf Europa begrenzte Recht, das Plug-in zu verändern, unverändert oder in veränderter Form zu dem in der Präambel dargestellten Zweck für geschäftliche Zwecke zu nutzen, d.h. das Plug-in zu speichern, ablaufen zu lassen, zu vervielfältigen, zu verbreiten und öffentlich zugänglich zu machen. + 4. Heidelpay kann neue Versionen/Updates des Plug-ins anbieten, die zum Beispiel Fehlerbehebungen und neue Funktionalitäten beinhalten können. Heidelpay empfiehlt daher die regelmässige Ãœberprüfung der Ak-tualität des Plug-in, dies wird auf der Seite http://dev.heidelpay.com veröffentlicht. Auch diese neuen Versio-nen/Updates unterliegen den Bedingungen dieser Vereinbarung. + +V. Beschränkungen + + 1. Durch diese Vereinbarung erfolgt keine Ãœbertragung jedweder Schutzrechte von heidelpay. + 2. Das Recht, das Plug-in zu verändern und diese veränderte Version zu vervielfältigen, zu verbreiten oder öf-fentlich zugänglich zu machen, setzt voraus, dass + a. die im Source Code bzw. Object Code enthaltenen Hinweise auf diese Lizenz erhalten bleiben; und + b. alle Hinweise und Vermerke im Source Code bzw. Object Code, hinsichtlich des Urhebers des Plug-in un-verändert bleiben; und + c. ein deutlicher Hinweis erteilt wird, dass es sich um eine veränderte Version des Plug-in handelt, eine Do-kumentation darüber, welche Teile verändert wurden, mitgeliefert wird; und + d. Heidelpay für sämtliche aus der Veränderung resultierende Ansprüche freigestellt wird und zudem das veränderte Plug-in mit einer Klarstellung versehen wird, dass heidelpay für das Plug-in in der veränderten Form keine Haftung übernimmt; und + e. das veränderte Plug-in unter einer Lizenzvereinbarung zur Verfügung gestellt wird, die das Interesse von heidelpay entsprechend den Bedingungen dieser Vereinbarung schützt; und + f. die im Zusammenhang mit dem Plug-in angezeigten rechtlichen Hinweise nicht entfernt, verdeckt oder abgeändert werden. + 3. Der Nutzer sichert zu, dass er bei der Nutzung des Plug-in von heidelpay die geltenden nationalen und inter-nationalen Gesetze einhält; + 4. Der Nutzer sichert zu, heidelpay unverzüglich zu informieren, wenn Dritte ihm gegenüber Ansprüche im Zu-sammenhang mit dem Plug-in anmelden und/oder behaupten, das Plug-in verletze Rechte Dritter, und hei-delpay alle Dokumente und/oder Informationen zur Verfügung zu stellen, die der Nutzer im Zusammenhang mit einem solchen Anspruch erhält. + +VI. Datenschutz + +Es gelten die Datenschutzbestimmugen, abrufbar unter https://dev.heidelpay.de/datenschutzerklaerung/ . + +VII. FREISTELLUNG + +Der Nutzer erklärt sich einverstanden, heidelpay, deren Tochtergesellschaften, angeschlossenen Unternehmen, Geschäftsführer, leitenden Angestellten, Mitarbeiter, Vertreter, Geschäftspartner und Lizenzgeber gegen alle An-sprüche oder Forderungen Dritter, einschließlich Gerichtskosten, angemessener Anwaltsgebühren und Sachver-ständigenkosten, freizustellen, die entstehen weil: + (a) die Nutzung des Plug-ins von heidelpay unter Verletzung der Bestimmungen dieser Vereinbarung erfolgt; oder + (b) der Nutzer gegen geltende Gesetze oder aufsichtsrechtliche Bestimmungen verstösst oder + (c) der Nutzer seine Identität in einer falschen, betrügerischen, böswilligen oder unzutreffenden Weise dar-stellt. + +VIII. TECHNISCHER SUPPORT + +Heidelpay kann dem Nutzer, welcher das Plug-in in unverändertem Zustand nutzt, Support zur Verfügung stellen. Hierzu bedarf es einer gesonderten Vereinbarung zwischen dem Nutzer und heidelpay. + +IX.LAUFZEIT UND KÃœNDIGUNG + + 1. Diese Vereinbarung kann von den Parteien jederzeit fristlos gekündigt werden. + 2. Es steht heidelpay frei, das Downloadangebot jederzeit einzustellen. + 3. Alle Rechte des Nutzers aus dieser Vereinbarung erlöschen unmittelbar, sobald der Nutzer wesentliche Best-immungen dieser Vereinbarung verletzt. + 4. Sobald diese Vereinbarung beendet ist oder der Nutzer seine Rechte gemäss Ziffer 3 verliert, hat der Nutzer sämtliche Kopien des Plug-ins (und alle entsprechenden Sicherungen) zu löschen. + +X. HAFTUNG + + 1. Da die Lizenz unentgeltlich zur Verfügung gestellt wird, handelt es sich um einen Schenkungsvertrag, Daher haftet heidelpay für etwaige Schäden nur gem. § 524 BGB. + 2. Soweit ein Schaden - unmittelbar oder mittelbar - auf einem Datenverlust beruht und heidelpay nach Ziffer 1 hierfür haftbar gemacht werden kann, ist die Haftung von heidelpay auf den Wiederherstellungsaufwand be-schränkt, der bei regelmäßiger gefahrentsprechender Datensicherung eingetreten wäre. + 3. Ansprüche auf Schadensersatz, ausgenommen solche aus einer vorsätzlichen oder grob fahrlässigen Pflicht-verletzung, einer Verletzung des Lebens, des Körpers, der Gesundheit, unerlaubter Handlung oder aus dem Produkthaftungsgesetz, verjähren spätestens in einem Jahr von dem Zeitpunkt an, an dem die geschädigte Partei von dem Schaden und den Umständen, aus denen sich die Anspruchsberechtigung ergibt, Kenntnis er-langt, ohne Rücksicht auf Kenntnis drei Jahre ab dem schädigenden Ereignis. Kürzere gesetzliche Verjäh-rungsfristen bleiben unberührt. + +XI. Schlussbestimmungen + + 1. Diese Vereinbarung unterliegt den Gesetzen der Bundesrepublik Deutschland unter Ausschluss des UN-Kaufrechts. Der ausschließliche Gerichtsstand ist das Landgericht Heidelberg. + 2. In einige Länder, inklusive der Vereinigten Staaten von Amerika, gelten Exportbeschränkungen. Das Plug-in kann solchen Beschränkungen unterliegen. Diese sind insbesondere zu beachten, als das Plug-in in andere Länder exportiert wird. Wenn der Nutzer das Plug-in exportiert, ist allein er für die Einhaltung der maßgebli-chen Regelungen verantwortlich. In jedem Fall ist es untersagt, das Plug-in in ein Land zu exportieren, wel-ches einem Embargo der Vereinigten Staaten von Amerika oder der Europäischen Union unterliegt, oder ei-ner Person zu überlassen, an die eine Lieferung nach U.S. amerikanischen oder europäischen Regelung un-tersagt ist. + 3. Diese Bestimmungen oder die Nutzung des Plug-ins begründet kein Joint Venture, keine Teilhaberschaft, kei-ne Beschäftigung mit heidelpay und keine Befugnis zur Vertretung von heidelpay. + 4. Die Bestimmungen der Abschnitte IV, V, VI, VII, X, XI. überdauern die Beendigung dieser Bestimmungen, gleich aus welchem Grund. \ No newline at end of file diff --git a/vendor/heidelpay/php-basket-api/README.md b/vendor/heidelpay/php-basket-api/README.md new file mode 100644 index 0000000..9dc4547 --- /dev/null +++ b/vendor/heidelpay/php-basket-api/README.md @@ -0,0 +1,32 @@ +[![Build Status](https://travis-ci.org/heidelpay/php-basket-api.svg?branch=develop)](https://travis-ci.org/heidelpay/php-basket-api) +[![Codacy Badge](https://api.codacy.com/project/badge/Grade/13dd225543524c93b2a9400e4b343fe1)](https://www.codacy.com/app/heidelpay/php-basket-api?utm_source=github.com&utm_medium=referral&utm_content=heidelpay/php-basket-api&utm_campaign=Badge_Grade) +[![Codacy Badge](https://api.codacy.com/project/badge/Coverage/13dd225543524c93b2a9400e4b343fe1)](https://www.codacy.com/app/heidelpay/php-basket-api?utm_source=github.com&utm_medium=referral&utm_content=heidelpay/php-basket-api&utm_campaign=Badge_Coverage) +[![Latest Stable Version](https://poser.pugx.org/heidelpay/php-basket-api/v/stable)](https://packagist.org/packages/heidelpay/php-basket-api) +[![PHP 5.6](https://img.shields.io/badge/php-5.6-blue.svg)](http://www.php.net) +[![PHP 7.0](https://img.shields.io/badge/php-7.0-blue.svg)](http://www.php.net) +[![PHP 7.1](https://img.shields.io/badge/php-7.1-blue.svg)](http://www.php.net) +[![PHP 7.2](https://img.shields.io/badge/php-7.2-blue.svg)](http://www.php.net) + +![Logo](http://dev.heidelpay.com/devHeidelpay_400_180.jpg) + +# Welcome to the heidelpay basket api + +This is the PHP Basket API for heidelpay. The library will help you to easily integrate heidelpay into your application. + +### SYSTEM REQUIREMENTS + +php-basket-api requires PHP 5.6 or higher; we recommend using the +latest stable PHP version whenever possible. + +## SECURITY ADVICE +If you want to store the output of this library into a database or something, please make sure that your +application takes care of sql injection, cross-site-scripting (xss) and so on. There is no build in protection +by now. + +## LICENSE + +You can find a copy of this license in [LICENSE.txt](LICENSE.txt). + +## Documentation + +Please visit http://dev.heidelpay.com/php-basket-api/ for the developer documentation. diff --git a/vendor/heidelpay/php-basket-api/composer.json b/vendor/heidelpay/php-basket-api/composer.json new file mode 100644 index 0000000..aaae197 --- /dev/null +++ b/vendor/heidelpay/php-basket-api/composer.json @@ -0,0 +1,51 @@ +{ + "name": "heidelpay/php-basket-api", + "description": "Client library for heidelpay basket api.", + "license": "proprietary", + "authors": [ + { + "name": "Jens Richter", + "email": "development@heidelpay.com", + "homepage": "http://dev.heidelpay.com", + "role": "Developer" + }, + { + "name": "Stephano Vogel", + "email": "development@heidelpay.com", + "homepage": "http://dev.heidelpay.com", + "role": "Developer" + } + ], + "require": { + "php": ">=5.6.0", + "lib-curl": ">=7.26.0", + "lib-openssl": ">=1.0.1.5" + }, + "require-dev": { + "codacy/coverage": "~1.1.0", + "friendsofphp/php-cs-fixer" : "^2.0", + "phpunit/phpunit": "~5" + }, + "autoload": { + "psr-4": { + "Heidelpay\\PhpBasketApi\\": "lib" + } + }, + "autoload-dev": { + "psr-4": { + "Heidelpay\\Tests\\PhpBasketApi\\": "tests/" + } + }, + "support": { + "email": "development@heidelpay.com" + }, + "homepage": "http://dev.heidelpay.com", + "minimum-stability": "dev", + "type": "library", + "keywords": [ + "php", + "api", + "sdk", + "basket-api" + ] +} \ No newline at end of file diff --git a/vendor/heidelpay/php-basket-api/lib/Adapter/AdapterInterface.php b/vendor/heidelpay/php-basket-api/lib/Adapter/AdapterInterface.php new file mode 100644 index 0000000..0363ccf --- /dev/null +++ b/vendor/heidelpay/php-basket-api/lib/Adapter/AdapterInterface.php @@ -0,0 +1,35 @@ + + * + * @package heidelpay\php-basket-api\interfaces\adapter + */ +interface AdapterInterface +{ + /** + * Sends a post request to the $url containing the $payload Request + * + * @param string $url + * @param Request $payload + * + * @throws Exception + * @throws CurlAdapterException + * + * @return string The BasketApi JSON response + */ + public function sendPost($url, Request $payload); +} diff --git a/vendor/heidelpay/php-basket-api/lib/Adapter/CurlAdapter.php b/vendor/heidelpay/php-basket-api/lib/Adapter/CurlAdapter.php new file mode 100644 index 0000000..ea01bf9 --- /dev/null +++ b/vendor/heidelpay/php-basket-api/lib/Adapter/CurlAdapter.php @@ -0,0 +1,66 @@ + + * + * @package heidelpay + */ +class CurlAdapter implements AdapterInterface +{ + /** + * @inheritdoc + */ + public function sendPost($uri, Request $payload) + { + if (!extension_loaded('curl')) { + throw new Exception('The php-curl library is not installed.'); + } + + $curlRequest = curl_init(); + curl_setopt($curlRequest, CURLOPT_URL, $uri); + curl_setopt($curlRequest, CURLOPT_HEADER, 0); + curl_setopt($curlRequest, CURLOPT_TIMEOUT, 60); + curl_setopt($curlRequest, CURLOPT_CONNECTTIMEOUT, 60); + curl_setopt($curlRequest, CURLOPT_POST, true); + curl_setopt($curlRequest, CURLOPT_POSTFIELDS, $payload->toJson()); + curl_setopt($curlRequest, CURLOPT_HTTPHEADER, [ + 'Accept: application/json', + 'Content-Type: application/json', + 'Content-Length: ' . strlen($payload->toJson()) + ]); + + curl_setopt($curlRequest, CURLOPT_RETURNTRANSFER, 1); + curl_setopt($curlRequest, CURLOPT_SSL_VERIFYPEER, 1); + curl_setopt($curlRequest, CURLOPT_SSL_VERIFYHOST, 2); + curl_setopt($curlRequest, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1_2); + curl_setopt($curlRequest, CURLOPT_USERAGENT, 'PhpBasketApi'); + + $response = curl_exec($curlRequest); + $error = curl_error($curlRequest); + $info = curl_getinfo($curlRequest, CURLINFO_HTTP_CODE); + + curl_close($curlRequest); + + if ($info != 200 && !empty($error)) { + throw new CurlAdapterException($error); + } + + return $response; + } +} diff --git a/vendor/heidelpay/php-basket-api/lib/BasketError.php b/vendor/heidelpay/php-basket-api/lib/BasketError.php new file mode 100644 index 0000000..dbb68f0 --- /dev/null +++ b/vendor/heidelpay/php-basket-api/lib/BasketError.php @@ -0,0 +1,105 @@ + + * + * @package heidelpay\php-basket-api\Interaction\Object + */ +class BasketError extends AbstractObject +{ + /** + * @var string $code The Error code + */ + protected $code; + + /** + * @var string $message The Error message + */ + protected $message; + + /** + * Returns the Error code. + * + * @return string + */ + public function getCode() + { + return $this->code; + } + + /** + * Returns the Error message. + * + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * Sets the error code. + * + * @param string $code + * + * @return $this + */ + public function setCode($code) + { + $this->code = $code; + + return $this; + } + + /** + * Sets the error code. + * + * @param string $message + * + * @return $this + */ + public function setMessage($message) + { + $this->message = $message; + + return $this; + } + + /** + * Returns an array that is used for the JSON representation when using json_encode or toJson(). + * + * @return array + */ + public function jsonSerialize() + { + return [ + 'code' => $this->code, + 'message' => $this->message + ]; + } + + /** + * Prints the error message that the BasketError instance is representing. + * + * @return string + */ + public function printMessage() + { + return sprintf('[Errorcode %s, Message: %s]', $this->code, $this->message); + } +} diff --git a/vendor/heidelpay/php-basket-api/lib/Exception/BasketException.php b/vendor/heidelpay/php-basket-api/lib/Exception/BasketException.php new file mode 100644 index 0000000..976941e --- /dev/null +++ b/vendor/heidelpay/php-basket-api/lib/Exception/BasketException.php @@ -0,0 +1,21 @@ + + * + * @package heidelpay\php-basket-api\Exception + */ +class BasketException extends Exception +{ +} diff --git a/vendor/heidelpay/php-basket-api/lib/Exception/BasketItemException.php b/vendor/heidelpay/php-basket-api/lib/Exception/BasketItemException.php new file mode 100644 index 0000000..7c7c883 --- /dev/null +++ b/vendor/heidelpay/php-basket-api/lib/Exception/BasketItemException.php @@ -0,0 +1,21 @@ + + * + * @package heidelpay\php-basket-api\Exception + */ +class BasketItemException extends Exception +{ +} diff --git a/vendor/heidelpay/php-basket-api/lib/Exception/CurlAdapterException.php b/vendor/heidelpay/php-basket-api/lib/Exception/CurlAdapterException.php new file mode 100644 index 0000000..34bb8f9 --- /dev/null +++ b/vendor/heidelpay/php-basket-api/lib/Exception/CurlAdapterException.php @@ -0,0 +1,21 @@ + + * + * @package heidelpay\php-basket-api\Exception + */ +class CurlAdapterException extends Exception +{ +} diff --git a/vendor/heidelpay/php-basket-api/lib/Exception/InvalidBasketitemIdException.php b/vendor/heidelpay/php-basket-api/lib/Exception/InvalidBasketitemIdException.php new file mode 100644 index 0000000..89d0f84 --- /dev/null +++ b/vendor/heidelpay/php-basket-api/lib/Exception/InvalidBasketitemIdException.php @@ -0,0 +1,21 @@ + + * + * @package heidelpay\php-basket-api\Exception + */ +class InvalidBasketitemIdException extends Exception +{ +} diff --git a/vendor/heidelpay/php-basket-api/lib/Exception/InvalidBasketitemPositionException.php b/vendor/heidelpay/php-basket-api/lib/Exception/InvalidBasketitemPositionException.php new file mode 100644 index 0000000..2c26b10 --- /dev/null +++ b/vendor/heidelpay/php-basket-api/lib/Exception/InvalidBasketitemPositionException.php @@ -0,0 +1,21 @@ + + * + * @package heidelpay\php-basket-api\Exception + */ +class InvalidBasketitemPositionException extends Exception +{ +} diff --git a/vendor/heidelpay/php-basket-api/lib/Exception/ParameterOverflowException.php b/vendor/heidelpay/php-basket-api/lib/Exception/ParameterOverflowException.php new file mode 100644 index 0000000..e81d289 --- /dev/null +++ b/vendor/heidelpay/php-basket-api/lib/Exception/ParameterOverflowException.php @@ -0,0 +1,21 @@ + + * + * @package heidelpay\php-basket-api\Exception + */ +class ParameterOverflowException extends Exception +{ +} diff --git a/vendor/heidelpay/php-basket-api/lib/Exception/RequestException.php b/vendor/heidelpay/php-basket-api/lib/Exception/RequestException.php new file mode 100644 index 0000000..b576a91 --- /dev/null +++ b/vendor/heidelpay/php-basket-api/lib/Exception/RequestException.php @@ -0,0 +1,21 @@ + + * + * @package heidelpay\php-basket-api\Exception + */ +class RequestException extends Exception +{ +} diff --git a/vendor/heidelpay/php-basket-api/lib/Object/AbstractObject.php b/vendor/heidelpay/php-basket-api/lib/Object/AbstractObject.php new file mode 100644 index 0000000..0a90377 --- /dev/null +++ b/vendor/heidelpay/php-basket-api/lib/Object/AbstractObject.php @@ -0,0 +1,34 @@ + + * + * @package heidelpay\php-basket-api\Object + */ +abstract class AbstractObject implements JsonSerializable +{ + /** + * Returns a Json representation of the object instance. + * + * @param int $options json_encode options + * + * @return string + */ + public function toJson($options = 0) + { + return json_encode($this->jsonSerialize(), $options); + } +} diff --git a/vendor/heidelpay/php-basket-api/lib/Object/Authentication.php b/vendor/heidelpay/php-basket-api/lib/Object/Authentication.php new file mode 100644 index 0000000..104a144 --- /dev/null +++ b/vendor/heidelpay/php-basket-api/lib/Object/Authentication.php @@ -0,0 +1,140 @@ + + * @author Stephano Vogel + * + * @package heidelpay\php-basket-api\Object + */ +class Authentication extends AbstractObject +{ + /** + * @var int Max character count for the Sender ID + */ + const MAX_SENDER_LENGTH = 32; + + /** + * @var string user login + */ + protected $login; + + /** + * @var string user password + */ + protected $password; + + /** + * @var string sender id + */ + protected $sender; + + /** + * Authentication constructor. + * + * @param string $login + * @param string $password + * @param string $senderId + * + * @throws ParameterOverflowException + */ + public function __construct($login = null, $password = null, $senderId = null) + { + $this->setLogin($login); + $this->setPassword($password); + $this->setSender($senderId); + } + + /** + * Sets the user login + * + * @param string $login + * + * @return Authentication + */ + public function setLogin($login) + { + $this->login = $login; + return $this; + } + + /** + * @return string + */ + public function getLogin() + { + return $this->login; + } + + /** + * Sets the user password + * + * @param string $password + * + * @return Authentication + */ + public function setPassword($password) + { + $this->password = $password; + return $this; + } + + /** + * @return string + */ + public function getPassword() + { + return $this->password; + } + + /** + * Sets the Sender ID. + * + * @param string $sender + * + * @throws ParameterOverflowException + * + * @return Authentication + */ + public function setSender($sender) + { + if (strlen($sender) > $this::MAX_SENDER_LENGTH) { + throw new ParameterOverflowException( + 'Sender ID cannot be longer than ' . $this::MAX_SENDER_LENGTH . ' characters.' + ); + } + + $this->sender = $sender; + return $this; + } + + /** + * @return string + */ + public function getSender() + { + return $this->sender; + } + + /** + * @return array + */ + public function jsonSerialize() + { + return [ + 'login' => $this->login, + 'password' => $this->password, + 'sender' => $this->sender, + ]; + } +} diff --git a/vendor/heidelpay/php-basket-api/lib/Object/Basket.php b/vendor/heidelpay/php-basket-api/lib/Object/Basket.php new file mode 100644 index 0000000..a8649a7 --- /dev/null +++ b/vendor/heidelpay/php-basket-api/lib/Object/Basket.php @@ -0,0 +1,676 @@ + + * @author Stephano Vogel + * + * @package heidelpay\php-basket-api\Object + */ +class Basket extends AbstractObject +{ + /** + * @var int $amountTotalNet The total amount of the whole basket without Tax in the smallest unit of the currency + */ + protected $amountTotalNet; + + /** + * @var int $amountTotalVat The total amount of the Vat in smallest unit of the currency + */ + protected $amountTotalVat; + + /** + * @var int $amountTotalDiscount The total discount amount of the whole basket in the smallest unit of the currency + */ + protected $amountTotalDiscount; + + /** + * @var BasketItem[] $basketItems An array containing BasketItems + */ + protected $basketItems = []; + + /** + * @var string $basketReferenceId A basket reference ID sent from the shop backend with a maximum length of 255 + */ + protected $basketReferenceId; + + /** + * @var string $currencyCode The currency code in ISO 4217 format with 3 characters + */ + protected $currencyCode; + + /** + * @var string $note A note sent from the application with a maximum length of 3900 characters + */ + protected $note; + + /** + * @var int $voucherAmount Voucher amount to be applied on a whole basket + */ + protected $voucherAmount; + + /** + * @var string $voucherId A Voucher ID for a whole basket + */ + protected $voucherId; + + /** + * @var array $mandatory An array of attributes that are mandatory for the Basket + */ + protected static $mandatory = [ + 'amountTotalNet', + 'currencyCode', + 'basketItems' + ]; + + /** + * Returns the total discount. + * + * @return int + */ + public function getAmountTotalDiscount() + { + return $this->amountTotalDiscount; + } + + /** + * Sets the total discount amount. + * + * @param int $amountTotalDiscount + * + * @return $this + */ + public function setAmountTotalDiscount($amountTotalDiscount) + { + $this->amountTotalDiscount = $amountTotalDiscount; + + return $this; + } + + /** + * Returns the total net amount. + * + * @return int + */ + public function getAmountTotalNet() + { + return $this->amountTotalNet; + } + + /** + * Sets the total net amount. + * + * @param int $value + * + * @return $this + */ + public function setAmountTotalNet($value) + { + $this->amountTotalNet = $value; + return $this; + } + + /** + * Returns the total vat amount. + * + * @return int + */ + public function getAmountTotalVat() + { + return $this->amountTotalVat; + } + + /** + * Sets the total vat amount. + * + * @param int $value + * + * @return $this + */ + public function setAmountTotalVat($value) + { + $this->amountTotalVat = $value; + return $this; + } + + /** + * Returns the Basket reference id. + * + * @return string basketReferenceId + */ + public function getBasketReferenceId() + { + return $this->basketReferenceId; + } + + /** + * Sets the Basket reference id. + * + * @param string $value + * + * @return $this + */ + public function setBasketReferenceId($value) + { + $this->basketReferenceId = $value; + return $this; + } + + /** + * Returns the currency code. + * + * @return string currency code + */ + public function getCurrencyCode() + { + return $this->currencyCode; + } + + /** + * Sets the currency code. + * + * @param string $value + * + * @return $this + */ + public function setCurrencyCode($value) + { + $this->currencyCode = $value; + return $this; + } + + /** + * Returns the amount of BasketItems. + * + * @return int + */ + public function getItemCount() + { + return count($this->basketItems); + } + + /** + * Returns the Basket note. + * + * @return string + */ + public function getNote() + { + return $this->note; + } + + /** + * Sets the Basket note. + * + * @param string $value + * + * @return $this + */ + public function setNote($value) + { + $this->note = $value; + return $this; + } + + /** + * Returns the voucher amount. + * + * @return int + */ + public function getVoucherAmount() + { + return $this->voucherAmount; + } + + /** + * Sets the voucher amount. + * + * @param int $voucherAmount + * + * @return $this + */ + public function setVoucherAmount($voucherAmount) + { + $this->voucherAmount = $voucherAmount; + return $this; + } + + /** + * Returns the voucher ID. + * + * @return string + */ + public function getVoucherId() + { + return $this->voucherId; + } + + /** + * Sets the voucher ID. + * + * @param string $voucherId + * + * @return $this + */ + public function setVoucherId($voucherId) + { + $this->voucherId = $voucherId; + return $this; + } + + /** + * Returns the array of all BasketItems. + * + * @return BasketItem[] + */ + public function getBasketItems() + { + return $this->basketItems; + } + + /** + * Returns a BasketItem at the given position. + * + * @param int $position + * + * @throws InvalidBasketitemPositionException + * + * @return BasketItem|null + */ + public function getBasketItemByPosition($position) + { + if ($position <= 0) { + throw new InvalidBasketitemPositionException('BasketItem position cannot be equal or less than 0.'); + } + + if (array_key_exists($position - 1, $this->basketItems)) { + return $this->basketItems[$position - 1]; + } + + return null; + } + + /** + * Returns a BasketItem by it's reference id. + * + * @param string $referenceId + * + * @return BasketItem|null + */ + public function getBasketItemByReferenceId($referenceId) + { + foreach ($this->getBasketItems() as $basketItem) { + if ($basketItem->getReferenceId() === $referenceId) { + return $basketItem; + } + } + + return null; + } + + /** + * Returns the 'real' position of a BasketItem in the array, where 'real' means + * the array equivalent of a position (0 array => 1 Basket position) + * + * @param int $position + * + * @throws InvalidBasketitemPositionException + * + * @return BasketItem + */ + private function getBasketItemByRealPosition($position) + { + if (isset($this->basketItems[$position])) { + return $this->basketItems[$position]; + } + + throw new InvalidBasketitemPositionException('BasketItem position ' . $position . ' is invalid.'); + } + + /** + * Adds a BasketItem to the Basket. + * + * @param BasketItem $item The BasketItem to be added + * @param int|null $position The position where the item should be placed (optional) + * @param bool $autoUpdate If the BasketItem amounts can be added to the Basket automatically + * + * @throws InvalidBasketitemPositionException + * + * @return $this + */ + public function addBasketItem(BasketItem $item, $position = null, $autoUpdate = false) + { + // do this to avoid having copies or references. + $newItem = clone $item; + + $realPosition = !$position ? $this->getBasketItemPosition($newItem, $position) : $position; + + if ($autoUpdate) { + $this->addBasketItemAmountsToBasket($newItem); + } + + if ($realPosition === null) { + $newItem->setPosition($this->getItemCount() + 1); + } + + $this->basketItems[$realPosition] = $newItem; + sort($this->basketItems); + + return $this; + } + + /** + * Updates the object at the given index. + * + * @param BasketItem $item the item to be set + * @param int $position The position of the BasketItem + * @param bool $autoUpdate If Basket amounts should be updated automatically + * + * @throws InvalidBasketitemPositionException + * + * @return $this + */ + public function updateBasketItem(BasketItem $item, $position = null, $autoUpdate = false) + { + $updateItem = clone $item; + + $realPosition = $this->getBasketItemPosition($updateItem, $position, true); + + if ($realPosition === null) { + throw new InvalidBasketitemPositionException('BasketItem has no position, and no position was given.'); + } + + if (array_key_exists($realPosition, $this->basketItems)) { + if ($autoUpdate) { + $oldItem = $this->getBasketItemByRealPosition($realPosition); + $this->updateAmountBalances($oldItem, $updateItem); + } + + $this->basketItems[$realPosition] = $updateItem; + return $this; + } + + throw new InvalidBasketitemPositionException('Basket item with id ' . $position . ' does not exist.'); + } + + /** + * Removes an item of the basket at the given position. + * + * @param int $position the basket index of the item + * @param bool $autoUpdate decrease Basket amounts by BasketItem amounts + * + * @throws InvalidBasketitemPositionException + * + * @return $this + */ + public function deleteBasketItemByPosition($position, $autoUpdate = true) + { + if ($position <= 0) { + throw new InvalidBasketitemPositionException('BasketItem position cannot be equal or less than 0.'); + } + + if (array_key_exists($position - 1, $this->basketItems)) { + if ($autoUpdate) { + $this->decreaseBasketItemAmountsFromBasket($this->getBasketItemByPosition($position)); + } + + unset($this->basketItems[$position - 1]); + return $this; + } + + throw new InvalidBasketitemPositionException('Basket item on position ' . $position . ' does not exist.'); + } + + /** + * Deletes a BasketItem by it's reference id. + * + * @param string $referenceId + * @param bool $autoUpdate decrease Basket amounts by BasketItem amounts + * + * @return $this + * + * @throws InvalidBasketitemIdException + */ + public function deleteBasketItemByReferenceId($referenceId, $autoUpdate = true) + { + foreach ($this->getBasketItems() as $basketItem) { + if ($basketItem->getReferenceId() === $referenceId) { + if ($autoUpdate) { + $this->decreaseBasketItemAmountsFromBasket($basketItem); + } + + unset($this->basketItems[$basketItem->getPosition() - 1]); + return $this; + } + } + + throw new InvalidBasketitemIdException('Basket item with refereceId ' . $referenceId . ' does not exist.'); + } + + /** + * Returns an array that is used for the JSON representation when using json_encode or toJson(). + * + * @return array + */ + public function jsonSerialize() + { + return [ + 'amountTotalNet' => $this->amountTotalNet, + 'amountTotalVat' => $this->amountTotalVat, + 'amountTotalDiscount' => $this->amountTotalDiscount, + 'basketReferenceId' => $this->basketReferenceId, + 'currencyCode' => $this->currencyCode, + 'voucherAmount' => $this->voucherAmount, + 'voucherId' => $this->voucherId, + 'itemCount' => $this->getItemCount(), + 'note' => $this->note, + 'basketItems' => array_values($this->basketItems) + ]; + } + + /** + * Determines the position of the BasketItem in the BasketItem array. + * + * @param BasketItem $item The BasketItem containing the changes + * @param int|null $position The position where a BasketItem should be updated + * @param bool $doUpdate If the position is needed for an update + * + * @return int|null + */ + private function getBasketItemPosition(BasketItem $item, $position = null, $doUpdate = false) + { + $result = null; + + // in case the item position is not null and > 0 + if (is_numeric($item->getPosition()) && $item->getPosition() > 0) { + $result = $item->getPosition(); + } + + // in case the position is not null and > 0 + if (is_numeric($position) && $position > 0) { + $result = $position - 1; + } + + // if an item already exists on the determined position, just increase the result number... + if ($result !== null && isset($this->basketItems[$result])) { + ++$result; + } + + // getBasketItemPosition determines a position for a new item, so if + // we do an update, we'll decrease the found position by one. + if ($doUpdate && $result !== null && is_numeric($result)) { + --$result; + } + + return $result; + } + + /** + * Increases the total discount amount. + * + * @param int $amount + */ + public function addAmountTotalDiscount($amount) + { + $this->amountTotalDiscount += $amount; + } + + /** + * Decreases the total discount amount. + * + * @param int $amount + */ + public function decreaseAmountTotalDiscount($amount) + { + $this->amountTotalDiscount -= $amount; + } + + /** + * Increases the total net amount. + * + * @param int $amount + */ + public function addAmountTotalNet($amount) + { + $this->amountTotalNet += $amount; + } + + /** + * Decreases the total net amount. + * + * @param int $amount + */ + public function decreaseAmountTotalNet($amount) + { + $this->amountTotalNet -= $amount; + } + + /** + * Increases the total vat amount. + * + * @param int $amount + */ + public function addAmountTotalVat($amount) + { + $this->amountTotalVat += $amount; + } + + /** + * Decreases the total vat amount. + * + * @param int $amount + */ + public function decreaseAmountTotalVat($amount) + { + $this->amountTotalVat -= $amount; + } + + /** + * Increases the Basket amounts by the BasketItem amounts. + * + * @param BasketItem $basketItem + */ + private function addBasketItemAmountsToBasket(BasketItem $basketItem) + { + $this->addAmountTotalDiscount($basketItem->getAmountDiscount()); + $this->addAmountTotalNet($basketItem->getAmountNet()); + $this->addAmountTotalVat($basketItem->getAmountVat()); + } + + /** + * Decreases the Basket amounts by the BasketItem amounts. + * + * @param BasketItem $basketItem + */ + private function decreaseBasketItemAmountsFromBasket(BasketItem $basketItem) + { + $this->decreaseAmountTotalDiscount($basketItem->getAmountDiscount()); + $this->decreaseAmountTotalNet($basketItem->getAmountNet()); + $this->decreaseAmountTotalVat($basketItem->getAmountVat()); + } + + /** + * Updates the Basket balances according to the differences + * of an updated BasketItem and it's predecessor. + * + * @param BasketItem $oldItem + * @param BasketItem $newItem + */ + private function updateAmountBalances(BasketItem $oldItem, BasketItem $newItem) + { + $discountBalance = $newItem->getAmountDiscount() - $oldItem->getAmountDiscount(); + if ($discountBalance !== 0) { + $this->addAmountTotalDiscount($discountBalance); + } + + $netBalance = $newItem->getAmountNet() - $oldItem->getAmountNet(); + if ($netBalance !== 0) { + $this->addAmountTotalNet($netBalance); + } + + $vatBalance = $newItem->getAmountVat() - $oldItem->getAmountVat(); + if ($vatBalance !== 0) { + $this->addAmountTotalVat($vatBalance); + } + } + + /** + * Magic getter for properties. + * + * @param $name + * + * @return mixed + */ + public function __get($name) + { + if (property_exists($this, $name)) { + return $this->$name; + } + + return null; + } + + /** + * Magic setter in favor of parsing. + * + * @param $field + * @param $value + */ + public function __set($field, $value) + { + if (property_exists($this, $field)) { + $this->$field = $value; + } + } + + /** + * Isset implementation for the __set method + * + * @param $field + * + * @return bool + */ + public function __isset($field) + { + if (!property_exists($this, $field)) { + return false; + } + + return $this->$field !== null && !empty($this->$field); + } +} diff --git a/vendor/heidelpay/php-basket-api/lib/Object/BasketItem.php b/vendor/heidelpay/php-basket-api/lib/Object/BasketItem.php new file mode 100644 index 0000000..5fbfa74 --- /dev/null +++ b/vendor/heidelpay/php-basket-api/lib/Object/BasketItem.php @@ -0,0 +1,780 @@ + + * @author Stephano Vogel + * + * @package heidelpay\php-basket-api\Object + */ +class BasketItem extends AbstractObject +{ + /** + * @var int $position (optional) The position of the item in the Basket + */ + protected $position; + + /** + * @var string $basketItemReferenceId A unique reference id for the BasketItem with a maximum length of 255 + */ + protected $basketItemReferenceId; + + /** + * @var string $unit (optional) The unit description of the item e.g. "Stk." with a maximum length of 255 + */ + protected $unit; + + /** + * @var int $quantity The quantity of the basket item (mandatory) + */ + protected $quantity; + + /** + * @var int $amountDiscount The discount amount for the basket item (optinal) + */ + protected $amountDiscount; + + /** + * @var int $vat The vat value for the basket item in percent (conditional) + */ + protected $vat; + + /** + * @var int $amountGross The gross amount (conditional), means amountNet + amountVat. + */ + protected $amountGross; + + /** + * @var int $amountVat The vat amount, this value could be 0 if the vat value is 0 (conditional) + */ + protected $amountVat; + + /** + * @var int $amountPerUnit The amount per unit (mandatory) + */ + protected $amountPerUnit; + + /** + * @var int $amountNet This value could be the same value as the gross amount if the vat value is 0 + */ + protected $amountNet; + + /** + * @var string $articleId (optional) The shop article id for the basket item with a maximum length of 255 + */ + protected $articleId; + + /** + * @var string $type (optional) The type of the basket item, e.g. "goods", "shipment", "voucher" or "digital" with + * a maximum length of 255 + */ + protected $type; + + /** + * @var string $title The title of the BasketItem with a maximum length of 255 + */ + protected $title; + + /** + * @var string $description (optional) A description for the basket item with a maximum length of 255 + */ + protected $description; + + /** + * @var string $imageUrl (optional) An image url e.g. https://placehold.it/32x32 with a maximum length of 255 + */ + protected $imageUrl; + + /** + * @var string $channel (cond. mandatory) The booking channel on which the item has to be booked (Marketplace) + */ + protected $channel; + + /** + * @var string $transactionId (optional) A unique identifier with a maximum length of 255 + */ + protected $transactionId; + + /** + * @var string $usage (optional) A description for the BasketItem with a maximum length of 255 + */ + protected $usage; + + /** + * @var float $commissionRate (optional) The commission rate for the marketplace in % with 2 decimal places + */ + protected $commissionRate; + + /** + * @var int $voucherAmount (optional) Voucher amount to be applied on the current BasketItem + */ + protected $voucherAmount; + + /** + * @var string $voucherId (optional) Voucher ID for the current BasketItem with a maximum length of 255 + */ + protected $voucherId; + + /** + * @var string $articleCategory + */ + protected $articleCategory; + + /** + * @var array $mandatory An array containing attributes that are mandatory for every BasketItem + */ + protected static $mandatory = [ + 'basketitemReferenceId', + 'quantity', + 'amountPerUnit', + 'amountNet', + 'title' + ]; + + /** + * @var bool $isMarketplace If the BasketItem is used for a marketplace. + */ + private $isMarketplaceItem; + + /** + * BasketItem constructor. + * + * @param bool $isMarketplace Determines if the BasketItem is used for a marketplace + */ + public function __construct($isMarketplace = false) + { + $this->isMarketplaceItem = $isMarketplace; + } + + /** + * Sets the discount amount. + * + * @param int $value + * + * @return $this + */ + public function setAmountDiscount($value) + { + $this->amountDiscount = $value; + return $this; + } + + /** + * Sets the gross amount. + * + * @param int $value + * + * @return $this + */ + public function setAmountGross($value) + { + $this->amountGross = $value; + return $this; + } + + /** + * Sets the net amount. + * + * @param int $value + * + * @return $this + */ + public function setAmountNet($value) + { + $this->amountNet = $value; + return $this; + } + + /** + * Sets the amount per unit. + * + * @param int $value + * + * @return $this + */ + public function setAmountPerUnit($value) + { + $this->amountPerUnit = $value; + return $this; + } + + /** + * Sets the vat amount. + * + * @param int $value + * + * @return $this + */ + public function setAmountVat($value) + { + $this->amountVat = $value; + return $this; + } + + /** + * Sets the article id. + * + * @param string $value + * + * @return $this + */ + public function setArticleId($value) + { + $this->articleId = $value; + return $this; + } + + /** + * Sets the BasketItem reference id. + * + * @param string $value + * + * @return $this + */ + public function setBasketItemReferenceId($value) + { + $this->basketItemReferenceId = $value; + return $this; + } + + /** + * Sets the description. + * + * @param string $value + * + * @return $this + */ + public function setDescription($value) + { + $this->description = $value; + return $this; + } + + /** + * Image url setter + * + * If possible provide a https source - http images could be blocked due to + * browser securtiy restrictions. + * + * @param string $value + * + * @return $this + */ + public function setImageUrl($value) + { + $this->imageUrl = $value; + return $this; + } + + /** + * Sets the position. + * + * @param int $position + * + * @throws InvalidBasketitemPositionException + * + * @return $this + */ + public function setPosition($position) + { + if ($position <= 0) { + throw new InvalidBasketitemPositionException('BasketItem position cannot be equal or less than 0.'); + } + + $this->position = $position; + return $this; + } + + /** + * Sets the quantity. + * + * @param int $value + * + * @return $this + */ + public function setQuantity($value) + { + $this->quantity = $value; + return $this; + } + + /** + * Sets the title. + * + * @param string $value + * + * @return $this + */ + public function setTitle($value) + { + $this->title = $value; + return $this; + } + + /** + * Sets the type. + * + * @param string $value + * + * @return $this + */ + public function setType($value) + { + $this->type = $value; + return $this; + } + + /** + * Sets the unit. + * + * @param string $value + * + * @return $this + */ + public function setUnit($value) + { + $this->unit = $value; + return $this; + } + + /** + * Sets the vat. + * + * @param int $value + * + * @return $this + */ + public function setVat($value) + { + $this->vat = $value; + return $this; + } + + /** + * Sets the marketplace channel. + * + * @param string $channel + * + * @return $this + */ + public function setChannel($channel) + { + $this->channel = $channel; + return $this; + } + + /** + * Sets the transaction id. + * + * @param string $transactionId + * + * @return $this + */ + public function setTransactionId($transactionId) + { + $this->transactionId = $transactionId; + return $this; + } + + /** + * Sets the usage. + * + * @param string $usage + * + * @return $this + */ + public function setUsage($usage) + { + $this->usage = $usage; + return $this; + } + + /** + * Sets the commission rate. + * + * @param float $commissionRate + * + * @return $this + */ + public function setCommissionRate($commissionRate) + { + $this->commissionRate = $commissionRate; + return $this; + } + + /** + * Sets the voucher amount. + * + * @param int $voucherAmount + * + * @return $this + */ + public function setVoucherAmount($voucherAmount) + { + $this->voucherAmount = $voucherAmount; + return $this; + } + + /** + * Sets the voucher id. + * + * @param string $voucherId + * + * @return $this + */ + public function setVoucherId($voucherId) + { + $this->voucherId = $voucherId; + return $this; + } + + /** + * Returns the position. + * + * @return int + */ + public function getPosition() + { + return $this->position; + } + + /** + * Returns the reference id. + * + * @return string + */ + public function getReferenceId() + { + return $this->basketItemReferenceId; + } + + /** + * Returns the unit. + * + * @return string + */ + public function getUnit() + { + return $this->unit; + } + + /** + * @return int + */ + public function getQuantity() + { + return $this->quantity; + } + + /** + * Returns the discount amount. + * + * @return int + */ + public function getAmountDiscount() + { + return $this->amountDiscount; + } + + /** + * Returns the vat. + * + * @return int + */ + public function getVat() + { + return $this->vat; + } + + /** + * Returns the gross amount. + * + * @return int + */ + public function getAmountGross() + { + return $this->amountGross; + } + + /** + * Returns the vat amount. + * + * @return int + */ + public function getAmountVat() + { + return $this->amountVat; + } + + /** + * Returns the amount per unit. + * + * @return int + */ + public function getAmountPerUnit() + { + return $this->amountPerUnit; + } + + /** + * Returns the net amount. + * + * @return int + */ + public function getAmountNet() + { + return $this->amountNet; + } + + /** + * Returns the article id. + * + * @return string + */ + public function getArticleId() + { + return $this->articleId; + } + + /** + * Returns the type. + * + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * Returns the title. + * + * @return string + */ + public function getTitle() + { + return $this->title; + } + + /** + * Returns the description. + * + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Returns the image url. + * + * @return string + */ + public function getImageUrl() + { + return $this->imageUrl; + } + + /** + * Returns the marketplace channel. + * + * @return string + */ + public function getChannel() + { + return $this->channel; + } + + /** + * Returns the transaction id. + * + * @return string + */ + public function getTransactionId() + { + return $this->transactionId; + } + + /** + * Returns the usage. + * + * @return string + */ + public function getUsage() + { + return $this->usage; + } + + /** + * Returns the commission rate. + * + * @return float + */ + public function getCommissionRate() + { + return $this->commissionRate; + } + + /** + * Returns the voucher amount. + * + * @return int + */ + public function getVoucherAmount() + { + return $this->voucherAmount; + } + + /** + * Returns the voucher id. + * + * @return string + */ + public function getVoucherId() + { + return $this->voucherId; + } + + /** + * @todo property is yet undocumented in the Integration_Guide (v1.2)! + * + * @return string + */ + public function getArticleCategory() + { + return $this->articleCategory; + } + + /** + * @todo property is yet undocumented in the Integration_Guide (v1.2)! + * + * @param string $articleCategory + * + * @return $this + */ + public function setArticleCategory($articleCategory) + { + $this->articleCategory = $articleCategory; + return $this; + } + + /** + * Returns if the BasketItem is used for marketplace purposes. + * + * @return bool + */ + public function isMarketplaceItem() + { + return $this->isMarketplaceItem; + } + + /** + * Sets the boolean that determines if the BasketItem is used for a marketplace. + * + * @param bool $isMarketplaceItem + */ + public function setIsMarketplaceItem($isMarketplaceItem = true) + { + $this->isMarketplaceItem = $isMarketplaceItem; + } + + /** + * Returns an array that is used for the JSON representation when using json_encode or toJson(). + * + * @return array + */ + public function jsonSerialize() + { + // TODO: add articleCategory if documented and ready to release. + $result = [ + 'position' => $this->position, + 'basketItemReferenceId' => $this->basketItemReferenceId, + 'articleId' => $this->articleId, + 'title' => $this->title, + 'description' => $this->description, + 'amountGross' => $this->amountGross, + 'amountNet' => $this->amountNet, + 'amountPerUnit' => $this->amountPerUnit, + 'amountVat' => $this->amountVat, + 'amountDiscount' => $this->amountDiscount, + 'unit' => $this->unit, + 'quantity' => $this->quantity, + 'vat' => $this->vat, + 'type' => $this->type, + 'imageUrl' => $this->imageUrl, + 'voucherAmount' => $this->voucherAmount, + 'voucherId' => $this->voucherId, + ]; + + if ($this->isMarketplaceItem()) { + $result = array_merge($result, [ + 'channel' => $this->channel, + 'commissionRate' => $this->commissionRate, + 'transactionId' => $this->transactionId, + 'usage' => $this->usage, + ]); + } + + return $result; + } + + /** + * Magic getter for properties + * + * @param $field + * + * @return null + */ + public function __get($field) + { + if (property_exists($this, $field)) { + return $this->$field; + } + + return null; + } + + /** + * Magic setter in favor of parsing. + * + * @param $field + * @param $value + */ + public function __set($field, $value) + { + if (property_exists($this, $field)) { + $this->$field = $value; + } + } + + /** + * Isset implementation for the __set method + * + * @param $field + * + * @return bool + */ + public function __isset($field) + { + if (!property_exists($this, $field)) { + return false; + } + + return $this->$field !== null && !empty($this->$field); + } +} diff --git a/vendor/heidelpay/php-basket-api/lib/Request.php b/vendor/heidelpay/php-basket-api/lib/Request.php new file mode 100644 index 0000000..bfff3fd --- /dev/null +++ b/vendor/heidelpay/php-basket-api/lib/Request.php @@ -0,0 +1,219 @@ + + * @author Stephano Vogel + * + * @package heidelpay\php-basket-api\Interaction\Object + */ +class Request extends AbstractObject +{ + /** + * @var string URL for the test system + */ + const URL_TEST = 'https://test-heidelpay.hpcgw.net/ngw/basket/'; + + /** + * @var string URL for the live system + */ + const URL_LIVE = 'https://heidelpay.hpcgw.net/ngw/basket/'; + + /** + * @var Authentication $authentication The authentication instance + */ + protected $authentication; + + /** + * @var Basket $basket The basket object + */ + protected $basket; + + /** + * @var bool $isSandbox If the request is being sent to the test environment + */ + protected $isSandbox = true; + + /** + * @var AdapterInterface $adapter The adapter for sending requests to the API + */ + protected $adapter; + + /** + * Request class constructor + * + * @param Authentication|null $auth + * @param Basket|null $basket + */ + public function __construct(Authentication $auth = null, Basket $basket = null) + { + if ($auth !== null) { + $this->authentication = $auth; + } + + if ($basket !== null) { + $this->basket = $basket; + } + + $this->adapter = new CurlAdapter(); + } + + /** + * Enables or disables Sandbox mode. + * + * @param bool $isSandbox either if sandbox mode is enabled or not + * + * @return $this + */ + public function setIsSandboxMode($isSandbox) + { + $this->isSandbox = $isSandbox; + + return $this; + } + + /** + * Determines if the SDK runs in sandbox mode. + * + * @return bool + */ + public function isSandboxMode() + { + return $this->isSandbox; + } + + /** + * Sets the authentication object. + * + * @param string $login + * @param string $password + * @param string $senderId + * + * @return $this + */ + public function setAuthentication($login = null, $password = null, $senderId = null) + { + $this->authentication = new Authentication($login, $password, $senderId); + + return $this; + } + + /** + * Returns the Authentication object. + * + * @return Authentication + */ + public function getAuthentication() + { + if ($this->authentication === null) { + $this->authentication = new Authentication(); + } + + return $this->authentication; + } + + /** + * Sets the basket for the request. + * + * @param Basket $basket + * + * @return $this + */ + public function setBasket(Basket $basket) + { + $this->basket = $basket; + + return $this; + } + + /** + * Returns the Basket from the Request. + * + * @return Basket + */ + public function getBasket() + { + if ($this->basket === null) { + $this->basket = new Basket(); + } + + return $this->basket; + } + + /** + * Retrieves a basket by the given unique basket id. + * The Response is returned, not the Basket itself. + * + * @param string $basketId + * + * @return Response + */ + public function retrieveBasket($basketId) + { + return new Response($this->adapter->sendPost($this->generateUrl('get/' . $basketId), $this)); + } + + /** + * Submits a basket and returns a Response. + * + * @return Response + */ + public function addNewBasket() + { + return new Response($this->adapter->sendPost($this->generateUrl(), $this)); + } + + /** + * Submits the current Basket to overwrite/change the basket with the given $basketId, + * e.g. if the user added a voucher or shipping fees have changed. + * + * @param string $basketId + * + * @return Response + */ + public function overwriteBasket($basketId) + { + return new Response($this->adapter->sendPost($this->generateUrl($basketId), $this)); + } + + /** + * Generates a url for the request. + * + * @param string|null $suffix The url suffix + * + * @return string + */ + private function generateUrl($suffix = null) + { + $base = $this->isSandbox ? self::URL_TEST : self::URL_LIVE; + + return sprintf('%s%s', $base, $suffix); + } + + /** + * @return array + */ + public function jsonSerialize() + { + return [ + 'authentication' => $this->authentication, + 'basket' => $this->basket + ]; + } +} diff --git a/vendor/heidelpay/php-basket-api/lib/Response.php b/vendor/heidelpay/php-basket-api/lib/Response.php new file mode 100644 index 0000000..e6527a3 --- /dev/null +++ b/vendor/heidelpay/php-basket-api/lib/Response.php @@ -0,0 +1,393 @@ + + * + * @package heidelpay\php-basket-api\interaction\object + */ +class Response extends AbstractObject +{ + /** + * @var string The application name + */ + const APP_NAME = 'heidelpay Basket-API'; + + /** + * @var string ACK result code + */ + const RESULT_ACK = 'ACK'; + + /** + * @var string NOK result code + */ + const RESULT_NOK = 'NOK'; + + /** + * @var string API method name for adding a basket + */ + const METHOD_ADDNEWBASKET = 'addNewBasket'; + + /** + * @var string API method name for overwriting a basket + */ + const METHOD_OVERWRITEBASKET = 'overwriteBasket'; + + /** + * @var string API method name for getting a basket + */ + const METHOD_GETBASKET = 'getBasket'; + + /** + * @var string Response result (either "ACK" or "NOK") + */ + protected $result; + + /** + * @var string The Basket called method, e.g. 'addNewBasket', 'getBasket', 'overwriteBasket' + */ + protected $method; + + /** + * @var string Basket Id for reference in following transactions + */ + protected $basketId; + + /** + * @var Basket a basket object, if present in the response + */ + protected $basket; + + /** + * @var BasketError[] array of response errors + */ + protected $basketErrors = []; + + /** + * Response constructor. + * + * The response should be in json format (as a string), so it can + * be parsed correctly. + * + * @param string|null $content + */ + public function __construct($content = null) + { + if ($content !== null && is_string($content)) { + $this->parseResponse($content); + } + } + + /** + * Returns true, if the request results in a 'ACK' (acknowledged). + * + * @return bool + */ + public function isSuccess() + { + return $this->result === self::RESULT_ACK; + } + + /** + * Returns true, if the request results in a 'NOK' (not ok). + * + * @return bool + */ + public function isFailure() + { + return $this->result === self::RESULT_NOK; + } + + /** + * Returns the Response result, which is either 'ACK' or 'NOK'. + * + * @return string + */ + public function getResult() + { + return $this->result; + } + + /** + * @param string $result + * + * @return $this + */ + protected function setResult($result) + { + $this->result = $result; + return $this; + } + + /** + * @return string + */ + public function getMethod() + { + return $this->method; + } + + /** + * @param string $method + * + * @return $this + */ + protected function setMethod($method) + { + $this->method = $method; + return $this; + } + + /** + * @return string + */ + public function getBasketId() + { + return $this->basketId; + } + + /** + * @param string $basketId + * + * @return $this + */ + protected function setBasketId($basketId) + { + $this->basketId = $basketId; + return $this; + } + + /** + * @return Basket + */ + public function getBasket() + { + return $this->basket; + } + + /** + * @param Basket $basket + * + * @return $this + */ + protected function setBasket(Basket $basket) + { + $this->basket = $basket; + return $this; + } + + /** + * @return BasketError[] + */ + public function getBasketErrors() + { + return $this->basketErrors; + } + + /** + * @param BasketError $basketError + * + * @return $this + */ + private function addBasketError(BasketError $basketError) + { + $this->basketErrors[] = $basketError; + return $this; + } + + /** + * @return array + */ + public function jsonSerialize() + { + return [ + 'result' => $this->result, + 'method' => $this->method, + 'basket' => $this->basket, + 'basketId' => $this->basketId, + 'basketErrors' => array_values($this->basketErrors) + ]; + } + + /** + * Prints a formatted message of the Response, including the basket errors. + * + * @return string + */ + public function printMessage() + { + $messages = []; + + foreach ($this->basketErrors as $basketError) { + $messages[] = $basketError->printMessage(); + } + + if ($this->isSuccess()) { + return sprintf('%s - %s Request SUCCESS. %s', self::APP_NAME, $this->method, implode(', ', $messages)); + } + + return sprintf('%s - %s Request FAILURE. %s', self::APP_NAME, $this->method, implode(', ', $messages)); + } + + /** + * Parses a raw json response into a instance of this class. + * + * @param string $response a raw json response from a cURL request + * + * @throws BasketException + */ + private function parseResponse($response) + { + /** @var \stdClass $obj */ + // if the json cannot be parsed, do nothing. + if (!$obj = json_decode($response)) { + return; + } + + $this->setResponseParameters($obj); + + if (isset($obj->basket)) { + // instanciate a new Basket + $basket = new Basket(); + + // go through all properties of the parsed object and + // set the Basket's properties by their values. + $this->setBasketProperties($basket, $obj); + + // iterate through the basket items. + if (isset($obj->basket->basketItems) && !empty($obj->basket->basketItems)) { + sort($obj->basket->basketItems); + $this->setBasketItemProperties($basket, $obj->basket->basketItems); + } + + $this->setBasket($basket); + + if (isset($obj->basket->itemCount) && $this->basket->getItemCount() !== $obj->basket->itemCount) { + throw new BasketException( + 'Itemcount ' . $this->basket->getItemCount() . ' does not match ' . $obj->basket->itemCount . '!' + ); + } + } + + // iterate through all basket errors, create object instances + // of them and add them to the basketErrors array. + if (isset($obj->basketErrors) && is_array($obj->basketErrors)) { + $this->setBasketErrors($obj->basketErrors); + } + } + + /** + * Returns if the provided BasketItem uses Marketplace properties (that are not null) + * + * @param BasketItem $basketItem + * + * @return bool + */ + private function itemHasMarketplaceProperties(BasketItem $basketItem) + { + return $basketItem->getChannel() !== null + || $basketItem->getCommissionRate() !== null + || $basketItem->getTransactionId() !== null + || $basketItem->getUsage() !== null; + } + + /** + * Sets response parameters (result, request method &basket id) + * + * @param \stdClass $obj + */ + private function setResponseParameters(\stdClass $obj) + { + if (isset($obj->result)) { + $this->setResult($obj->result); + } + + if (isset($obj->method)) { + $this->setMethod($obj->method); + } + + if (isset($obj->basketId)) { + $this->setBasketId($obj->basketId); + } + } + + /** + * Sets the BasketErrors for the Reponse instance. + * + * @param array $basketErrors + */ + private function setBasketErrors($basketErrors) + { + foreach ($basketErrors as $basketError) { + $objErr = new BasketError(); + + if (isset($basketError->code)) { + $objErr->setCode($basketError->code); + } + + if (isset($basketError->message)) { + $objErr->setMessage($basketError->message); + } + + $this->addBasketError($objErr); + } + } + + /** + * Sets the Basket's properties. + * + * @param Basket $basket + * @param \stdClass $obj + */ + private function setBasketProperties(Basket $basket, \stdClass $obj) + { + foreach (get_object_vars($obj->basket) as $class_var => $value) { + if ($class_var !== 'basketItems') { + $basket->$class_var = $value; + } + } + } + + /** + * @param Basket $basket + * @param array $basketItems + * + * @throws BasketException + */ + private function setBasketItemProperties(Basket $basket, array $basketItems) + { + foreach ($basketItems as $basketItem) { + $item = new BasketItem(); + + foreach (get_object_vars($basketItem) as $class_var => $value) { + $item->$class_var = $value; + } + + // if marketplace parameters are provided, set the BasketItem's + // isMarketplaceItem property to 'true'. + if ($this->itemHasMarketplaceProperties($item)) { + $item->setIsMarketplaceItem(); + } + + try { + $basket->addBasketItem($item, $item->getPosition()); + } catch (InvalidBasketitemPositionException $e) { + throw new BasketException('Could not add BasketItem to Basket during parsing!'); + } + } + } +} diff --git a/vendor/heidelpay/php-basket-api/phpdoc.dist.xml b/vendor/heidelpay/php-basket-api/phpdoc.dist.xml new file mode 100644 index 0000000..67f537c --- /dev/null +++ b/vendor/heidelpay/php-basket-api/phpdoc.dist.xml @@ -0,0 +1,21 @@ + + + php-basket-api + + PHP Basket Api + ./docs/ + + + ./docs/ + + + . + vendor/* + + + + + +