From 539c330da686541ae35df4d9233f409418996b16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C2=AB?= Date: Wed, 27 Mar 2019 14:40:03 +0100 Subject: [PATCH 001/353] change author to plentysystems AG --- meta/documents/changelog_de.md | 92 +++++++++++++++++- meta/documents/changelog_en.md | 91 ++++++++++++++++- meta/documents/support_contact_de.md | 6 +- meta/documents/support_contact_en.md | 6 +- meta/images/icon_author_md.png | Bin 3228 -> 18603 bytes meta/images/icon_author_sm.png | Bin 3228 -> 7193 bytes meta/images/icon_author_xs.png | Bin 3228 -> 768 bytes plugin.json | 6 +- .../Api/Request/DataProviderAbstract.php | 2 +- 9 files changed, 187 insertions(+), 16 deletions(-) mode change 100644 => 100755 meta/images/icon_author_md.png mode change 100644 => 100755 meta/images/icon_author_sm.png mode change 100644 => 100755 meta/images/icon_author_xs.png diff --git a/meta/documents/changelog_de.md b/meta/documents/changelog_de.md index 7268c364..a39e3686 100644 --- a/meta/documents/changelog_de.md +++ b/meta/documents/changelog_de.md @@ -1,2 +1,90 @@ -Das Changelog wird zentralisiert in [github](https://github.com/PAYONE-GmbH/plentymarkets-7/blob/master/CHANGELOG.md) -gepflegt, das es sich um ein Open Source Projekt handelt. \ No newline at end of file +# Release Notes BS Payone + +## 1.1.0 (2019-03-27) + +### Geändert +- Supportübernahme durch plentysystems +- Icons getauscht und Beschreibungen aktualisiert/ergänzt + + +## 1.0.9 (2018-04-10) + +### Changed +- user_guide alert Text + + +## 1.0.8 (2018-25-09) + +### Changed +- Support Tab information +- Changelog + + +## 1.0.7 (2018-20-09) + +### Updated +- config.json / new Pluginformat + +### Added +- Translations + +### Changed +- Userguide +- guzzle/httpguzzle Version in dependency for PayPal compatibility + + +## 1.0.6 (2018-05-15) + +### Added +- Sofort display in frontend +- Paydirekt display in frontend +- invoice secure display in frontend +- PayPal display in frontend + +### Changed +- improve rendering of payment error popup + + +## 1.0.5 (2018-04-06) + +### Changed +- Logos and plugin name + + +## 1.0.4 (2018-03-27) + +### Changed +- documentation + + +## 1.0.3 (2018-03-26) + +### Added +- english documentation + +### Changed +- use current payone php api + + +## 1.0.2 (2018-03-21) + +### Changed +- use Scriptloader to include payone scripts in template + + +## 1.0.1 (2018-03-01) + +### Changed +- update plugin documentation + + +## 1.0.1 (2018-03-01) + +Plugin release supporting following payment methods: + +- invoice +- pre payment +- cash on delivery +- debit payment +- credit card +- credit card 3DS \ No newline at end of file diff --git a/meta/documents/changelog_en.md b/meta/documents/changelog_en.md index f37abed3..a39e3686 100644 --- a/meta/documents/changelog_en.md +++ b/meta/documents/changelog_en.md @@ -1 +1,90 @@ -The changelog will be maintained at [github](https://github.com/PAYONE-GmbH/plentymarkets-7/blob/master/CHANGELOG.md). \ No newline at end of file +# Release Notes BS Payone + +## 1.1.0 (2019-03-27) + +### Geändert +- Supportübernahme durch plentysystems +- Icons getauscht und Beschreibungen aktualisiert/ergänzt + + +## 1.0.9 (2018-04-10) + +### Changed +- user_guide alert Text + + +## 1.0.8 (2018-25-09) + +### Changed +- Support Tab information +- Changelog + + +## 1.0.7 (2018-20-09) + +### Updated +- config.json / new Pluginformat + +### Added +- Translations + +### Changed +- Userguide +- guzzle/httpguzzle Version in dependency for PayPal compatibility + + +## 1.0.6 (2018-05-15) + +### Added +- Sofort display in frontend +- Paydirekt display in frontend +- invoice secure display in frontend +- PayPal display in frontend + +### Changed +- improve rendering of payment error popup + + +## 1.0.5 (2018-04-06) + +### Changed +- Logos and plugin name + + +## 1.0.4 (2018-03-27) + +### Changed +- documentation + + +## 1.0.3 (2018-03-26) + +### Added +- english documentation + +### Changed +- use current payone php api + + +## 1.0.2 (2018-03-21) + +### Changed +- use Scriptloader to include payone scripts in template + + +## 1.0.1 (2018-03-01) + +### Changed +- update plugin documentation + + +## 1.0.1 (2018-03-01) + +Plugin release supporting following payment methods: + +- invoice +- pre payment +- cash on delivery +- debit payment +- credit card +- credit card 3DS \ No newline at end of file diff --git a/meta/documents/support_contact_de.md b/meta/documents/support_contact_de.md index 3d344521..638557f3 100644 --- a/meta/documents/support_contact_de.md +++ b/meta/documents/support_contact_de.md @@ -1,5 +1,3 @@ -## Support +## Webseite -Zwischen arvatis media und Payone besteht für dieses Plugin keine Support- und Wartungsvereinbarung. -Bitte wenden Sie sich bei Fragem oder Problemen direkt an [Payone](https://www.bspayone.com/DE/de/contact-germany), -über E-Mail [tech.support@bspayone.com](mailto:tech.support@bspayone.com) oder Telefon [+49 431 25968-500](tel:+49 431 25968-500). \ No newline at end of file +[https://www.plentymarkets.eu/](https://www.plentymarkets.eu/) \ No newline at end of file diff --git a/meta/documents/support_contact_en.md b/meta/documents/support_contact_en.md index 6f146ef0..00c81cc2 100644 --- a/meta/documents/support_contact_en.md +++ b/meta/documents/support_contact_en.md @@ -1,5 +1,3 @@ -## Support +## Web page -arvatis media and Payone have no Support- and Maintenancecontract. -Please contact [Payone](https://www.bspayone.com/DE/en/contact-germany) if you experience any Problems or have a Question. -Or contact Payone via E-Mail [tech.support@bspayone.com](mailto:tech.support@bspayone.com) or Phone: [+49 431 25968-500](tel:+49 431 25968-500). \ No newline at end of file +[https://www.plentymarkets.co.uk/](https://www.plentymarkets.co.uk/) \ No newline at end of file diff --git a/meta/images/icon_author_md.png b/meta/images/icon_author_md.png old mode 100644 new mode 100755 index 7c3277b780b5d8ec05fe097a45dc171b37493ad6..99a33d1145db783d33d40e55149f6ba8ae1f2e54 GIT binary patch literal 18603 zcmc$Ghd-6?|NnIk$KHDrI%JPfDGr@N9U*&UuaK1_^BCDPdlVsiQ^-2Dlr1ZJyh+O5 z>v#Kn|A=2bdhocr&V60i>w3-S>v^3p^(RW?BrGHV0CE*&^iu%f(64YnL;(HR^B6sW zeh`>HRzicztG`)I`SH*bVrOOjm(VB1ul~Ul`O`h1hlFk_st*Vk;KZb)_!m8q#sF{u z6|{nu$JEBm8`Edn_0n6b&rW$&ZTQ)_?yb62e0uR@xTeNHh$|b*H6O$kJ|C170N15D z+q+{duW+8RPvVKt5HZ*yp&(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RD@Dq3q^G*& zrD|3z)!7gF)C&@aoPC65Q$cnm8vZiW6eSJ#h;Iq=TR(2xLH#wP+!Xi@xy+e zI6GhNq*bMQZI3aX?yeo^&^^N7E0(kB#V@^GA=o)Wd z*wgS6B!ncCs&a?lu;V;>*mXX*xQO#giePN%z601td(PT%uV zr;S&p7qa%!Vy5?!xmH?B^+{uhMK$J~&~Q$XgX)Wl*fg(%9}Ukjtpr@8GMT$SZlN<` zZng1Px1B#t%%}c)y;(l1CwH8Y!^nKQX*F?HAfXim-i`<$0!mw?o&MRhq@D z(s&zge>ldbrV!hFA-w(wdpjc32ciTbF=Y+&H@AdLIY83VQUN@^rH!k~vMDc2>~6R- zLt|30!_Zy%E2S5KWtXskY2E`Q~+CjA#PvSB6mZiQp>YDI!rqa zU9gB$0C%iwp{lk^?utmIj!-nlmG3q3Nn=Rv44`Qul@ffxC>On3&*o+kD=$S$(2{an zxjqnO`to{1DsTjgN(J$D&(oLH^XA@w+$E7p9sY2P%c>d-Pn8iYBo)LDH@bJdkE`Bq zRNm)Gu&7jrSzOb}nAhuAv0t_vL@I^s?T9ezoqBFu*<^_qvm%vA#DM2^`WgJ{0e-i+ zO<4wkU}32a;|oT)XT6Vsix2RJFWN;ekxCu4oe}Q(sD*wn*YdNCt?ccH$Xykw)KDLY z^6;mv^j}=d#qT!o@7;dOoMDq}q+RdmXbhI^3$ScofNYz_g{4_s+&7EaeKHv!{ntgR z)1@;K;|*^oZ+PR`mVKNyrj}$LQH%Bz<@J)?MuS`4ynWzgQl^{|Hf=DHZ zRDwt)2qKk`3{pwiilAJoCK(1nwN%?>7zEW)ZI)pWR7+JY!yp(Tm6QSt3Z<&>GyzLx zCpK$t89g!;!m 'arvatis media GmbH', + 'vendor' => 'plentysystems AG', 'version' => 7, 'type' => 'Webshop', 'url' => $this->shopHelper->getPlentyDomain(), From d71e638e061e13dad0c5b073a5fcb46d283e29b7 Mon Sep 17 00:00:00 2001 From: Denise Breidenbach Date: Wed, 27 Mar 2019 17:34:53 +0100 Subject: [PATCH 002/353] ADD instructions in user guide DE --- meta/documents/user_guide_de.md | 183 ++++++++++++++++++++++++++++---- 1 file changed, 162 insertions(+), 21 deletions(-) diff --git a/meta/documents/user_guide_de.md b/meta/documents/user_guide_de.md index a67bd89f..9cace156 100644 --- a/meta/documents/user_guide_de.md +++ b/meta/documents/user_guide_de.md @@ -1,34 +1,175 @@ +

+ # BS PAYONE Payment für plentymarkets 7 -**Hinweis: Für den Alleinvertrieb, innerhalb Plentymarkets System, ist die PSG Projektmanagement GmbH zuständig. [Hier geht’s zum Anmeldeformular](https://www.psg-projektmanagement.de/bs-payone/)** +Das plentymarkets BS Payone Plugin bietet Ihnen Zugang zu internationalen und lokalen Zahlungsarten. Gleichzeitig haben Sie Zugriff auf ein integriertes Risikomanagement, automatisierte Gutschriften und schnelle Retourenabwicklung. -Payment mit BS PAYONE überzeugt +Aktuell beinhaltet das plentymarkets BS Payone Plugin die folgenden Zahlungsarten: -Eine Lösung, ein Partner, ein Vertrag: Einfach & effizient. Technische Abwicklung und Finanzdienstleistungen aus einer Hand. +* Rechnung +* Gesicherte Rechnung +* Paydirekt +* Payolution Ratenzahlung +* PayPal +* RatePay Ratenzahlung +* Sofortüberweisung +* Vorkasse +* Kreditkarte +* Nachnahme +* Lastschrift -* Internationale Zahlungsabwicklung: Zugang zu internationalen und lokalen Zahlungsarten on demand. +## Erste Schritte -* Integriertes Risikomanagement: Minimierung von Zahlungsausfällen und Betrug. Für mehr Profitabilität. +**Hinweis: Bevor Sie das Plugin nutzen, müssen Sie ein PAYONE Konto beantragen. [Hier geht es zum Anmeldeformular](https://www.psg-projektmanagement.de/bs-payone/).** -* Automatisches Debitorenmanagement: Effektive Entlastung der Buchhaltung durch Transaktionszuordnung und Kontenabgleich. +Zuerst aktivieren Sie die Zahlungsart einmalig im Menü **System » Systemeinstellungen » Aufträge » Zahlung » Zahlungsarten**. Weitere Informationen dazu finden Sie auf der Handbuchseite Zahlungsarten verwalten . -* Zahlungsartenübergreifende Gutschriften: Schnelles Retourenmanagement. Mit automatisierten Gutschriften. +Stellen Sie zudem sicher, dass die Zahlungsart unter dem Punkt **Erlaubte Zahlungsarten** in den Kundenklassen vorhanden ist und nicht im Bereich **Gesperrte Zahlungsarten** in den Versandprofilen aufgeführt ist. -* Beste Referenzen, langjährige Erfahrung: Ausgewiesene Experten. Persönlicher Kundenservice. Bei jedem E-Commerce-Projekt. +## Einrichtung des Plugins -## Aktuell unterstützte Zahlarten +Die folgenden Einrichtungsschritte für das plentymarkets Payone Plugins erfolgen direkt in der Plugin-Übersicht. Gehen Sie dazu wie im Folgenden beschrieben vor. -* Rechnung -* Vorkasse -* Nachnahme -* Lastschrift -* Kreditkarte -* Kreditkarte 3DS -* Gesicherte Rechnung -* PayPal -* Paydirekt -* Sofortüberweisung +### Grundeinstellungen vornehmen + +1. Öffnen Sie das Menü **Plugins » Plugin-Übersicht**. +2. Klicken Sie in der Liste der Plugins auf den Namen des Plugins **BS Payone**. +→ Die Detailansicht des Plugins öffnet sich. +3. Öffnen Sie den Menüpunkt **Konfiguration**. +4. Klicken Sie auf **Grundeinstellungen**. Nehmen Sie die Einstellungen anhand der Informationen in Tabelle 1 vor. +5. **Speichern** Sie die Einstellungen. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Tab. 1: Payone Plugin: Grundeinstellungen vornehmen
+ Einstellung + + Erläuterung +
+ Merchant-Id + + Geben Sie hier die Kundennummer ein, die Sie bei der Registrierung bei Payone erhalten haben. +
+ Portal-Id + + Geben Sie hier die ID des Zahlungsportals ein, die Sie bei der Registrierung bei Payone erhalten haben. +
+ Account-Id + + Geben Sie hier die Account-ID ein, die Sie bei der Registrierung bei Payone erhalten haben. +
+ Key + + Geben Sie hier den Schlüssel ein, den Sie bei der Registrierung bei Payone erhalten haben. +
+ Modus + + Wahlen Sie zwischen den Optionen Test und Live. Wir empfehlen, während der Einrichtung des Plugins den Testmodus zu wählen. Währenddessen ist die Zahlungsart noch nicht in Ihrem Webshop verfügbar. Nach erfolgter Einrichtung wechseln Sie in den Livemodus und machen somit die Zahlungsart in Ihrem Webshop sichtbar. +
+ Autorisierungsmethode + + Preautorisierung:: Wählen Sie diese Option, wenn Sie für Payone-Zahlungen manuell oder per Ereignisaktion den Zahlungseingang buchen wollen.
+ Autorisierung:: Wählen Sie diese Option, wenn der Zahlungseingang direkt nach dem Kaufabschluss im Webshop und der Überprüfung durch Payone in Ihrem plentymarkets System gebucht werden soll. +
+ +### Zahlungsarten einrichten + +Im Folgenden legen Sie fest, welche Payone-Zahlungsarten Ihren Kunden im Webshop zur Verfügung stehen sollen. Außerdem nehmen Sie für die festgelegten Zahlungsarten genauere Einstellungen vor. Gehen Sie dazu wie im Folgenden beschrieben vor. -## Installationsanleitung +1. Öffnen Sie den Menüpunkt **Konfiguration** in der Detailansicht des Plugins. +2. Klicken Sie auf den Menüpunkt der Zahlungsart. Nehmen Sie die Einstellungen anhand der Informationen in Tabelle 2 vor. +5. **Speichern** Sie die Einstellungen. -[Hinweise zur Installation und Einrichtung](https://github.com/PAYONE-GmbH/plentymarkets-7/blob/master/README.md) \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Tab. 2: Payone Plugin: Zahlungsarten einrichten
+ Einstellung + + Erläuterung +
+ Aktiv + + Erklärung ... +
+ Name + + Erklärung ... +
+ Beschreibung + + Erklärung ... +
+ Minimaler Bestellwert + + Erklärung... +
+ Maximaler Bestellwert + + Erklärung ... +
+ Erlaubte Länder + + Erklärung ... +
From 6aed620745a10fe801ba0ff78811b0a3de381427 Mon Sep 17 00:00:00 2001 From: Denise Breidenbach Date: Thu, 28 Mar 2019 11:31:16 +0100 Subject: [PATCH 003/353] UPDATE changelog wording and format and ADD translation --- meta/documents/changelog_de.md | 91 +++++++++++++++------------------- meta/documents/changelog_en.md | 83 ++++++++++++++----------------- 2 files changed, 78 insertions(+), 96 deletions(-) diff --git a/meta/documents/changelog_de.md b/meta/documents/changelog_de.md index a39e3686..3fd3860a 100644 --- a/meta/documents/changelog_de.md +++ b/meta/documents/changelog_de.md @@ -1,90 +1,81 @@ -# Release Notes BS Payone +# Release Notes für Payone ## 1.1.0 (2019-03-27) ### Geändert - Supportübernahme durch plentysystems -- Icons getauscht und Beschreibungen aktualisiert/ergänzt - +- Icons getauscht und Beschreibungen aktualisiert +- Updates an den User Guides in deutscher und englischer Sprache ## 1.0.9 (2018-04-10) -### Changed -- user_guide alert Text - +### Geändert +- Hinweistext im User Guide ergänzt ## 1.0.8 (2018-25-09) -### Changed -- Support Tab information -- Changelog - +### Geändert +- Informationen im Support-Tab aktualisiert +- Changelog aktualisiert ## 1.0.7 (2018-20-09) -### Updated -- config.json / new Pluginformat - -### Added -- Translations +### Geändert +- Aktualisierung der config.json Datei zur Bereitstellung des neuen Plugin-Formats -### Changed -- Userguide -- guzzle/httpguzzle Version in dependency for PayPal compatibility +### Hinzugefügt +- Übersetzungen hinzugefügt +### Geändert +- User Guide aktualisiert +- guzzle/httpguzzle Version hinzugefügt, um Kompatibilität mit PayPal zu erreichen ## 1.0.6 (2018-05-15) -### Added -- Sofort display in frontend -- Paydirekt display in frontend -- invoice secure display in frontend -- PayPal display in frontend - -### Changed -- improve rendering of payment error popup +### Hinzugefügt +- Die Zahlungsart Sofort wird jetzt im Frontend angezeigt +- Die Zahlungsart Paydirekt wird jetzt im Frontend angezeigt +- Die Zahlungsart Gesicherte Rechnung wird jetzt im Frontend angezeigt +- Die Zahlungsart PayPal wird jetzt im Frontend angezeigt +### Geändert +- Verbesserte Darstellung der Popup-Meldung bei fehlerhaften Zahlungen ## 1.0.5 (2018-04-06) -### Changed -- Logos and plugin name - +### Geändert +- Logos und Name des Plugins aktualisiert ## 1.0.4 (2018-03-27) -### Changed -- documentation - +### Geändert +- Dokumentation aktualisiert ## 1.0.3 (2018-03-26) -### Added -- english documentation - -### Changed -- use current payone php api +### Hinzugefügt +- Dokumentation in englischer Sprache hinzugefügt +### Geändert +- Die aktuelle Payone PHP API wird nun genutzt ## 1.0.2 (2018-03-21) -### Changed -- use Scriptloader to include payone scripts in template - +### Geändert +- Scriptloader wird nun genutzt, um Payone Skripte in Templates einzubinden ## 1.0.1 (2018-03-01) -### Changed -- update plugin documentation - +### Geändert +- Plugin-Dokumentation aktualisiert ## 1.0.1 (2018-03-01) -Plugin release supporting following payment methods: +Veröffentlichung des Plugins inklusive Unterstützung der folgenden Zahlungsarten: -- invoice -- pre payment -- cash on delivery -- debit payment -- credit card -- credit card 3DS \ No newline at end of file +- Rechnung +- Vorkasse +- Nachnahme +- Lastschrift +- Kreditkarte +- Kreditkarte 3DS diff --git a/meta/documents/changelog_en.md b/meta/documents/changelog_en.md index a39e3686..fba38170 100644 --- a/meta/documents/changelog_en.md +++ b/meta/documents/changelog_en.md @@ -1,90 +1,81 @@ -# Release Notes BS Payone +# Release Notes for Payone ## 1.1.0 (2019-03-27) -### Geändert -- Supportübernahme durch plentysystems -- Icons getauscht und Beschreibungen aktualisiert/ergänzt - +### Changed +- Support is now within the responsibility of plentysystems +- Added new icons and customised descriptions +- Updated German and English user guides ## 1.0.9 (2018-04-10) -### Changed -- user_guide alert Text - +### Changed +- Added alert text to user guide ## 1.0.8 (2018-25-09) -### Changed -- Support Tab information -- Changelog - +### Changed +- Updated information in the support tab +- Updated changelog ## 1.0.7 (2018-20-09) -### Updated -- config.json / new Pluginformat - -### Added -- Translations +### Updated +- Updated the config.json file to implement new plugin format -### Changed -- Userguide -- guzzle/httpguzzle Version in dependency for PayPal compatibility +### Added +- Added translations +### Changed +- Updated user guide +- Implemented guzzle/httpguzzle version in dependency for PayPal compatibility ## 1.0.6 (2018-05-15) ### Added -- Sofort display in frontend -- Paydirekt display in frontend -- invoice secure display in frontend -- PayPal display in frontend +- Sofort is now displayed in the front end +- Paydirekt is now displayed in the front end +- Secure invoice is now displayed in the front end +- PayPal is now displayed in the front end ### Changed -- improve rendering of payment error popup - +- Improved rendering of payment error message ## 1.0.5 (2018-04-06) -### Changed -- Logos and plugin name - +### Changed +- Updated logos and plugin name ## 1.0.4 (2018-03-27) -### Changed -- documentation - +### Changed +- Updated documentation ## 1.0.3 (2018-03-26) ### Added -- english documentation +- Added English documentation ### Changed -- use current payone php api - +- The current Payone PHP API is now used ## 1.0.2 (2018-03-21) ### Changed -- use Scriptloader to include payone scripts in template - +- Scriptloader is now used to include Payone scripts in templates ## 1.0.1 (2018-03-01) ### Changed -- update plugin documentation - +- Update plugin documentation ## 1.0.1 (2018-03-01) -Plugin release supporting following payment methods: +Plugin release supporting the following payment methods: -- invoice -- pre payment -- cash on delivery -- debit payment -- credit card -- credit card 3DS \ No newline at end of file +- Invoice +- Prepayment +- Cash on delivery +- Debit payment +- Credit card +- Credit card 3DS From ed3bc5acc096e323322a17270c8d2d4034cb0f74 Mon Sep 17 00:00:00 2001 From: Denise Breidenbach Date: Thu, 28 Mar 2019 11:36:11 +0100 Subject: [PATCH 004/353] remove line --- meta/documents/changelog_de.md | 1 - meta/documents/changelog_en.md | 1 - 2 files changed, 2 deletions(-) diff --git a/meta/documents/changelog_de.md b/meta/documents/changelog_de.md index 3fd3860a..789a35d4 100644 --- a/meta/documents/changelog_de.md +++ b/meta/documents/changelog_de.md @@ -70,7 +70,6 @@ - Plugin-Dokumentation aktualisiert ## 1.0.1 (2018-03-01) - Veröffentlichung des Plugins inklusive Unterstützung der folgenden Zahlungsarten: - Rechnung diff --git a/meta/documents/changelog_en.md b/meta/documents/changelog_en.md index fba38170..1715f05d 100644 --- a/meta/documents/changelog_en.md +++ b/meta/documents/changelog_en.md @@ -70,7 +70,6 @@ - Update plugin documentation ## 1.0.1 (2018-03-01) - Plugin release supporting the following payment methods: - Invoice From 00bac493b9a9854d781f4fe4e342aece6c32ab16 Mon Sep 17 00:00:00 2001 From: Denise Breidenbach Date: Thu, 28 Mar 2019 11:48:01 +0100 Subject: [PATCH 005/353] FIX labels DE + EN --- resources/lang/de/Config.properties | 32 ++++---- resources/lang/en/Config.properties | 118 ++++++++++++++-------------- 2 files changed, 75 insertions(+), 75 deletions(-) diff --git a/resources/lang/de/Config.properties b/resources/lang/de/Config.properties index a33425d0..47c7b1d1 100644 --- a/resources/lang/de/Config.properties +++ b/resources/lang/de/Config.properties @@ -1,8 +1,8 @@ GrundeinstellungenTab=Grundeinstellungen -midLabel=Merchant-Id -portalidLabel=Portal-Id -aidLabel=Account-Id -keyLabel=Key +midLabel=Merchant ID +portalidLabel=Portal ID +aidLabel=Account ID +keyLabel=Schlüssel modeLabel=Modus modePossibleValue0=Test modePossibleValue1=Live @@ -17,7 +17,7 @@ PAYONEPAYONEINVOICENameLabel=Name PAYONEPAYONEINVOICEDescriptionLabel=Beschreibung PAYONEPAYONEINVOICEMinCartAmountLabel=Minimaler Bestellwert PAYONEPAYONEINVOICEMaxCartAmountLabel=Maximaler Bestellwert -PAYONEPAYONEINVOICEAllowedCountriesLabel=Erlaubte Länder +PAYONEPAYONEINVOICEAllowedCountriesLabel=Erlaubte Lieferländer GesicherteRechnungTab=Gesicherte Rechnung PAYONEPAYONEINVOICESECUREActiveLabel=Aktiv PAYONEPAYONEINVOICESECUREActivePossibleValue0=Nein @@ -26,7 +26,7 @@ PAYONEPAYONEINVOICESECURENameLabel=Name PAYONEPAYONEINVOICESECUREDescriptionLabel=Beschreibung PAYONEPAYONEINVOICESECUREMinCartAmountLabel=Minimaler Bestellwert PAYONEPAYONEINVOICESECUREMaxCartAmountLabel=Maximaler Bestellwert -PAYONEPAYONEINVOICESECUREAllowedCountriesLabel=Erlaubte Länder +PAYONEPAYONEINVOICESECUREAllowedCountriesLabel=Erlaubte Lieferländer PaydirektTab=Paydirekt PAYONEPAYONEPAYDIREKTActiveLabel=Aktiv PAYONEPAYONEPAYDIREKTActivePossibleValue0=Nein @@ -35,7 +35,7 @@ PAYONEPAYONEPAYDIREKTNameLabel=Name PAYONEPAYONEPAYDIREKTDescriptionLabel=Beschreibung PAYONEPAYONEPAYDIREKTMinCartAmountLabel=Minimaler Bestellwert PAYONEPAYONEPAYDIREKTMaxCartAmountLabel=Maximaler Bestellwert -PAYONEPAYONEPAYDIREKTAllowedCountriesLabel=Erlaubte Länder +PAYONEPAYONEPAYDIREKTAllowedCountriesLabel=Erlaubte Lieferländer PayolutionRatenzahlungTab=Payolution Ratenzahlung PAYONEPAYONEPAYOLUTIONINSTALLMENTActiveLabel=Aktiv PAYONEPAYONEPAYOLUTIONINSTALLMENTActivePossibleValue0=Nein @@ -43,7 +43,7 @@ PAYONEPAYONEPAYOLUTIONINSTALLMENTNameLabel=Name PAYONEPAYONEPAYOLUTIONINSTALLMENTDescriptionLabel=Beschreibung PAYONEPAYONEPAYOLUTIONINSTALLMENTMinCartAmountLabel=Minimaler Bestellwert PAYONEPAYONEPAYOLUTIONINSTALLMENTMaxCartAmountLabel=Maximaler Bestellwert -PAYONEPAYONEPAYOLUTIONINSTALLMENTAllowedCountriesLabel=Erlaubte Länder +PAYONEPAYONEPAYOLUTIONINSTALLMENTAllowedCountriesLabel=Erlaubte Lieferländer PayPalTab=PayPal PAYONEPAYONEPAYPALActiveLabel=Aktiv PAYONEPAYONEPAYPALActivePossibleValue0=Nein @@ -52,7 +52,7 @@ PAYONEPAYONEPAYPALNameLabel=Name PAYONEPAYONEPAYPALDescriptionLabel=Beschreibung PAYONEPAYONEPAYPALMinCartAmountLabel=Minimaler Bestellwert PAYONEPAYONEPAYPALMaxCartAmountLabel=Maximaler Bestellwert -PAYONEPAYONEPAYPALAllowedCountriesLabel=Erlaubte Länder +PAYONEPAYONEPAYPALAllowedCountriesLabel=Erlaubte Lieferländer RatePayRatenzahlungTab=RatePay Ratenzahlung PAYONEPAYONERATEPAYINSTALLMENTActiveLabel=Aktiv PAYONEPAYONERATEPAYINSTALLMENTActivePossibleValue0=Nein @@ -60,7 +60,7 @@ PAYONEPAYONERATEPAYINSTALLMENTNameLabel=Name PAYONEPAYONERATEPAYINSTALLMENTDescriptionLabel=Beschreibung PAYONEPAYONERATEPAYINSTALLMENTMinCartAmountLabel=Minimaler Bestellwert PAYONEPAYONERATEPAYINSTALLMENTMaxCartAmountLabel=Maximaler Bestellwert -PAYONEPAYONERATEPAYINSTALLMENTAllowedCountriesLabel=Erlaubte Länder +PAYONEPAYONERATEPAYINSTALLMENTAllowedCountriesLabel=Erlaubte Lieferländer SofortberweisungTab=Sofortüberweisung PAYONEPAYONESOFORTActiveLabel=Aktiv PAYONEPAYONESOFORTActivePossibleValue0=Nein @@ -69,7 +69,7 @@ PAYONEPAYONESOFORTNameLabel=Name PAYONEPAYONESOFORTDescriptionLabel=Beschreibung PAYONEPAYONESOFORTMinCartAmountLabel=Minimaler Bestellwert PAYONEPAYONESOFORTMaxCartAmountLabel=Maximaler Bestellwert -PAYONEPAYONESOFORTAllowedCountriesLabel=Erlaubte Länder +PAYONEPAYONESOFORTAllowedCountriesLabel=Erlaubte Lieferländer VorkasseTab=Vorkasse PAYONEPAYONEPREPAYMENTActiveLabel=Aktiv PAYONEPAYONEPREPAYMENTActivePossibleValue0=Nein @@ -78,7 +78,7 @@ PAYONEPAYONEPREPAYMENTNameLabel=Name PAYONEPAYONEPREPAYMENTDescriptionLabel=Beschreibung PAYONEPAYONEPREPAYMENTMinCartAmountLabel=Minimaler Bestellwert PAYONEPAYONEPREPAYMENTMaxCartAmountLabel=Maximaler Bestellwert -PAYONEPAYONEPREPAYMENTAllowedCountriesLabel=Erlaubte Länder +PAYONEPAYONEPREPAYMENTAllowedCountriesLabel=Erlaubte Lieferländer KreditkarteTab=Kreditkarte PAYONEPAYONECREDITCARDActiveLabel=Aktiv PAYONEPAYONECREDITCARDActivePossibleValue0=Nein @@ -91,7 +91,7 @@ PAYONEPAYONECREDITCARDMinExpireTimeLabel=Minmiale Kartengültigkeit in Tagen PAYONEPAYONECREDITCARDDefaultStyleLabel=Kreditkartenfelder default style PAYONEPAYONECREDITCARDDefaultHeightInPxLabel=Kreditkartenfelder Höhe in px PAYONEPAYONECREDITCARDDefaultWidthInPxLabel=Kreditkartenfelder Breite in px -PAYONEPAYONECREDITCARDAllowedCountriesLabel=Erlaubte Länder +PAYONEPAYONECREDITCARDAllowedCountriesLabel=Erlaubte Lieferländer PAYONEPAYONECREDITCARDAllowedCardTypesLabel=Erlaubte Kartentypen PAYONEPAYONECREDITCARDAllowedCardTypesPossibleValuePAYONEPAYONECREDITCARDAllowedCardTypesV=Visa PAYONEPAYONECREDITCARDAllowedCardTypesPossibleValuePAYONEPAYONECREDITCARDAllowedCardTypesM=Mastercard @@ -111,7 +111,7 @@ PAYONEPAYONECASHONDELIVERYNameLabel=Name PAYONEPAYONECASHONDELIVERYDescriptionLabel=Beschreibung PAYONEPAYONECASHONDELIVERYMinCartAmountLabel=Minimaler Bestellwert PAYONEPAYONECASHONDELIVERYMaxCartAmountLabel=Maximaler Bestellwert -PAYONEPAYONECASHONDELIVERYAllowedCountriesLabel=Erlaubte Länder +PAYONEPAYONECASHONDELIVERYAllowedCountriesLabel=Erlaubte Lieferländer LastschriftTab=Lastschrift PAYONEPAYONEDIRECTDEBITActiveLabel=Aktiv PAYONEPAYONEDIRECTDEBITActivePossibleValue0=Nein @@ -120,7 +120,7 @@ PAYONEPAYONEDIRECTDEBITNameLabel=Name PAYONEPAYONEDIRECTDEBITDescriptionLabel=Beschreibung PAYONEPAYONEDIRECTDEBITMinCartAmountLabel=Minimaler Bestellwert PAYONEPAYONEDIRECTDEBITMaxCartAmountLabel=Maximaler Bestellwert -PAYONEPAYONEDIRECTDEBITAllowedCountriesLabel=Erlaubte Länder +PAYONEPAYONEDIRECTDEBITAllowedCountriesLabel=Erlaubte Lieferländer DebuggingTab=Debugging debuggingActiveLabel=Aktiv debuggingActivePossibleValue0=Nein @@ -130,4 +130,4 @@ get = "get" set = "set" prepend = "prepend" push = "push" -getPrefix = "getPrefix" \ No newline at end of file +getPrefix = "getPrefix" diff --git a/resources/lang/en/Config.properties b/resources/lang/en/Config.properties index de89d5d5..a743fd7c 100644 --- a/resources/lang/en/Config.properties +++ b/resources/lang/en/Config.properties @@ -1,98 +1,98 @@ GrundeinstellungenTab=Basesettings -midLabel=Merchant-Id -portalidLabel=Portal-Id -aidLabel=Account-Id +midLabel=Merchant ID +portalidLabel=Portal ID +aidLabel=Account ID keyLabel=Key -modeLabel=Modus +modeLabel=Mode modePossibleValue0=Test modePossibleValue1=Live -authTypeLabel=authorization method +authTypeLabel=Authorization method authTypePossibleValue0=Preauthorization -authTypePossibleValue1=authorization +authTypePossibleValue1=Authorization RechnungTab=Invoice -PAYONEPAYONEINVOICEActiveLabel=Activ +PAYONEPAYONEINVOICEActiveLabel=Active PAYONEPAYONEINVOICEActivePossibleValue0=No PAYONEPAYONEINVOICEActivePossibleValue1=Yes PAYONEPAYONEINVOICENameLabel=Name PAYONEPAYONEINVOICEDescriptionLabel=Description -PAYONEPAYONEINVOICEMinCartAmountLabel=Min Order amount -PAYONEPAYONEINVOICEMaxCartAmountLabel=Max Order amount -PAYONEPAYONEINVOICEAllowedCountriesLabel=allowed Countries +PAYONEPAYONEINVOICEMinCartAmountLabel=Minimum order value +PAYONEPAYONEINVOICEMaxCartAmountLabel=Maximum order value +PAYONEPAYONEINVOICEAllowedCountriesLabel=Allowed countries of delivery GesicherteRechnungTab=Secured invoice -PAYONEPAYONEINVOICESECUREActiveLabel=Activ +PAYONEPAYONEINVOICESECUREActiveLabel=Active PAYONEPAYONEINVOICESECUREActivePossibleValue0=No PAYONEPAYONEINVOICESECUREActivePossibleValue1=Yes PAYONEPAYONEINVOICESECURENameLabel=Name PAYONEPAYONEINVOICESECUREDescriptionLabel=Description -PAYONEPAYONEINVOICESECUREMinCartAmountLabel=Min Order amount -PAYONEPAYONEINVOICESECUREMaxCartAmountLabel=Max Order amount -PAYONEPAYONEINVOICESECUREAllowedCountriesLabel=allowed Countries +PAYONEPAYONEINVOICESECUREMinCartAmountLabel=Minimum order value +PAYONEPAYONEINVOICESECUREMaxCartAmountLabel=Maximum order value +PAYONEPAYONEINVOICESECUREAllowedCountriesLabel=Allowed countries of delivery PaydirektTab=Paydirect -PAYONEPAYONEPAYDIREKTActiveLabel=Activ +PAYONEPAYONEPAYDIREKTActiveLabel=Active PAYONEPAYONEPAYDIREKTActivePossibleValue0=No PAYONEPAYONEPAYDIREKTActivePossibleValue1=Yes PAYONEPAYONEPAYDIREKTNameLabel=Name PAYONEPAYONEPAYDIREKTDescriptionLabel=Description -PAYONEPAYONEPAYDIREKTMinCartAmountLabel=Min Order amount -PAYONEPAYONEPAYDIREKTMaxCartAmountLabel=Max Order amount -PAYONEPAYONEPAYDIREKTAllowedCountriesLabel=allowed Countries +PAYONEPAYONEPAYDIREKTMinCartAmountLabel=Minimum order value +PAYONEPAYONEPAYDIREKTMaxCartAmountLabel=Maximum order value +PAYONEPAYONEPAYDIREKTAllowedCountriesLabel=Allowed countries of delivery PayolutionRatenzahlungTab=Payolution payment by installments -PAYONEPAYONEPAYOLUTIONINSTALLMENTActiveLabel=Activ +PAYONEPAYONEPAYOLUTIONINSTALLMENTActiveLabel=Active PAYONEPAYONEPAYOLUTIONINSTALLMENTActivePossibleValue0=No PAYONEPAYONEPAYOLUTIONINSTALLMENTNameLabel=Name PAYONEPAYONEPAYOLUTIONINSTALLMENTDescriptionLabel=Description -PAYONEPAYONEPAYOLUTIONINSTALLMENTMinCartAmountLabel=Min Order amount -PAYONEPAYONEPAYOLUTIONINSTALLMENTMaxCartAmountLabel=Max Order amount -PAYONEPAYONEPAYOLUTIONINSTALLMENTAllowedCountriesLabel=allowed Countries +PAYONEPAYONEPAYOLUTIONINSTALLMENTMinCartAmountLabel=Minimum order value +PAYONEPAYONEPAYOLUTIONINSTALLMENTMaxCartAmountLabel=Maximum order value +PAYONEPAYONEPAYOLUTIONINSTALLMENTAllowedCountriesLabel=Allowed countries of delivery PayPalTab=PayPal -PAYONEPAYONEPAYPALActiveLabel=Activ +PAYONEPAYONEPAYPALActiveLabel=Active PAYONEPAYONEPAYPALActivePossibleValue0=No PAYONEPAYONEPAYPALActivePossibleValue1=Yes PAYONEPAYONEPAYPALNameLabel=Name PAYONEPAYONEPAYPALDescriptionLabel=Description -PAYONEPAYONEPAYPALMinCartAmountLabel=Min Order amount -PAYONEPAYONEPAYPALMaxCartAmountLabel=Max Order amount -PAYONEPAYONEPAYPALAllowedCountriesLabel=allowed Countries +PAYONEPAYONEPAYPALMinCartAmountLabel=Minimum order value +PAYONEPAYONEPAYPALMaxCartAmountLabel=Maximum order value +PAYONEPAYONEPAYPALAllowedCountriesLabel=Allowed countries of delivery RatePayRatenzahlungTab=RatePay payment by installments -PAYONEPAYONERATEPAYINSTALLMENTActiveLabel=Activ +PAYONEPAYONERATEPAYINSTALLMENTActiveLabel=Active PAYONEPAYONERATEPAYINSTALLMENTActivePossibleValue0=No PAYONEPAYONERATEPAYINSTALLMENTNameLabel=Name PAYONEPAYONERATEPAYINSTALLMENTDescriptionLabel=Description -PAYONEPAYONERATEPAYINSTALLMENTMinCartAmountLabel=Min Order amount -PAYONEPAYONERATEPAYINSTALLMENTMaxCartAmountLabel=Max Order amount -PAYONEPAYONERATEPAYINSTALLMENTAllowedCountriesLabel=allowed Countries +PAYONEPAYONERATEPAYINSTALLMENTMinCartAmountLabel=Minimum order value +PAYONEPAYONERATEPAYINSTALLMENTMaxCartAmountLabel=Maximum order value +PAYONEPAYONERATEPAYINSTALLMENTAllowedCountriesLabel=Allowed countries of delivery SofortberweisungTab=Sofortüberweisung -PAYONEPAYONESOFORTActiveLabel=Activ +PAYONEPAYONESOFORTActiveLabel=Active PAYONEPAYONESOFORTActivePossibleValue0=No PAYONEPAYONESOFORTActivePossibleValue1=Yes PAYONEPAYONESOFORTNameLabel=Name PAYONEPAYONESOFORTDescriptionLabel=Description -PAYONEPAYONESOFORTMinCartAmountLabel=Min Order amount -PAYONEPAYONESOFORTMaxCartAmountLabel=Max Order amount -PAYONEPAYONESOFORTAllowedCountriesLabel=allowed Countries -VorkasseTab=Payment in advance -PAYONEPAYONEPREPAYMENTActiveLabel=Activ +PAYONEPAYONESOFORTMinCartAmountLabel=Minimum order value +PAYONEPAYONESOFORTMaxCartAmountLabel=Maximum order value +PAYONEPAYONESOFORTAllowedCountriesLabel=Allowed countries of delivery +VorkasseTab=Cash in advance +PAYONEPAYONEPREPAYMENTActiveLabel=Active PAYONEPAYONEPREPAYMENTActivePossibleValue0=No PAYONEPAYONEPREPAYMENTActivePossibleValue1=Yes PAYONEPAYONEPREPAYMENTNameLabel=Name PAYONEPAYONEPREPAYMENTDescriptionLabel=Description -PAYONEPAYONEPREPAYMENTMinCartAmountLabel=Min Order amount -PAYONEPAYONEPREPAYMENTMaxCartAmountLabel=Max Order amount -PAYONEPAYONEPREPAYMENTAllowedCountriesLabel=allowed Countries -KreditkarteTab=Creditcard -PAYONEPAYONECREDITCARDActiveLabel=Activ +PAYONEPAYONEPREPAYMENTMinCartAmountLabel=Minimum order value +PAYONEPAYONEPREPAYMENTMaxCartAmountLabel=Maximum order value +PAYONEPAYONEPREPAYMENTAllowedCountriesLabel=Allowed countries of delivery +KreditkarteTab=Credit card +PAYONEPAYONECREDITCARDActiveLabel=Active PAYONEPAYONECREDITCARDActivePossibleValue0=No PAYONEPAYONECREDITCARDActivePossibleValue1=Yes PAYONEPAYONECREDITCARDNameLabel=Name PAYONEPAYONECREDITCARDDescriptionLabel=Description -PAYONEPAYONECREDITCARDMinCartAmountLabel=Min Order amount -PAYONEPAYONECREDITCARDMaxCartAmountLabel=Max Order amount -PAYONEPAYONECREDITCARDMinExpireTimeLabel=Minmiale card validity in days -PAYONEPAYONECREDITCARDDefaultStyleLabel=Creditcard Fields default style -PAYONEPAYONECREDITCARDDefaultHeightInPxLabel=Creditcard Fields height in px -PAYONEPAYONECREDITCARDDefaultWidthInPxLabel=Creditcard Fields width in px -PAYONEPAYONECREDITCARDAllowedCountriesLabel=allowed Countries -PAYONEPAYONECREDITCARDAllowedCardTypesLabel=Erlaubte Kartentypen +PAYONEPAYONECREDITCARDMinCartAmountLabel=Minimum order amount +PAYONEPAYONECREDITCARDMaxCartAmountLabel=Maximum order amount +PAYONEPAYONECREDITCARDMinExpireTimeLabel=Minimum card validity in days +PAYONEPAYONECREDITCARDDefaultStyleLabel=Credit card fields default style +PAYONEPAYONECREDITCARDDefaultHeightInPxLabel=Credit card fields height in px +PAYONEPAYONECREDITCARDDefaultWidthInPxLabel=Credit card fields width in px +PAYONEPAYONECREDITCARDAllowedCountriesLabel=Allowed countries of delivery +PAYONEPAYONECREDITCARDAllowedCardTypesLabel=Allowed card types PAYONEPAYONECREDITCARDAllowedCardTypesPossibleValuePAYONEPAYONECREDITCARDAllowedCardTypesV=Visa PAYONEPAYONECREDITCARDAllowedCardTypesPossibleValuePAYONEPAYONECREDITCARDAllowedCardTypesM=Mastercard PAYONEPAYONECREDITCARDAllowedCardTypesPossibleValuePAYONEPAYONECREDITCARDAllowedCardTypesA=Amex @@ -104,25 +104,25 @@ PAYONEPAYONECREDITCARDAllowedCardTypesPossibleValuePAYONEPAYONECREDITCARDAllowed PAYONEPAYONECREDITCARDAllowedCardTypesPossibleValuePAYONEPAYONECREDITCARDAllowedCardTypesJ=JCB PAYONEPAYONECREDITCARDAllowedCardTypesPossibleValuePAYONEPAYONECREDITCARDAllowedCardTypesP=China Union Pay NachnahmeTab=Cash on delivery -PAYONEPAYONECASHONDELIVERYActiveLabel=Activ +PAYONEPAYONECASHONDELIVERYActiveLabel=Active PAYONEPAYONECASHONDELIVERYActivePossibleValue0=No PAYONEPAYONECASHONDELIVERYActivePossibleValue1=Yes PAYONEPAYONECASHONDELIVERYNameLabel=Name PAYONEPAYONECASHONDELIVERYDescriptionLabel=Description -PAYONEPAYONECASHONDELIVERYMinCartAmountLabel=Min Order amount -PAYONEPAYONECASHONDELIVERYMaxCartAmountLabel=Max Order amount -PAYONEPAYONECASHONDELIVERYAllowedCountriesLabel=allowed Countries +PAYONEPAYONECASHONDELIVERYMinCartAmountLabel=Minimum order value +PAYONEPAYONECASHONDELIVERYMaxCartAmountLabel=Maximum order value +PAYONEPAYONECASHONDELIVERYAllowedCountriesLabel=Allowed countries of delivery LastschriftTab=Debit -PAYONEPAYONEDIRECTDEBITActiveLabel=Activ +PAYONEPAYONEDIRECTDEBITActiveLabel=Active PAYONEPAYONEDIRECTDEBITActivePossibleValue0=No PAYONEPAYONEDIRECTDEBITActivePossibleValue1=Yes PAYONEPAYONEDIRECTDEBITNameLabel=Name PAYONEPAYONEDIRECTDEBITDescriptionLabel=Description -PAYONEPAYONEDIRECTDEBITMinCartAmountLabel=Min Order amount -PAYONEPAYONEDIRECTDEBITMaxCartAmountLabel=Max Order amount -PAYONEPAYONEDIRECTDEBITAllowedCountriesLabel=allowed Countries +PAYONEPAYONEDIRECTDEBITMinCartAmountLabel=Minimum order value +PAYONEPAYONEDIRECTDEBITMaxCartAmountLabel=Maximum order value +PAYONEPAYONEDIRECTDEBITAllowedCountriesLabel=Allowed countries of delivery DebuggingTab=Debugging -debuggingActiveLabel=Activ +debuggingActiveLabel=Active debuggingActivePossibleValue0=No debuggingActivePossibleValue1=Yes has = "has" @@ -130,4 +130,4 @@ get = "get" set = "set" prepend = "prepend" push = "push" -getPrefix = "getPrefix" \ No newline at end of file +getPrefix = "getPrefix" From ebf6c443483e403513f702b16dd6385da6815a83 Mon Sep 17 00:00:00 2001 From: Denise Breidenbach Date: Thu, 28 Mar 2019 11:59:02 +0100 Subject: [PATCH 006/353] update user guide DE --- meta/documents/user_guide_de.md | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/meta/documents/user_guide_de.md b/meta/documents/user_guide_de.md index 9cace156..ef86c877 100644 --- a/meta/documents/user_guide_de.md +++ b/meta/documents/user_guide_de.md @@ -42,7 +42,7 @@ Die folgenden Einrichtungsschritte für das plentymarkets Payone Plugins erfolge 5. **Speichern** Sie die Einstellungen. - + @@ -108,6 +108,9 @@ Die folgenden Einrichtungsschritte für das plentymarkets Payone Plugins erfolge Im Folgenden legen Sie fest, welche Payone-Zahlungsarten Ihren Kunden im Webshop zur Verfügung stehen sollen. Außerdem nehmen Sie für die festgelegten Zahlungsarten genauere Einstellungen vor. Gehen Sie dazu wie im Folgenden beschrieben vor. + +##### Zahlungsarten einrichten: + 1. Öffnen Sie den Menüpunkt **Konfiguration** in der Detailansicht des Plugins. 2. Klicken Sie auf den Menüpunkt der Zahlungsart. Nehmen Sie die Einstellungen anhand der Informationen in Tabelle 2 vor. 5. **Speichern** Sie die Einstellungen. @@ -174,4 +177,154 @@ Im Folgenden legen Sie fest, welche Payone-Zahlungsarten Ihren Kunden im Webshop
Tab. 1: Payone Plugin: Grundeinstellungen vornehmenTab. 1: Grundeinstellungen vornehmen
Einstellung @@ -54,7 +54,7 @@ Die folgenden Einrichtungsschritte für das plentymarkets Payone Plugins erfolge
- Merchant-Id + Merchant ID Geben Sie hier die Kundennummer ein, die Sie bei der Registrierung bei Payone erhalten haben. @@ -62,7 +62,7 @@ Die folgenden Einrichtungsschritte für das plentymarkets Payone Plugins erfolge
- Portal-Id + Portal ID Geben Sie hier die ID des Zahlungsportals ein, die Sie bei der Registrierung bei Payone erhalten haben. @@ -70,7 +70,7 @@ Die folgenden Einrichtungsschritte für das plentymarkets Payone Plugins erfolge
- Account-Id + Account ID Geben Sie hier die Account-ID ein, die Sie bei der Registrierung bei Payone erhalten haben. @@ -78,7 +78,7 @@ Die folgenden Einrichtungsschritte für das plentymarkets Payone Plugins erfolge
- Key + Schlüssel Geben Sie hier den Schlüssel ein, den Sie bei der Registrierung bei Payone erhalten haben. @@ -113,7 +113,7 @@ Im Folgenden legen Sie fest, welche Payone-Zahlungsarten Ihren Kunden im Webshop 5. **Speichern** Sie die Einstellungen. - + @@ -136,7 +136,7 @@ Im Folgenden legen Sie fest, welche Payone-Zahlungsarten Ihren Kunden im Webshop Name @@ -144,7 +144,7 @@ Im Folgenden legen Sie fest, welche Payone-Zahlungsarten Ihren Kunden im Webshop Beschreibung @@ -152,7 +152,7 @@ Im Folgenden legen Sie fest, welche Payone-Zahlungsarten Ihren Kunden im Webshop Minimaler Bestellwert @@ -160,16 +160,18 @@ Im Folgenden legen Sie fest, welche Payone-Zahlungsarten Ihren Kunden im Webshop Maximaler Bestellwert
Tab. 2: Payone Plugin: Zahlungsarten einrichtenTab. 2: Zahlungsarten einrichten
Einstellung @@ -128,7 +128,7 @@ Im Folgenden legen Sie fest, welche Payone-Zahlungsarten Ihren Kunden im Webshop Aktiv - Erklärung ... + Wählen Sie die Option Ja, um die Zahlungsart zu aktivieren und somit im Webshop anzubieten.
Wählen Sie die Option Nein, wenn die Zahlungsart deaktiviert werden und damit nicht zur Verfügung stehen soll.
- Erklärung ... + Geben Sie einen Namen für die Zahlungsart ein. Dieser Name ist für Ihre Kunden im Webshop sichtbar.
- Erklärung ... + Geben Sie einen Beschreibungstext für die Zahlungsart ein. Dieser Text ist für Ihre Kunden im Webshop sichtbar.
- Erklärung... + Geben Sie einen minimalen Bestellwert ein, ab dem die Zahlungsart im Webshop verfügbar sein soll.
- Erklärung ... + Geben Sie einen maximalen Bestellwert ein, bis zu dem die Zahlungsart im Webshop verfügbar sein soll. Wird dieser Wert überschritten, ist die Zahlungsart nicht mehr verfügbar.
- Erlaubte Länder + Erlaubte Lieferländer - Erklärung ... + Geben Sie kommasepariert die Lieferländer aus, für die die Zahlungsart verfügbar sein soll.
+ +Für die Zahlungsart **Kreditkarte** können Sie zusätzliche Einstellungen vornehmen. Diese Einstellungen werden in Tabelle 3 beschrieben. From 2a229ca5f4ddc8ab8ea51796ae191d6ff20fd5e2 Mon Sep 17 00:00:00 2001 From: Denise Breidenbach Date: Thu, 28 Mar 2019 14:28:06 +0100 Subject: [PATCH 007/353] CHANGE labels --- resources/lang/de/Config.properties | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/lang/de/Config.properties b/resources/lang/de/Config.properties index 47c7b1d1..b3e977a1 100644 --- a/resources/lang/de/Config.properties +++ b/resources/lang/de/Config.properties @@ -6,9 +6,9 @@ keyLabel=Schlüssel modeLabel=Modus modePossibleValue0=Test modePossibleValue1=Live -authTypeLabel=Autorisierungsmethode -authTypePossibleValue0=Preautorisierung -authTypePossibleValue1=Autorisierung +authTypeLabel=Art des Zahlungseinzugs +authTypePossibleValue0=manuell/Ereignisaktion +authTypePossibleValue1=direkt nach der Autorisierung RechnungTab=Rechnung PAYONEPAYONEINVOICEActiveLabel=Aktiv PAYONEPAYONEINVOICEActivePossibleValue0=Nein From 2d874b8843f3143928223c899829564cebf27777 Mon Sep 17 00:00:00 2001 From: Denise Breidenbach Date: Thu, 28 Mar 2019 14:57:11 +0100 Subject: [PATCH 008/353] CHANGE naming for event procedure --- src/Providers/PayoneServiceProvider.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Providers/PayoneServiceProvider.php b/src/Providers/PayoneServiceProvider.php index 00a07a7f..aaac9657 100644 --- a/src/Providers/PayoneServiceProvider.php +++ b/src/Providers/PayoneServiceProvider.php @@ -112,8 +112,8 @@ public function boot( ); $captureProcedureTitle = [ - 'de' => PluginConstants::NAME . ' | Bestellung erfassen', - 'en' => PluginConstants::NAME . ' | Capture order', + 'de' => PluginConstants::NAME . ' | Zahlungseingang buchen', + 'en' => PluginConstants::NAME . ' | Book incoming payment', ]; $eventProceduresService->registerProcedure( PluginConstants::NAME, @@ -123,7 +123,7 @@ public function boot( ); $refundProcedureTitle = [ - 'de' => PluginConstants::NAME . ' | Gutschrift erstellen', + 'de' => PluginConstants::NAME . ' | Rückerstattung senden', 'en' => PluginConstants::NAME . ' | Refund order', ]; $eventProceduresService->registerProcedure( From 1740ebc6a50be79b09985a080504fbe494ceb9b2 Mon Sep 17 00:00:00 2001 From: Denise Breidenbach Date: Thu, 28 Mar 2019 15:52:52 +0100 Subject: [PATCH 009/353] CHANGE labels EN --- resources/lang/de/Config.properties | 4 ++-- resources/lang/en/Config.properties | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/resources/lang/de/Config.properties b/resources/lang/de/Config.properties index b3e977a1..f154e204 100644 --- a/resources/lang/de/Config.properties +++ b/resources/lang/de/Config.properties @@ -7,8 +7,8 @@ modeLabel=Modus modePossibleValue0=Test modePossibleValue1=Live authTypeLabel=Art des Zahlungseinzugs -authTypePossibleValue0=manuell/Ereignisaktion -authTypePossibleValue1=direkt nach der Autorisierung +authTypePossibleValue0=Manuell/Ereignisaktion +authTypePossibleValue1=Direkt nach der Autorisierung RechnungTab=Rechnung PAYONEPAYONEINVOICEActiveLabel=Aktiv PAYONEPAYONEINVOICEActivePossibleValue0=Nein diff --git a/resources/lang/en/Config.properties b/resources/lang/en/Config.properties index a743fd7c..cad800dc 100644 --- a/resources/lang/en/Config.properties +++ b/resources/lang/en/Config.properties @@ -6,9 +6,9 @@ keyLabel=Key modeLabel=Mode modePossibleValue0=Test modePossibleValue1=Live -authTypeLabel=Authorization method -authTypePossibleValue0=Preauthorization -authTypePossibleValue1=Authorization +authTypeLabel=Method for payment registration +authTypePossibleValue0=Manually/Event procedure +authTypePossibleValue1=Directly after authorisation RechnungTab=Invoice PAYONEPAYONEINVOICEActiveLabel=Active PAYONEPAYONEINVOICEActivePossibleValue0=No From f42cb600b8d53bab9083fa9888c79ad28ab4cca7 Mon Sep 17 00:00:00 2001 From: Denise Breidenbach Date: Thu, 28 Mar 2019 18:11:22 +0100 Subject: [PATCH 010/353] FIX label ADD user guide EN --- meta/documents/user_guide_de.md | 175 +++++++++++++- meta/documents/user_guide_en.md | 340 ++++++++++++++++++++++++++-- resources/lang/en/Config.properties | 6 +- 3 files changed, 484 insertions(+), 37 deletions(-) diff --git a/meta/documents/user_guide_de.md b/meta/documents/user_guide_de.md index ef86c877..fb803def 100644 --- a/meta/documents/user_guide_de.md +++ b/meta/documents/user_guide_de.md @@ -1,12 +1,12 @@ -# BS PAYONE Payment für plentymarkets 7 +# PAYONE Payment für plentymarkets 7 -Das plentymarkets BS Payone Plugin bietet Ihnen Zugang zu internationalen und lokalen Zahlungsarten. Gleichzeitig haben Sie Zugriff auf ein integriertes Risikomanagement, automatisierte Gutschriften und schnelle Retourenabwicklung. +Das plentymarkets Payone Plugin bietet Ihnen Zugang zu internationalen und lokalen Zahlungsarten. Gleichzeitig haben Sie Zugriff auf ein integriertes Risikomanagement, automatisierte Gutschriften und schnelle Retourenabwicklung. -Aktuell beinhaltet das plentymarkets BS Payone Plugin die folgenden Zahlungsarten: +Aktuell beinhaltet das Plugin die folgenden Zahlungsarten: * Rechnung * Gesicherte Rechnung @@ -24,15 +24,15 @@ Aktuell beinhaltet das plentymarkets BS Payone Plugin die folgenden Zahlungsarte **Hinweis: Bevor Sie das Plugin nutzen, müssen Sie ein PAYONE Konto beantragen. [Hier geht es zum Anmeldeformular](https://www.psg-projektmanagement.de/bs-payone/).** -Zuerst aktivieren Sie die Zahlungsart einmalig im Menü **System » Systemeinstellungen » Aufträge » Zahlung » Zahlungsarten**. Weitere Informationen dazu finden Sie auf der Handbuchseite Zahlungsarten verwalten . +Aktivieren Sie die gewünschten Payone-Zahlungsarten einmalig im Menü **System » Systemeinstellungen » Aufträge » Zahlung » Zahlungsarten**. Weitere Informationen dazu finden Sie auf der Handbuchseite Zahlungsarten verwalten . Stellen Sie zudem sicher, dass die Zahlungsart unter dem Punkt **Erlaubte Zahlungsarten** in den Kundenklassen vorhanden ist und nicht im Bereich **Gesperrte Zahlungsarten** in den Versandprofilen aufgeführt ist. ## Einrichtung des Plugins -Die folgenden Einrichtungsschritte für das plentymarkets Payone Plugins erfolgen direkt in der Plugin-Übersicht. Gehen Sie dazu wie im Folgenden beschrieben vor. +Die folgenden Einrichtungsschritte für das plentymarkets Payone Plugins erfolgen direkt in der Plugin-Übersicht Ihres plentymarkets Systems. Gehen Sie dazu wie im Folgenden beschrieben vor. -### Grundeinstellungen vornehmen +##### Grundeinstellungen vornehmen 1. Öffnen Sie das Menü **Plugins » Plugin-Übersicht**. 2. Klicken Sie in der Liste der Plugins auf den Namen des Plugins **BS Payone**. @@ -94,11 +94,11 @@ Die folgenden Einrichtungsschritte für das plentymarkets Payone Plugins erfolge
- Autorisierungsmethode + Art des Zahlungseinzugs - Preautorisierung:: Wählen Sie diese Option, wenn Sie für Payone-Zahlungen manuell oder per Ereignisaktion den Zahlungseingang buchen wollen.
- Autorisierung:: Wählen Sie diese Option, wenn der Zahlungseingang direkt nach dem Kaufabschluss im Webshop und der Überprüfung durch Payone in Ihrem plentymarkets System gebucht werden soll. + Wählen Sie, wann und auf welche Weise Aufträge mit der Zahlungsart Payone in Ihrem plentymarkets System als bezahlt markiert werden sollen.
Manuell/Ereignisaktion: Wählen Sie diese Option, wenn Sie für Payone-Zahlungen manuell oder per Ereignisaktion den Zahlungseingang buchen wollen.
+ Direkt nach der Autorisierung:: Wählen Sie diese Option, wenn der Zahlungseingang direkt nach dem Kaufabschluss im Webshop und der anschließenden Autorisierung durch Payone in Ihrem plentymarkets System gebucht werden soll.
-Für die Zahlungsart **Kreditkarte** können Sie zusätzliche Einstellungen vornehmen. Diese Einstellungen werden in Tabelle 3 beschrieben. +**Hinweis**: Die Zahlungsart **Kreditkarte** stellt einen Sonderfall dar. Für diese Zahlungsart sind zusätzliche Einstellungen notwendig. Diese Einstellungen werden in Tabelle 3 beschrieben. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Tab. 3: Zahlungsart Kreditkarte einrichten
+ Einstellung + + Erläuterung +
+ Minimale Kartengültigkeit in Tagen + + Geben Sie die erforderliche minimale Kartengültigkeit an, über die eine Kreditkarte verfügen muss, um für die Zahlungsart akzeptiert zu werden. +
+ Kreditkartenfelder Default Style + + Standardmäßig ist hier voreingestellt, in welcher Farbe, Schriftgröße und Schriftart die Eingabefelder für die Kreditkartendaten für Kunden im Webshop angezeigt werden. Die Werte sind editierbar. +
+ Kreditkartenfelder Höhe in px + + Standardmäßig ist hier die Höhe der Eingabefelder in px voreingestellt. Der Wert ist editierbar. +
+ Kreditkartenfelder Breite in px + + Standardmäßig ist hier die Breite der Eingabefelder in px voreingestellt. Der Wert ist editierbar. +
+ Erlaubte Kartentypen + + Aktivieren Sie die Kartentypen, die für die Zahlungsart akzeptiert werden sollen. +
+ +## Template-Container verknüpfen + +Für die Zahlungsart Payone stehen Ihnen verschiedene Möglichkeiten zur Verfügung, um sie in Ihrem Webshop einzubinden. +Hierfür sind in den Templates in plentymarkets an relevanten Stellen Container hinterlegt, mit denen zur Individualisierung Contents verknüpft werden. + +##### Container verknüpfen: + +1. Öffnen Sie das Menü **CMS » Container-Verknüpfungen**. +2. Wählen Sie den gewünschten Content, der verknüpft werden soll. +3. Wählen Sie einen oder mehrere Container, in denen der zuvor gewählte Content dargestellt werden soll. Beachten Sie dazu die Erläuterungen in Tabelle 4. +4. **Speichern** Sie die Einstellungen.
→ Die Contents sind mit den Containern verknüpft. + + + + + + + + + + + + + + + + + +
Tab. 4: Container verknüpfen
+ Content + + Erläuterung +
+ Payone Order Confirmation Page Payment Data + + Verknüpfen Sie diesen Content mit dem Container **Script loader: After script loaded**, um +
+ Payone Checkout JS + + Verknüpfen Sie diesen Content mit dem Container **Script loader: After script loaded**, um +
+ +## Payone-Zahlung automatisch zurückzahlen + +Richten Sie eine Ereignisaktion ein, um die Rückzahlung einer Zahlung über Payone zu automatisieren. + +##### Ereignisaktion einrichten: + +1. Öffnen Sie das Menü **System » Aufträge » Ereignisaktionen**. +2. Klicken Sie auf **Ereignisaktion hinzufügen**.
+→ Das Fenster **Neue Ereignisaktion erstellen** wird geöffnet. +3. Geben Sie einen Namen ein. +4. Wählen Sie das Ereignis gemäß Tabelle 5. +5. **Speichern** Sie die Einstellungen.
+→ Die Ereignisaktion wird angelegt. +6. Nehmen Sie die weiteren Einstellungen gemäß Tabelle 5 vor. +7. Setzen Sie ein Häkchen bei **Aktiv**. +8. **Speichern** Sie die Einstellungen.
+→ Die Ereignisaktion wird gespeichert. + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Tab. 5: Ereignisaktion zur automatischen Rückzahlung der Payone-Zahlung +
+ Einstellung + + Option + + Auswahl +
EreignisDas Ereignis wählen, nach dem eine Rückzahlung erfolgen soll.
Filter 1Auftrag > ZahlungsartPlugin: PAYONE +
AktionPlugin > Payone | Rückerstattung senden
diff --git a/meta/documents/user_guide_en.md b/meta/documents/user_guide_en.md index cf13377e..0ec08128 100644 --- a/meta/documents/user_guide_en.md +++ b/meta/documents/user_guide_en.md @@ -1,35 +1,329 @@ -# BS PAYONE Payment for plentymarkets 7 + -**Hinweis: The Distribution in Plentymarkets system is controlled by PSG Projektmanagement GmbH. [Click here for Registration](https://www.psg-projektmanagement.de/bs-payone/)** +# PAYONE Payment for plentymarkets 7 -Payment with BS PAYONE convinces +The plentymarkets Payone plugin offers you access to international as well as local payment methods. In addition, the plugin offers the advantages of an integrated risk management system, automated refunds and swift processing of returns. -One solution, one partner, one contract: simple & efficient. Technical handling and financial services from a single -source. +The plugin currently offers the following payment methods: -* International payment processing: access to international and local payment methods on demand. +* Invoice +* Secure invoice +* Paydirekt +* Payolution Payment in installments +* PayPal +* RatePay Payment in installments +* Sofortüberweisung +* Cash in advance +* Credit card +* Cash on Delivery +* Debit -* Integrated risk management: minimizing defaults and fraud. For more profitability. +## First steps -* Automatic Debtor Management: Effectively relieving the bookkeeping through transaction assignment and account reconciliation. +**Note: Before using the plugin, you have to register for a PAYONE account. [Click here to access the registration form](https://www.psg-projektmanagement.de/bs-payone/).** -* Multi-payment refunds: Fast returns management. With automated refunds. +First of all, activate the payment method once in the **System » System Settings » Orders » Payment » Methods** menu. More information on carrying out this setting is available on the Managing payment methods page of the manual. -* Best references, many years of experience: proven experts. Personal customer service. For every e-commerce project. +In addition, make sure that the payment method is included among the Permitted payment methods in the customer classes and that it is not listed among the Blocked payment methods in the shipping profiles. -## Currently supported payment methods +## Setting up the plugin -* invoice -* pre payment -* cash on delivery -* debit payment -* credit card -* credit card 3DS -* invoice secure -* PayPal -* Paydirekt -* Sofortüberweisung +The following steps for setting up the plentymarkets Payone plugin are carried out in the plugin overview of your plentymarkets system. Proceed as described below to set up the plugin. + +##### Carrying out the basic settings + +1. Go to **Plugin » Plugin overview**. +2. In the plugin list, click on the name of the plugin **BS Payone**. +→ The detail view of the plugin opens. +3. Open the menu entry **Configuration**. +4. Click on **Basic settings**. Carry out the settings according to the information provided in table 1. +5. **Save** the settings. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Tab. 1: Carrying out the basic settings
+ Setting + + Explanation +
+ Merchant ID + + Enter the customer number as received after the registration process with Payone. +
+ Portal ID + + Enter the payment portal ID as received after the registration process with Payone. +
+ Account ID + + Enter the account ID as received after the registration process with Payone. +
+ Key + + Enter the key as received after the registration process with Payone. +
+ Mode + + Select one of the options Test and Live. We recommend using the test mode while setting up the plugin. The test mode ensures that the payment method is not available in your online store during the setup process. After completing the setup of the plugin, select the live mode so that the payment method becomes visible in your online store. +
+ Method for payment registration + + Select when and how orders with the payment method Payone are marked as paid in your plentymarkets system.
Manually/Event procedure: Select this option if you wish to manually book incoming payment or to set up an event procedure booking incoming payment.
+ Directly after authorisation:: Select this option if incoming payment should be booked directly after completion of the checkout process in the online store and successful authorisation by Payone. +
+ +### Setting up payment methods + +In the following, you select the Payone payment methods that should be available for your customers in the online store. In addition, you carry out more detailed settings for the selected payment methods. Proceed as described below. + + +##### Setting up payment methods: + +1. Open the menu entry **Configuration** in the detail view of the plugin. +2. Click on the menu entry of the payment method. Carry out the settings according to the information provided in table 2. +5. **Save** the settings. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Tab. 2: Setting up payment methods
+ Setting + + Explanation +
+ Active + + Select the option Yes to activate the payment method and thus offer it in the online store.
Select the option No if the payment method should be deactivated and thus not be available. +
+ Name + + Enter a name for the payment method. This name is visible for your customers in the online store. +
+ Description + + Enter a description for the payment method. This text is visible for your customers in the online store. +
+ Minimum order value + + Enter a minimum order value for which the payment method should be available in the online store. +
+ Maximum order value + + Enter a maximum order value for which the payment method should be available in the online store. The payment method is not available for orders exceeding this value. +
+ Allowed countries of delivery + + Enter the countries of delivery (separated by a comma) for which the payment method should be available. +
+ +**Note:** The payment method Die Zahlungsart **Credit card** requires particular attention. Additional settings are necessary for this payment method. The settings are described in table 3. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Tab. 3: Setting up the payment method Credit card
+ Setting + + Explanation +
+ Minimum card validity in days + + Enter the required minimum card validity in days that a credit card must have to be accepted for the payment method. +
+ Credit card fields default style + + Default settings are saved for the colour, font size and font used for the data fields into which customers enter their credit card data in the online store. The values are editable. +
+ Credit card fields height in px + + The height of the data fields in px is set by default. The value is editable. +
+ Credit card fields width in px + + The width of the data fields in px is set by default. The value is editable. +
+ Allowed card types + + Activate the card types that should be accepted for the payment method. +
+ +## Linking template containers + +You have multiple options to integrate the payment method Payone into your online store. For this purpose, the plentymarkets system offers containers at relevant places which can be filled with content to meet your needs. + +##### Linking template containers: + +1. Go to **CMS » Container links**. +2. Select the content that should be linked. +3. Select one or more containers in which the previously selected content should be displayed. Pay attention to the information provided in table 4. +4. **Save** the settings.
→ The content is linked to the containers + + + + + + + + + + + + + + + + + +
Tab. 4: Linking template containers
+ Content + + Explanation +
+ Payone Order Confirmation Page Payment Data + + Link this content to the container Script loader: After script loaded to +
+ Payone Checkout JS + + Linkt his content to the container Script loader: After script loaded to +
+ +## Automatically refunding Payone payments + +Set up an event procedure to automatically refund a Payone payment. + +##### Setting up an event procedure: -## Installation guide +1. Go to **System » Orders » Events**. +2. Click on **Add event procedure**. +→ The **Create new event procedure** window opens. +3. Enter a name. +4. Select the event according to table 5. +5. **Save** the settings. +→ The event procedure is created. +6. Carry out the further settings according to table 5. +7. Place a check mark next to the option **Active**. +8. **Save** the settings. +→ The event procedure is saved. -[Information for installation and setup](https://github.com/PAYONE-GmbH/plentymarkets-7/blob/master/README.md) \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Tab. 5: Event procedure for automatically refunding Payone payments +
+ Setting + + Option + + Selection +
EventSelect the event to trigger a refund.
Filter 1Order > Payment methodPlugin: PAYONE +
ProcedurePlugins > Payone | Refund order
diff --git a/resources/lang/en/Config.properties b/resources/lang/en/Config.properties index cad800dc..ffe3f93d 100644 --- a/resources/lang/en/Config.properties +++ b/resources/lang/en/Config.properties @@ -27,7 +27,7 @@ PAYONEPAYONEINVOICESECUREDescriptionLabel=Description PAYONEPAYONEINVOICESECUREMinCartAmountLabel=Minimum order value PAYONEPAYONEINVOICESECUREMaxCartAmountLabel=Maximum order value PAYONEPAYONEINVOICESECUREAllowedCountriesLabel=Allowed countries of delivery -PaydirektTab=Paydirect +PaydirektTab=Paydirekt PAYONEPAYONEPAYDIREKTActiveLabel=Active PAYONEPAYONEPAYDIREKTActivePossibleValue0=No PAYONEPAYONEPAYDIREKTActivePossibleValue1=Yes @@ -36,7 +36,7 @@ PAYONEPAYONEPAYDIREKTDescriptionLabel=Description PAYONEPAYONEPAYDIREKTMinCartAmountLabel=Minimum order value PAYONEPAYONEPAYDIREKTMaxCartAmountLabel=Maximum order value PAYONEPAYONEPAYDIREKTAllowedCountriesLabel=Allowed countries of delivery -PayolutionRatenzahlungTab=Payolution payment by installments +PayolutionRatenzahlungTab=Payolution payment in installments PAYONEPAYONEPAYOLUTIONINSTALLMENTActiveLabel=Active PAYONEPAYONEPAYOLUTIONINSTALLMENTActivePossibleValue0=No PAYONEPAYONEPAYOLUTIONINSTALLMENTNameLabel=Name @@ -53,7 +53,7 @@ PAYONEPAYONEPAYPALDescriptionLabel=Description PAYONEPAYONEPAYPALMinCartAmountLabel=Minimum order value PAYONEPAYONEPAYPALMaxCartAmountLabel=Maximum order value PAYONEPAYONEPAYPALAllowedCountriesLabel=Allowed countries of delivery -RatePayRatenzahlungTab=RatePay payment by installments +RatePayRatenzahlungTab=RatePay payment in installments PAYONEPAYONERATEPAYINSTALLMENTActiveLabel=Active PAYONEPAYONERATEPAYINSTALLMENTActivePossibleValue0=No PAYONEPAYONERATEPAYINSTALLMENTNameLabel=Name From e233b807aa6c1d75b01651e377bd60c6d7a6f19a Mon Sep 17 00:00:00 2001 From: Denise Breidenbach Date: Fri, 29 Mar 2019 11:43:46 +0100 Subject: [PATCH 011/353] change payone to BS PAYONE --- meta/documents/user_guide_de.md | 38 ++++++++++++++++----------------- meta/documents/user_guide_en.md | 32 +++++++++++++-------------- 2 files changed, 35 insertions(+), 35 deletions(-) diff --git a/meta/documents/user_guide_de.md b/meta/documents/user_guide_de.md index fb803def..ebe0e8eb 100644 --- a/meta/documents/user_guide_de.md +++ b/meta/documents/user_guide_de.md @@ -1,10 +1,10 @@ -# PAYONE Payment für plentymarkets 7 +# BS PAYONE Payment für plentymarkets 7 -Das plentymarkets Payone Plugin bietet Ihnen Zugang zu internationalen und lokalen Zahlungsarten. Gleichzeitig haben Sie Zugriff auf ein integriertes Risikomanagement, automatisierte Gutschriften und schnelle Retourenabwicklung. +Das plentymarkets BS PAYONE Plugin bietet Ihnen Zugang zu internationalen und lokalen Zahlungsarten. Gleichzeitig haben Sie Zugriff auf ein integriertes Risikomanagement, automatisierte Gutschriften und schnelle Retourenabwicklung. Aktuell beinhaltet das Plugin die folgenden Zahlungsarten: @@ -22,20 +22,20 @@ Aktuell beinhaltet das Plugin die folgenden Zahlungsarten: ## Erste Schritte -**Hinweis: Bevor Sie das Plugin nutzen, müssen Sie ein PAYONE Konto beantragen. [Hier geht es zum Anmeldeformular](https://www.psg-projektmanagement.de/bs-payone/).** +**Hinweis: Bevor Sie das Plugin nutzen, müssen Sie ein BS PAYONE Konto beantragen. [Hier geht es zum Anmeldeformular](https://www.psg-projektmanagement.de/bs-payone/).** -Aktivieren Sie die gewünschten Payone-Zahlungsarten einmalig im Menü **System » Systemeinstellungen » Aufträge » Zahlung » Zahlungsarten**. Weitere Informationen dazu finden Sie auf der Handbuchseite Zahlungsarten verwalten . +Aktivieren Sie die gewünschten BS PAYONE-Zahlungsarten einmalig im Menü **System » Systemeinstellungen » Aufträge » Zahlung » Zahlungsarten**. Weitere Informationen dazu finden Sie auf der Handbuchseite Zahlungsarten verwalten . Stellen Sie zudem sicher, dass die Zahlungsart unter dem Punkt **Erlaubte Zahlungsarten** in den Kundenklassen vorhanden ist und nicht im Bereich **Gesperrte Zahlungsarten** in den Versandprofilen aufgeführt ist. ## Einrichtung des Plugins -Die folgenden Einrichtungsschritte für das plentymarkets Payone Plugins erfolgen direkt in der Plugin-Übersicht Ihres plentymarkets Systems. Gehen Sie dazu wie im Folgenden beschrieben vor. +Die folgenden Einrichtungsschritte für das plentymarkets BS PAYONE Plugins erfolgen direkt in der Plugin-Übersicht Ihres plentymarkets Systems. Gehen Sie dazu wie im Folgenden beschrieben vor. ##### Grundeinstellungen vornehmen 1. Öffnen Sie das Menü **Plugins » Plugin-Übersicht**. -2. Klicken Sie in der Liste der Plugins auf den Namen des Plugins **BS Payone**. +2. Klicken Sie in der Liste der Plugins auf den Namen des Plugins **BS BS PAYONE**. → Die Detailansicht des Plugins öffnet sich. 3. Öffnen Sie den Menüpunkt **Konfiguration**. 4. Klicken Sie auf **Grundeinstellungen**. Nehmen Sie die Einstellungen anhand der Informationen in Tabelle 1 vor. @@ -57,7 +57,7 @@ Die folgenden Einrichtungsschritte für das plentymarkets Payone Plugins erfolge Merchant ID - Geben Sie hier die Kundennummer ein, die Sie bei der Registrierung bei Payone erhalten haben. + Geben Sie hier die Kundennummer ein, die Sie bei der Registrierung bei BS PAYONE erhalten haben. @@ -65,7 +65,7 @@ Die folgenden Einrichtungsschritte für das plentymarkets Payone Plugins erfolge Portal ID - Geben Sie hier die ID des Zahlungsportals ein, die Sie bei der Registrierung bei Payone erhalten haben. + Geben Sie hier die ID des Zahlungsportals ein, die Sie bei der Registrierung bei BS PAYONE erhalten haben. @@ -73,7 +73,7 @@ Die folgenden Einrichtungsschritte für das plentymarkets Payone Plugins erfolge Account ID - Geben Sie hier die Account-ID ein, die Sie bei der Registrierung bei Payone erhalten haben. + Geben Sie hier die Account-ID ein, die Sie bei der Registrierung bei BS PAYONE erhalten haben. @@ -81,7 +81,7 @@ Die folgenden Einrichtungsschritte für das plentymarkets Payone Plugins erfolge Schlüssel - Geben Sie hier den Schlüssel ein, den Sie bei der Registrierung bei Payone erhalten haben. + Geben Sie hier den Schlüssel ein, den Sie bei der Registrierung bei BS PAYONE erhalten haben. @@ -97,8 +97,8 @@ Die folgenden Einrichtungsschritte für das plentymarkets Payone Plugins erfolge Art des Zahlungseinzugs - Wählen Sie, wann und auf welche Weise Aufträge mit der Zahlungsart Payone in Ihrem plentymarkets System als bezahlt markiert werden sollen.
Manuell/Ereignisaktion: Wählen Sie diese Option, wenn Sie für Payone-Zahlungen manuell oder per Ereignisaktion den Zahlungseingang buchen wollen.
- Direkt nach der Autorisierung:: Wählen Sie diese Option, wenn der Zahlungseingang direkt nach dem Kaufabschluss im Webshop und der anschließenden Autorisierung durch Payone in Ihrem plentymarkets System gebucht werden soll. + Wählen Sie, wann und auf welche Weise Aufträge mit der Zahlungsart BS PAYONE in Ihrem plentymarkets System als bezahlt markiert werden sollen.
Manuell/Ereignisaktion: Wählen Sie diese Option, wenn Sie für BS PAYONE-Zahlungen manuell oder per Ereignisaktion den Zahlungseingang buchen wollen.
+ Direkt nach der Autorisierung:: Wählen Sie diese Option, wenn der Zahlungseingang direkt nach dem Kaufabschluss im Webshop und der anschließenden Autorisierung durch BS PAYONE in Ihrem plentymarkets System gebucht werden soll. @@ -106,7 +106,7 @@ Die folgenden Einrichtungsschritte für das plentymarkets Payone Plugins erfolge ### Zahlungsarten einrichten -Im Folgenden legen Sie fest, welche Payone-Zahlungsarten Ihren Kunden im Webshop zur Verfügung stehen sollen. Außerdem nehmen Sie für die festgelegten Zahlungsarten genauere Einstellungen vor. Gehen Sie dazu wie im Folgenden beschrieben vor. +Im Folgenden legen Sie fest, welche BS PAYONE-Zahlungsarten Ihren Kunden im Webshop zur Verfügung stehen sollen. Außerdem nehmen Sie für die festgelegten Zahlungsarten genauere Einstellungen vor. Gehen Sie dazu wie im Folgenden beschrieben vor. ##### Zahlungsarten einrichten: @@ -235,7 +235,7 @@ Im Folgenden legen Sie fest, welche Payone-Zahlungsarten Ihren Kunden im Webshop ## Template-Container verknüpfen -Für die Zahlungsart Payone stehen Ihnen verschiedene Möglichkeiten zur Verfügung, um sie in Ihrem Webshop einzubinden. +Für die Zahlungsart BS PAYONE stehen Ihnen verschiedene Möglichkeiten zur Verfügung, um sie in Ihrem Webshop einzubinden. Hierfür sind in den Templates in plentymarkets an relevanten Stellen Container hinterlegt, mit denen zur Individualisierung Contents verknüpft werden. ##### Container verknüpfen: @@ -275,9 +275,9 @@ Hierfür sind in den Templates in plentymarkets an relevanten Stellen Container -## Payone-Zahlung automatisch zurückzahlen +## BS PAYONE-Zahlung automatisch zurückzahlen -Richten Sie eine Ereignisaktion ein, um die Rückzahlung einer Zahlung über Payone zu automatisieren. +Richten Sie eine Ereignisaktion ein, um die Rückzahlung einer Zahlung über BS PAYONE zu automatisieren. ##### Ereignisaktion einrichten: @@ -295,7 +295,7 @@ Richten Sie eine Ereignisaktion ein, um die Rückzahlung einer Zahlung über Pay @@ -323,7 +323,7 @@ Richten Sie eine Ereignisaktion ein, um die Rückzahlung einer Zahlung über Pay - + diff --git a/meta/documents/user_guide_en.md b/meta/documents/user_guide_en.md index 0ec08128..288d4a8e 100644 --- a/meta/documents/user_guide_en.md +++ b/meta/documents/user_guide_en.md @@ -1,10 +1,10 @@ # PAYONE Payment for plentymarkets 7 -The plentymarkets Payone plugin offers you access to international as well as local payment methods. In addition, the plugin offers the advantages of an integrated risk management system, automated refunds and swift processing of returns. +The plentymarkets BS PAYONE plugin offers you access to international as well as local payment methods. In addition, the plugin offers the advantages of an integrated risk management system, automated refunds and swift processing of returns. The plugin currently offers the following payment methods: @@ -22,7 +22,7 @@ The plugin currently offers the following payment methods: ## First steps -**Note: Before using the plugin, you have to register for a PAYONE account. [Click here to access the registration form](https://www.psg-projektmanagement.de/bs-payone/).** +**Note: Before using the plugin, you have to register for a BS PAYONE account. [Click here to access the registration form](https://www.psg-projektmanagement.de/bs-payone/).** First of all, activate the payment method once in the **System » System Settings » Orders » Payment » Methods** menu. More information on carrying out this setting is available on the Managing payment methods page of the manual. @@ -30,12 +30,12 @@ In addition, make sure that the payment method is included among the Permitted p ## Setting up the plugin -The following steps for setting up the plentymarkets Payone plugin are carried out in the plugin overview of your plentymarkets system. Proceed as described below to set up the plugin. +The following steps for setting up the plentymarkets BS PAYONE plugin are carried out in the plugin overview of your plentymarkets system. Proceed as described below to set up the plugin. ##### Carrying out the basic settings 1. Go to **Plugin » Plugin overview**. -2. In the plugin list, click on the name of the plugin **BS Payone**. +2. In the plugin list, click on the name of the plugin **BS BS PAYONE**. → The detail view of the plugin opens. 3. Open the menu entry **Configuration**. 4. Click on **Basic settings**. Carry out the settings according to the information provided in table 1. @@ -57,7 +57,7 @@ The following steps for setting up the plentymarkets Payone plugin are carried o Merchant ID @@ -65,7 +65,7 @@ The following steps for setting up the plentymarkets Payone plugin are carried o Portal ID @@ -73,7 +73,7 @@ The following steps for setting up the plentymarkets Payone plugin are carried o Account ID @@ -81,7 +81,7 @@ The following steps for setting up the plentymarkets Payone plugin are carried o Key @@ -97,8 +97,8 @@ The following steps for setting up the plentymarkets Payone plugin are carried o Method for payment registration @@ -106,7 +106,7 @@ The following steps for setting up the plentymarkets Payone plugin are carried o ### Setting up payment methods -In the following, you select the Payone payment methods that should be available for your customers in the online store. In addition, you carry out more detailed settings for the selected payment methods. Proceed as described below. +In the following, you select the BS PAYONE payment methods that should be available for your customers in the online store. In addition, you carry out more detailed settings for the selected payment methods. Proceed as described below. ##### Setting up payment methods: @@ -235,7 +235,7 @@ In the following, you select the Payone payment methods that should be available ## Linking template containers -You have multiple options to integrate the payment method Payone into your online store. For this purpose, the plentymarkets system offers containers at relevant places which can be filled with content to meet your needs. +You have multiple options to integrate the payment method BS PAYONE into your online store. For this purpose, the plentymarkets system offers containers at relevant places which can be filled with content to meet your needs. ##### Linking template containers: @@ -274,9 +274,9 @@ You have multiple options to integrate the payment method Payone into your onlin
- Tab. 5: Ereignisaktion zur automatischen Rückzahlung der Payone-Zahlung + Tab. 5: Ereignisaktion zur automatischen Rückzahlung der BS PAYONE-Zahlung
AktionPlugin > Payone | Rückerstattung sendenPlugin > BS PAYONE | Rückerstattung senden
- Enter the customer number as received after the registration process with Payone. + Enter the customer number as received after the registration process with BS PAYONE.
- Enter the payment portal ID as received after the registration process with Payone. + Enter the payment portal ID as received after the registration process with BS PAYONE.
- Enter the account ID as received after the registration process with Payone. + Enter the account ID as received after the registration process with BS PAYONE.
- Enter the key as received after the registration process with Payone. + Enter the key as received after the registration process with BS PAYONE.
- Select when and how orders with the payment method Payone are marked as paid in your plentymarkets system.
Manually/Event procedure: Select this option if you wish to manually book incoming payment or to set up an event procedure booking incoming payment.
- Directly after authorisation:: Select this option if incoming payment should be booked directly after completion of the checkout process in the online store and successful authorisation by Payone. + Select when and how orders with the payment method BS PAYONE are marked as paid in your plentymarkets system.
Manually/Event procedure: Select this option if you wish to manually book incoming payment or to set up an event procedure booking incoming payment.
+ Directly after authorisation:: Select this option if incoming payment should be booked directly after completion of the checkout process in the online store and successful authorisation by BS PAYONE.
-## Automatically refunding Payone payments +## Automatically refunding BS PAYONE payments -Set up an event procedure to automatically refund a Payone payment. +Set up an event procedure to automatically refund a BS PAYONE payment. ##### Setting up an event procedure: @@ -294,7 +294,7 @@ Set up an event procedure to automatically refund a Payone payment. From 70d393d438c722e525799b96da82b428b27a2a5e Mon Sep 17 00:00:00 2001 From: Denise Breidenbach Date: Fri, 29 Mar 2019 13:19:36 +0100 Subject: [PATCH 012/353] ADD info on container links --- meta/documents/user_guide_de.md | 4 ++-- meta/documents/user_guide_en.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/meta/documents/user_guide_de.md b/meta/documents/user_guide_de.md index ebe0e8eb..eba4c72e 100644 --- a/meta/documents/user_guide_de.md +++ b/meta/documents/user_guide_de.md @@ -261,7 +261,7 @@ Hierfür sind in den Templates in plentymarkets an relevanten Stellen Container Payone Order Confirmation Page Payment Data @@ -269,7 +269,7 @@ Hierfür sind in den Templates in plentymarkets an relevanten Stellen Container Payone Checkout JS diff --git a/meta/documents/user_guide_en.md b/meta/documents/user_guide_en.md index 288d4a8e..ef3c6d25 100644 --- a/meta/documents/user_guide_en.md +++ b/meta/documents/user_guide_en.md @@ -260,7 +260,7 @@ You have multiple options to integrate the payment method BS PAYONE into your on Payone Order Confirmation Page Payment Data @@ -268,7 +268,7 @@ You have multiple options to integrate the payment method BS PAYONE into your on Payone Checkout JS From d6b36da8ac549a4a9acf6b8bba6afaa5b1607950 Mon Sep 17 00:00:00 2001 From: Denise Breidenbach Date: Fri, 29 Mar 2019 13:38:43 +0100 Subject: [PATCH 013/353] ADD pmi info --- meta/documents/user_guide_de.md | 2 ++ meta/documents/user_guide_en.md | 2 ++ 2 files changed, 4 insertions(+) diff --git a/meta/documents/user_guide_de.md b/meta/documents/user_guide_de.md index eba4c72e..4cf35feb 100644 --- a/meta/documents/user_guide_de.md +++ b/meta/documents/user_guide_de.md @@ -24,6 +24,8 @@ Aktuell beinhaltet das Plugin die folgenden Zahlungsarten: **Hinweis: Bevor Sie das Plugin nutzen, müssen Sie ein BS PAYONE Konto beantragen. [Hier geht es zum Anmeldeformular](https://www.psg-projektmanagement.de/bs-payone/).** +Nach Erhalt der Zugangsdaten loggen Sie sich im BS PAYONE Händlerportal ein und nehmen die folgenden Einstellungen vor: + Aktivieren Sie die gewünschten BS PAYONE-Zahlungsarten einmalig im Menü **System » Systemeinstellungen » Aufträge » Zahlung » Zahlungsarten**. Weitere Informationen dazu finden Sie auf der Handbuchseite Zahlungsarten verwalten . Stellen Sie zudem sicher, dass die Zahlungsart unter dem Punkt **Erlaubte Zahlungsarten** in den Kundenklassen vorhanden ist und nicht im Bereich **Gesperrte Zahlungsarten** in den Versandprofilen aufgeführt ist. diff --git a/meta/documents/user_guide_en.md b/meta/documents/user_guide_en.md index ef3c6d25..122d41a5 100644 --- a/meta/documents/user_guide_en.md +++ b/meta/documents/user_guide_en.md @@ -24,6 +24,8 @@ The plugin currently offers the following payment methods: **Note: Before using the plugin, you have to register for a BS PAYONE account. [Click here to access the registration form](https://www.psg-projektmanagement.de/bs-payone/).** +Upon receipt of your access data, log in to the BS PAYONE merchant portal and carry out the following settings: + First of all, activate the payment method once in the **System » System Settings » Orders » Payment » Methods** menu. More information on carrying out this setting is available on the Managing payment methods page of the manual. In addition, make sure that the payment method is included among the Permitted payment methods in the customer classes and that it is not listed among the Blocked payment methods in the shipping profiles. From 23675aedba3aeff653f6c38883a550ed7eb18eb9 Mon Sep 17 00:00:00 2001 From: Denise Breidenbach Date: Tue, 2 Apr 2019 16:37:56 +0200 Subject: [PATCH 014/353] ADD final changes to user guide --- meta/documents/user_guide_de.md | 14 +++++++++++--- meta/documents/user_guide_en.md | 12 ++++++++++-- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/meta/documents/user_guide_de.md b/meta/documents/user_guide_de.md index 4cf35feb..4ea5aeda 100644 --- a/meta/documents/user_guide_de.md +++ b/meta/documents/user_guide_de.md @@ -24,9 +24,17 @@ Aktuell beinhaltet das Plugin die folgenden Zahlungsarten: **Hinweis: Bevor Sie das Plugin nutzen, müssen Sie ein BS PAYONE Konto beantragen. [Hier geht es zum Anmeldeformular](https://www.psg-projektmanagement.de/bs-payone/).** -Nach Erhalt der Zugangsdaten loggen Sie sich im BS PAYONE Händlerportal ein und nehmen die folgenden Einstellungen vor: +Nach Erhalt der Zugangsdaten loggen Sie sich im BS PAYONE Merchant Interface ein und nehmen die folgenden Einstellungen vor. -Aktivieren Sie die gewünschten BS PAYONE-Zahlungsarten einmalig im Menü **System » Systemeinstellungen » Aufträge » Zahlung » Zahlungsarten**. Weitere Informationen dazu finden Sie auf der Handbuchseite Zahlungsarten verwalten . +##### Einstellungen im PAYONE Merchant Interface vornehmen: + +1. Öffnen Sie das Menü **Konfiguration » Zahlungsportale**. +2. Öffnen Sie das Tab **Erweitert** des Zahlungsportals Ihres Shops. +3. Tragen Sie im Feld **TransactionStatusURL** eine URL nach dem Schema **DOMAIN/payment/payone/status** ein. Den Platzhalter **DOMAIN** durch die URL zu Ihrem Webshop ersetzen. +4. Wählen Sie als **Verfahren Hashwert-Prüfung** die Option **md5 oder sha2-384 (für Migration)**. +5. **Speichern** Sie die Einstellungen. + +Aktivieren Sie die gewünschten BS PAYONE-Zahlungsarten in Ihrem plentymarkets Backend einmalig im Menü **System » Systemeinstellungen » Aufträge » Zahlung » Zahlungsarten**. Weitere Informationen dazu finden Sie auf der Handbuchseite Zahlungsarten verwalten . Stellen Sie zudem sicher, dass die Zahlungsart unter dem Punkt **Erlaubte Zahlungsarten** in den Kundenklassen vorhanden ist und nicht im Bereich **Gesperrte Zahlungsarten** in den Versandprofilen aufgeführt ist. @@ -34,7 +42,7 @@ Stellen Sie zudem sicher, dass die Zahlungsart unter dem Punkt **Erlaubte Zahlun Die folgenden Einrichtungsschritte für das plentymarkets BS PAYONE Plugins erfolgen direkt in der Plugin-Übersicht Ihres plentymarkets Systems. Gehen Sie dazu wie im Folgenden beschrieben vor. -##### Grundeinstellungen vornehmen +##### Grundeinstellungen vornehmen: 1. Öffnen Sie das Menü **Plugins » Plugin-Übersicht**. 2. Klicken Sie in der Liste der Plugins auf den Namen des Plugins **BS BS PAYONE**. diff --git a/meta/documents/user_guide_en.md b/meta/documents/user_guide_en.md index 122d41a5..f38d51ca 100644 --- a/meta/documents/user_guide_en.md +++ b/meta/documents/user_guide_en.md @@ -24,9 +24,17 @@ The plugin currently offers the following payment methods: **Note: Before using the plugin, you have to register for a BS PAYONE account. [Click here to access the registration form](https://www.psg-projektmanagement.de/bs-payone/).** -Upon receipt of your access data, log in to the BS PAYONE merchant portal and carry out the following settings: +Upon receipt of your access data, log in to the BS PAYONE merchant interface and carry out the following settings. -First of all, activate the payment method once in the **System » System Settings » Orders » Payment » Methods** menu. More information on carrying out this setting is available on the Managing payment methods page of the manual. +##### Carrying out settings in the BS PAYONE merchant interface + +1. Go to **Configuration » Payment portals**. +2. Open the **Extended Tab** of the payment portal belonging to your online store. +3. In the field **TransactionStatusURL**, enter a URL following the pattern **DOMAIN/payment/payone/status**. Replace **DOMAIN** with the URL of your online store. +4. For the option **Method hash calculation**, select the option **md5 or sha2-384 (during migration)**. +5. **Save** the settings. + +In your plentymarkets back end, activate the payment method once in the **System » System Settings » Orders » Payment » Methods** menu. More information on carrying out this setting is available on the Managing payment methods page of the manual. In addition, make sure that the payment method is included among the Permitted payment methods in the customer classes and that it is not listed among the Blocked payment methods in the shipping profiles. From 1442b99659a844f03f69b512381ff2222705323b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20Po=CC=88nninghaus?= <> Date: Tue, 2 Apr 2019 18:40:29 +0200 Subject: [PATCH 015/353] plugin.json description, email and phone updated --- plugin.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugin.json b/plugin.json index 15e510eb..1e1ad473 100644 --- a/plugin.json +++ b/plugin.json @@ -7,11 +7,13 @@ "name": "Payone", "marketplaceName" : {"de":"BS Payone","en":"BS Payone"}, "shortDescription": { - "de": "Das offizielle Payone plugin für Plentymarkets. Das Payone Plugin setzt einen Checkout-Prozess auf Basis von Ceres voraus.", - "en": "The official Payone plugin for plentymarkets" + "de": "Das offizielle Payone plugin für plentymarkets Webshops. Das Payone Plugin setzt einen Checkout-Prozess auf Basis von Ceres voraus.", + "en": "The official Payone plugin for plentymarkets online stores" }, "description": "The official Payone plugin for plentymarkets", "author": "plentysystems AG", + "email": "sales@plentymarkets.com", + "phone": "+49 561 98 681 100", "keywords": ["Payone", "plentymarkets", "payment"], "categories": [3519], "type": "payment", From 3ff6f1e94e8789f69dfbf3d7a5ca158eca0dd327 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20Po=CC=88nninghaus?= <> Date: Tue, 2 Apr 2019 20:40:28 +0200 Subject: [PATCH 016/353] fixed internal error on loading scripts, optimized script loading (scripts will just be loaded in checkout myaccount and orderconfirmation) --- resources/views/Partials/Javascript.twig | 3 +++ src/Models/PaymentConfig/ApiCredentials.php | 10 +++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/resources/views/Partials/Javascript.twig b/resources/views/Partials/Javascript.twig index 21922857..8d89d3a8 100644 --- a/resources/views/Partials/Javascript.twig +++ b/resources/views/Partials/Javascript.twig @@ -1,3 +1,4 @@ +{% if (services.template.isCurrentTemplate('tpl.checkout') or services.template.isCurrentTemplate('tpl.my-account') or services.template.isCurrentTemplate('tpl.confirmation')) %} + +{% endif %} \ No newline at end of file diff --git a/src/Models/PaymentConfig/ApiCredentials.php b/src/Models/PaymentConfig/ApiCredentials.php index bccb6e94..45dd0d6c 100644 --- a/src/Models/PaymentConfig/ApiCredentials.php +++ b/src/Models/PaymentConfig/ApiCredentials.php @@ -24,7 +24,7 @@ public function __construct( /** * @return string */ - public function getKey(): string + public function getKey() { return $this->configRepo->get('key'); } @@ -32,7 +32,7 @@ public function getKey(): string /** * @return string */ - public function getAid(): string + public function getAid() { return $this->configRepo->get('aid'); } @@ -40,7 +40,7 @@ public function getAid(): string /** * @return string */ - public function getMid(): string + public function getMid() { return $this->configRepo->get('mid'); } @@ -48,7 +48,7 @@ public function getMid(): string /** * @return string */ - public function getPortalid(): string + public function getPortalid() { return $this->configRepo->get('portalid'); } @@ -56,7 +56,7 @@ public function getPortalid(): string /** * @return string */ - public function getMode(): string + public function getMode() { $mode = $this->configRepo->get('mode'); From 8f8f8d83446618d93b3d7bebf7107411e7740c54 Mon Sep 17 00:00:00 2001 From: Marvin Kanitz <> Date: Thu, 4 Apr 2019 15:01:35 +0200 Subject: [PATCH 017/353] reload checkout --- .../views/Partials/PaymentForm/PAYONE_PAYONE_CREDIT_CARD.twig | 2 +- .../views/Partials/PaymentForm/PAYONE_PAYONE_DIRECT_DEBIT.twig | 2 +- .../PaymentForm/PAYONE_PAYONE_DIRECT_DEBIT_MANDATE.twig | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/views/Partials/PaymentForm/PAYONE_PAYONE_CREDIT_CARD.twig b/resources/views/Partials/PaymentForm/PAYONE_PAYONE_CREDIT_CARD.twig index ca378c97..3ff65368 100644 --- a/resources/views/Partials/PaymentForm/PAYONE_PAYONE_CREDIT_CARD.twig +++ b/resources/views/Partials/PaymentForm/PAYONE_PAYONE_CREDIT_CARD.twig @@ -68,7 +68,7 @@ {% if errorMessage is empty %} diff --git a/resources/views/Partials/PaymentForm/PAYONE_PAYONE_DIRECT_DEBIT.twig b/resources/views/Partials/PaymentForm/PAYONE_PAYONE_DIRECT_DEBIT.twig index 50aeb913..64886229 100644 --- a/resources/views/Partials/PaymentForm/PAYONE_PAYONE_DIRECT_DEBIT.twig +++ b/resources/views/Partials/PaymentForm/PAYONE_PAYONE_DIRECT_DEBIT.twig @@ -49,7 +49,7 @@ {% if errorMessage is empty %} diff --git a/resources/views/Partials/PaymentForm/PAYONE_PAYONE_DIRECT_DEBIT_MANDATE.twig b/resources/views/Partials/PaymentForm/PAYONE_PAYONE_DIRECT_DEBIT_MANDATE.twig index 0c479be8..2334296c 100644 --- a/resources/views/Partials/PaymentForm/PAYONE_PAYONE_DIRECT_DEBIT_MANDATE.twig +++ b/resources/views/Partials/PaymentForm/PAYONE_PAYONE_DIRECT_DEBIT_MANDATE.twig @@ -30,7 +30,7 @@ From 2e50d39a3bb5d018e403662aaa7cc8f68fd83ef4 Mon Sep 17 00:00:00 2001 From: Denise Breidenbach Date: Tue, 9 Apr 2019 17:01:26 +0200 Subject: [PATCH 018/353] CHANGE information according to partner management --- meta/documents/user_guide_de.md | 2 +- meta/documents/user_guide_en.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/meta/documents/user_guide_de.md b/meta/documents/user_guide_de.md index 4ea5aeda..5705ab6c 100644 --- a/meta/documents/user_guide_de.md +++ b/meta/documents/user_guide_de.md @@ -22,7 +22,7 @@ Aktuell beinhaltet das Plugin die folgenden Zahlungsarten: ## Erste Schritte -**Hinweis: Bevor Sie das Plugin nutzen, müssen Sie ein BS PAYONE Konto beantragen. [Hier geht es zum Anmeldeformular](https://www.psg-projektmanagement.de/bs-payone/).** +**Hinweis: Die Nutzung dieses Plugins erfordert einen Freischaltcode, den Sie über die PSG Projektmanagement GmbH erhalten können. Unter bestimmten Voraussetzungen können Sie in Verbindung mit dieser Zahlart über die PSG Projektmanagement GmbH in den Genuss eines attraktiven Förderprogramms kommen. [Hier geht es zum Anmeldeformular](https://www.psg-projektmanagement.de/bs-payone/).** Nach Erhalt der Zugangsdaten loggen Sie sich im BS PAYONE Merchant Interface ein und nehmen die folgenden Einstellungen vor. diff --git a/meta/documents/user_guide_en.md b/meta/documents/user_guide_en.md index f38d51ca..cf4ade6b 100644 --- a/meta/documents/user_guide_en.md +++ b/meta/documents/user_guide_en.md @@ -22,7 +22,7 @@ The plugin currently offers the following payment methods: ## First steps -**Note: Before using the plugin, you have to register for a BS PAYONE account. [Click here to access the registration form](https://www.psg-projektmanagement.de/bs-payone/).** +**Note: The use of this plugin requires an access code which can be obtained from PSG Projektmanagement GmbH. Under certain conditions, you can take part in an attractive promotion program through PSG Projektmanagement GmbH in connnection with this payment method. [Click here to access the registration form](https://www.psg-projektmanagement.de/bs-payone/).** Upon receipt of your access data, log in to the BS PAYONE merchant interface and carry out the following settings. From 63b1669cde8c34b402648450b9681fc4aed2c44a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C2=AB?= Date: Wed, 10 Apr 2019 12:04:08 +0200 Subject: [PATCH 019/353] Change logging to the correct logging level Remove logging debug mode --- config.json | 23 ----------------- src/Adapter/Logger.php | 27 -------------------- src/Controllers/StatusController.php | 2 +- src/Helpers/ShopHelper.php | 11 -------- src/Providers/DataProviders/Javascript.php | 1 - src/Providers/PayoneRouteServiceProvider.php | 2 -- src/Services/Api.php | 18 ++++++------- src/Views/ErrorMessageRenderer.php | 3 +-- src/Views/PaymentRenderer.php | 3 +-- 9 files changed, 12 insertions(+), 78 deletions(-) diff --git a/config.json b/config.json index 3ae6bb26..2dd93a73 100644 --- a/config.json +++ b/config.json @@ -810,29 +810,6 @@ } } } - }, - "Config.DebuggingTab": { - "label": "Config.DebuggingTab", - "formFields": { - "debugging.active": { - "type": "selectBox", - "required": false, - "label": "Config.debuggingActiveLabel", - "options": { - "defaultValue": "0", - "selectBoxValues": [ - { - "value": "0", - "caption": "Config.debuggingActivePossibleValue0" - }, - { - "value": "1", - "caption": "Config.debuggingActivePossibleValue1" - } - ] - } - } - } } } } \ No newline at end of file diff --git a/src/Adapter/Logger.php b/src/Adapter/Logger.php index b4932158..53d849fc 100644 --- a/src/Adapter/Logger.php +++ b/src/Adapter/Logger.php @@ -69,12 +69,7 @@ public function debug( string $code, $additionalInfo = null ) { - if ($this->shopHelper->isDebugModeActive()) { - return $this->critical($code, $additionalInfo); - } - $this->getPlentyLogger()->debug(PluginConstants::NAME . '::' . $code, $additionalInfo); - return $this; } @@ -88,12 +83,7 @@ public function info( string $code, $additionalInfo = null ) { - if ($this->shopHelper->isDebugModeActive()) { - return $this->critical($code, $additionalInfo); - } - $this->getPlentyLogger()->info(PluginConstants::NAME . '::' . $code, $additionalInfo); - return $this; } @@ -107,12 +97,7 @@ public function notice( string $code, $additionalInfo = null ) { - if ($this->shopHelper->isDebugModeActive()) { - return $this->critical($code, $additionalInfo); - } - $this->getPlentyLogger()->notice(PluginConstants::NAME . '::' . $code, $additionalInfo); - return $this; } @@ -126,12 +111,7 @@ public function warning( string $code, $additionalInfo = null ) { - if ($this->shopHelper->isDebugModeActive()) { - return $this->critical($code, $additionalInfo); - } - $this->getPlentyLogger()->warning(PluginConstants::NAME . '::' . $code, $additionalInfo); - return $this; } @@ -146,7 +126,6 @@ public function error( $additionalInfo = null ) { $this->getPlentyLogger()->error(PluginConstants::NAME . '::' . $code, $additionalInfo); - return $this; } @@ -161,7 +140,6 @@ public function critical( $additionalInfo = null ) { $this->getPlentyLogger()->critical(PluginConstants::NAME . '::' . $code, $additionalInfo); - return $this; } @@ -176,7 +154,6 @@ public function alert( $additionalInfo = null ) { $this->getPlentyLogger()->alert(PluginConstants::NAME . '::' . $code, $additionalInfo); - return $this; } @@ -191,7 +168,6 @@ public function emergency( $additionalInfo = null ) { $this->getPlentyLogger()->emergency(PluginConstants::NAME . '::' . $code, $additionalInfo); - return $this; } @@ -205,7 +181,6 @@ public function logException( \Exception $exception ) { $this->getPlentyLogger()->logException($exception); - return $this; } @@ -219,7 +194,6 @@ public function setReferenceType( ) { $this->referenceType = $referenceType; $this->logger->setReferenceType($referenceType); - return $this; } @@ -233,7 +207,6 @@ public function setReferenceValue( ) { $this->referenceValue = $referenceValue; $this->logger->setReferenceValue($referenceValue); - return $this; } diff --git a/src/Controllers/StatusController.php b/src/Controllers/StatusController.php index e1ea3e08..8b1e9d54 100644 --- a/src/Controllers/StatusController.php +++ b/src/Controllers/StatusController.php @@ -10,7 +10,7 @@ use Plenty\Plugin\Http\Request; /** - * Class ConfigController + * Class StatusController */ class StatusController extends Controller { diff --git a/src/Helpers/ShopHelper.php b/src/Helpers/ShopHelper.php index 778ff845..36f395e9 100644 --- a/src/Helpers/ShopHelper.php +++ b/src/Helpers/ShopHelper.php @@ -79,17 +79,6 @@ public function getCurrentCurrency() return $config['currency'] ?? $this->getDefaultCurrency(); } - /** - * @return bool - */ - public function isDebugModeActive() - { - /** @var ConfigRepository $config */ - $config = pluginApp(ConfigRepository::class); - - return (bool) $config->get(PluginConstants::NAME . '.debugging.active'); - } - /** * @return string */ diff --git a/src/Providers/DataProviders/Javascript.php b/src/Providers/DataProviders/Javascript.php index 091e77d8..18888038 100644 --- a/src/Providers/DataProviders/Javascript.php +++ b/src/Providers/DataProviders/Javascript.php @@ -38,7 +38,6 @@ public function call( PluginConstants::NAME . '::Partials.Javascript', [ 'locale' => $helper->getCurrentLanguage(), - 'isDebugModeEnabled' => $helper->isDebugModeActive(), 'creditcardcheck' => $creditCardCheck, 'allowedCCTypes' => $creditcardTypes->getAllowedTypes(), 'defaultWidthInPx' => $style->getDefaultWidthInPx(), diff --git a/src/Providers/PayoneRouteServiceProvider.php b/src/Providers/PayoneRouteServiceProvider.php index 55bebfa5..d7dda8b6 100644 --- a/src/Providers/PayoneRouteServiceProvider.php +++ b/src/Providers/PayoneRouteServiceProvider.php @@ -16,8 +16,6 @@ class PayoneRouteServiceProvider extends RouteServiceProvider public function map(Router $router) { - $router->get('payment/payone/migrate/', 'Payone\Controllers\ConfigController@migrate'); - $router->post('payment/payone/status/', 'Payone\Controllers\StatusController@index'); $router->post('payment/payone/checkout/doAuth', 'Payone\Controllers\CheckoutController@doAuth'); diff --git a/src/Services/Api.php b/src/Services/Api.php index 4599c876..1dbcf967 100644 --- a/src/Services/Api.php +++ b/src/Services/Api.php @@ -70,7 +70,7 @@ public function doAuth($requestParams): AuthResponse $responseObject = AuthResponseFactory::create($response); $this->logger->setReferenceValue($responseObject->getTransactionID()); - $this->logger->critical('Api.' . $this->getCallAction(self::REQUEST_TYPE_AUTH), $response); + $this->logger->debug('Api.' . $this->getCallAction(self::REQUEST_TYPE_AUTH), $response); return $responseObject; } @@ -89,7 +89,7 @@ public function doPreAuth($requestParams): PreAuthResponse $responseObject = PreAuthResponseFactory::create($response); $this->logger->setReferenceValue($responseObject->getTransactionID()); - $this->logger->critical('Api.' . $this->getCallAction(self::REQUEST_TYPE_PRE_AUTH), $response); + $this->logger->debug('Api.' . $this->getCallAction(self::REQUEST_TYPE_PRE_AUTH), $response); return $responseObject; } @@ -109,7 +109,7 @@ public function doReversal($requestParams): Response $responseObject = ResponseFactory::create($response); $this->logger->setReferenceValue($responseObject->getTransactionID()); - $this->logger->critical('Api.' . $this->getCallAction(self::REQUEST_TYPE_REVERSAL), $response); + $this->logger->debug('Api.' . $this->getCallAction(self::REQUEST_TYPE_REVERSAL), $response); return $responseObject; } @@ -129,7 +129,7 @@ public function doCapture($requestParams): Response $responseObject = ResponseFactory::create($response); $this->logger->setReferenceValue($responseObject->getTransactionID()); - $this->logger->critical('Api.' . $this->getCallAction(self::REQUEST_TYPE_CAPTURE), $response); + $this->logger->debug('Api.' . $this->getCallAction(self::REQUEST_TYPE_CAPTURE), $response); return $responseObject; } @@ -149,7 +149,7 @@ public function doRefund($requestParams): Response $responseObject = ResponseFactory::create($response); $this->logger->setReferenceValue($responseObject->getTransactionID()); - $this->logger->critical('Api.' . $this->getCallAction(self::REQUEST_TYPE_AUTH), $response); + $this->logger->debug('Api.' . $this->getCallAction(self::REQUEST_TYPE_AUTH), $response); return $responseObject; } @@ -167,7 +167,7 @@ public function doReAuth($requestParams): Response $responseObject = ResponseFactory::create($response); $this->logger->setReferenceValue($responseObject->getTransactionID()); - $this->logger->critical('Api.' . $this->getCallAction(self::REQUEST_TYPE_AUTH), $response); + $this->logger->debug('Api.' . $this->getCallAction(self::REQUEST_TYPE_AUTH), $response); return $responseObject; } @@ -185,7 +185,7 @@ public function doDebit($requestParams): Response $responseObject = ResponseFactory::create($response); $this->logger->setReferenceValue($responseObject->getTransactionID()); - $this->logger->critical('Api.' . $this->getCallAction(self::REQUEST_TYPE_AUTH), $response); + $this->logger->debug('Api.' . $this->getCallAction(self::REQUEST_TYPE_AUTH), $response); return $responseObject; } @@ -203,7 +203,7 @@ public function doManagemandate($requestParams): ManagemandateResponse $responseObject = ManagemandateResponseFactory::create($response); $this->logger->setReferenceValue($responseObject->getTransactionID()); - $this->logger->critical('Api.' . $this->getCallAction(self::REQUEST_TYPE_MANAGEMANDATE), $response); + $this->logger->debug('Api.' . $this->getCallAction(self::REQUEST_TYPE_MANAGEMANDATE), $response); return $responseObject; } @@ -217,7 +217,7 @@ public function doManagemandate($requestParams): ManagemandateResponse public function doLibCall($call, $requestParams): array { $this->logger->setReferenceType(Logger::PAYONE_REQUEST_REFERENCE); - $this->logger->critical('Api.' . $this->getCallAction($call), $requestParams); + $this->logger->debug('Api.' . $this->getCallAction($call), $requestParams); try { $response = $this->libCall->call( diff --git a/src/Views/ErrorMessageRenderer.php b/src/Views/ErrorMessageRenderer.php index 7f897104..68256333 100644 --- a/src/Views/ErrorMessageRenderer.php +++ b/src/Views/ErrorMessageRenderer.php @@ -46,8 +46,7 @@ public function render($errorMessage) return $this->twig->render( PluginConstants::NAME . '::Partials.Error', [ - 'errorMessage' => $errorMessage, - 'isDebugModeEnabled' => $this->shopHelper->isDebugModeActive(), + 'errorMessage' => $errorMessage ] ); } diff --git a/src/Views/PaymentRenderer.php b/src/Views/PaymentRenderer.php index 0cf7e3b7..1700ea6d 100644 --- a/src/Views/PaymentRenderer.php +++ b/src/Views/PaymentRenderer.php @@ -85,8 +85,7 @@ public function render(PaymentAbstract $payment, $message) 'ccTypes' => $this->creditcardTypes->getAllowedTypes(), 'defaultWidthInPx' => $this->style->getDefaultWidthInPx(), 'defaultHeightInPx' => $this->style->getDefaultHeightInPx(), - 'defaultStyle' => $this->style->getDefaultStyle(), - 'isDebugModeEnabled' => $this->shopHelper->isDebugModeActive(), + 'defaultStyle' => $this->style->getDefaultStyle() ] ); } From ecf7666041ecc824a9550ad5b9aeb8f8cb455b29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C2=AB?= Date: Wed, 10 Apr 2019 12:04:29 +0200 Subject: [PATCH 020/353] Update lang files --- resources/lang/de/Config.properties | 6 +++--- resources/lang/en/Config.properties | 6 +++--- src/Providers/PayoneServiceProvider.php | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/resources/lang/de/Config.properties b/resources/lang/de/Config.properties index f154e204..515d3eb5 100644 --- a/resources/lang/de/Config.properties +++ b/resources/lang/de/Config.properties @@ -6,9 +6,9 @@ keyLabel=Schlüssel modeLabel=Modus modePossibleValue0=Test modePossibleValue1=Live -authTypeLabel=Art des Zahlungseinzugs -authTypePossibleValue0=Manuell/Ereignisaktion -authTypePossibleValue1=Direkt nach der Autorisierung +authTypeLabel=Art der Authorisierung +authTypePossibleValue0=Vorauthorisierung +authTypePossibleValue1=Authorisierung RechnungTab=Rechnung PAYONEPAYONEINVOICEActiveLabel=Aktiv PAYONEPAYONEINVOICEActivePossibleValue0=Nein diff --git a/resources/lang/en/Config.properties b/resources/lang/en/Config.properties index ffe3f93d..95dd8bd6 100644 --- a/resources/lang/en/Config.properties +++ b/resources/lang/en/Config.properties @@ -6,9 +6,9 @@ keyLabel=Key modeLabel=Mode modePossibleValue0=Test modePossibleValue1=Live -authTypeLabel=Method for payment registration -authTypePossibleValue0=Manually/Event procedure -authTypePossibleValue1=Directly after authorisation +authTypeLabel=Authorization method +authTypePossibleValue0=Preauthorization +authTypePossibleValue1=Authorization RechnungTab=Invoice PAYONEPAYONEINVOICEActiveLabel=Active PAYONEPAYONEINVOICEActivePossibleValue0=No diff --git a/src/Providers/PayoneServiceProvider.php b/src/Providers/PayoneServiceProvider.php index aaac9657..65b280c8 100644 --- a/src/Providers/PayoneServiceProvider.php +++ b/src/Providers/PayoneServiceProvider.php @@ -112,8 +112,8 @@ public function boot( ); $captureProcedureTitle = [ - 'de' => PluginConstants::NAME . ' | Zahlungseingang buchen', - 'en' => PluginConstants::NAME . ' | Book incoming payment', + 'de' => 'Versandbestätigung an ' . PluginConstants::NAME, + 'en' => 'Send shipping confirmation to ' . PluginConstants::NAME, ]; $eventProceduresService->registerProcedure( PluginConstants::NAME, From afd7ace3dcbba76a744bc1365ebbe03c4e16e450 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C2=AB?= Date: Wed, 10 Apr 2019 13:27:19 +0200 Subject: [PATCH 021/353] Remove unused function and file FIx DataProvider object check --- src/Controllers/ConfigController.php | 267 ------------------ .../ConfirmationAdditionalPaymentData.php | 9 +- 2 files changed, 7 insertions(+), 269 deletions(-) delete mode 100644 src/Controllers/ConfigController.php diff --git a/src/Controllers/ConfigController.php b/src/Controllers/ConfigController.php deleted file mode 100644 index 6eba0b5e..00000000 --- a/src/Controllers/ConfigController.php +++ /dev/null @@ -1,267 +0,0 @@ -configRepo = $configRepo; - $this->paymentMethodRepo = $paymentMethodRepo; - $this->paymentHelper = $paymentHelper; - $this->shopHelper = $shopHelper; - } - - /** - * @param Request $request - */ - public function printConfig(Request $request) - { - if (!$this->shopHelper->isDebugModeActive()) { - return; - } - - try { - return json_encode($this->configRepo->get(PluginConstants::NAME), JSON_PRETTY_PRINT) . - PHP_EOL . $request->get('configPath') . PHP_EOL . - json_encode($this->configRepo->get($request->get('configPath')), - JSON_PRETTY_PRINT); - } catch (\Exception $e) { - return $e->getMessage(); - } - } - - public function migrate(CreatePaymentMethods $migration) - { - if (!$this->shopHelper->isDebugModeActive()) { - return; - } - try { - $migration->run(); - - return __METHOD__; - } catch (\Exception $e) { - return $e->getMessage(); - } - } - - public function printAllPaymentMethods() - { - if (!$this->shopHelper->isDebugModeActive()) { - return; - } - $paymentMethods = $this->paymentMethodRepo->all(); - - $text = ''; - foreach ($paymentMethods as $paymentMethod) { - $text .= $paymentMethod->id . ': ' . $paymentMethod->paymentKey . PHP_EOL; - } - - return $text; - } - - /** - * @param Request $request - * @param Api $api - * @param PreAuthDataProvider $provider - * @param BasketRepositoryContract $basket - * - * @return string|void - */ - public function doPreCheck( - Request $request, - Api $api, - PreAuthDataProvider $provider, - BasketRepositoryContract $basket - ) { - if (!$this->shopHelper->isDebugModeActive()) { - return; - } - try { - $paymentCode = $request->get('paymentCode'); - $response = $api->doPreAuth( - $provider->getDataFromBasket($paymentCode, $basket->load()) - ); - - return json_encode($response, JSON_PRETTY_PRINT); - } catch (\Exception $e) { - return PHP_EOL . - $e->getCode() . PHP_EOL . - $e->getMessage() . PHP_EOL . - $e->getTraceAsString(); - } - } - - /** - * @param Request $request - * @param PreAuthDataProvider $provider - * @param BasketRepositoryContract $basket - * - * @return string|void - */ - public function testRequestData( - Request $request, - PreAuthDataProvider $provider, - BasketRepositoryContract $basket - ) { - if (!$this->shopHelper->isDebugModeActive()) { - return; - } - try { - return json_encode($provider->getDataFromBasket($request->get('paymentCode'), $basket->load()), - JSON_PRETTY_PRINT); - } catch (\Exception $e) { - return PHP_EOL . - $e->getCode() . PHP_EOL . - $e->getMessage() . PHP_EOL . - $e->getTraceAsString(); - } - } - - /** - * @param Request $request - * @param ShippingProfileRepositoryContract $shippingProfileRepositoryContract - * - * @return string|void - */ - public function printShippingProfiles( - Request $request, - ShippingProfileRepositoryContract $shippingProfileRepositoryContract - ) { - if (!$this->shopHelper->isDebugModeActive()) { - return; - } - try { - $shippingProviderId = $request->get('id'); - - /** @var \Plenty\Modules\Authorization\Services\AuthHelper $authHelper */ - $authHelper = pluginApp(AuthHelper::class); - $response = $authHelper->processUnguarded( - function () use ($shippingProfileRepositoryContract, $shippingProviderId) { - return $shippingProfileRepositoryContract->get($shippingProviderId); - } - ); - - return json_encode($response, JSON_PRETTY_PRINT); - } catch (\Exception $e) { - return PHP_EOL . - $e->getCode() . PHP_EOL . - $e->getMessage() . PHP_EOL . - $e->getTraceAsString(); - } - } - - /** - * @param Request $request - * @param ItemShippingProfilesRepositoryContract $shippingProfileRepositoryContract - * - * @return string|void - */ - public function printItemShippingProfiles( - Request $request, - ItemShippingProfilesRepositoryContract $shippingProfileRepositoryContract - ) { - if (!$this->shopHelper->isDebugModeActive()) { - return; - } - try { - $shippingProviderId = $request->get('id'); - - /** @var \Plenty\Modules\Authorization\Services\AuthHelper $authHelper */ - $authHelper = pluginApp(AuthHelper::class); - $response = $authHelper->processUnguarded( - function () use ($shippingProfileRepositoryContract, $shippingProviderId) { - return $shippingProfileRepositoryContract->find($shippingProviderId); - } - ); - - return json_encode($response, JSON_PRETTY_PRINT); - } catch (\Exception $e) { - return PHP_EOL . - $e->getCode() . PHP_EOL . - $e->getMessage() . PHP_EOL . - $e->getTraceAsString(); - } - } - - /** - * @param Request $request - * @param ParcelServicePresetRepositoryContract $shippingProfileRepositoryContract - * - * @return string|void - */ - public function printParcelServicePreset( - Request $request, - ParcelServicePresetRepositoryContract $shippingProfileRepositoryContract - ) { - if (!$this->shopHelper->isDebugModeActive()) { - return; - } - try { - $shippingProviderId = $request->get('id'); - - /** @var \Plenty\Modules\Authorization\Services\AuthHelper $authHelper */ - $authHelper = pluginApp(AuthHelper::class); - $response = $authHelper->processUnguarded( - function () use ($shippingProfileRepositoryContract, $shippingProviderId) { - return $shippingProfileRepositoryContract->getPresetById($shippingProviderId); - } - ); - - return json_encode($response, JSON_PRETTY_PRINT); - } catch (\Exception $e) { - return PHP_EOL . - $e->getCode() . PHP_EOL . - $e->getMessage() . PHP_EOL . - $e->getTraceAsString(); - } - } -} diff --git a/src/Providers/DataProviders/ConfirmationAdditionalPaymentData.php b/src/Providers/DataProviders/ConfirmationAdditionalPaymentData.php index 0ef54e65..25a01a0c 100644 --- a/src/Providers/DataProviders/ConfirmationAdditionalPaymentData.php +++ b/src/Providers/DataProviders/ConfirmationAdditionalPaymentData.php @@ -7,6 +7,7 @@ use Payone\Models\Api\AuthResponse; use Payone\Models\Api\Clearing\Bank; use Payone\Models\Api\PreAuthResponse; +use Payone\Models\Api\ResponseAbstract; use Payone\Models\ApiResponseCache; use Payone\PluginConstants; use Plenty\Modules\Order\Models\Order; @@ -37,12 +38,12 @@ public function call( $order = $arg[0]; $logger->setIdentifier(__METHOD__)->debug('Dataprovider.ConfirmationAdditionalPaymentData', $arg); - if (!($order instanceof Order)) { + if ( !is_array($order) || $order['id'] <= 0 ) { $logger->setIdentifier(__METHOD__)->debug('Dataprovider.ConfirmationAdditionalPaymentData', 'Not an order.'); return ''; } - $payments = $paymentRepositoryContract->getPaymentsByOrderId($order->id); + $payments = $paymentRepositoryContract->getPaymentsByOrderId($order['id']); foreach ($payments as $payment) { /** @var Payment $payment */ if (!$paymentHelper->isPayonePayment($payment->mopId)) { @@ -56,6 +57,10 @@ public function call( /** @var AuthResponse|PreAuthResponse $auth */ $auth = $paymentCache->loadAuth($payment->mopId); + if(!$auth instanceof ResponseAbstract) { + return ''; + } + $clearing = $auth->getClearing(); if (!$clearing || !($clearing instanceof Bank)) { continue; From e595dc2eb74e32ecd5e3578bf4419603517a9654 Mon Sep 17 00:00:00 2001 From: Denise Breidenbach Date: Wed, 10 Apr 2019 13:59:55 +0200 Subject: [PATCH 022/353] some corrections in user guide DE --- meta/documents/user_guide_de.md | 74 +++++++++++++++++++++++++++++---- 1 file changed, 65 insertions(+), 9 deletions(-) diff --git a/meta/documents/user_guide_de.md b/meta/documents/user_guide_de.md index 5705ab6c..b7c6f4a6 100644 --- a/meta/documents/user_guide_de.md +++ b/meta/documents/user_guide_de.md @@ -104,11 +104,11 @@ Die folgenden Einrichtungsschritte für das plentymarkets BS PAYONE Plugins erfo @@ -285,27 +285,83 @@ Hierfür sind in den Templates in plentymarkets an relevanten Stellen Container
- Tab. 5: Event procedure for automatically refunding Payone payments + Tab. 5: Event procedure for automatically refunding BS PAYONE payments
- Verknüpfen Sie diesen Content mit dem Container **Script loader: After script loaded**, um + Verknüpfen Sie diesen Content mit dem Container Order confirmation: Additional payment information, um die BS PAYONE-Zahlungsarten auf der Bestellbestätigungsseite im Webshop anzuzeigen.
- Verknüpfen Sie diesen Content mit dem Container **Script loader: After script loaded**, um + Verknüpfen Sie diesen Content mit dem Container Script loader: After script loaded, um die BS PAYONE-Zahlungsarten während der Kaufabwicklung im Webshop anzuzeigen.
- Link this content to the container Script loader: After script loaded to + Link this content to the container Order confirmation: Additional payment information to display the BS PAYONE payment methods on the order confirmation page in the online store.
- Linkt his content to the container Script loader: After script loaded to + Link this content to the container Script loader: After script loaded to display the BS PAYONE payment methods during the checkout process in the online store.
- Art des Zahlungseinzugs + Art der Autorisierung - Wählen Sie, wann und auf welche Weise Aufträge mit der Zahlungsart BS PAYONE in Ihrem plentymarkets System als bezahlt markiert werden sollen.
Manuell/Ereignisaktion: Wählen Sie diese Option, wenn Sie für BS PAYONE-Zahlungen manuell oder per Ereignisaktion den Zahlungseingang buchen wollen.
- Direkt nach der Autorisierung:: Wählen Sie diese Option, wenn der Zahlungseingang direkt nach dem Kaufabschluss im Webshop und der anschließenden Autorisierung durch BS PAYONE in Ihrem plentymarkets System gebucht werden soll. + Vorautorisierung: Wählen Sie diese Option, wenn die Zahlung beim Käufer nur vorgemerkt werden soll. Der Zahlungseinzug erfolgt dann durch eine Ereignisaktion, die beim Warenausgang ausgelöst werden muss (siehe Tabelle 5).
+ Autorisierung:: Wählen Sie diese Option, wenn der Zahlungseinzug beim Käufer sofort stattfinden soll. Der Zahlungseingang wird somit direkt nach dem Kaufabschluss im Webshop in Ihrem plentymarkets System gebucht.
-## BS PAYONE-Zahlung automatisch zurückzahlen +## Automatische Versandbestätigung an BS PAYONE senden -Richten Sie eine Ereignisaktion ein, um die Rückzahlung einer Zahlung über BS PAYONE zu automatisieren. +Richten Sie eine Ereignisaktion ein, um eine automatische Versandbestätigung an BS PAYONE zu senden, sobald Sie den Auftrag versendet haben. + +**Hinweis:** Die Einrichtung dieser Ereignisaktion ist zwingend notwendig, wenn als **Art der Autorisierung** die Option **Vorautorisierung** gewählt wurde (siehe Tabelle 1). Haben Sie die Option **Autorisierung** gewählt, ist diese Ereignisaktion nicht nutzbar und nicht notwendig. ##### Ereignisaktion einrichten: 1. Öffnen Sie das Menü **System » Aufträge » Ereignisaktionen**. -2. Klicken Sie auf **Ereignisaktion hinzufügen**.
+2. Klicken Sie auf **Ereignisaktion hinzufügen**. → Das Fenster **Neue Ereignisaktion erstellen** wird geöffnet. 3. Geben Sie einen Namen ein. 4. Wählen Sie das Ereignis gemäß Tabelle 5. -5. **Speichern** Sie die Einstellungen.
+5. **Speichern** Sie die Einstellungen. → Die Ereignisaktion wird angelegt. 6. Nehmen Sie die weiteren Einstellungen gemäß Tabelle 5 vor. 7. Setzen Sie ein Häkchen bei **Aktiv**. -8. **Speichern** Sie die Einstellungen.
+8. **Speichern** Sie die Einstellungen. +→ Die Ereignisaktion wird gespeichert. + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Tab. 5: Ereignisaktion zum Senden einer automatischen Versandbestätigung an BS PAYONE +
+ Einstellung + + Option + + Auswahl +
EreignisDas Ereignis wählen, nach dem die Versandbestätigung automatisch versendet werden soll, beispielsweise Auftragsänderung > Warenausgang gebucht
Filter 1Auftrag > ZahlungsartPlugin: PAYONE +
AktionPlugin > BS PAYONE | Versandbestätigung senden
+ +## BS PAYONE-Zahlung automatisch zurückzahlen + +Richten Sie eine Ereignisaktion ein, um die Rückzahlung einer Zahlung über BS PAYONE zu automatisieren. + +##### Ereignisaktion einrichten: + +1. Öffnen Sie das Menü **System » Aufträge » Ereignisaktionen**. +2. Klicken Sie auf **Ereignisaktion hinzufügen**. +→ Das Fenster **Neue Ereignisaktion erstellen** wird geöffnet. +3. Geben Sie einen Namen ein. +4. Wählen Sie das Ereignis gemäß Tabelle 6. +5. **Speichern** Sie die Einstellungen. +→ Die Ereignisaktion wird angelegt. +6. Nehmen Sie die weiteren Einstellungen gemäß Tabelle 6 vor. +7. Setzen Sie ein Häkchen bei **Aktiv**. +8. **Speichern** Sie die Einstellungen. → Die Ereignisaktion wird gespeichert. From 21306deec43d72460e8dad206ceaaea0142d3512 Mon Sep 17 00:00:00 2001 From: Denise Breidenbach Date: Wed, 10 Apr 2019 14:31:17 +0200 Subject: [PATCH 023/353] FIX authorisation and other labels --- resources/lang/de/Config.properties | 6 +++--- resources/lang/en/Config.properties | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/resources/lang/de/Config.properties b/resources/lang/de/Config.properties index 515d3eb5..d7273163 100644 --- a/resources/lang/de/Config.properties +++ b/resources/lang/de/Config.properties @@ -6,9 +6,9 @@ keyLabel=Schlüssel modeLabel=Modus modePossibleValue0=Test modePossibleValue1=Live -authTypeLabel=Art der Authorisierung -authTypePossibleValue0=Vorauthorisierung -authTypePossibleValue1=Authorisierung +authTypeLabel=Art der Autorisierung +authTypePossibleValue0=Vorautorisierung +authTypePossibleValue1=Autorisierung RechnungTab=Rechnung PAYONEPAYONEINVOICEActiveLabel=Aktiv PAYONEPAYONEINVOICEActivePossibleValue0=Nein diff --git a/resources/lang/en/Config.properties b/resources/lang/en/Config.properties index 95dd8bd6..ca7ca5ba 100644 --- a/resources/lang/en/Config.properties +++ b/resources/lang/en/Config.properties @@ -1,4 +1,4 @@ -GrundeinstellungenTab=Basesettings +GrundeinstellungenTab=Basic settings midLabel=Merchant ID portalidLabel=Portal ID aidLabel=Account ID @@ -6,9 +6,9 @@ keyLabel=Key modeLabel=Mode modePossibleValue0=Test modePossibleValue1=Live -authTypeLabel=Authorization method -authTypePossibleValue0=Preauthorization -authTypePossibleValue1=Authorization +authTypeLabel=Authorisation method +authTypePossibleValue0=Preauthorisation +authTypePossibleValue1=Authorisation RechnungTab=Invoice PAYONEPAYONEINVOICEActiveLabel=Active PAYONEPAYONEINVOICEActivePossibleValue0=No From de1b1b31f4f32a0aad344a695151be6361e69508 Mon Sep 17 00:00:00 2001 From: Denise Breidenbach Date: Wed, 10 Apr 2019 15:25:46 +0200 Subject: [PATCH 024/353] change user guide EN --- meta/documents/user_guide_de.md | 2 +- meta/documents/user_guide_en.md | 71 +++++++++++++++++++++++++++++---- 2 files changed, 64 insertions(+), 9 deletions(-) diff --git a/meta/documents/user_guide_de.md b/meta/documents/user_guide_de.md index b7c6f4a6..5b899baf 100644 --- a/meta/documents/user_guide_de.md +++ b/meta/documents/user_guide_de.md @@ -107,7 +107,7 @@ Die folgenden Einrichtungsschritte für das plentymarkets BS PAYONE Plugins erfo Art der Autorisierung diff --git a/meta/documents/user_guide_en.md b/meta/documents/user_guide_en.md index cf4ade6b..e5eb2f39 100644 --- a/meta/documents/user_guide_en.md +++ b/meta/documents/user_guide_en.md @@ -104,12 +104,11 @@ The following steps for setting up the plentymarkets BS PAYONE plugin are carrie + Preauthorisation: Select this option if payment collection should only be prepared for the customer. The definite collection of payment has to be effected by an event procedure that should be triggered by booking outgoing items (see table 5).
+ Authorisation: Select this option if the payment should be collected from the customer immediately. Incoming payment is then booked directly after the customer has completed the checkout process in the online store.
- Tab. 5: Ereignisaktion zur automatischen Rückzahlung der BS PAYONE-Zahlung + Tab. 6: Ereignisaktion zur automatischen Rückzahlung der BS PAYONE-Zahlung
- Vorautorisierung: Wählen Sie diese Option, wenn die Zahlung beim Käufer nur vorgemerkt werden soll. Der Zahlungseinzug erfolgt dann durch eine Ereignisaktion, die beim Warenausgang ausgelöst werden muss (siehe Tabelle 5).
+ Vorautorisierung: Wählen Sie diese Option, wenn der Zahlungseinzug beim Käufer nur vorgemerkt werden soll. Der Zahlungseinzug erfolgt dann durch eine Ereignisaktion, die beim Warenausgang ausgelöst werden muss (siehe Tabelle 5).
Autorisierung:: Wählen Sie diese Option, wenn der Zahlungseinzug beim Käufer sofort stattfinden soll. Der Zahlungseingang wird somit direkt nach dem Kaufabschluss im Webshop in Ihrem plentymarkets System gebucht.
- Method for payment registration + Authorisation method - Select when and how orders with the payment method BS PAYONE are marked as paid in your plentymarkets system.
Manually/Event procedure: Select this option if you wish to manually book incoming payment or to set up an event procedure booking incoming payment.
- Directly after authorisation:: Select this option if incoming payment should be booked directly after completion of the checkout process in the online store and successful authorisation by BS PAYONE. -
@@ -187,7 +186,7 @@ In the following, you select the BS PAYONE payment methods that should be availa -**Note:** The payment method Die Zahlungsart **Credit card** requires particular attention. Additional settings are necessary for this payment method. The settings are described in table 3. +**Note:** The payment method **Credit card** requires particular attention. Additional settings are necessary for this payment method. The settings are described in table 3. @@ -284,9 +283,11 @@ You have multiple options to integrate the payment method BS PAYONE into your on
Tab. 3: Setting up the payment method Credit card
-## Automatically refunding BS PAYONE payments +## Sending an automatic shipping confirmation to BS PAYONE -Set up an event procedure to automatically refund a BS PAYONE payment. +Set up an event procedure to send an automatic shipping confirmation to BS PAYONE as soon as you have shipped the order. + +**Note:** Sending up the following event procedure is mandatory if you have selected the option **Preauthorisation** as **Authorisation method** (see table 1). This event procedure is not necessary and cannot be used if you have selected the option **Authorisation**. ##### Setting up an event procedure: @@ -304,7 +305,61 @@ Set up an event procedure to automatically refund a BS PAYONE payment. + + + + + + + + + + + + + + + + + + + + + + + +
- Tab. 5: Event procedure for automatically refunding BS PAYONE payments + Tab. 5: Event procedure for sending an automatic shipping confirmation to BS PAYONE +
+ Setting + + Option + + Selection +
EventSelect the event after which an automatic shipping confirmation should be sent, e.g. Order change > Outgoing items booked
Filter 1Order > Payment methodPlugin: PAYONE +
ProcedurePlugins > Payone | Refund order
+ +## Automatically refunding BS PAYONE payments + +Set up an event procedure to automatically refund a BS PAYONE payment. + +##### Setting up an event procedure: + +1. Go to **System » Orders » Events**. +2. Click on **Add event procedure**. +→ The **Create new event procedure** window opens. +3. Enter a name. +4. Select the event according to table 6. +5. **Save** the settings. +→ The event procedure is created. +6. Carry out the further settings according to table 6. +7. Place a check mark next to the option **Active**. +8. **Save** the settings. +→ The event procedure is saved. + + + From 452c0aaff520ea5981e1859097233c618c458ffb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C2=AB?= Date: Fri, 12 Apr 2019 09:48:20 +0200 Subject: [PATCH 025/353] Update Version 1.1.0 --- plugin.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.json b/plugin.json index 1e1ad473..d5115f85 100644 --- a/plugin.json +++ b/plugin.json @@ -1,5 +1,5 @@ { - "version": "1.0.9", + "version": "1.1.0", "license":"MIT", "pluginIcon":"icon_plugin_xs.png", "price":0.0, From f22acdf0957ec3a1e52ef06bba0d06fc1fee9a1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C2=AB?= Date: Fri, 12 Apr 2019 10:16:16 +0200 Subject: [PATCH 026/353] Remove unused file add require IO --- plugin.json | 2 +- resources/views/Partials/Error.twig | 6 +- src/Controllers/ConfigController.php | 267 --------------------------- 3 files changed, 2 insertions(+), 273 deletions(-) delete mode 100644 src/Controllers/ConfigController.php diff --git a/plugin.json b/plugin.json index d5115f85..75d31de7 100644 --- a/plugin.json +++ b/plugin.json @@ -20,7 +20,7 @@ "namespace": "Payone", "javaScriptFiles": [], "containers": [], - "require": [], + "require": ["IO"], "serviceProvider": "Payone\\Providers\\PayoneServiceProvider", "dependencies":{ "arvatis/payone-php-api":"2.2.*" diff --git a/resources/views/Partials/Error.twig b/resources/views/Partials/Error.twig index 0296dadd..cd534712 100755 --- a/resources/views/Partials/Error.twig +++ b/resources/views/Partials/Error.twig @@ -1,5 +1 @@ -{% if isDebugModeEnabled %} - {{ trans(errorMessage) }} -{% else %} - {{ trans('Payone::Template.orderErrorMessage') }} -{% endif %} \ No newline at end of file +{{ trans('Payone::Template.orderErrorMessage') }} \ No newline at end of file diff --git a/src/Controllers/ConfigController.php b/src/Controllers/ConfigController.php deleted file mode 100644 index 6eba0b5e..00000000 --- a/src/Controllers/ConfigController.php +++ /dev/null @@ -1,267 +0,0 @@ -configRepo = $configRepo; - $this->paymentMethodRepo = $paymentMethodRepo; - $this->paymentHelper = $paymentHelper; - $this->shopHelper = $shopHelper; - } - - /** - * @param Request $request - */ - public function printConfig(Request $request) - { - if (!$this->shopHelper->isDebugModeActive()) { - return; - } - - try { - return json_encode($this->configRepo->get(PluginConstants::NAME), JSON_PRETTY_PRINT) . - PHP_EOL . $request->get('configPath') . PHP_EOL . - json_encode($this->configRepo->get($request->get('configPath')), - JSON_PRETTY_PRINT); - } catch (\Exception $e) { - return $e->getMessage(); - } - } - - public function migrate(CreatePaymentMethods $migration) - { - if (!$this->shopHelper->isDebugModeActive()) { - return; - } - try { - $migration->run(); - - return __METHOD__; - } catch (\Exception $e) { - return $e->getMessage(); - } - } - - public function printAllPaymentMethods() - { - if (!$this->shopHelper->isDebugModeActive()) { - return; - } - $paymentMethods = $this->paymentMethodRepo->all(); - - $text = ''; - foreach ($paymentMethods as $paymentMethod) { - $text .= $paymentMethod->id . ': ' . $paymentMethod->paymentKey . PHP_EOL; - } - - return $text; - } - - /** - * @param Request $request - * @param Api $api - * @param PreAuthDataProvider $provider - * @param BasketRepositoryContract $basket - * - * @return string|void - */ - public function doPreCheck( - Request $request, - Api $api, - PreAuthDataProvider $provider, - BasketRepositoryContract $basket - ) { - if (!$this->shopHelper->isDebugModeActive()) { - return; - } - try { - $paymentCode = $request->get('paymentCode'); - $response = $api->doPreAuth( - $provider->getDataFromBasket($paymentCode, $basket->load()) - ); - - return json_encode($response, JSON_PRETTY_PRINT); - } catch (\Exception $e) { - return PHP_EOL . - $e->getCode() . PHP_EOL . - $e->getMessage() . PHP_EOL . - $e->getTraceAsString(); - } - } - - /** - * @param Request $request - * @param PreAuthDataProvider $provider - * @param BasketRepositoryContract $basket - * - * @return string|void - */ - public function testRequestData( - Request $request, - PreAuthDataProvider $provider, - BasketRepositoryContract $basket - ) { - if (!$this->shopHelper->isDebugModeActive()) { - return; - } - try { - return json_encode($provider->getDataFromBasket($request->get('paymentCode'), $basket->load()), - JSON_PRETTY_PRINT); - } catch (\Exception $e) { - return PHP_EOL . - $e->getCode() . PHP_EOL . - $e->getMessage() . PHP_EOL . - $e->getTraceAsString(); - } - } - - /** - * @param Request $request - * @param ShippingProfileRepositoryContract $shippingProfileRepositoryContract - * - * @return string|void - */ - public function printShippingProfiles( - Request $request, - ShippingProfileRepositoryContract $shippingProfileRepositoryContract - ) { - if (!$this->shopHelper->isDebugModeActive()) { - return; - } - try { - $shippingProviderId = $request->get('id'); - - /** @var \Plenty\Modules\Authorization\Services\AuthHelper $authHelper */ - $authHelper = pluginApp(AuthHelper::class); - $response = $authHelper->processUnguarded( - function () use ($shippingProfileRepositoryContract, $shippingProviderId) { - return $shippingProfileRepositoryContract->get($shippingProviderId); - } - ); - - return json_encode($response, JSON_PRETTY_PRINT); - } catch (\Exception $e) { - return PHP_EOL . - $e->getCode() . PHP_EOL . - $e->getMessage() . PHP_EOL . - $e->getTraceAsString(); - } - } - - /** - * @param Request $request - * @param ItemShippingProfilesRepositoryContract $shippingProfileRepositoryContract - * - * @return string|void - */ - public function printItemShippingProfiles( - Request $request, - ItemShippingProfilesRepositoryContract $shippingProfileRepositoryContract - ) { - if (!$this->shopHelper->isDebugModeActive()) { - return; - } - try { - $shippingProviderId = $request->get('id'); - - /** @var \Plenty\Modules\Authorization\Services\AuthHelper $authHelper */ - $authHelper = pluginApp(AuthHelper::class); - $response = $authHelper->processUnguarded( - function () use ($shippingProfileRepositoryContract, $shippingProviderId) { - return $shippingProfileRepositoryContract->find($shippingProviderId); - } - ); - - return json_encode($response, JSON_PRETTY_PRINT); - } catch (\Exception $e) { - return PHP_EOL . - $e->getCode() . PHP_EOL . - $e->getMessage() . PHP_EOL . - $e->getTraceAsString(); - } - } - - /** - * @param Request $request - * @param ParcelServicePresetRepositoryContract $shippingProfileRepositoryContract - * - * @return string|void - */ - public function printParcelServicePreset( - Request $request, - ParcelServicePresetRepositoryContract $shippingProfileRepositoryContract - ) { - if (!$this->shopHelper->isDebugModeActive()) { - return; - } - try { - $shippingProviderId = $request->get('id'); - - /** @var \Plenty\Modules\Authorization\Services\AuthHelper $authHelper */ - $authHelper = pluginApp(AuthHelper::class); - $response = $authHelper->processUnguarded( - function () use ($shippingProfileRepositoryContract, $shippingProviderId) { - return $shippingProfileRepositoryContract->getPresetById($shippingProviderId); - } - ); - - return json_encode($response, JSON_PRETTY_PRINT); - } catch (\Exception $e) { - return PHP_EOL . - $e->getCode() . PHP_EOL . - $e->getMessage() . PHP_EOL . - $e->getTraceAsString(); - } - } -} From e70c419f948e6055028edc632314d5ae1c07c2a8 Mon Sep 17 00:00:00 2001 From: Denise Breidenbach Date: Fri, 12 Apr 2019 17:49:01 +0200 Subject: [PATCH 027/353] add PSG contact data DE + EN --- meta/documents/user_guide_de.md | 12 +++++++++++- meta/documents/user_guide_en.md | 12 +++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/meta/documents/user_guide_de.md b/meta/documents/user_guide_de.md index 5b899baf..70c52692 100644 --- a/meta/documents/user_guide_de.md +++ b/meta/documents/user_guide_de.md @@ -22,7 +22,17 @@ Aktuell beinhaltet das Plugin die folgenden Zahlungsarten: ## Erste Schritte -**Hinweis: Die Nutzung dieses Plugins erfordert einen Freischaltcode, den Sie über die PSG Projektmanagement GmbH erhalten können. Unter bestimmten Voraussetzungen können Sie in Verbindung mit dieser Zahlart über die PSG Projektmanagement GmbH in den Genuss eines attraktiven Förderprogramms kommen. [Hier geht es zum Anmeldeformular](https://www.psg-projektmanagement.de/bs-payone/).** + + +Kontaktieren Sie uns:
+PSG Projektmanagement GmbH
+Meergässle 4
+89180 Berghülen
+Telefon: 07344-9592588
+E-Mail: plenty@psg-projektmanagement.de
+Internet: http://www.psg-projektmanagement.de Nach Erhalt der Zugangsdaten loggen Sie sich im BS PAYONE Merchant Interface ein und nehmen die folgenden Einstellungen vor. diff --git a/meta/documents/user_guide_en.md b/meta/documents/user_guide_en.md index e5eb2f39..fe25c70e 100644 --- a/meta/documents/user_guide_en.md +++ b/meta/documents/user_guide_en.md @@ -22,7 +22,17 @@ The plugin currently offers the following payment methods: ## First steps -**Note: The use of this plugin requires an access code which can be obtained from PSG Projektmanagement GmbH. Under certain conditions, you can take part in an attractive promotion program through PSG Projektmanagement GmbH in connnection with this payment method. [Click here to access the registration form](https://www.psg-projektmanagement.de/bs-payone/).** + + +Contact us:
+Meergässle 4
+89180 Berghülen
+Phone: 07344-9592588
+E-mail: plenty@psg-projektmanagement.de
+Website: http://www.psg-projektmanagement.de Upon receipt of your access data, log in to the BS PAYONE merchant interface and carry out the following settings. From fd307fc0020929a083ca5924816e0a41d894a957 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20Po=CC=88nninghaus?= <> Date: Thu, 2 May 2019 20:13:16 +0200 Subject: [PATCH 028/353] Fixed a problem that caused duplicate orders, debug log fixes --- meta/documents/changelog_de.md | 5 ++++ meta/documents/changelog_en.md | 5 ++++ plugin.json | 2 +- resources/lang/de/Controller.properties | 5 ++++ resources/lang/de/Payment.properties | 4 +++ resources/lang/en/Controller.properties | 5 ++++ resources/lang/en/Payment.properties | 4 +++ src/Controllers/CheckoutController.php | 25 +++++++++++++++---- src/Models/PaymentCache.php | 18 +++++++++++++ src/PluginConstants.php | 2 +- .../Api/Request/AuthDataProvider.php | 2 +- .../Api/Request/DataProviderAbstract.php | 8 ++++-- .../Api/Request/PreAuthDataProvider.php | 2 +- src/Services/PaymentCreation.php | 20 +++++++-------- 14 files changed, 86 insertions(+), 21 deletions(-) create mode 100644 resources/lang/de/Controller.properties create mode 100644 resources/lang/en/Controller.properties diff --git a/meta/documents/changelog_de.md b/meta/documents/changelog_de.md index 789a35d4..7ad2e9e5 100644 --- a/meta/documents/changelog_de.md +++ b/meta/documents/changelog_de.md @@ -1,5 +1,10 @@ # Release Notes für Payone +## 1.1.1 (2019-04-02) + +### Behoben +- Es wurde ein Problem behoben, was für Auftragsduplikate geführt hatte. + ## 1.1.0 (2019-03-27) ### Geändert diff --git a/meta/documents/changelog_en.md b/meta/documents/changelog_en.md index 1715f05d..09762f0c 100644 --- a/meta/documents/changelog_en.md +++ b/meta/documents/changelog_en.md @@ -1,5 +1,10 @@ # Release Notes for Payone +## 1.1.1 (2019-04-02) + +### Fixed +- Fixed an issue that caused duplicate orders. + ## 1.1.0 (2019-03-27) ### Changed diff --git a/plugin.json b/plugin.json index 75d31de7..fb972688 100644 --- a/plugin.json +++ b/plugin.json @@ -1,5 +1,5 @@ { - "version": "1.1.0", + "version": "1.1.1", "license":"MIT", "pluginIcon":"icon_plugin_xs.png", "price":0.0, diff --git a/resources/lang/de/Controller.properties b/resources/lang/de/Controller.properties new file mode 100644 index 00000000..cda254fd --- /dev/null +++ b/resources/lang/de/Controller.properties @@ -0,0 +1,5 @@ +Status = "Status" +Success = "Success" +Checkout = "Checkout" +routeCalled = "route called" +redirecting = "redirecting" \ No newline at end of file diff --git a/resources/lang/de/Payment.properties b/resources/lang/de/Payment.properties index ec946c63..d184c7f6 100644 --- a/resources/lang/de/Payment.properties +++ b/resources/lang/de/Payment.properties @@ -1,3 +1,7 @@ minCartAmount = "minCartAmount" maxCartAmount = "maxCartAmount" countryNotAllowed = "countryNotAllowed" +createPayment = "createPayment" +updatePayment = "updatePayment" +updatingPayment = "updatingPayment" +createRefundPayment = "createRefundPayment" diff --git a/resources/lang/en/Controller.properties b/resources/lang/en/Controller.properties new file mode 100644 index 00000000..cda254fd --- /dev/null +++ b/resources/lang/en/Controller.properties @@ -0,0 +1,5 @@ +Status = "Status" +Success = "Success" +Checkout = "Checkout" +routeCalled = "route called" +redirecting = "redirecting" \ No newline at end of file diff --git a/resources/lang/en/Payment.properties b/resources/lang/en/Payment.properties index ec946c63..d184c7f6 100644 --- a/resources/lang/en/Payment.properties +++ b/resources/lang/en/Payment.properties @@ -1,3 +1,7 @@ minCartAmount = "minCartAmount" maxCartAmount = "maxCartAmount" countryNotAllowed = "countryNotAllowed" +createPayment = "createPayment" +updatePayment = "updatePayment" +updatingPayment = "updatingPayment" +createRefundPayment = "createRefundPayment" diff --git a/src/Controllers/CheckoutController.php b/src/Controllers/CheckoutController.php index a2ce968b..9aacf3b3 100644 --- a/src/Controllers/CheckoutController.php +++ b/src/Controllers/CheckoutController.php @@ -11,6 +11,7 @@ use Payone\Models\BankAccountCache; use Payone\Models\CreditCardCheckResponse; use Payone\Models\CreditCardCheckResponseRepository; +use Payone\Models\PaymentCache; use Payone\Models\SepaMandateCache; use Payone\PluginConstants; use Payone\Services\PaymentService; @@ -81,7 +82,7 @@ public function doAuth( BasketRepositoryContract $basket ) { $this->logger->setIdentifier(__METHOD__) - ->debug('CheckoutController', $this->request->all()); + ->debug('Controller.Checkout', $this->request->all()); if (!$this->sessionHelper->isLoggedIn()) { return $this->getJsonErrors([ 'message' => 'Your session expired. Please login and start a new purchase.', @@ -109,7 +110,7 @@ public function storeCCCheckResponse( CardExpireDate $validator ) { $this->logger->setIdentifier(__METHOD__) - ->debug('CheckoutController', $this->request->all()); + ->debug('Controller.Checkout', $this->request->all()); if (!$this->sessionHelper->isLoggedIn()) { return $this->getJsonErrors(['message' => 'Your session expired. Please login and start a new purchase.']); } @@ -165,7 +166,7 @@ public function storeAccountData( 'iban' => $this->request->get('iban'), 'bic' => $this->request->get('bic'), ]; - $this->logger->setIdentifier(__METHOD__)->debug('Router.routeCalled', $this->request->all()); + $this->logger->setIdentifier(__METHOD__)->debug('Controller.routeCalled', $this->request->all()); foreach ($formData as $key => $value) { if (empty($formData[$key])) { @@ -245,16 +246,30 @@ public function getSepaMandateStep(Twig $twig, SepaMandateCache $sepaMandateCach * * @return string */ - public function checkoutSuccess(BasketRepositoryContract $basketReopo, PaymentHelper $helper) + public function checkoutSuccess(BasketRepositoryContract $basketReopo, PaymentHelper $helper, PaymentCache $paymentCache) { $this->logger->setIdentifier(__METHOD__); $this->logger->debug('Controller.Success', $this->request->all()); + $transactionBasketId = $this->request->get('transactionBasketId'); + if(strlen($transactionBasketId)){ + $storedBasketId = $paymentCache->getActiveBasketId(); + if($storedBasketId === null){ + return $this->response->redirectTo('confirmation'); + } + if($storedBasketId != $transactionBasketId){ + return $this->response->redirectTo('payone/error'); + } + } + else{ + return $this->response->redirectTo('payone/error'); + } $basket = $basketReopo->load(); if (!$helper->isPayonePayment($basket->methodOfPaymentId)) { return $this->response->redirectTo('payone/error'); } + $paymentCache->resetActiveBasketId(); return $this->response->redirectTo('place-order'); } @@ -269,7 +284,7 @@ public function redirectWithNotice( ErrorMessageRenderer $messageRenderer ) { $this->logger->setIdentifier(__METHOD__); - $this->logger->debug('redirecting'); + $this->logger->debug('Controller.redirecting'); //info would be enought but is not shown in frontend $notificationService->error($messageRenderer->render('Payone::Template.orderErrorMessage')); diff --git a/src/Models/PaymentCache.php b/src/Models/PaymentCache.php index 5b2c132d..1966dc6f 100644 --- a/src/Models/PaymentCache.php +++ b/src/Models/PaymentCache.php @@ -56,6 +56,24 @@ public function deletePayment(string $paymentCode) ); } + public function setActiveBasketId($transactionBasketId){ + $this->sessionStorage->setSessionValue( + $this->getStorageKey('activeTransactionBasketId'), + $transactionBasketId + ); + } + + public function getActiveBasketId(){ + return $this->sessionStorage->getSessionValue($this->getStorageKey('activeTransactionBasketId')); + } + + public function resetActiveBasketId(){ + $this->sessionStorage->setSessionValue( + $this->getStorageKey('activeTransactionBasketId'), + null + ); + } + /** * @param string $paymentCode * diff --git a/src/PluginConstants.php b/src/PluginConstants.php index 4bc1cb8e..47ace757 100644 --- a/src/PluginConstants.php +++ b/src/PluginConstants.php @@ -5,5 +5,5 @@ class PluginConstants { const NAME = 'Payone'; - const VERSION = '1.0.6'; + const VERSION = '1.1.1'; } diff --git a/src/Providers/Api/Request/AuthDataProvider.php b/src/Providers/Api/Request/AuthDataProvider.php index bf466239..2f65eb30 100644 --- a/src/Providers/Api/Request/AuthDataProvider.php +++ b/src/Providers/Api/Request/AuthDataProvider.php @@ -42,7 +42,7 @@ public function getDataFromBasket(string $paymentCode, Basket $basket, string $r } if ($this->paymentHasRedirect($paymentCode)) { - $requestParams['redirect'] = $this->getRedirectUrls(); + $requestParams['redirect'] = $this->getRedirectUrls($basket->id); } if ($paymentCode == PayoneCCPaymentMethod::PAYMENT_CODE) { $requestParams['ccCheck'] = $this->getCreditCardData()->jsonSerialize(); diff --git a/src/Providers/Api/Request/DataProviderAbstract.php b/src/Providers/Api/Request/DataProviderAbstract.php index b6f5b48f..32168d1a 100644 --- a/src/Providers/Api/Request/DataProviderAbstract.php +++ b/src/Providers/Api/Request/DataProviderAbstract.php @@ -447,10 +447,14 @@ protected function paymentHasRedirect($paymentCode) /** * @return array */ - protected function getRedirectUrls() + protected function getRedirectUrls($transactionBasketId = "") { + $successParam = ''; + if(strlen($transactionBasketId)){ + $successParam = '?transactionBasketId='.$transactionBasketId; + } return [ - 'success' => $this->shopHelper->getPlentyDomain() . '/payment/payone/checkoutSuccess', + 'success' => $this->shopHelper->getPlentyDomain() . '/payment/payone/checkoutSuccess'.$successParam, 'error' => $this->shopHelper->getPlentyDomain() . '/payment/payone/error', 'back' => $this->shopHelper->getPlentyDomain() . '/checkout', ]; diff --git a/src/Providers/Api/Request/PreAuthDataProvider.php b/src/Providers/Api/Request/PreAuthDataProvider.php index c2d57a24..630a309f 100644 --- a/src/Providers/Api/Request/PreAuthDataProvider.php +++ b/src/Providers/Api/Request/PreAuthDataProvider.php @@ -40,7 +40,7 @@ public function getDataFromBasket(string $paymentCode, Basket $basket, string $r $requestParams['bankAccount'] = $this->getBankAccount(); } if ($this->paymentHasRedirect($paymentCode)) { - $requestParams['redirect'] = $this->getRedirectUrls(); + $requestParams['redirect'] = $this->getRedirectUrls($basket->id); } if ($paymentCode == PayoneCCPaymentMethod::PAYMENT_CODE) { $requestParams['ccCheck'] = $this->getCreditCardData()->jsonSerialize(); diff --git a/src/Services/PaymentCreation.php b/src/Services/PaymentCreation.php index b8c15fe3..5506aa6f 100644 --- a/src/Services/PaymentCreation.php +++ b/src/Services/PaymentCreation.php @@ -91,7 +91,7 @@ public function __construct( public function createPayment($mopId, ResponseAbstract $response, Basket $basket, ClearingAbstract $account = null) { $this->logger->setIdentifier(__METHOD__)->debug( - 'PaymentCreation.createPayment', + 'Payment.createPayment', [ 'paymentId' => $mopId, 'response' => $response, @@ -199,7 +199,7 @@ public function createPayment($mopId, ResponseAbstract $response, Basket $basket public function capturePayment(Payment $payment, Order $order) { $this->logger->setIdentifier(__METHOD__)->debug( - 'PaymentCreation.updatePayment', + 'Payment.updatePayment', [ 'payment' => $payment, 'order' => $order, @@ -227,7 +227,7 @@ public function capturePayment(Payment $payment, Order $order) public function reAuthorizePayment(Payment $payment, Response $response, Order $order) { $this->logger->setIdentifier(__METHOD__)->debug( - 'PaymentCreation.updatePayment', + 'Payment.updatePayment', [ 'payment' => $payment, 'response' => $response, @@ -277,7 +277,7 @@ public function reAuthorizePayment(Payment $payment, Response $response, Order $ public function createRefundPayment($paymentId, $response, $currency, $grandTotal, $parentPaymentId) { $this->logger->setIdentifier(__METHOD__)->debug( - 'PaymentCreation.createRefundPayment', + 'Payment.createRefundPayment', [ 'paymentId' => $paymentId, 'response' => $response, @@ -344,7 +344,7 @@ public function createRefundPayment($paymentId, $response, $currency, $grandTota public function assignPaymentToOrder(Payment $payment, Order $order) { $this->logger->setIdentifier(__METHOD__)->debug( - 'PaymentCreation.assignPaymentToOrder', + 'Payment.assignPaymentToOrder', [ 'payment' => $payment, 'orderId' => $order->id, @@ -395,7 +395,7 @@ public function findLastPayment($ownerId, $selectedPaymentId) public function updatePaymentStatus($txid, $txaction, $sequenceNumber) { $this->logger->setIdentifier(__METHOD__)->debug( - 'PaymentCreation.updatingPayment', + 'Payment.updatingPayment', [ 'txid' => $txid, 'txaction' => $txaction, @@ -411,7 +411,7 @@ public function updatePaymentStatus($txid, $txaction, $sequenceNumber) $this->logger->debug('PaymentCreation.updatingPayment', ['payments' => $payments]); if (!count($payments)) { $this->logger->debug( - 'PaymentCreation.updatingPayment', + 'Payment.updatingPayment', 'No payments found for txid' ); @@ -421,7 +421,7 @@ public function updatePaymentStatus($txid, $txaction, $sequenceNumber) foreach ($payments as $payment) { $newStatus = PayonePaymentStatus::getPlentyStatus($txaction); $this->logger->debug( - 'PaymentCreation.updatingPayment', + 'Payment.updatingPayment', [ 'payment' => $payment, 'oldStatus' => $payment->status, @@ -474,7 +474,7 @@ private function createOrUpdatePaymentProperty($payment, $pamentPropertyTypeId, } if ($property->typeId === $pamentPropertyTypeId) { $this->logger->debug( - 'PaymentCreation.updatingPayment', + 'Payment.updatingPayment', [ 'property' => $pamentPropertyTypeId, 'oldValue' => $property->value, @@ -487,7 +487,7 @@ private function createOrUpdatePaymentProperty($payment, $pamentPropertyTypeId, } $this->logger->debug( - 'PaymentCreation.updatingPayment', + 'Payment.updatingPayment', [ 'property' => $pamentPropertyTypeId, 'newValue' => $value, From 0e27a9bd26bfb0abe51860156c906c984721f486 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20Po=CC=88nninghaus?= <> Date: Fri, 3 May 2019 12:24:49 +0200 Subject: [PATCH 029/353] An error causing the creation of duplicate orders during payment processing has been fixed --- meta/documents/changelog_de.md | 2 +- meta/documents/changelog_en.md | 2 +- src/Services/Auth.php | 1 + src/Services/PreAuth.php | 1 + 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/meta/documents/changelog_de.md b/meta/documents/changelog_de.md index 7ad2e9e5..3c193a57 100644 --- a/meta/documents/changelog_de.md +++ b/meta/documents/changelog_de.md @@ -3,7 +3,7 @@ ## 1.1.1 (2019-04-02) ### Behoben -- Es wurde ein Problem behoben, was für Auftragsduplikate geführt hatte. +- Ein Fehler, der während der Zahlungsabwicklung zur Anlage von Auftragsduplikaten geführt hatte, wurde behoben. ## 1.1.0 (2019-03-27) diff --git a/meta/documents/changelog_en.md b/meta/documents/changelog_en.md index 09762f0c..3b369283 100644 --- a/meta/documents/changelog_en.md +++ b/meta/documents/changelog_en.md @@ -3,7 +3,7 @@ ## 1.1.1 (2019-04-02) ### Fixed -- Fixed an issue that caused duplicate orders. +- An error causing the creation of duplicate orders during payment processing has been fixed. ## 1.1.0 (2019-03-27) diff --git a/src/Services/Auth.php b/src/Services/Auth.php index b10e5e88..7e7c9bd1 100644 --- a/src/Services/Auth.php +++ b/src/Services/Auth.php @@ -92,6 +92,7 @@ public function executeAuth(Basket $basket) $payment = $this->createPayment($selectedPaymentId, $authResponse, $basket); $this->paymentCache->storePayment((string) $selectedPaymentId, $payment); + $this->paymentCache->setActiveBasketId($basket->id); return $authResponse; } diff --git a/src/Services/PreAuth.php b/src/Services/PreAuth.php index 1697733b..061632a9 100644 --- a/src/Services/PreAuth.php +++ b/src/Services/PreAuth.php @@ -85,6 +85,7 @@ public function executePreAuth(Basket $basket) $payment = $this->createPayment($selectedPaymentId, $preAuthResponse, $basket); $this->paymentCache->storePayment((string) $selectedPaymentId, $payment); + $this->paymentCache->setActiveBasketId($basket->id); return $preAuthResponse; } From f9dc5fce54807ba0ba799f5a15327e1a964dbf2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20Po=CC=88nninghaus?= <> Date: Fri, 3 May 2019 16:00:58 +0200 Subject: [PATCH 030/353] An error with the credit card type selection was fixed, changelog update --- meta/documents/changelog_de.md | 3 ++- meta/documents/changelog_en.md | 3 ++- resources/views/Partials/Javascript.twig | 4 +--- .../PaymentForm/PAYONE_PAYONE_CREDIT_CARD.twig | 15 +++++++-------- src/Models/CreditcardTypes.php | 5 ++++- 5 files changed, 16 insertions(+), 14 deletions(-) diff --git a/meta/documents/changelog_de.md b/meta/documents/changelog_de.md index 3c193a57..c59eb523 100644 --- a/meta/documents/changelog_de.md +++ b/meta/documents/changelog_de.md @@ -3,7 +3,8 @@ ## 1.1.1 (2019-04-02) ### Behoben -- Ein Fehler, der während der Zahlungsabwicklung zur Anlage von Auftragsduplikaten geführt hatte, wurde behoben. +- Ein Fehler, der während der Zahlungsabwicklung zur Anlage von Auftragsduplikaten geführt hatte, wurde behoben +- Ein Fehler bei der Kreditkartentypauswahl wurde behoben ## 1.1.0 (2019-03-27) diff --git a/meta/documents/changelog_en.md b/meta/documents/changelog_en.md index 3b369283..db415047 100644 --- a/meta/documents/changelog_en.md +++ b/meta/documents/changelog_en.md @@ -3,7 +3,8 @@ ## 1.1.1 (2019-04-02) ### Fixed -- An error causing the creation of duplicate orders during payment processing has been fixed. +- An error causing the creation of duplicate orders during payment processing has been fixed +- An error with the credit card type selection was fixed ## 1.1.0 (2019-03-27) diff --git a/resources/views/Partials/Javascript.twig b/resources/views/Partials/Javascript.twig index 8d89d3a8..e547b0c4 100644 --- a/resources/views/Partials/Javascript.twig +++ b/resources/views/Partials/Javascript.twig @@ -26,9 +26,7 @@ ' ' + '' + ' ' + - '';; - - var request = {{ creditcardcheck|json_encode|raw }}; + ''; //Credit Card var allowedCCTypes = {{ allowedCCTypes|json_encode|raw }}; diff --git a/resources/views/Partials/PaymentForm/PAYONE_PAYONE_CREDIT_CARD.twig b/resources/views/Partials/PaymentForm/PAYONE_PAYONE_CREDIT_CARD.twig index 3ff65368..0908ae8d 100644 --- a/resources/views/Partials/PaymentForm/PAYONE_PAYONE_CREDIT_CARD.twig +++ b/resources/views/Partials/PaymentForm/PAYONE_PAYONE_CREDIT_CARD.twig @@ -28,21 +28,20 @@
-
- -
-
-
-
-
-
+
+
+
+ +
+
+
+ Tab. 6: Event procedure for automatically refunding BS PAYONE payments
+ +## Ceres-Checkout anpassen + +Als Nächstes ist eine Anpassung im Ceres-Checkout notwendig, damit Ihre Kunden bei Bezahlvorgängen mit PAYONE ihr Geburtsdatum korrekt eingeben können. + + + +##### Ceres-Checkout anpassen: + +1. Öffnen Sie das Menü **Plugins » Plugin-Übersicht**.
→ Die Plugin-Übersicht wird geöffnet. +2. Klicken Sie auf **Ceres**.
→ Das Plugin wird geöffnet. +3. Klicken Sie im Verzeichnisbaum auf **Konfiguration**. +4. Wechseln Sie in das Tab **Kaufabwicklung und Mein Konto.** +5. Klappen Sie den Bereich **Rechnungsadressfelder im Adressformular anzeigen (DE)** auf. +6. Aktivieren Sie über die Checkbox die Option **Geburtsdatum**. +7. **Speichern** Sie die Einstellungen.
Im Checkout wird Ihren Kunden nun ein Feld zur Eingabe des Geburtsdatums angezeigt. + ## Template-Container verknüpfen Für die Zahlungsart BS PAYONE stehen Ihnen verschiedene Möglichkeiten zur Verfügung, um sie in Ihrem Webshop einzubinden. @@ -304,16 +323,13 @@ Richten Sie eine Ereignisaktion ein, um eine automatische Versandbestätigung an ##### Ereignisaktion einrichten: 1. Öffnen Sie das Menü **System » Aufträge » Ereignisaktionen**. -2. Klicken Sie auf **Ereignisaktion hinzufügen**. -→ Das Fenster **Neue Ereignisaktion erstellen** wird geöffnet. +2. Klicken Sie auf **Ereignisaktion hinzufügen**.
→ Das Fenster **Neue Ereignisaktion erstellen** wird geöffnet. 3. Geben Sie einen Namen ein. 4. Wählen Sie das Ereignis gemäß Tabelle 5. -5. **Speichern** Sie die Einstellungen. -→ Die Ereignisaktion wird angelegt. +5. **Speichern** Sie die Einstellungen.
→ Die Ereignisaktion wird angelegt. 6. Nehmen Sie die weiteren Einstellungen gemäß Tabelle 5 vor. 7. Setzen Sie ein Häkchen bei **Aktiv**. -8. **Speichern** Sie die Einstellungen. -→ Die Ereignisaktion wird gespeichert. +8. **Speichern** Sie die Einstellungen.
→ Die Ereignisaktion wird gespeichert.
@@ -358,16 +374,13 @@ Richten Sie eine Ereignisaktion ein, um die Rückzahlung einer Zahlung über BS ##### Ereignisaktion einrichten: 1. Öffnen Sie das Menü **System » Aufträge » Ereignisaktionen**. -2. Klicken Sie auf **Ereignisaktion hinzufügen**. -→ Das Fenster **Neue Ereignisaktion erstellen** wird geöffnet. +2. Klicken Sie auf **Ereignisaktion hinzufügen**.
→ Das Fenster **Neue Ereignisaktion erstellen** wird geöffnet. 3. Geben Sie einen Namen ein. 4. Wählen Sie das Ereignis gemäß Tabelle 6. -5. **Speichern** Sie die Einstellungen. -→ Die Ereignisaktion wird angelegt. +5. **Speichern** Sie die Einstellungen.
→ Die Ereignisaktion wird angelegt. 6. Nehmen Sie die weiteren Einstellungen gemäß Tabelle 6 vor. 7. Setzen Sie ein Häkchen bei **Aktiv**. -8. **Speichern** Sie die Einstellungen. -→ Die Ereignisaktion wird gespeichert. +8. **Speichern** Sie die Einstellungen.
→ Die Ereignisaktion wird gespeichert.
From 7c9dfe30a26d09bbf36e7b10372a28de0efaabef Mon Sep 17 00:00:00 2001 From: Denise Breidenbach Date: Fri, 17 May 2019 15:15:22 +0200 Subject: [PATCH 040/353] fix changelog translation / wording --- meta/documents/changelog_en.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/documents/changelog_en.md b/meta/documents/changelog_en.md index b1217cb9..17f6e00b 100644 --- a/meta/documents/changelog_en.md +++ b/meta/documents/changelog_en.md @@ -3,7 +3,7 @@ ## 1.1.2 (2019-05-10) ### Changed -- The entry of the date of birth is now a mandatory field in the checkout process. This field must be activated in the Ceres settings for the checkout process. +- Entering the date of birth is now mandatory in the checkout process. The field for the date of birth must be activated in the Ceres settings for the checkout process. ### Added - Net orders can now be executed. From 23ee00c449508f6502880537440b985f4fc28be2 Mon Sep 17 00:00:00 2001 From: Denise Breidenbach Date: Fri, 17 May 2019 16:36:51 +0200 Subject: [PATCH 041/353] add translation user guide en fix formatting in user guides de + en --- meta/documents/user_guide_de.md | 3 +-- meta/documents/user_guide_en.md | 39 +++++++++++++++++++++------------ 2 files changed, 26 insertions(+), 16 deletions(-) diff --git a/meta/documents/user_guide_de.md b/meta/documents/user_guide_de.md index 7cbf6d5a..065d9f38 100644 --- a/meta/documents/user_guide_de.md +++ b/meta/documents/user_guide_de.md @@ -253,10 +253,9 @@ Im Folgenden legen Sie fest, welche BS PAYONE-Zahlungsarten Ihren Kunden im Webs
- ## Ceres-Checkout anpassen -Als Nächstes ist eine Anpassung im Ceres-Checkout notwendig, damit Ihre Kunden bei Bezahlvorgängen mit PAYONE ihr Geburtsdatum korrekt eingeben können. +Als Nächstes ist eine Anpassung im Ceres Checkout notwendig, damit Ihre Kunden bei Bezahlvorgängen mit PAYONE ihr Geburtsdatum korrekt eingeben können.
+## Adjusting the Ceres checkout + +In the next step, an adjustment to your Ceres checkout settings is necessary. These adjustments need to be made so that customers using PAYONE for payment processes can enter their date of birth correctly. + + + +##### Adjusting the Ceres checkout: + +1. Go to **Plugins » Plugin overview**.
→ The plugin overview opens. +2. Click on **Ceres**.
→ The plugin opens. +3. Click on **Configuration** in the directory tree. +4. Click on the **Checkout and My account** tab. +5. Open the **Show invoice address fields in the address form (DE)** area. +6. Use the check box to activate the option **Date of birth**. +7. **Save** the settings.
A field for entering the date of birth is now displayed for your customers in the checkout area. + ## Linking template containers You have multiple options to integrate the payment method BS PAYONE into your online store. For this purpose, the plentymarkets system offers containers at relevant places which can be filled with content to meet your needs. @@ -302,16 +319,13 @@ Set up an event procedure to send an automatic shipping confirmation to BS PAYON ##### Setting up an event procedure: 1. Go to **System » Orders » Events**. -2. Click on **Add event procedure**. -→ The **Create new event procedure** window opens. +2. Click on **Add event procedure**.
→ The **Create new event procedure** window opens. 3. Enter a name. 4. Select the event according to table 5. -5. **Save** the settings. -→ The event procedure is created. +5. **Save** the settings.
→ The event procedure is created. 6. Carry out the further settings according to table 5. 7. Place a check mark next to the option **Active**. -8. **Save** the settings. -→ The event procedure is saved. +8. **Save** the settings.
→ The event procedure is saved.
@@ -356,16 +370,13 @@ Set up an event procedure to automatically refund a BS PAYONE payment. ##### Setting up an event procedure: 1. Go to **System » Orders » Events**. -2. Click on **Add event procedure**. -→ The **Create new event procedure** window opens. +2. Click on **Add event procedure**.
→ The **Create new event procedure** window opens. 3. Enter a name. 4. Select the event according to table 6. -5. **Save** the settings. -→ The event procedure is created. +5. **Save** the settings.
→ The event procedure is created. 6. Carry out the further settings according to table 6. 7. Place a check mark next to the option **Active**. -8. **Save** the settings. -→ The event procedure is saved. +8. **Save** the settings.
→ The event procedure is saved. @@ -85,7 +85,7 @@ Die folgenden Einrichtungsschritte für das plentymarkets BS PAYONE Plugins erfo Portal ID @@ -93,7 +93,7 @@ Die folgenden Einrichtungsschritte für das plentymarkets BS PAYONE Plugins erfo Account ID @@ -101,7 +101,7 @@ Die folgenden Einrichtungsschritte für das plentymarkets BS PAYONE Plugins erfo Schlüssel @@ -126,7 +126,7 @@ Die folgenden Einrichtungsschritte für das plentymarkets BS PAYONE Plugins erfo ### Zahlungsarten einrichten -Im Folgenden legen Sie fest, welche BS PAYONE-Zahlungsarten Ihren Kunden im Webshop zur Verfügung stehen sollen. Außerdem nehmen Sie für die festgelegten Zahlungsarten genauere Einstellungen vor. Gehen Sie dazu wie im Folgenden beschrieben vor. +Im Folgenden legen Sie fest, welche PAYONE-Zahlungsarten Ihren Kunden im Webshop zur Verfügung stehen sollen. Außerdem nehmen Sie für die festgelegten Zahlungsarten genauere Einstellungen vor. Gehen Sie dazu wie im Folgenden beschrieben vor. ##### Zahlungsarten einrichten: @@ -273,7 +273,7 @@ Als Nächstes ist eine Anpassung im Ceres Checkout notwendig, damit Ihre Kunden ## Template-Container verknüpfen -Für die Zahlungsart BS PAYONE stehen Ihnen verschiedene Möglichkeiten zur Verfügung, um sie in Ihrem Webshop einzubinden. +Für die Zahlungsart PAYONE stehen Ihnen verschiedene Möglichkeiten zur Verfügung, um sie in Ihrem Webshop einzubinden. Hierfür sind in den Templates in plentymarkets an relevanten Stellen Container hinterlegt, mit denen zur Individualisierung Contents verknüpft werden. ##### Container verknüpfen: @@ -299,7 +299,7 @@ Hierfür sind in den Templates in plentymarkets an relevanten Stellen Container Payone Order Confirmation Page Payment Data @@ -307,15 +307,15 @@ Hierfür sind in den Templates in plentymarkets an relevanten Stellen Container Payone Checkout JS
From 732d8f7cb769bccf44dafd1ed48442c3f638edab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20Po=CC=88nninghaus?= <> Date: Tue, 11 Jun 2019 18:50:04 +0200 Subject: [PATCH 042/353] date of birth fix --- .../Api/Request/DataProviderAbstract.php | 24 ++++++++++++------- src/Providers/PayoneServiceProvider.php | 3 ++- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/src/Providers/Api/Request/DataProviderAbstract.php b/src/Providers/Api/Request/DataProviderAbstract.php index 53b1b6c4..3ff18bd6 100644 --- a/src/Providers/Api/Request/DataProviderAbstract.php +++ b/src/Providers/Api/Request/DataProviderAbstract.php @@ -228,17 +228,25 @@ protected function getCustomerData(Address $addressObj, $customerId) 'firstname' => (string)$addressObj->firstName, 'lastname' => (string)$addressObj->lastName, 'title' => '', // (string)$addressObj->title: '', - 'birthday' => $this->getBirthDay($addressObj), 'ip' => (string)$this->shopHelper->getIpAddress(), 'customerId' => (string)$customerId, - 'registrationDate' => '1970-01-01', + //'registrationDate' => '1970-01-01', // what the ... is this? 'group' => 'default', 'company' => (string)$addressObj->companyName, 'telephonenumber' => (string)$addressObj->phone, 'language' => $this->shopHelper->getCurrentLanguage(), ]; - //TODO: Check format + + $dateOfBirth = $this->getBirthDay($addressObj); + $customerData['birthday'] = ''; + if(isset($dateOfBirth)) { + $customerData['birthday'] = $dateOfBirth; + } + $customerData['gender'] = 'm'; + if($addressObj->gender == 'female') { + $customerData['gender'] = 'f'; + } return $customerData; } @@ -267,15 +275,13 @@ protected function getApiContextParams() /** * @param Address $addressObj - * - * @return string + * @return false|string|null */ - protected function getBirthDay(Address $addressObj): string + protected function getBirthDay(Address $addressObj) { - if (!$addressObj->birthday) { - return '1970-01-01'; + if(!isset($addressObj->birthday) || !strlen($addressObj->birthday)) { + return null; } - $dateOfBirth = strtotime($addressObj->birthday); return date('Y-m-d', $dateOfBirth); } diff --git a/src/Providers/PayoneServiceProvider.php b/src/Providers/PayoneServiceProvider.php index 93fb25df..16d926c6 100644 --- a/src/Providers/PayoneServiceProvider.php +++ b/src/Providers/PayoneServiceProvider.php @@ -254,7 +254,8 @@ function (GetPaymentMethodContent $event) use ( $basket = $basketRepository->load(); $billingAddress = $addressHelper->getBasketBillingAddress($basket); - if(!isset($billingAddress->birthday) || !strlen($billingAddress->birthday)){ + if( $paymentCode == PayoneInvoiceSecurePaymentMethod::PAYMENT_CODE && + (!isset($billingAddress->birthday) || !strlen($billingAddress->birthday)) ) { /** @var \Plenty\Plugin\Translation\Translator $translator */ $translator = pluginApp(\Plenty\Plugin\Translation\Translator::class); From 2dc2ceb0de7cdd916d70f17b1a56f720d1702717 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20Po=CC=88nninghaus?= <> Date: Thu, 13 Jun 2019 10:44:56 +0200 Subject: [PATCH 043/353] updated userguide for entering the date of birth (secure invoice only) --- meta/documents/changelog_de.md | 6 ++++++ meta/documents/changelog_en.md | 6 ++++++ meta/documents/user_guide_de.md | 4 ++-- meta/documents/user_guide_en.md | 4 ++-- plugin.json | 2 +- 5 files changed, 17 insertions(+), 5 deletions(-) diff --git a/meta/documents/changelog_de.md b/meta/documents/changelog_de.md index 517cb82f..ac0d28ab 100644 --- a/meta/documents/changelog_de.md +++ b/meta/documents/changelog_de.md @@ -1,5 +1,11 @@ # Release Notes für Payone +## 1.1.3 (2019-06-13) + +### Geändert +- Optimierungen für die Eingabe des Geburtsdatums im Bestellprozess. +- User Guide aktualisiert. + ## 1.1.2 (2019-05-10) ### Geändert diff --git a/meta/documents/changelog_en.md b/meta/documents/changelog_en.md index 17f6e00b..f7a4c5e8 100644 --- a/meta/documents/changelog_en.md +++ b/meta/documents/changelog_en.md @@ -1,5 +1,11 @@ # Release Notes for Payone +## 1.1.3 (2019-06-13) + +### Changed +- Optimisation for Entering the date of birth in the checkout process. +- Updated user guide + ## 1.1.2 (2019-05-10) ### Changed diff --git a/meta/documents/user_guide_de.md b/meta/documents/user_guide_de.md index 065d9f38..9d66db76 100644 --- a/meta/documents/user_guide_de.md +++ b/meta/documents/user_guide_de.md @@ -255,13 +255,13 @@ Im Folgenden legen Sie fest, welche BS PAYONE-Zahlungsarten Ihren Kunden im Webs ## Ceres-Checkout anpassen -Als Nächstes ist eine Anpassung im Ceres Checkout notwendig, damit Ihre Kunden bei Bezahlvorgängen mit PAYONE ihr Geburtsdatum korrekt eingeben können. +Als Nächstes ist eine Anpassung im Ceres Checkout notwendig, damit Ihre Kunden bei Bezahlvorgängen mit PAYONE ihr Geburtsdatum (nur für den gesicherten Rechnungskauf) korrekt eingeben können. -##### Ceres-Checkout anpassen: +##### Ceres-Checkout anpassen für den gesicherten Rechnungskauf: 1. Öffnen Sie das Menü **Plugins » Plugin-Übersicht**.
→ Die Plugin-Übersicht wird geöffnet. 2. Klicken Sie auf **Ceres**.
→ Das Plugin wird geöffnet. diff --git a/meta/documents/user_guide_en.md b/meta/documents/user_guide_en.md index 1369b7f3..59b2e5ad 100644 --- a/meta/documents/user_guide_en.md +++ b/meta/documents/user_guide_en.md @@ -253,13 +253,13 @@ In the following, you select the BS PAYONE payment methods that should be availa ## Adjusting the Ceres checkout -In the next step, an adjustment to your Ceres checkout settings is necessary. These adjustments need to be made so that customers using PAYONE for payment processes can enter their date of birth correctly. +In the next step, an adjustment to your Ceres checkout settings is necessary. These adjustments need to be made so that customers using PAYONE for payment processes can enter their date of birth (for secure invoice only) correctly. -##### Adjusting the Ceres checkout: +##### Adjusting the Ceres checkout for secure invoice: 1. Go to **Plugins » Plugin overview**.
→ The plugin overview opens. 2. Click on **Ceres**.
→ The plugin opens. diff --git a/plugin.json b/plugin.json index 9439479a..32868486 100644 --- a/plugin.json +++ b/plugin.json @@ -1,5 +1,5 @@ { - "version": "1.1.2", + "version": "1.1.3", "license":"MIT", "pluginIcon":"icon_plugin_xs.png", "price":0.0, From db178d0108ef15769a8f5f05acab5dbbbdd4ad14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20Po=CC=88nninghaus?= <> Date: Thu, 13 Jun 2019 17:23:52 +0200 Subject: [PATCH 044/353] log typo --- src/PluginConstants.php | 2 +- src/Services/PaymentService.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PluginConstants.php b/src/PluginConstants.php index 61e8f829..16ae108c 100644 --- a/src/PluginConstants.php +++ b/src/PluginConstants.php @@ -5,5 +5,5 @@ class PluginConstants { const NAME = 'Payone'; - const VERSION = '1.1.2'; + const VERSION = '1.1.3'; } diff --git a/src/Services/PaymentService.php b/src/Services/PaymentService.php index b7495105..754db670 100644 --- a/src/Services/PaymentService.php +++ b/src/Services/PaymentService.php @@ -88,7 +88,7 @@ public function openTransaction(Basket $basket) } if (!$authResponse->getSuccess()) { throw new \Exception( - $authResponse->getErrorMessage() ?? 'Could not initialize payment. Please choose another payment and retry' + $authResponse->getErrorMessage() ?? 'Could not initialize payment. Please choose another payment method and retry' ); } $this->responseCache->storeAuth($selectedPaymentMopId, $authResponse); From 8246ce0bbce529565af670b2c43a6ab441e2794d Mon Sep 17 00:00:00 2001 From: Jens Konopka Date: Tue, 13 Aug 2019 08:06:16 +0200 Subject: [PATCH 045/353] add amazon pay method --- plugin.json | 3 +- src/Helpers/PaymentHelper.php | 2 + src/Methods/PaymentMethodServiceFactory.php | 2 + src/Methods/PayoneAmazonPayPaymentMethod.php | 8 +++ .../CreateAmazonPayPaymentMethod.php | 68 +++++++++++++++++++ src/Providers/PayoneServiceProvider.php | 7 ++ 6 files changed, 89 insertions(+), 1 deletion(-) create mode 100644 src/Methods/PayoneAmazonPayPaymentMethod.php create mode 100644 src/Migrations/CreateAmazonPayPaymentMethod.php diff --git a/plugin.json b/plugin.json index b2e35e01..f788b6b4 100644 --- a/plugin.json +++ b/plugin.json @@ -26,7 +26,8 @@ "arvatis/payone-php-api":"2.2.*" }, "runOnBuild": [ - "Payone\\Migrations\\CreatePaymentMethods" + "Payone\\Migrations\\CreatePaymentMethods", + "Payone\\Migrations\\CreateAmazonPayPaymentMethod" ], "dataProviders": [ { diff --git a/src/Helpers/PaymentHelper.php b/src/Helpers/PaymentHelper.php index 6b7d6435..e03eee83 100644 --- a/src/Helpers/PaymentHelper.php +++ b/src/Helpers/PaymentHelper.php @@ -4,6 +4,7 @@ namespace Payone\Helpers; +use Payone\Methods\PayoneAmazonPayPaymentMethod; use Payone\Methods\PayoneCCPaymentMethod; use Payone\Methods\PayoneCODPaymentMethod; use Payone\Methods\PayoneDirectDebitPaymentMethod; @@ -130,6 +131,7 @@ public function getPaymentCodes() PayoneCCPaymentMethod::PAYMENT_CODE, PayoneDirectDebitPaymentMethod::PAYMENT_CODE, PayoneInvoiceSecurePaymentMethod::PAYMENT_CODE, + PayoneAmazonPayPaymentMethod::PAYMENT_CODE ]; } diff --git a/src/Methods/PaymentMethodServiceFactory.php b/src/Methods/PaymentMethodServiceFactory.php index 0b3d49f9..c0fa6ecf 100644 --- a/src/Methods/PaymentMethodServiceFactory.php +++ b/src/Methods/PaymentMethodServiceFactory.php @@ -37,6 +37,8 @@ public static function create($paymentCode) return pluginApp(PayoneDirectDebitPaymentMethod::class); case PayoneInvoiceSecurePaymentMethod::PAYMENT_CODE; return pluginApp(PayoneInvoiceSecurePaymentMethod::class); + case PayoneAmazonPayPaymentMethod::PAYMENT_CODE; + return pluginApp(PayoneAmazonPayPaymentMethod::PAYMENT_CODE); } throw new \InvalidArgumentException('Unknown payment method ' . $paymentCode); } diff --git a/src/Methods/PayoneAmazonPayPaymentMethod.php b/src/Methods/PayoneAmazonPayPaymentMethod.php new file mode 100644 index 00000000..5979e569 --- /dev/null +++ b/src/Methods/PayoneAmazonPayPaymentMethod.php @@ -0,0 +1,8 @@ +paymentMethodRepo = $paymentMethodRepo; + $this->paymentHelper = $paymentHelper; + $this->logger = $logger; + } + + /** + * Run on plugin build + * + * Create Payone payment methods + */ + public function run() + { + $paymentCode = PayoneAmazonPayPaymentMethod::PAYMENT_CODE; + if ($this->paymentHelper->getMopId($paymentCode) != 'no_paymentmethod_found') { + $this->logger->debug(' Skipping payment method creation of ' . $paymentCode); + return true; + } + $this->logger->debug(' Creating payment method ' . $paymentCode); + $this->paymentMethodRepo->createPaymentMethod([ + 'pluginKey' => PluginConstants::NAME, + 'paymentKey' => $paymentCode, + 'name' => $paymentCode, + ]); + } +} diff --git a/src/Providers/PayoneServiceProvider.php b/src/Providers/PayoneServiceProvider.php index 00a07a7f..812f23fc 100644 --- a/src/Providers/PayoneServiceProvider.php +++ b/src/Providers/PayoneServiceProvider.php @@ -7,6 +7,7 @@ use Payone\Helpers\PaymentHelper; use Payone\Methods\PaymentAbstract; use Payone\Methods\PaymentMethodServiceFactory; +use Payone\Methods\PayoneAmazonPayPaymentMethod; use Payone\Methods\PayoneCCPaymentMethod; use Payone\Methods\PayoneCODPaymentMethod; use Payone\Methods\PayoneDirectDebitPaymentMethod; @@ -201,6 +202,12 @@ protected function registerPaymentMethods(PaymentMethodContainer $payContainer) PayoneInvoiceSecurePaymentMethod::class, $events ); + + $payContainer->register( + 'Payone::' . PayoneAmazonPayPaymentMethod::PAYMENT_CODE, + PayoneAmazonPayPaymentMethod::class, + $events + ); } /** From cf308476b35a7d99f651043204b7360190885cd6 Mon Sep 17 00:00:00 2001 From: Jens Konopka Date: Tue, 13 Aug 2019 08:06:16 +0200 Subject: [PATCH 046/353] add amazon pay method --- plugin.json | 3 +- src/Helpers/PaymentHelper.php | 2 + src/Methods/PaymentMethodServiceFactory.php | 2 + src/Methods/PayoneAmazonPayPaymentMethod.php | 8 +++ .../CreateAmazonPayPaymentMethod.php | 68 +++++++++++++++++++ src/Providers/PayoneServiceProvider.php | 7 ++ 6 files changed, 89 insertions(+), 1 deletion(-) create mode 100644 src/Methods/PayoneAmazonPayPaymentMethod.php create mode 100644 src/Migrations/CreateAmazonPayPaymentMethod.php diff --git a/plugin.json b/plugin.json index b2e35e01..f788b6b4 100644 --- a/plugin.json +++ b/plugin.json @@ -26,7 +26,8 @@ "arvatis/payone-php-api":"2.2.*" }, "runOnBuild": [ - "Payone\\Migrations\\CreatePaymentMethods" + "Payone\\Migrations\\CreatePaymentMethods", + "Payone\\Migrations\\CreateAmazonPayPaymentMethod" ], "dataProviders": [ { diff --git a/src/Helpers/PaymentHelper.php b/src/Helpers/PaymentHelper.php index 6b7d6435..e03eee83 100644 --- a/src/Helpers/PaymentHelper.php +++ b/src/Helpers/PaymentHelper.php @@ -4,6 +4,7 @@ namespace Payone\Helpers; +use Payone\Methods\PayoneAmazonPayPaymentMethod; use Payone\Methods\PayoneCCPaymentMethod; use Payone\Methods\PayoneCODPaymentMethod; use Payone\Methods\PayoneDirectDebitPaymentMethod; @@ -130,6 +131,7 @@ public function getPaymentCodes() PayoneCCPaymentMethod::PAYMENT_CODE, PayoneDirectDebitPaymentMethod::PAYMENT_CODE, PayoneInvoiceSecurePaymentMethod::PAYMENT_CODE, + PayoneAmazonPayPaymentMethod::PAYMENT_CODE ]; } diff --git a/src/Methods/PaymentMethodServiceFactory.php b/src/Methods/PaymentMethodServiceFactory.php index 0b3d49f9..c0fa6ecf 100644 --- a/src/Methods/PaymentMethodServiceFactory.php +++ b/src/Methods/PaymentMethodServiceFactory.php @@ -37,6 +37,8 @@ public static function create($paymentCode) return pluginApp(PayoneDirectDebitPaymentMethod::class); case PayoneInvoiceSecurePaymentMethod::PAYMENT_CODE; return pluginApp(PayoneInvoiceSecurePaymentMethod::class); + case PayoneAmazonPayPaymentMethod::PAYMENT_CODE; + return pluginApp(PayoneAmazonPayPaymentMethod::PAYMENT_CODE); } throw new \InvalidArgumentException('Unknown payment method ' . $paymentCode); } diff --git a/src/Methods/PayoneAmazonPayPaymentMethod.php b/src/Methods/PayoneAmazonPayPaymentMethod.php new file mode 100644 index 00000000..5979e569 --- /dev/null +++ b/src/Methods/PayoneAmazonPayPaymentMethod.php @@ -0,0 +1,8 @@ +paymentMethodRepo = $paymentMethodRepo; + $this->paymentHelper = $paymentHelper; + $this->logger = $logger; + } + + /** + * Run on plugin build + * + * Create Payone payment methods + */ + public function run() + { + $paymentCode = PayoneAmazonPayPaymentMethod::PAYMENT_CODE; + if ($this->paymentHelper->getMopId($paymentCode) != 'no_paymentmethod_found') { + $this->logger->debug(' Skipping payment method creation of ' . $paymentCode); + return true; + } + $this->logger->debug(' Creating payment method ' . $paymentCode); + $this->paymentMethodRepo->createPaymentMethod([ + 'pluginKey' => PluginConstants::NAME, + 'paymentKey' => $paymentCode, + 'name' => $paymentCode, + ]); + } +} diff --git a/src/Providers/PayoneServiceProvider.php b/src/Providers/PayoneServiceProvider.php index 00a07a7f..812f23fc 100644 --- a/src/Providers/PayoneServiceProvider.php +++ b/src/Providers/PayoneServiceProvider.php @@ -7,6 +7,7 @@ use Payone\Helpers\PaymentHelper; use Payone\Methods\PaymentAbstract; use Payone\Methods\PaymentMethodServiceFactory; +use Payone\Methods\PayoneAmazonPayPaymentMethod; use Payone\Methods\PayoneCCPaymentMethod; use Payone\Methods\PayoneCODPaymentMethod; use Payone\Methods\PayoneDirectDebitPaymentMethod; @@ -201,6 +202,12 @@ protected function registerPaymentMethods(PaymentMethodContainer $payContainer) PayoneInvoiceSecurePaymentMethod::class, $events ); + + $payContainer->register( + 'Payone::' . PayoneAmazonPayPaymentMethod::PAYMENT_CODE, + PayoneAmazonPayPaymentMethod::class, + $events + ); } /** From d72e49d0662fe9207ee9fe1a45299b26c0161856 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20Po=CC=88nninghaus?= <> Date: Tue, 13 Aug 2019 18:06:20 +0200 Subject: [PATCH 047/353] relocate payone api start --- composer.json | 5 +- plugin.json | 7 +- resources/lang/de/Api.properties | 1 + resources/lang/en/Api.properties | 1 + .../lib/Payone/ArvPayoneApi/Api/Client.php | 137 ++++++++++++++ .../ArvPayoneApi/Api/ClientContract.php | 32 ++++ .../lib/Payone/ArvPayoneApi/Api/PostApi.php | 102 ++++++++++ .../lib/Payone/ArvPayoneApi/Lib/Version.php | 17 ++ .../ArvPayoneApi/Request/ArraySerializer.php | 55 ++++++ .../Request/Authorization/CashOnDelivery.php | 47 +++++ .../Request/Authorization/Creditcard.php | 65 +++++++ .../Request/Authorization/DirectDebit.php | 47 +++++ .../Request/Authorization/Invoice.php | 26 +++ .../Request/Authorization/InvoiceSecure.php | 57 ++++++ .../Authorization/OnlineBankTransfer.php | 76 ++++++++ .../Request/Authorization/PayPal.php | 61 ++++++ .../Request/Authorization/Paydirekt.php | 80 ++++++++ .../Request/Authorization/PrePayment.php | 25 +++ .../Request/Authorization/RequestFactory.php | 130 +++++++++++++ .../Request/Authorization/Sofort.php | 76 ++++++++ .../Request/AuthorizationRequestAbstract.php | 37 ++++ .../Request/AuthorizationRequestContract.php | 42 +++++ .../ArvPayoneApi/Request/Capture/Capture.php | 91 +++++++++ .../Request/Capture/CaptureModes.php | 12 ++ .../Request/Capture/RequestFactory.php | 38 ++++ .../Request/Capture/SettleAccountModes.php | 11 ++ .../ArvPayoneApi/Request/ClearingTypes.php | 15 ++ .../ArvPayoneApi/Request/Debit/Debit.php | 60 ++++++ .../Request/Debit/RequestFactory.php | 30 +++ .../Request/GenericAuthRequestFactory.php | 49 +++++ .../Request/GenericAuthorizationRequest.php | 67 +++++++ .../ArvPayoneApi/Request/GenericRequest.php | 120 ++++++++++++ .../Request/GenericRequestFactory.php | 47 +++++ .../Request/Managemandate/ManageMandate.php | 156 ++++++++++++++++ .../ManageMandateRequestFactory.php | 73 ++++++++ .../Request/Parts/BankAccount.php | 94 ++++++++++ .../ArvPayoneApi/Request/Parts/Cart.php | 46 +++++ .../Request/Parts/CartFactory.php | 57 ++++++ .../ArvPayoneApi/Request/Parts/CartItem.php | 174 ++++++++++++++++++ .../ArvPayoneApi/Request/Parts/Config.php | 102 ++++++++++ .../ArvPayoneApi/Request/Parts/Customer.php | 168 +++++++++++++++++ .../Request/Parts/CustomerAddress.php | 80 ++++++++ .../Request/Parts/RedirectUrls.php | 64 +++++++ .../Request/Parts/SepaMandate.php | 85 +++++++++ .../Request/Parts/ShippingAddress.php | 92 +++++++++ .../ArvPayoneApi/Request/Parts/SystemInfo.php | 78 ++++++++ .../ArvPayoneApi/Request/PaymentTypes.php | 30 +++ .../PreAuthorization/RequestFactory.php | 14 ++ .../ArvPayoneApi/Request/Refund/Refund.php | 46 +++++ .../Request/Refund/RequestFactory.php | 24 +++ .../Request/RequestDataContract.php | 50 +++++ .../Request/RequestFactoryContract.php | 15 ++ .../Request/SerializerFactory.php | 11 ++ .../Request/SerializerInterface.php | 13 ++ .../lib/Payone/ArvPayoneApi/Request/Types.php | 23 +++ .../Payone/ArvPayoneApi/Response/Clearing.php | 139 ++++++++++++++ .../Response/ClientErrorResponse.php | 54 ++++++ .../ArvPayoneApi/Response/GenericResponse.php | 103 +++++++++++ .../Response/ResponseContract.php | 40 ++++ .../Response/ResponseDataAbstract.php | 31 ++++ .../Response/ResponseDataContract.php | 11 ++ .../ArvPayoneApi/Response/ResponseFactory.php | 60 ++++++ .../Response/ResponseWithClearing.php | 29 +++ .../Payone/ArvPayoneApi/Response/Status.php | 13 ++ resources/lib/doAuth.php | 26 ++- resources/lib/doCapture.php | 24 ++- resources/lib/doDebit.php | 24 ++- resources/lib/doManagemandate.php | 24 ++- resources/lib/doPreAuth.php | 23 ++- resources/lib/doRefund.php | 23 ++- src/Services/Api.php | 3 + src/Services/Auth.php | 4 + 72 files changed, 3746 insertions(+), 46 deletions(-) create mode 100644 resources/lib/Payone/ArvPayoneApi/Api/Client.php create mode 100644 resources/lib/Payone/ArvPayoneApi/Api/ClientContract.php create mode 100644 resources/lib/Payone/ArvPayoneApi/Api/PostApi.php create mode 100644 resources/lib/Payone/ArvPayoneApi/Lib/Version.php create mode 100644 resources/lib/Payone/ArvPayoneApi/Request/ArraySerializer.php create mode 100644 resources/lib/Payone/ArvPayoneApi/Request/Authorization/CashOnDelivery.php create mode 100644 resources/lib/Payone/ArvPayoneApi/Request/Authorization/Creditcard.php create mode 100644 resources/lib/Payone/ArvPayoneApi/Request/Authorization/DirectDebit.php create mode 100644 resources/lib/Payone/ArvPayoneApi/Request/Authorization/Invoice.php create mode 100644 resources/lib/Payone/ArvPayoneApi/Request/Authorization/InvoiceSecure.php create mode 100644 resources/lib/Payone/ArvPayoneApi/Request/Authorization/OnlineBankTransfer.php create mode 100644 resources/lib/Payone/ArvPayoneApi/Request/Authorization/PayPal.php create mode 100644 resources/lib/Payone/ArvPayoneApi/Request/Authorization/Paydirekt.php create mode 100644 resources/lib/Payone/ArvPayoneApi/Request/Authorization/PrePayment.php create mode 100644 resources/lib/Payone/ArvPayoneApi/Request/Authorization/RequestFactory.php create mode 100644 resources/lib/Payone/ArvPayoneApi/Request/Authorization/Sofort.php create mode 100644 resources/lib/Payone/ArvPayoneApi/Request/AuthorizationRequestAbstract.php create mode 100644 resources/lib/Payone/ArvPayoneApi/Request/AuthorizationRequestContract.php create mode 100644 resources/lib/Payone/ArvPayoneApi/Request/Capture/Capture.php create mode 100644 resources/lib/Payone/ArvPayoneApi/Request/Capture/CaptureModes.php create mode 100644 resources/lib/Payone/ArvPayoneApi/Request/Capture/RequestFactory.php create mode 100644 resources/lib/Payone/ArvPayoneApi/Request/Capture/SettleAccountModes.php create mode 100644 resources/lib/Payone/ArvPayoneApi/Request/ClearingTypes.php create mode 100644 resources/lib/Payone/ArvPayoneApi/Request/Debit/Debit.php create mode 100644 resources/lib/Payone/ArvPayoneApi/Request/Debit/RequestFactory.php create mode 100644 resources/lib/Payone/ArvPayoneApi/Request/GenericAuthRequestFactory.php create mode 100644 resources/lib/Payone/ArvPayoneApi/Request/GenericAuthorizationRequest.php create mode 100644 resources/lib/Payone/ArvPayoneApi/Request/GenericRequest.php create mode 100644 resources/lib/Payone/ArvPayoneApi/Request/GenericRequestFactory.php create mode 100644 resources/lib/Payone/ArvPayoneApi/Request/Managemandate/ManageMandate.php create mode 100644 resources/lib/Payone/ArvPayoneApi/Request/Managemandate/ManageMandateRequestFactory.php create mode 100644 resources/lib/Payone/ArvPayoneApi/Request/Parts/BankAccount.php create mode 100644 resources/lib/Payone/ArvPayoneApi/Request/Parts/Cart.php create mode 100644 resources/lib/Payone/ArvPayoneApi/Request/Parts/CartFactory.php create mode 100644 resources/lib/Payone/ArvPayoneApi/Request/Parts/CartItem.php create mode 100644 resources/lib/Payone/ArvPayoneApi/Request/Parts/Config.php create mode 100644 resources/lib/Payone/ArvPayoneApi/Request/Parts/Customer.php create mode 100644 resources/lib/Payone/ArvPayoneApi/Request/Parts/CustomerAddress.php create mode 100644 resources/lib/Payone/ArvPayoneApi/Request/Parts/RedirectUrls.php create mode 100644 resources/lib/Payone/ArvPayoneApi/Request/Parts/SepaMandate.php create mode 100644 resources/lib/Payone/ArvPayoneApi/Request/Parts/ShippingAddress.php create mode 100644 resources/lib/Payone/ArvPayoneApi/Request/Parts/SystemInfo.php create mode 100644 resources/lib/Payone/ArvPayoneApi/Request/PaymentTypes.php create mode 100644 resources/lib/Payone/ArvPayoneApi/Request/PreAuthorization/RequestFactory.php create mode 100644 resources/lib/Payone/ArvPayoneApi/Request/Refund/Refund.php create mode 100644 resources/lib/Payone/ArvPayoneApi/Request/Refund/RequestFactory.php create mode 100644 resources/lib/Payone/ArvPayoneApi/Request/RequestDataContract.php create mode 100644 resources/lib/Payone/ArvPayoneApi/Request/RequestFactoryContract.php create mode 100644 resources/lib/Payone/ArvPayoneApi/Request/SerializerFactory.php create mode 100644 resources/lib/Payone/ArvPayoneApi/Request/SerializerInterface.php create mode 100644 resources/lib/Payone/ArvPayoneApi/Request/Types.php create mode 100644 resources/lib/Payone/ArvPayoneApi/Response/Clearing.php create mode 100644 resources/lib/Payone/ArvPayoneApi/Response/ClientErrorResponse.php create mode 100644 resources/lib/Payone/ArvPayoneApi/Response/GenericResponse.php create mode 100644 resources/lib/Payone/ArvPayoneApi/Response/ResponseContract.php create mode 100644 resources/lib/Payone/ArvPayoneApi/Response/ResponseDataAbstract.php create mode 100644 resources/lib/Payone/ArvPayoneApi/Response/ResponseDataContract.php create mode 100644 resources/lib/Payone/ArvPayoneApi/Response/ResponseFactory.php create mode 100644 resources/lib/Payone/ArvPayoneApi/Response/ResponseWithClearing.php create mode 100644 resources/lib/Payone/ArvPayoneApi/Response/Status.php diff --git a/composer.json b/composer.json index e018a1b5..364ff757 100644 --- a/composer.json +++ b/composer.json @@ -16,8 +16,5 @@ "type": "git", "url": "https://github.com/plentymarkets/plugin-interface.git" } - ], - "require": { - "arvatis/payone-php-api":"2.2.*" - } + ] } diff --git a/plugin.json b/plugin.json index 32868486..fb15a6db 100644 --- a/plugin.json +++ b/plugin.json @@ -21,10 +21,13 @@ "javaScriptFiles": [], "containers": [], "require": ["IO"], - "serviceProvider": "Payone\\Providers\\PayoneServiceProvider", "dependencies":{ - "arvatis/payone-php-api":"2.2.*" + "guzzlehttp/guzzle": "6.*", + "symfony/serializer": "3.2.7", + "symfony/property-access": "3.2.7", + "doctrine/common": "2.7.2" }, + "serviceProvider": "Payone\\Providers\\PayoneServiceProvider", "runOnBuild": [ "Payone\\Migrations\\CreatePaymentMethods" ], diff --git a/resources/lang/de/Api.properties b/resources/lang/de/Api.properties index 404bfce8..ee4c310a 100644 --- a/resources/lang/de/Api.properties +++ b/resources/lang/de/Api.properties @@ -5,3 +5,4 @@ doCapture = "doCapture" doRefund = "doRefund" doReAuth = "doReAuth" doCalculation = "doCalculation" +doAuth = "doAuth" diff --git a/resources/lang/en/Api.properties b/resources/lang/en/Api.properties index 404bfce8..ee4c310a 100644 --- a/resources/lang/en/Api.properties +++ b/resources/lang/en/Api.properties @@ -5,3 +5,4 @@ doCapture = "doCapture" doRefund = "doRefund" doReAuth = "doReAuth" doCalculation = "doCalculation" +doAuth = "doAuth" diff --git a/resources/lib/Payone/ArvPayoneApi/Api/Client.php b/resources/lib/Payone/ArvPayoneApi/Api/Client.php new file mode 100644 index 00000000..20eaf857 --- /dev/null +++ b/resources/lib/Payone/ArvPayoneApi/Api/Client.php @@ -0,0 +1,137 @@ +client = new \GuzzleHttp\Client(); + } + + /** + * @return \GuzzleHttp\Client + */ + public function getClient() + { + return $this->client; + } + + /** + * @param \GuzzleHttp\Client $client + * + * @return Client + */ + public function setClient(\GuzzleHttp\Client $client) + { + $this->client = $client; + + return $this; + } + + /** + * @return string + */ + public function getHttpMethod() + { + return $this->httpMethod; + } + + /** + * @param string $httpMethod + * + * @return Client + */ + public function setHttpMethod($httpMethod) + { + $this->httpMethod = $httpMethod; + + return $this; + } + + /** + * @return string + */ + public function getEndpointUrl() + { + return $this->url; + } + + /** + * @param string $url + * + * @return Client + */ + public function setEndpointUrl($url) + { + $this->url = $url; + + return $this; + } + + /** + * @param array $data + * + * @return string + */ + public function doRequest($data) + { + $res = $this->client->request( + $this->getHttpMethod(), + $this->getEndpointUrl(), + [ + 'form_params' => $data, + 'headers' => $this->headers, + ] + ); + + return (string) $res->getBody(); + } + + /** + * @param string $method + * + * @return $this + */ + public function setMethod($method) + { + $this->httpMethod = $method; + + return $this; + } + + /** + * @param string $key + * @param string $value + */ + public function addHeader($key, $value) + { + if (!$this->headers) { + $this->headers = []; + } + $this->headers[$key] = $value; + } +} diff --git a/resources/lib/Payone/ArvPayoneApi/Api/ClientContract.php b/resources/lib/Payone/ArvPayoneApi/Api/ClientContract.php new file mode 100644 index 00000000..4f035d88 --- /dev/null +++ b/resources/lib/Payone/ArvPayoneApi/Api/ClientContract.php @@ -0,0 +1,32 @@ +client = $client; + $this->serializer = $serializer; + $client->setEndpointUrl($this->getEndPointUrl()); + $client->setMethod('POST'); + $client->addHeader('Content-Type', 'application/x-www-form-urlencoded; charset=utf-8'); + } + + /** + * @return ClientContract + */ + public function getClient(): ClientContract + { + return $this->client; + } + + /** + * @param ClientContract $client + * + * @return PostApi + */ + public function setClient(ClientContract $client) + { + $this->client = $client; + + return $this; + } + + /** + * @param object $entity + * + * @return ResponseContract + */ + public function doRequest($entity) + { + $this->requestData = $this->serializer->serialize($entity); + try { + $responseBody = $this->client->doRequest($this->requestData); + + return ResponseFactory::create($responseBody); + } catch (\Exception $e) { + } + + return new ClientErrorResponse($e->getMessage()); + } + + /** + * @return string + */ + protected function getEndPointUrl() + { + return $this::PAYONE_SERVER_API_URL; + } + + /** + * @return array + */ + public function getLastRequestData(){ + return $this->requestData; + } +} diff --git a/resources/lib/Payone/ArvPayoneApi/Lib/Version.php b/resources/lib/Payone/ArvPayoneApi/Lib/Version.php new file mode 100644 index 00000000..82efa130 --- /dev/null +++ b/resources/lib/Payone/ArvPayoneApi/Lib/Version.php @@ -0,0 +1,17 @@ +jsonSerialize(); + asort($result); + return $result; + } + + $oClass = new \ReflectionClass(get_class($object)); + $result = []; + foreach ($oClass->getMethods() as $method) { + if (substr($method->name, 0, 3) != 'get') { + continue; + } + $propName = $this->camelCaseToUnderscore(substr($method->name, 3)); + + $value = $method->invoke($object); + if (is_object($value)) { + $result += $this->serialize($value); + continue; + } + if ($value !== null && $value !== '') { + $result[$propName] = $value; + } + } + + asort($result); + + return $result; + } + + /** + * @param string $string + * + * @return string + */ + private function camelCaseToUnderscore($string) + { + return strtolower(preg_replace('/(?authorizationRequest = $authorizationRequest; + $this->shippingprovider = $shippingprovider; + } + + /** + * Getter for Shippingprovider + * + * @return mixed + */ + public function getShippingprovider() + { + return $this->shippingprovider; + } +} diff --git a/resources/lib/Payone/ArvPayoneApi/Request/Authorization/Creditcard.php b/resources/lib/Payone/ArvPayoneApi/Request/Authorization/Creditcard.php new file mode 100644 index 00000000..2a811b3e --- /dev/null +++ b/resources/lib/Payone/ArvPayoneApi/Request/Authorization/Creditcard.php @@ -0,0 +1,65 @@ +authorizationRequest = $authorizationRequest; + $this->pseudocardpan = $pseudocardPan; + $this->urls = $urls; + } + + /** + * Getter for Pseudocardpan + * + * @return string + */ + public function getPseudocardpan() + { + return $this->pseudocardpan; + } + + /** + * Getter for Urls + * + * @return RedirectUrls + */ + public function getUrls() + { + return $this->urls; + } +} diff --git a/resources/lib/Payone/ArvPayoneApi/Request/Authorization/DirectDebit.php b/resources/lib/Payone/ArvPayoneApi/Request/Authorization/DirectDebit.php new file mode 100644 index 00000000..e1357018 --- /dev/null +++ b/resources/lib/Payone/ArvPayoneApi/Request/Authorization/DirectDebit.php @@ -0,0 +1,47 @@ +authorizationRequest = $authorizationRequest; + $this->sepaMandate = $sepaMandate; + } + + /** + * Getter for SepaMandate + * + * @return SepaMandate + */ + public function getSepaMandate() + { + return $this->sepaMandate; + } +} diff --git a/resources/lib/Payone/ArvPayoneApi/Request/Authorization/Invoice.php b/resources/lib/Payone/ArvPayoneApi/Request/Authorization/Invoice.php new file mode 100644 index 00000000..d324d197 --- /dev/null +++ b/resources/lib/Payone/ArvPayoneApi/Request/Authorization/Invoice.php @@ -0,0 +1,26 @@ +authorizationRequest = $authorizationRequest; + } +} diff --git a/resources/lib/Payone/ArvPayoneApi/Request/Authorization/InvoiceSecure.php b/resources/lib/Payone/ArvPayoneApi/Request/Authorization/InvoiceSecure.php new file mode 100644 index 00000000..f888ed9d --- /dev/null +++ b/resources/lib/Payone/ArvPayoneApi/Request/Authorization/InvoiceSecure.php @@ -0,0 +1,57 @@ +authorizationRequest = $authorizationRequest; + $this->cart = $cart; + } + + /** + * Getter for Subclearingtype + * + * @return string + */ + public function getSubclearingtype() + { + return $this->subclearingtype; + } + + /** + * Getter for Cart + * @return Cart + */ + public function getCart() + { + return $this->cart; + } +} diff --git a/resources/lib/Payone/ArvPayoneApi/Request/Authorization/OnlineBankTransfer.php b/resources/lib/Payone/ArvPayoneApi/Request/Authorization/OnlineBankTransfer.php new file mode 100644 index 00000000..2d5ae79c --- /dev/null +++ b/resources/lib/Payone/ArvPayoneApi/Request/Authorization/OnlineBankTransfer.php @@ -0,0 +1,76 @@ +authorizationRequest = $authorizationRequest; + $this->urls = $urls; + $this->bankAccount = $bankAccount; + } + + /** + * Getter for Urls + * + * @return RedirectUrls + */ + public function getUrls() + { + return $this->urls; + } + + /** + * Getter for Onlinebanktransfertype + * + * @return string + */ + public function getOnlinebanktransfertype() + { + return $this->onlinebanktransfertype; + } + + /** + * Getter for BankAccount + * + * @return BankAccount + */ + public function getBankAccount() + { + return $this->bankAccount; + } +} diff --git a/resources/lib/Payone/ArvPayoneApi/Request/Authorization/PayPal.php b/resources/lib/Payone/ArvPayoneApi/Request/Authorization/PayPal.php new file mode 100644 index 00000000..c7e959a5 --- /dev/null +++ b/resources/lib/Payone/ArvPayoneApi/Request/Authorization/PayPal.php @@ -0,0 +1,61 @@ +authorizationRequest = $authorizationRequest; + $this->urls = $urls; + } + + /** + * Getter for Urls + * + * @return RedirectUrls + */ + public function getUrls() + { + return $this->urls; + } + + /** + * Getter for Wallettype + * + * @return string + */ + public function getWallettype() + { + return $this->wallettype; + } +} diff --git a/resources/lib/Payone/ArvPayoneApi/Request/Authorization/Paydirekt.php b/resources/lib/Payone/ArvPayoneApi/Request/Authorization/Paydirekt.php new file mode 100644 index 00000000..c88d7eec --- /dev/null +++ b/resources/lib/Payone/ArvPayoneApi/Request/Authorization/Paydirekt.php @@ -0,0 +1,80 @@ +authorizationRequest = $authorizationRequest; + $this->urls = $urls; + $this->shippingAddress = $shippingAddress; + } + + /** + * Getter for Urls + * + * @return RedirectUrls + */ + public function getUrls() + { + return $this->urls; + } + + /** + * Getter for Wallettype + * + * @return string + */ + public function getWallettype() + { + return $this->wallettype; + } + + /** + * Getter for ShippingAddress + * + * @return ShippingAddress + */ + public function getShippingAddress() + { + return $this->shippingAddress; + } +} diff --git a/resources/lib/Payone/ArvPayoneApi/Request/Authorization/PrePayment.php b/resources/lib/Payone/ArvPayoneApi/Request/Authorization/PrePayment.php new file mode 100644 index 00000000..d2d28ace --- /dev/null +++ b/resources/lib/Payone/ArvPayoneApi/Request/Authorization/PrePayment.php @@ -0,0 +1,25 @@ +authorizationRequest = $authorizationRequest; + } +} diff --git a/resources/lib/Payone/ArvPayoneApi/Request/Authorization/RequestFactory.php b/resources/lib/Payone/ArvPayoneApi/Request/Authorization/RequestFactory.php new file mode 100644 index 00000000..56d8d9b0 --- /dev/null +++ b/resources/lib/Payone/ArvPayoneApi/Request/Authorization/RequestFactory.php @@ -0,0 +1,130 @@ +authorizationRequest = $authorizationRequest; + $this->urls = $urls; + $this->bankAccount = $bankAccount; + } + + /** + * Getter for Urls + * + * @return RedirectUrls + */ + public function getUrls() + { + return $this->urls; + } + + /** + * Getter for Onlinebanktransfertype + * + * @return string + */ + public function getOnlinebanktransfertype() + { + return $this->onlinebanktransfertype; + } + + /** + * Getter for BankAccount + * + * @return BankAccount + */ + public function getBankAccount() + { + return $this->bankAccount; + } +} diff --git a/resources/lib/Payone/ArvPayoneApi/Request/AuthorizationRequestAbstract.php b/resources/lib/Payone/ArvPayoneApi/Request/AuthorizationRequestAbstract.php new file mode 100644 index 00000000..4fa5f707 --- /dev/null +++ b/resources/lib/Payone/ArvPayoneApi/Request/AuthorizationRequestAbstract.php @@ -0,0 +1,37 @@ +authorizationRequest; + } + + /** + * Getter for Clearingtype + * + * @return string + */ + public function getClearingtype() + { + return $this->clearingtype; + } +} diff --git a/resources/lib/Payone/ArvPayoneApi/Request/AuthorizationRequestContract.php b/resources/lib/Payone/ArvPayoneApi/Request/AuthorizationRequestContract.php new file mode 100644 index 00000000..5543ccb2 --- /dev/null +++ b/resources/lib/Payone/ArvPayoneApi/Request/AuthorizationRequestContract.php @@ -0,0 +1,42 @@ +request = $request; + $this->txid = $txid; + $this->capturemode = $capturemode; + $this->cart = $cart; + $this->settleaccount = $settleaccount; + } + + /** + * Getter for Cart + * @return Cart + */ + public function getCart() + { + return $this->cart; + } + + /** + * Getter for Txid + * + * @return string + */ + public function getTxid() + { + return $this->txid; + } + + /** + * Getter for Capturemode + * + * @return string + */ + public function getCapturemode() + { + return $this->capturemode; + } + + /** + * Getter for Request + * + * @return GenericRequest + */ + public function getRequest() + { + return $this->request; + } + + /** + * Getter for Settleaccount + * @return mixed + */ + public function getSettleaccount() + { + return $this->settleaccount; + } + + +} diff --git a/resources/lib/Payone/ArvPayoneApi/Request/Capture/CaptureModes.php b/resources/lib/Payone/ArvPayoneApi/Request/Capture/CaptureModes.php new file mode 100644 index 00000000..12f5055a --- /dev/null +++ b/resources/lib/Payone/ArvPayoneApi/Request/Capture/CaptureModes.php @@ -0,0 +1,12 @@ +txid = $txid; + $this->request = $request; + $this->cart = $cart; + } + + /** + * Getter for Request + * + * @return GenericRequest + */ + public function getRequest() + { + return $this->request; + } + + /** + * Getter for Txid + * + * @return string + */ + public function getTxid() + { + return $this->txid; + } + + /** + * Getter for Cart + * @return Cart + */ + public function getCart() + { + return $this->cart; + } +} diff --git a/resources/lib/Payone/ArvPayoneApi/Request/Debit/RequestFactory.php b/resources/lib/Payone/ArvPayoneApi/Request/Debit/RequestFactory.php new file mode 100644 index 00000000..e2f62ca4 --- /dev/null +++ b/resources/lib/Payone/ArvPayoneApi/Request/Debit/RequestFactory.php @@ -0,0 +1,30 @@ +customer = $customer; + $this->reference = $reference; + $this->genericRequest = $genericRequest; + } + + /** + * Getter for Reference + */ + public function getReference() + { + return $this->reference; + } + + /** + * Getter for Customer + * + * @return Customer + */ + public function getCustomer(): Customer + { + return $this->customer; + } + + /** + * Getter for GenericRequestrequest + * + * @return GenericRequest + */ + public function getGenericRequest() + { + return $this->genericRequest; + } +} diff --git a/resources/lib/Payone/ArvPayoneApi/Request/GenericRequest.php b/resources/lib/Payone/ArvPayoneApi/Request/GenericRequest.php new file mode 100644 index 00000000..5cce0e37 --- /dev/null +++ b/resources/lib/Payone/ArvPayoneApi/Request/GenericRequest.php @@ -0,0 +1,120 @@ +config = $config; + $this->request = $request; + $this->amount = $amount; + $this->currency = $currency; + $this->sequencenumber = $sequencenumber; + $this->info = $info; + } + + /** + * Getter for Sequencenumber + */ + public function getSequencenumber() + { + return $this->sequencenumber; + } + + /** + * Getter for Amount + * + * @return int + */ + public function getAmount() + { + return $this->amount; + } + + /** + * Getter for Currency + * + * @return string + */ + public function getCurrency() + { + return $this->currency; + } + + /** + * Getter for Config + * + * @return Config + */ + public function getConfig(): Config + { + return $this->config; + } + + /** + * @return string + */ + public function getRequest() + { + return $this->request; + } + + /** + * Getter for Info + * + * @return SystemInfo + */ + public function getInfo() + { + return $this->info; + } +} diff --git a/resources/lib/Payone/ArvPayoneApi/Request/GenericRequestFactory.php b/resources/lib/Payone/ArvPayoneApi/Request/GenericRequestFactory.php new file mode 100644 index 00000000..ac7377f0 --- /dev/null +++ b/resources/lib/Payone/ArvPayoneApi/Request/GenericRequestFactory.php @@ -0,0 +1,47 @@ +config = $config; + $this->currency = $currency; + $this->customer = $customer; + $this->info = $info; + $this->bankAccount = $bankAccount; + $this->mandateIdentification = $mandateIdentification; + } + + /** + * Getter for Clearingtype + * + * @return string + */ + public function getClearingtype() + { + return $this->clearingtype; + } + + /** + * Getter for MandateIdentification + * + * @return mixed + */ + public function getMandateIdentification() + { + return $this->mandateIdentification; + } + + /** + * Getter for Currency + * + * @return mixed + */ + public function getCurrency() + { + return $this->currency; + } + + /** + * Getter for Request + * + * @return string + */ + public function getRequest() + { + return $this->request; + } + + /** + * Getter for BankAccount + * + * @return BankAccount + */ + public function getBankAccount() + { + return $this->bankAccount; + } + + /** + * Getter for Customer + * + * @return Customer + */ + public function getCustomer() + { + return $this->customer; + } + + /** + * Getter for Config + * + * @return Config + */ + public function getConfig() + { + return $this->config; + } + + /** + * Getter for Info + * + * @return SystemInfo + */ + public function getInfo() + { + return $this->info; + } + + /** + * Getter for Sequencenumber + */ + public function getSequencenumber() + { + return null; + } + + /** + * Getter for Amount + * + * @return int + */ + public function getAmount() + { + return null; + } +} diff --git a/resources/lib/Payone/ArvPayoneApi/Request/Managemandate/ManageMandateRequestFactory.php b/resources/lib/Payone/ArvPayoneApi/Request/Managemandate/ManageMandateRequestFactory.php new file mode 100644 index 00000000..4bf9205a --- /dev/null +++ b/resources/lib/Payone/ArvPayoneApi/Request/Managemandate/ManageMandateRequestFactory.php @@ -0,0 +1,73 @@ +bankcountry = $bankcountry; + $this->iban = $iban; + $this->bic = $bic; + $holderNames = explode(' ', $holder); + $this->firstname = $holderNames[0] ?? ''; + $this->lastname = $holderNames[1] ?? ''; + } + + /** + * Getter for Bankcountry + * + * @return mixed + */ + public function getBankcountry() + { + return $this->bankcountry; + } + + /** + * Getter for Iban + * + * @return mixed + */ + public function getIban() + { + return $this->iban; + } + + /** + * Getter for Bic + * + * @return mixed + */ + public function getBic() + { + return $this->bic; + } + + /** + * Getter for Firstname + * + * @return mixed + */ + public function getFirstname() + { + return $this->firstname; + } + + /** + * Getter for Lastname + * + * @return mixed + */ + public function getLastname() + { + return $this->lastname; + } +} diff --git a/resources/lib/Payone/ArvPayoneApi/Request/Parts/Cart.php b/resources/lib/Payone/ArvPayoneApi/Request/Parts/Cart.php new file mode 100644 index 00000000..dcd77d31 --- /dev/null +++ b/resources/lib/Payone/ArvPayoneApi/Request/Parts/Cart.php @@ -0,0 +1,46 @@ +cartItems; + } + + /** + * @return array + */ + public function jsonSerialize() + { + $cartItems = $this->getCartItems(); + if (!$cartItems) { + return []; + } + $itemsArray = array_map( + function (CartItem $cartItem) { + return $cartItem->jsonSerialize(); + }, + $cartItems + ); + return call_user_func_array('array_merge', $itemsArray); + } + + /** + * @param CartItem $cartItem + */ + public function add(CartItem $cartItem) + { + $this->cartItems[] = $cartItem; + } +} \ No newline at end of file diff --git a/resources/lib/Payone/ArvPayoneApi/Request/Parts/CartFactory.php b/resources/lib/Payone/ArvPayoneApi/Request/Parts/CartFactory.php new file mode 100644 index 00000000..2f81f71c --- /dev/null +++ b/resources/lib/Payone/ArvPayoneApi/Request/Parts/CartFactory.php @@ -0,0 +1,57 @@ + $cartItemData) { + $cartItem = new CartItem( + $i, + $cartItemData['itemId'], + CartItem::TYPE_GOODS, + $cartItemData['quantity'] ?? '', + $cartItemData['price'], + $cartItemData['vat'], + $cartItemData['name'] ?? '' + ); + $cart->add($cartItem); + } + $cart->add(self::calculateShipping($requestData, $cart)); + return $cart; + } + + /** + * @param array $requestData + * @param $cart + * @return CartItem + */ + private static function calculateShipping(array $requestData, Cart $cart) + { + $taxRate = 0; + $basket = $requestData['basket']; + if ($basket['shippingAmountNet'] > 0) { + $taxRate = (int )round( + ($basket['shippingAmount'] / $basket['shippingAmountNet'] - 1) + * 10000 + ); + } + $shippingCost = new CartItem( + count($cart->getCartItems()), + 'shipping', + CartItem::TYPE_SHIPMENt, + 1, + $basket['shippingAmount'], + $taxRate, + 'shipping' + ); + return $shippingCost; + } +} \ No newline at end of file diff --git a/resources/lib/Payone/ArvPayoneApi/Request/Parts/CartItem.php b/resources/lib/Payone/ArvPayoneApi/Request/Parts/CartItem.php new file mode 100644 index 00000000..7c14ebb3 --- /dev/null +++ b/resources/lib/Payone/ArvPayoneApi/Request/Parts/CartItem.php @@ -0,0 +1,174 @@ + 99 = basis points (e.g. 1900 = 19%) + * + * @var int + */ + private $va; + + /** + * CartItem constructor. + * + * @param int $position + * @param string $sku + * @param string $type + * @param int $qty + * @param int $price in cent + * @param string $description ='' + * @param int $taxRate + */ + public function __construct( + $position, + $sku, + $type, + $qty, + $price, + $taxRate, + $description = '' + ) { + $this->position = $position; + $this->id = $sku; + $this->it = $type; + $this->no = $qty; + $this->pr = $price; + $this->de = $description; + $this->va = $taxRate; + } + + /** + * Getter for Position + * + * @return int + */ + public function getPosition() + { + return $this->position; + } + + /** + * Getter for Id + * + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * Getter for It + * + * @return string + */ + public function getIt() + { + return $this->it; + } + + /** + * Getter for No + * + * @return int + */ + public function getNo() + { + return $this->no; + } + + /** + * Getter for Pr + * + * @return int + */ + public function getPr() + { + return $this->pr; + } + + /** + * Getter for De + * + * @return string + */ + public function getDe() + { + return $this->de; + } + + /** + * Getter for Va + * + * @return int + */ + public function getVa() + { + return $this->va; + } + + public function jsonSerialize() + { + return [ + 'id' . $this->getPosition() => $this->getId(), + 'it' . $this->getPosition() => $this->getIt(), + 'no' . $this->getPosition() => $this->getNo(), + 'pr' . $this->getPosition() => $this->getPr(), + 'de' . $this->getPosition() => $this->getDe(), + 'va' . $this->getPosition() => $this->getva(), + ]; + } +} diff --git a/resources/lib/Payone/ArvPayoneApi/Request/Parts/Config.php b/resources/lib/Payone/ArvPayoneApi/Request/Parts/Config.php new file mode 100644 index 00000000..2b55bf0f --- /dev/null +++ b/resources/lib/Payone/ArvPayoneApi/Request/Parts/Config.php @@ -0,0 +1,102 @@ +aid = $aid; + $this->mid = $mid; + $this->portalid = $portalid; + $this->key = hash('md5', $key); + $this->mode = $mode; + } + + /** + * Getter for Aid + * + * @return mixed + */ + public function getAid() + { + return $this->aid; + } + + /** + * Getter for Mid + * + * @return mixed + */ + public function getMid() + { + return $this->mid; + } + + /** + * Getter for Portalid + * + * @return mixed + */ + public function getPortalid() + { + return $this->portalid; + } + + /** + * Getter for Key + * + * @return string + */ + public function getKey() + { + return $this->key; + } + + /** + * Getter for Mode + * + * @return string + */ + public function getMode() + { + return $this->mode; + } + + /** + * Getter for Encoding + * + * @return string + */ + public function getEncoding() + { + return $this->encoding; + } + + /** + * Getter for ApiVersion + * + * @return string + */ + public function getApiVersion() + { + return $this->apiVersion; + } +} diff --git a/resources/lib/Payone/ArvPayoneApi/Request/Parts/Customer.php b/resources/lib/Payone/ArvPayoneApi/Request/Parts/Customer.php new file mode 100644 index 00000000..54ca3a31 --- /dev/null +++ b/resources/lib/Payone/ArvPayoneApi/Request/Parts/Customer.php @@ -0,0 +1,168 @@ +salutation = $gender == 'm' ? 'Herr' : 'Frau'; + $this->title = $title; + $this->firstname = $firstname; + $this->lastname = $lastname; + $this->address = $address; + $this->email = $email; + $this->telephonenumber = $telephonenumber; + $this->birthday = $birthday; + $this->language = $language; + $this->gender = $gender; + $this->ip = $ip; + } + + /** + * Getter for Salutation + * + * @return string + */ + public function getSalutation() + { + return $this->salutation; + } + + /** + * Getter for Title + * + * @return mixed + */ + public function getTitle() + { + return $this->title; + } + + /** + * Getter for Firstname + * + * @return mixed + */ + public function getFirstname() + { + return $this->firstname; + } + + /** + * Getter for Lastname + * + * @return mixed + */ + public function getLastname() + { + return $this->lastname; + } + + /** + * Getter for Address + * + * @return CustomerAddress + */ + public function getAddress() + { + return $this->address; + } + + /** + * Getter for Email + * + * @return mixed + */ + public function getEmail() + { + return $this->email; + } + + /** + * Getter for Telephonenumber + * + * @return mixed + */ + public function getTelephonenumber() + { + return $this->telephonenumber; + } + + /** + * Getter for Birthday + * + * @return string + */ + public function getBirthday() + { + return str_replace('-', '', $this->birthday); + } + + /** + * Getter for Language + * + * @return mixed + */ + public function getLanguage() + { + return $this->language; + } + + /** + * Getter for Gender + * + * @return mixed + */ + public function getGender() + { + return $this->gender; + } + + /** + * Getter for Ip + * + * @return mixed + */ + public function getIp() + { + return $this->ip; + } +} diff --git a/resources/lib/Payone/ArvPayoneApi/Request/Parts/CustomerAddress.php b/resources/lib/Payone/ArvPayoneApi/Request/Parts/CustomerAddress.php new file mode 100644 index 00000000..7547ac5c --- /dev/null +++ b/resources/lib/Payone/ArvPayoneApi/Request/Parts/CustomerAddress.php @@ -0,0 +1,80 @@ +street = $street; + $this->addressaddition = $addressaddition; + $this->zip = $zip; + $this->city = $city; + $this->country = $country; + } + + /** + * Getter for Street + * + * @return mixed + */ + public function getStreet() + { + return $this->street; + } + + /** + * Getter for Addressaddition + * + * @return mixed + */ + public function getAddressaddition() + { + return $this->addressaddition; + } + + /** + * Getter for Zip + * + * @return mixed + */ + public function getZip() + { + return $this->zip; + } + + /** + * Getter for City + * + * @return mixed + */ + public function getCity() + { + return $this->city; + } + + /** + * Getter for Country + * + * @return mixed + */ + public function getCountry() + { + return $this->country; + } +} diff --git a/resources/lib/Payone/ArvPayoneApi/Request/Parts/RedirectUrls.php b/resources/lib/Payone/ArvPayoneApi/Request/Parts/RedirectUrls.php new file mode 100644 index 00000000..2967f63a --- /dev/null +++ b/resources/lib/Payone/ArvPayoneApi/Request/Parts/RedirectUrls.php @@ -0,0 +1,64 @@ +success = $success; + $this->error = $error; + $this->back = $back; + } + + /** + * Getter for Success + * + * @return string + */ + public function getSuccessurl() + { + return $this->success; + } + + /** + * Getter for Error + * + * @return string + */ + public function getErrorurl() + { + return $this->error; + } + + /** + * Getter for Back + * + * @return string + */ + public function getBackurl() + { + return $this->back; + } +} diff --git a/resources/lib/Payone/ArvPayoneApi/Request/Parts/SepaMandate.php b/resources/lib/Payone/ArvPayoneApi/Request/Parts/SepaMandate.php new file mode 100644 index 00000000..e23d40d3 --- /dev/null +++ b/resources/lib/Payone/ArvPayoneApi/Request/Parts/SepaMandate.php @@ -0,0 +1,85 @@ +mandateIdentification = $mandateIdentification; + $this->mandateDateofsignature = $mandateDateofsignature; + $this->iban = $iban; + $this->bic = $bic; + $this->bankcountry = $bankcountry; + } + + /** + * Getter for MandateIdentification + * + * @return string + */ + public function getMandateIdentification() + { + return $this->mandateIdentification; + } + + /** + * Getter for MandateDateofsignature + * + * @return string + */ + public function getMandateDateofsignature() + { + return $this->mandateDateofsignature; + } + + /** + * Getter for Iban + * + * @return string + */ + public function getIban() + { + return $this->iban; + } + + /** + * Getter for Bic + * + * @return string + */ + public function getBic() + { + return $this->bic; + } + + /** + * Getter for Bankcountry + * + * @return mixed + */ + public function getBankcountry() + { + return $this->bankcountry; + } +} diff --git a/resources/lib/Payone/ArvPayoneApi/Request/Parts/ShippingAddress.php b/resources/lib/Payone/ArvPayoneApi/Request/Parts/ShippingAddress.php new file mode 100644 index 00000000..b3575c4b --- /dev/null +++ b/resources/lib/Payone/ArvPayoneApi/Request/Parts/ShippingAddress.php @@ -0,0 +1,92 @@ +firstname = $firstname; + $this->lastname = $lastname; + $this->street = $street; + $this->addressaddition = $addressaddition; + $this->zip = $zip; + $this->city = $city; + $this->country = $country; + } + + /** + * @return mixed + */ + public function getShippingFirstname() + { + return $this->firstname; + } + + /** + * @return mixed + */ + public function getShippingLastname() + { + return $this->lastname; + } + + /** + * @return mixed + */ + public function getShippingStreet() + { + return $this->street; + } + + /** + * @return mixed + */ + public function getShippingAddressaddition() + { + return $this->addressaddition; + } + + /** + * @return mixed + */ + public function getShippingZip() + { + return $this->zip; + } + + /** + * @return mixed + */ + public function getShippingCity() + { + return $this->city; + } + + /** + * @return mixed + */ + public function getShippingCountry() + { + return $this->country; + } +} diff --git a/resources/lib/Payone/ArvPayoneApi/Request/Parts/SystemInfo.php b/resources/lib/Payone/ArvPayoneApi/Request/Parts/SystemInfo.php new file mode 100644 index 00000000..03bff5d4 --- /dev/null +++ b/resources/lib/Payone/ArvPayoneApi/Request/Parts/SystemInfo.php @@ -0,0 +1,78 @@ +integratorName = $integratorName; + $this->integratorVersion = $integratorVersion; + $this->solutionName = $solutionName; + $this->solutionVersion = $solutionVersion; + } + + /** + * Getter for IntegratorName + * + * @return string + */ + public function getIntegratorName() + { + return $this->integratorName; + } + + /** + * Getter for IntegratorVersion + * + * @return string + */ + public function getIntegratorVersion() + { + return $this->integratorVersion; + } + + /** + * Getter for SolutionName + * + * @return string + */ + public function getSolutionName() + { + return $this->solutionName; + } + + /** + * Getter for SolutionVersion + * + * @return string + */ + public function getSolutionVersion() + { + return $this->solutionVersion; + } +} diff --git a/resources/lib/Payone/ArvPayoneApi/Request/PaymentTypes.php b/resources/lib/Payone/ArvPayoneApi/Request/PaymentTypes.php new file mode 100644 index 00000000..a670f509 --- /dev/null +++ b/resources/lib/Payone/ArvPayoneApi/Request/PaymentTypes.php @@ -0,0 +1,30 @@ +getConstants(); + } +} diff --git a/resources/lib/Payone/ArvPayoneApi/Request/PreAuthorization/RequestFactory.php b/resources/lib/Payone/ArvPayoneApi/Request/PreAuthorization/RequestFactory.php new file mode 100644 index 00000000..b8d946e0 --- /dev/null +++ b/resources/lib/Payone/ArvPayoneApi/Request/PreAuthorization/RequestFactory.php @@ -0,0 +1,14 @@ +txid = $txid; + $this->request = $request; + } + + /** + * Getter for Request + * + * @return GenericRequest + */ + public function getRequest() + { + return $this->request; + } + + /** + * Getter for Txid + * + * @return string + */ + public function getTxid() + { + return $this->txid; + } +} diff --git a/resources/lib/Payone/ArvPayoneApi/Request/Refund/RequestFactory.php b/resources/lib/Payone/ArvPayoneApi/Request/Refund/RequestFactory.php new file mode 100644 index 00000000..c50f3a3f --- /dev/null +++ b/resources/lib/Payone/ArvPayoneApi/Request/Refund/RequestFactory.php @@ -0,0 +1,24 @@ +getConstants(); + } +} diff --git a/resources/lib/Payone/ArvPayoneApi/Response/Clearing.php b/resources/lib/Payone/ArvPayoneApi/Response/Clearing.php new file mode 100644 index 00000000..b545679b --- /dev/null +++ b/resources/lib/Payone/ArvPayoneApi/Response/Clearing.php @@ -0,0 +1,139 @@ +bankaccount = $responseData['clearing_bankaccount'] ?? ''; + $this->bankcode = $responseData['clearing_bankcode'] ?? ''; + $this->bankcountry = $responseData['clearing_bankcountry'] ?? ''; + $this->bankname = $responseData['clearing_bankname'] ?? ''; + $this->bankaccountholder = $responseData['clearing_bankaccountholder'] ?? ''; + $this->bankcity = $responseData['clearing_bankcity'] ?? ''; + $this->bankiban = $responseData['clearing_bankiban'] ?? ''; + $this->bankbic = $responseData['clearing_bankbic'] ?? ''; + } + + /** + * Getter for Bankaccount + * + * @return string + */ + public function getBankaccount() + { + return $this->bankaccount; + } + + /** + * Getter for Bankcode + * + * @return string + */ + public function getBankcode() + { + return $this->bankcode; + } + + /** + * Getter for Bankcountry + * + * @return string + */ + public function getBankcountry() + { + return $this->bankcountry; + } + + /** + * Getter for Bankname + * + * @return string + */ + public function getBankname() + { + return $this->bankname; + } + + /** + * Getter for Bankaccountholder + * + * @return string + */ + public function getBankaccountholder() + { + return $this->bankaccountholder; + } + + /** + * Getter for Bankcity + * + * @return string + */ + public function getBankcity() + { + return $this->bankcity; + } + + /** + * Getter for Bankiban + * + * @return string + */ + public function getBankiban() + { + return $this->bankiban; + } + + /** + * Getter for Bankbic + * + * @return string + */ + public function getBankbic() + { + return $this->bankbic; + } +} diff --git a/resources/lib/Payone/ArvPayoneApi/Response/ClientErrorResponse.php b/resources/lib/Payone/ArvPayoneApi/Response/ClientErrorResponse.php new file mode 100644 index 00000000..a85a5f6e --- /dev/null +++ b/resources/lib/Payone/ArvPayoneApi/Response/ClientErrorResponse.php @@ -0,0 +1,54 @@ +message = $message; + } + + /** + * @return bool + */ + public function getSuccess() + { + return false; + } + + /** + * @return string + */ + public function getErrorMessage() + { + return $this->message; + } + + /** + * @return string + */ + public function getStatus() + { + return ''; + } + + /** + * @return string + */ + public function getTransactionID() + { + return ''; + } +} diff --git a/resources/lib/Payone/ArvPayoneApi/Response/GenericResponse.php b/resources/lib/Payone/ArvPayoneApi/Response/GenericResponse.php new file mode 100644 index 00000000..3373c7f3 --- /dev/null +++ b/resources/lib/Payone/ArvPayoneApi/Response/GenericResponse.php @@ -0,0 +1,103 @@ +responseData = $responseData; + } + + /** + * Request success + * + * @return bool + */ + public function getSuccess() + { + if (!$this->responseData || $this->getStatus() == 'ERROR') { + return false; + } + + return true; + } + + /** + * Get full error description from response + * + * @return string + */ + public function getErrorMessage() + { + if ($this->getSuccess()) { + return ''; + } + + $response = 'empty response'; + if ($this->responseData) { + $response = print_r($this->responseData, true); + } + + return 'Payone returned an error: ' . $response; + } + + /** + * Get the transaction id + * + * @return string + */ + public function getTransactionID() + { + if (!isset($this->responseData['txid'])) { + return ''; + } + + return (string) $this->responseData['txid']; + } + + /** + * Getter for ResponseData + * + * @return array + */ + public function getResponseData() + { + return $this->responseData; + } + + /** + * @return string + */ + public function getStatus() + { + if (!isset($this->responseData['status'])) { + return ''; + } + + return (string) $this->responseData['status']; + } + + /** + * @return string + */ + public function getLibVersion() + { + return Version::getVersion(); + } +} diff --git a/resources/lib/Payone/ArvPayoneApi/Response/ResponseContract.php b/resources/lib/Payone/ArvPayoneApi/Response/ResponseContract.php new file mode 100644 index 00000000..af3e747f --- /dev/null +++ b/resources/lib/Payone/ArvPayoneApi/Response/ResponseContract.php @@ -0,0 +1,40 @@ +getMethods() as $method) { + if (substr($method->name, 0, 3) != 'get') { + continue; + } + $propertyName = strtolower(substr($method->name, 3, 1)) . substr($method->name, 4); + + $value = $method->invoke($this); + if (method_exists($value, 'jsonSerialize') + && is_callable([$value, 'jsonSerialize'])) { + $value = $value->jsonSerialize(); + } + $result[$propertyName] = $value; + } + + return $result; + } +} diff --git a/resources/lib/Payone/ArvPayoneApi/Response/ResponseDataContract.php b/resources/lib/Payone/ArvPayoneApi/Response/ResponseDataContract.php new file mode 100644 index 00000000..67cd1f3f --- /dev/null +++ b/resources/lib/Payone/ArvPayoneApi/Response/ResponseDataContract.php @@ -0,0 +1,11 @@ +getResponseData()); + $authResponse->setClearing($clearing); + + return $authResponse; + } + + return new GenericResponse($responseData); + } + + /** + * @param string $response + * + * @return array + */ + private static function parseResponse($response) + { + $responseData = []; + $separator = "\n\t"; + $line = strtok($response, $separator); + + while ($line !== false) { + $responseData += self::parseLine($line); + $line = strtok($separator); + } + + return $responseData; + } + + /** + * @param $line + * + * @return array + */ + private static function parseLine($line) + { + if (!trim($line)) { + return []; + } + list($key, $value) = explode('=', $line, 2); + + return [trim($key) => trim($value)]; + } +} diff --git a/resources/lib/Payone/ArvPayoneApi/Response/ResponseWithClearing.php b/resources/lib/Payone/ArvPayoneApi/Response/ResponseWithClearing.php new file mode 100644 index 00000000..2f570255 --- /dev/null +++ b/resources/lib/Payone/ArvPayoneApi/Response/ResponseWithClearing.php @@ -0,0 +1,29 @@ +clearing = $clearing; + } + + /** + * Getter for Clearing + * + * @return Clearing + */ + public function getClearing() + { + return $this->clearing; + } +} diff --git a/resources/lib/Payone/ArvPayoneApi/Response/Status.php b/resources/lib/Payone/ArvPayoneApi/Response/Status.php new file mode 100644 index 00000000..d390735c --- /dev/null +++ b/resources/lib/Payone/ArvPayoneApi/Response/Status.php @@ -0,0 +1,13 @@ +doRequest($request); diff --git a/resources/lib/doCapture.php b/resources/lib/doCapture.php index c3c113ba..a0e9e144 100644 --- a/resources/lib/doCapture.php +++ b/resources/lib/doCapture.php @@ -1,11 +1,22 @@ logger->setIdentifier(__METHOD__); $response = $this->doLibCall((self::REQUEST_TYPE_AUTH), $requestParams); + + $this->logger->error('Api.' . $this->getCallAction(self::REQUEST_TYPE_AUTH), $response); + $responseObject = AuthResponseFactory::create($response); $this->logger->setReferenceValue($responseObject->getTransactionID()); diff --git a/src/Services/Auth.php b/src/Services/Auth.php index 7e7c9bd1..b73b8a60 100644 --- a/src/Services/Auth.php +++ b/src/Services/Auth.php @@ -143,6 +143,10 @@ private function doAuthFromBasket(Basket $basket) ); $requestData = $this->authDataProvider->getDataFromBasket($paymentCode, $basket, ''); + $this->logger->setIdentifier(__METHOD__)->debug( + 'Api.doAuth', + ['requestData' => $requestData] + ); try { $authResponse = $this->api->doAuth($requestData); } catch (\Exception $e) { From f79a479f647b1195e0a90eddb56c1a0f3f352913 Mon Sep 17 00:00:00 2001 From: Jens Konopka Date: Wed, 14 Aug 2019 09:38:02 +0200 Subject: [PATCH 048/353] add correct composer autoload add require rename lib files --- .../PreAuthorization/RequestFactory.php | 14 - .../ArvPayoneApi => PayoneApi}/Api/Client.php | 2 +- .../Api/ClientContract.php | 2 +- .../Api/PostApi.php | 10 +- .../Lib/Version.php | 2 +- .../Request/ArraySerializer.php | 2 +- .../Request/Authorization/CashOnDelivery.php | 8 +- .../Request/Authorization/Creditcard.php | 10 +- .../Request/Authorization/DirectDebit.php | 10 +- .../Request/Authorization/Invoice.php | 8 +- .../Request/Authorization/InvoiceSecure.php | 10 +- .../Authorization/OnlineBankTransfer.php | 12 +- .../Request/Authorization/PayPal.php | 10 +- .../Request/Authorization/Paydirekt.php | 12 +- .../Request/Authorization/PrePayment.php | 8 +- .../Request/Authorization/RequestFactory.php | 22 +- .../Request/Authorization/Sofort.php | 12 +- .../Request/AuthorizationRequestAbstract.php | 2 +- .../Request/AuthorizationRequestContract.php | 4 +- .../Request/Capture/Capture.php | 6 +- .../Request/Capture/CaptureModes.php | 2 +- .../Request/Capture/RequestFactory.php | 14 +- .../Request/Capture/SettleAccountModes.php | 2 +- .../Request/ClearingTypes.php | 2 +- .../Request/Debit/Debit.php | 6 +- .../Request/Debit/RequestFactory.php | 14 +- .../Request/GenericAuthRequestFactory.php | 6 +- .../Request/GenericAuthorizationRequest.php | 4 +- .../Request/GenericRequest.php | 6 +- .../Request/GenericRequestFactory.php | 8 +- .../Request/Managemandate/ManageMandate.php | 16 +- .../ManageMandateRequestFactory.php | 16 +- .../Request/Parts/BankAccount.php | 2 +- .../Request/Parts/Cart.php | 2 +- .../Request/Parts/CartFactory.php | 2 +- .../Request/Parts/CartItem.php | 2 +- .../Request/Parts/Config.php | 2 +- .../Request/Parts/Customer.php | 2 +- .../Request/Parts/CustomerAddress.php | 2 +- .../Request/Parts/RedirectUrls.php | 2 +- .../Request/Parts/SepaMandate.php | 2 +- .../Request/Parts/ShippingAddress.php | 2 +- .../Request/Parts/SystemInfo.php | 2 +- .../Request/PaymentTypes.php | 2 +- .../PreAuthorization/RequestFactory.php | 14 + .../Request/Refund/Refund.php | 4 +- .../Request/Refund/RequestFactory.php | 10 +- .../Request/RequestDataContract.php | 6 +- .../Request/RequestFactoryContract.php | 2 +- .../Request/SerializerFactory.php | 2 +- .../Request/SerializerInterface.php | 2 +- .../Request/Types.php | 2 +- .../Response/Clearing.php | 2 +- .../Response/ClientErrorResponse.php | 2 +- .../Response/GenericResponse.php | 4 +- .../Response/ResponseContract.php | 2 +- .../Response/ResponseDataAbstract.php | 2 +- .../Response/ResponseDataContract.php | 2 +- .../Response/ResponseFactory.php | 2 +- .../Response/ResponseWithClearing.php | 2 +- .../Response/Status.php | 2 +- resources/lib/composer.json | 7 + resources/lib/doAuth.php | 26 +- resources/lib/doCapture.php | 26 +- resources/lib/doDebit.php | 26 +- resources/lib/doManagemandate.php | 26 +- resources/lib/doPreAuth.php | 26 +- resources/lib/doRefund.php | 26 +- resources/lib/vendor/autoload.php | 7 + resources/lib/vendor/composer/ClassLoader.php | 445 ++++++++++++++++++ resources/lib/vendor/composer/LICENSE | 21 + .../lib/vendor/composer/autoload_classmap.php | 9 + .../vendor/composer/autoload_namespaces.php | 9 + .../lib/vendor/composer/autoload_psr4.php | 10 + .../lib/vendor/composer/autoload_real.php | 52 ++ .../lib/vendor/composer/autoload_static.php | 31 ++ 76 files changed, 813 insertions(+), 282 deletions(-) delete mode 100644 resources/lib/Payone/ArvPayoneApi/Request/PreAuthorization/RequestFactory.php rename resources/lib/{Payone/ArvPayoneApi => PayoneApi}/Api/Client.php (98%) rename resources/lib/{Payone/ArvPayoneApi => PayoneApi}/Api/ClientContract.php (93%) rename resources/lib/{Payone/ArvPayoneApi => PayoneApi}/Api/PostApi.php (88%) rename resources/lib/{Payone/ArvPayoneApi => PayoneApi}/Lib/Version.php (82%) rename resources/lib/{Payone/ArvPayoneApi => PayoneApi}/Request/ArraySerializer.php (97%) rename resources/lib/{Payone/ArvPayoneApi => PayoneApi}/Request/Authorization/CashOnDelivery.php (78%) rename resources/lib/{Payone/ArvPayoneApi => PayoneApi}/Request/Authorization/Creditcard.php (79%) rename resources/lib/{Payone/ArvPayoneApi => PayoneApi}/Request/Authorization/DirectDebit.php (75%) rename resources/lib/{Payone/ArvPayoneApi => PayoneApi}/Request/Authorization/Invoice.php (65%) rename resources/lib/{Payone/ArvPayoneApi => PayoneApi}/Request/Authorization/InvoiceSecure.php (78%) rename resources/lib/{Payone/ArvPayoneApi => PayoneApi}/Request/Authorization/OnlineBankTransfer.php (81%) rename resources/lib/{Payone/ArvPayoneApi => PayoneApi}/Request/Authorization/PayPal.php (78%) rename resources/lib/{Payone/ArvPayoneApi => PayoneApi}/Request/Authorization/Paydirekt.php (81%) rename resources/lib/{Payone/ArvPayoneApi => PayoneApi}/Request/Authorization/PrePayment.php (65%) rename resources/lib/{Payone/ArvPayoneApi => PayoneApi}/Request/Authorization/RequestFactory.php (88%) rename resources/lib/{Payone/ArvPayoneApi => PayoneApi}/Request/Authorization/Sofort.php (81%) rename resources/lib/{Payone/ArvPayoneApi => PayoneApi}/Request/AuthorizationRequestAbstract.php (93%) rename resources/lib/{Payone/ArvPayoneApi => PayoneApi}/Request/AuthorizationRequestContract.php (88%) rename resources/lib/{Payone/ArvPayoneApi => PayoneApi}/Request/Capture/Capture.php (91%) rename resources/lib/{Payone/ArvPayoneApi => PayoneApi}/Request/Capture/CaptureModes.php (85%) rename resources/lib/{Payone/ArvPayoneApi => PayoneApi}/Request/Capture/RequestFactory.php (65%) rename resources/lib/{Payone/ArvPayoneApi => PayoneApi}/Request/Capture/SettleAccountModes.php (64%) rename resources/lib/{Payone/ArvPayoneApi => PayoneApi}/Request/ClearingTypes.php (86%) rename resources/lib/{Payone/ArvPayoneApi => PayoneApi}/Request/Debit/Debit.php (86%) rename resources/lib/{Payone/ArvPayoneApi => PayoneApi}/Request/Debit/RequestFactory.php (62%) rename resources/lib/{Payone/ArvPayoneApi => PayoneApi}/Request/GenericAuthRequestFactory.php (91%) rename resources/lib/{Payone/ArvPayoneApi => PayoneApi}/Request/GenericAuthorizationRequest.php (93%) rename resources/lib/{Payone/ArvPayoneApi => PayoneApi}/Request/GenericRequest.php (93%) rename resources/lib/{Payone/ArvPayoneApi => PayoneApi}/Request/GenericRequestFactory.php (84%) rename resources/lib/{Payone/ArvPayoneApi => PayoneApi}/Request/Managemandate/ManageMandate.php (87%) rename resources/lib/{Payone/ArvPayoneApi => PayoneApi}/Request/Managemandate/ManageMandateRequestFactory.php (83%) rename resources/lib/{Payone/ArvPayoneApi => PayoneApi}/Request/Parts/BankAccount.php (97%) rename resources/lib/{Payone/ArvPayoneApi => PayoneApi}/Request/Parts/Cart.php (94%) rename resources/lib/{Payone/ArvPayoneApi => PayoneApi}/Request/Parts/CartFactory.php (96%) rename resources/lib/{Payone/ArvPayoneApi => PayoneApi}/Request/Parts/CartItem.php (98%) rename resources/lib/{Payone/ArvPayoneApi => PayoneApi}/Request/Parts/Config.php (97%) rename resources/lib/{Payone/ArvPayoneApi => PayoneApi}/Request/Parts/Customer.php (98%) rename resources/lib/{Payone/ArvPayoneApi => PayoneApi}/Request/Parts/CustomerAddress.php (96%) rename resources/lib/{Payone/ArvPayoneApi => PayoneApi}/Request/Parts/RedirectUrls.php (95%) rename resources/lib/{Payone/ArvPayoneApi => PayoneApi}/Request/Parts/SepaMandate.php (97%) rename resources/lib/{Payone/ArvPayoneApi => PayoneApi}/Request/Parts/ShippingAddress.php (97%) rename resources/lib/{Payone/ArvPayoneApi => PayoneApi}/Request/Parts/SystemInfo.php (97%) rename resources/lib/{Payone/ArvPayoneApi => PayoneApi}/Request/PaymentTypes.php (94%) create mode 100644 resources/lib/PayoneApi/Request/PreAuthorization/RequestFactory.php rename resources/lib/{Payone/ArvPayoneApi => PayoneApi}/Request/Refund/Refund.php (87%) rename resources/lib/{Payone/ArvPayoneApi => PayoneApi}/Request/Refund/RequestFactory.php (60%) rename resources/lib/{Payone/ArvPayoneApi => PayoneApi}/Request/RequestDataContract.php (82%) rename resources/lib/{Payone/ArvPayoneApi => PayoneApi}/Request/RequestFactoryContract.php (88%) rename resources/lib/{Payone/ArvPayoneApi => PayoneApi}/Request/SerializerFactory.php (77%) rename resources/lib/{Payone/ArvPayoneApi => PayoneApi}/Request/SerializerInterface.php (79%) rename resources/lib/{Payone/ArvPayoneApi => PayoneApi}/Request/Types.php (91%) rename resources/lib/{Payone/ArvPayoneApi => PayoneApi}/Response/Clearing.php (98%) rename resources/lib/{Payone/ArvPayoneApi => PayoneApi}/Response/ClientErrorResponse.php (95%) rename resources/lib/{Payone/ArvPayoneApi => PayoneApi}/Response/GenericResponse.php (95%) rename resources/lib/{Payone/ArvPayoneApi => PayoneApi}/Response/ResponseContract.php (93%) rename resources/lib/{Payone/ArvPayoneApi => PayoneApi}/Response/ResponseDataAbstract.php (94%) rename resources/lib/{Payone/ArvPayoneApi => PayoneApi}/Response/ResponseDataContract.php (74%) rename resources/lib/{Payone/ArvPayoneApi => PayoneApi}/Response/ResponseFactory.php (97%) rename resources/lib/{Payone/ArvPayoneApi => PayoneApi}/Response/ResponseWithClearing.php (91%) rename resources/lib/{Payone/ArvPayoneApi => PayoneApi}/Response/Status.php (78%) create mode 100644 resources/lib/composer.json create mode 100644 resources/lib/vendor/autoload.php create mode 100644 resources/lib/vendor/composer/ClassLoader.php create mode 100644 resources/lib/vendor/composer/LICENSE create mode 100644 resources/lib/vendor/composer/autoload_classmap.php create mode 100644 resources/lib/vendor/composer/autoload_namespaces.php create mode 100644 resources/lib/vendor/composer/autoload_psr4.php create mode 100644 resources/lib/vendor/composer/autoload_real.php create mode 100644 resources/lib/vendor/composer/autoload_static.php diff --git a/resources/lib/Payone/ArvPayoneApi/Request/PreAuthorization/RequestFactory.php b/resources/lib/Payone/ArvPayoneApi/Request/PreAuthorization/RequestFactory.php deleted file mode 100644 index b8d946e0..00000000 --- a/resources/lib/Payone/ArvPayoneApi/Request/PreAuthorization/RequestFactory.php +++ /dev/null @@ -1,14 +0,0 @@ - + * Jordi Boggiano + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Composer\Autoload; + +/** + * ClassLoader implements a PSR-0, PSR-4 and classmap class loader. + * + * $loader = new \Composer\Autoload\ClassLoader(); + * + * // register classes with namespaces + * $loader->add('Symfony\Component', __DIR__.'/component'); + * $loader->add('Symfony', __DIR__.'/framework'); + * + * // activate the autoloader + * $loader->register(); + * + * // to enable searching the include path (eg. for PEAR packages) + * $loader->setUseIncludePath(true); + * + * In this example, if you try to use a class in the Symfony\Component + * namespace or one of its children (Symfony\Component\Console for instance), + * the autoloader will first look for the class under the component/ + * directory, and it will then fallback to the framework/ directory if not + * found before giving up. + * + * This class is loosely based on the Symfony UniversalClassLoader. + * + * @author Fabien Potencier + * @author Jordi Boggiano + * @see http://www.php-fig.org/psr/psr-0/ + * @see http://www.php-fig.org/psr/psr-4/ + */ +class ClassLoader +{ + // PSR-4 + private $prefixLengthsPsr4 = array(); + private $prefixDirsPsr4 = array(); + private $fallbackDirsPsr4 = array(); + + // PSR-0 + private $prefixesPsr0 = array(); + private $fallbackDirsPsr0 = array(); + + private $useIncludePath = false; + private $classMap = array(); + private $classMapAuthoritative = false; + private $missingClasses = array(); + private $apcuPrefix; + + public function getPrefixes() + { + if (!empty($this->prefixesPsr0)) { + return call_user_func_array('array_merge', $this->prefixesPsr0); + } + + return array(); + } + + public function getPrefixesPsr4() + { + return $this->prefixDirsPsr4; + } + + public function getFallbackDirs() + { + return $this->fallbackDirsPsr0; + } + + public function getFallbackDirsPsr4() + { + return $this->fallbackDirsPsr4; + } + + public function getClassMap() + { + return $this->classMap; + } + + /** + * @param array $classMap Class to filename map + */ + public function addClassMap(array $classMap) + { + if ($this->classMap) { + $this->classMap = array_merge($this->classMap, $classMap); + } else { + $this->classMap = $classMap; + } + } + + /** + * Registers a set of PSR-0 directories for a given prefix, either + * appending or prepending to the ones previously set for this prefix. + * + * @param string $prefix The prefix + * @param array|string $paths The PSR-0 root directories + * @param bool $prepend Whether to prepend the directories + */ + public function add($prefix, $paths, $prepend = false) + { + if (!$prefix) { + if ($prepend) { + $this->fallbackDirsPsr0 = array_merge( + (array) $paths, + $this->fallbackDirsPsr0 + ); + } else { + $this->fallbackDirsPsr0 = array_merge( + $this->fallbackDirsPsr0, + (array) $paths + ); + } + + return; + } + + $first = $prefix[0]; + if (!isset($this->prefixesPsr0[$first][$prefix])) { + $this->prefixesPsr0[$first][$prefix] = (array) $paths; + + return; + } + if ($prepend) { + $this->prefixesPsr0[$first][$prefix] = array_merge( + (array) $paths, + $this->prefixesPsr0[$first][$prefix] + ); + } else { + $this->prefixesPsr0[$first][$prefix] = array_merge( + $this->prefixesPsr0[$first][$prefix], + (array) $paths + ); + } + } + + /** + * Registers a set of PSR-4 directories for a given namespace, either + * appending or prepending to the ones previously set for this namespace. + * + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param array|string $paths The PSR-4 base directories + * @param bool $prepend Whether to prepend the directories + * + * @throws \InvalidArgumentException + */ + public function addPsr4($prefix, $paths, $prepend = false) + { + if (!$prefix) { + // Register directories for the root namespace. + if ($prepend) { + $this->fallbackDirsPsr4 = array_merge( + (array) $paths, + $this->fallbackDirsPsr4 + ); + } else { + $this->fallbackDirsPsr4 = array_merge( + $this->fallbackDirsPsr4, + (array) $paths + ); + } + } elseif (!isset($this->prefixDirsPsr4[$prefix])) { + // Register directories for a new namespace. + $length = strlen($prefix); + if ('\\' !== $prefix[$length - 1]) { + throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); + } + $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; + $this->prefixDirsPsr4[$prefix] = (array) $paths; + } elseif ($prepend) { + // Prepend directories for an already registered namespace. + $this->prefixDirsPsr4[$prefix] = array_merge( + (array) $paths, + $this->prefixDirsPsr4[$prefix] + ); + } else { + // Append directories for an already registered namespace. + $this->prefixDirsPsr4[$prefix] = array_merge( + $this->prefixDirsPsr4[$prefix], + (array) $paths + ); + } + } + + /** + * Registers a set of PSR-0 directories for a given prefix, + * replacing any others previously set for this prefix. + * + * @param string $prefix The prefix + * @param array|string $paths The PSR-0 base directories + */ + public function set($prefix, $paths) + { + if (!$prefix) { + $this->fallbackDirsPsr0 = (array) $paths; + } else { + $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths; + } + } + + /** + * Registers a set of PSR-4 directories for a given namespace, + * replacing any others previously set for this namespace. + * + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param array|string $paths The PSR-4 base directories + * + * @throws \InvalidArgumentException + */ + public function setPsr4($prefix, $paths) + { + if (!$prefix) { + $this->fallbackDirsPsr4 = (array) $paths; + } else { + $length = strlen($prefix); + if ('\\' !== $prefix[$length - 1]) { + throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); + } + $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; + $this->prefixDirsPsr4[$prefix] = (array) $paths; + } + } + + /** + * Turns on searching the include path for class files. + * + * @param bool $useIncludePath + */ + public function setUseIncludePath($useIncludePath) + { + $this->useIncludePath = $useIncludePath; + } + + /** + * Can be used to check if the autoloader uses the include path to check + * for classes. + * + * @return bool + */ + public function getUseIncludePath() + { + return $this->useIncludePath; + } + + /** + * Turns off searching the prefix and fallback directories for classes + * that have not been registered with the class map. + * + * @param bool $classMapAuthoritative + */ + public function setClassMapAuthoritative($classMapAuthoritative) + { + $this->classMapAuthoritative = $classMapAuthoritative; + } + + /** + * Should class lookup fail if not found in the current class map? + * + * @return bool + */ + public function isClassMapAuthoritative() + { + return $this->classMapAuthoritative; + } + + /** + * APCu prefix to use to cache found/not-found classes, if the extension is enabled. + * + * @param string|null $apcuPrefix + */ + public function setApcuPrefix($apcuPrefix) + { + $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null; + } + + /** + * The APCu prefix in use, or null if APCu caching is not enabled. + * + * @return string|null + */ + public function getApcuPrefix() + { + return $this->apcuPrefix; + } + + /** + * Registers this instance as an autoloader. + * + * @param bool $prepend Whether to prepend the autoloader or not + */ + public function register($prepend = false) + { + spl_autoload_register(array($this, 'loadClass'), true, $prepend); + } + + /** + * Unregisters this instance as an autoloader. + */ + public function unregister() + { + spl_autoload_unregister(array($this, 'loadClass')); + } + + /** + * Loads the given class or interface. + * + * @param string $class The name of the class + * @return bool|null True if loaded, null otherwise + */ + public function loadClass($class) + { + if ($file = $this->findFile($class)) { + includeFile($file); + + return true; + } + } + + /** + * Finds the path to the file where the class is defined. + * + * @param string $class The name of the class + * + * @return string|false The path if found, false otherwise + */ + public function findFile($class) + { + // class map lookup + if (isset($this->classMap[$class])) { + return $this->classMap[$class]; + } + if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) { + return false; + } + if (null !== $this->apcuPrefix) { + $file = apcu_fetch($this->apcuPrefix.$class, $hit); + if ($hit) { + return $file; + } + } + + $file = $this->findFileWithExtension($class, '.php'); + + // Search for Hack files if we are running on HHVM + if (false === $file && defined('HHVM_VERSION')) { + $file = $this->findFileWithExtension($class, '.hh'); + } + + if (null !== $this->apcuPrefix) { + apcu_add($this->apcuPrefix.$class, $file); + } + + if (false === $file) { + // Remember that this class does not exist. + $this->missingClasses[$class] = true; + } + + return $file; + } + + private function findFileWithExtension($class, $ext) + { + // PSR-4 lookup + $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext; + + $first = $class[0]; + if (isset($this->prefixLengthsPsr4[$first])) { + $subPath = $class; + while (false !== $lastPos = strrpos($subPath, '\\')) { + $subPath = substr($subPath, 0, $lastPos); + $search = $subPath . '\\'; + if (isset($this->prefixDirsPsr4[$search])) { + $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1); + foreach ($this->prefixDirsPsr4[$search] as $dir) { + if (file_exists($file = $dir . $pathEnd)) { + return $file; + } + } + } + } + } + + // PSR-4 fallback dirs + foreach ($this->fallbackDirsPsr4 as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) { + return $file; + } + } + + // PSR-0 lookup + if (false !== $pos = strrpos($class, '\\')) { + // namespaced class name + $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1) + . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR); + } else { + // PEAR-like class name + $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext; + } + + if (isset($this->prefixesPsr0[$first])) { + foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) { + if (0 === strpos($class, $prefix)) { + foreach ($dirs as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { + return $file; + } + } + } + } + } + + // PSR-0 fallback dirs + foreach ($this->fallbackDirsPsr0 as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { + return $file; + } + } + + // PSR-0 include paths. + if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) { + return $file; + } + + return false; + } +} + +/** + * Scope isolated include. + * + * Prevents access to $this/self from included files. + */ +function includeFile($file) +{ + include $file; +} diff --git a/resources/lib/vendor/composer/LICENSE b/resources/lib/vendor/composer/LICENSE new file mode 100644 index 00000000..f27399a0 --- /dev/null +++ b/resources/lib/vendor/composer/LICENSE @@ -0,0 +1,21 @@ + +Copyright (c) Nils Adermann, Jordi Boggiano + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + diff --git a/resources/lib/vendor/composer/autoload_classmap.php b/resources/lib/vendor/composer/autoload_classmap.php new file mode 100644 index 00000000..7a91153b --- /dev/null +++ b/resources/lib/vendor/composer/autoload_classmap.php @@ -0,0 +1,9 @@ + array($baseDir . '/PayoneApi'), +); diff --git a/resources/lib/vendor/composer/autoload_real.php b/resources/lib/vendor/composer/autoload_real.php new file mode 100644 index 00000000..bac53af1 --- /dev/null +++ b/resources/lib/vendor/composer/autoload_real.php @@ -0,0 +1,52 @@ += 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); + if ($useStaticLoader) { + require_once __DIR__ . '/autoload_static.php'; + + call_user_func(\Composer\Autoload\ComposerStaticInite0e92804b3676dcad52f71f8933f242a::getInitializer($loader)); + } else { + $map = require __DIR__ . '/autoload_namespaces.php'; + foreach ($map as $namespace => $path) { + $loader->set($namespace, $path); + } + + $map = require __DIR__ . '/autoload_psr4.php'; + foreach ($map as $namespace => $path) { + $loader->setPsr4($namespace, $path); + } + + $classMap = require __DIR__ . '/autoload_classmap.php'; + if ($classMap) { + $loader->addClassMap($classMap); + } + } + + $loader->register(true); + + return $loader; + } +} diff --git a/resources/lib/vendor/composer/autoload_static.php b/resources/lib/vendor/composer/autoload_static.php new file mode 100644 index 00000000..e5a0ebfc --- /dev/null +++ b/resources/lib/vendor/composer/autoload_static.php @@ -0,0 +1,31 @@ + + array ( + 'PayoneApi\\' => 10, + ), + ); + + public static $prefixDirsPsr4 = array ( + 'PayoneApi\\' => + array ( + 0 => __DIR__ . '/../..' . '/PayoneApi', + ), + ); + + public static function getInitializer(ClassLoader $loader) + { + return \Closure::bind(function () use ($loader) { + $loader->prefixLengthsPsr4 = ComposerStaticInite0e92804b3676dcad52f71f8933f242a::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInite0e92804b3676dcad52f71f8933f242a::$prefixDirsPsr4; + + }, null, ClassLoader::class); + } +} From b2358d97c69b543020bc001b2936f27893a13ecc Mon Sep 17 00:00:00 2001 From: Jens Konopka Date: Wed, 14 Aug 2019 14:41:52 +0200 Subject: [PATCH 049/353] add amazon pay to the sdk --- .../Request/Authorization/AmazonPay.php | 61 +++++++++++++++++++ .../Request/Authorization/RequestFactory.php | 6 ++ .../lib/PayoneApi/Request/PaymentTypes.php | 1 + 3 files changed, 68 insertions(+) create mode 100644 resources/lib/PayoneApi/Request/Authorization/AmazonPay.php diff --git a/resources/lib/PayoneApi/Request/Authorization/AmazonPay.php b/resources/lib/PayoneApi/Request/Authorization/AmazonPay.php new file mode 100644 index 00000000..2c980311 --- /dev/null +++ b/resources/lib/PayoneApi/Request/Authorization/AmazonPay.php @@ -0,0 +1,61 @@ +authorizationRequest = $authorizationRequest; + $this->urls = $urls; + } + + /** + * Getter for Urls + * + * @return RedirectUrls + */ + public function getUrls() + { + return $this->urls; + } + + /** + * Getter for Wallettype + * + * @return string + */ + public function getWallettype() + { + return $this->wallettype; + } +} diff --git a/resources/lib/PayoneApi/Request/Authorization/RequestFactory.php b/resources/lib/PayoneApi/Request/Authorization/RequestFactory.php index 37e06d2d..f9fdd88e 100644 --- a/resources/lib/PayoneApi/Request/Authorization/RequestFactory.php +++ b/resources/lib/PayoneApi/Request/Authorization/RequestFactory.php @@ -2,6 +2,7 @@ namespace PayoneApi\Request\Authorization; +use Faker\Provider\Payment; use PayoneApi\Request\AuthorizationRequestAbstract; use PayoneApi\Request\GenericAuthRequestFactory; use PayoneApi\Request\Parts\BankAccount; @@ -114,6 +115,11 @@ public static function create($paymentMethod, $data, $referenceId = null) self::createUrls($data['redirect']), $shippingAddress ); + case PaymentTypes::PAYONE_AMAZON_PAY: + return new AmazonPay( + $genericAuthRequest, + self::createUrls($data['redirect']) + ); } throw new \Exception('Unimplemented payment method ' . $paymentMethod); } diff --git a/resources/lib/PayoneApi/Request/PaymentTypes.php b/resources/lib/PayoneApi/Request/PaymentTypes.php index 7ffcd4f3..0f7ceda7 100644 --- a/resources/lib/PayoneApi/Request/PaymentTypes.php +++ b/resources/lib/PayoneApi/Request/PaymentTypes.php @@ -17,6 +17,7 @@ class PaymentTypes const PAYONE_PAYDIREKT = 'Paydirekt'; const PAYONE_INVOICE_SECURE = 'InvoiceSecure'; const PAYONE_ON_LINE_BANK_TRANSFER = 'OnlineBankTransfer'; + const PAYONE_AMAZON_PAY = 'Amazon Pay'; /** * @return mixed From 634cd042572c9c1620a1522b74c8d43ee6458302 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20Po=CC=88nninghaus?= <> Date: Thu, 15 Aug 2019 10:39:21 +0200 Subject: [PATCH 050/353] RequestFactory create --- resources/lib/doAuth.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/lib/doAuth.php b/resources/lib/doAuth.php index 785cc937..ebc41091 100644 --- a/resources/lib/doAuth.php +++ b/resources/lib/doAuth.php @@ -30,7 +30,7 @@ $paymentMethod = $sdkRestApi::getParam('paymentMethod'); - $request = RequestFactory::create($paymentMethod, $data, false); + $request = RequestFactory::create($paymentMethod, $data); $serializer = new ArraySerializer(); $client = new PostApi(new Client(), $serializer); From acf66576d6a1562e1f849fc7179be01faa82135a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20Po=CC=88nninghaus?= <> Date: Thu, 15 Aug 2019 13:06:04 +0200 Subject: [PATCH 051/353] removed unnecessary errorlog --- src/Services/Api.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/Services/Api.php b/src/Services/Api.php index 705dc089..30badd8c 100644 --- a/src/Services/Api.php +++ b/src/Services/Api.php @@ -68,8 +68,6 @@ public function doAuth($requestParams): AuthResponse $this->logger->setIdentifier(__METHOD__); $response = $this->doLibCall((self::REQUEST_TYPE_AUTH), $requestParams); - $this->logger->error('Api.' . $this->getCallAction(self::REQUEST_TYPE_AUTH), $response); - $responseObject = AuthResponseFactory::create($response); $this->logger->setReferenceValue($responseObject->getTransactionID()); From cabef6d4302611fbf888b7453eef33ecc4732bbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20Po=CC=88nninghaus?= <> Date: Thu, 15 Aug 2019 15:33:44 +0200 Subject: [PATCH 052/353] version update, General language file added, changelog update --- meta/documents/changelog_de.md | 11 +++++++++++ meta/documents/changelog_en.md | 11 +++++++++++ plugin.json | 2 +- resources/lang/de/Config.properties | 9 +++++++++ resources/lang/de/General.properties | 1 + resources/lang/en/Config.properties | 9 +++++++++ resources/lang/en/General.properties | 1 + 7 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 resources/lang/de/General.properties create mode 100644 resources/lang/en/General.properties diff --git a/meta/documents/changelog_de.md b/meta/documents/changelog_de.md index ac0d28ab..aaaf789c 100644 --- a/meta/documents/changelog_de.md +++ b/meta/documents/changelog_de.md @@ -1,5 +1,16 @@ # Release Notes für Payone +## 1.1.4 (2019-08-15) + +### Geändert +- Das Payone SDK wurde umgezogen. + +### Hinzugefügt +- Die Zahlungsart Amazon Pay wurde für das Backend hinzugefügt. + +### Behoben +- Einige Medlungen im Log + ## 1.1.3 (2019-06-13) ### Geändert diff --git a/meta/documents/changelog_en.md b/meta/documents/changelog_en.md index f7a4c5e8..20540ca0 100644 --- a/meta/documents/changelog_en.md +++ b/meta/documents/changelog_en.md @@ -1,5 +1,16 @@ # Release Notes for Payone +## 1.1.4 (2019-08-15) + +### Changed +- The Payone SDK was relocated + +### Added +- The payment method Amazon Pay was added for the backend. + +### Fixed +- Some log messages + ## 1.1.3 (2019-06-13) ### Changed diff --git a/plugin.json b/plugin.json index b92688ef..e16c291b 100644 --- a/plugin.json +++ b/plugin.json @@ -1,5 +1,5 @@ { - "version": "1.1.3", + "version": "1.1.4", "license":"MIT", "pluginIcon":"icon_plugin_xs.png", "price":0.0, diff --git a/resources/lang/de/Config.properties b/resources/lang/de/Config.properties index d7273163..369cc0c2 100644 --- a/resources/lang/de/Config.properties +++ b/resources/lang/de/Config.properties @@ -121,6 +121,15 @@ PAYONEPAYONEDIRECTDEBITDescriptionLabel=Beschreibung PAYONEPAYONEDIRECTDEBITMinCartAmountLabel=Minimaler Bestellwert PAYONEPAYONEDIRECTDEBITMaxCartAmountLabel=Maximaler Bestellwert PAYONEPAYONEDIRECTDEBITAllowedCountriesLabel=Erlaubte Lieferländer +AmazonPayTab=Amazon Pay +PAYONEPAYONEAMAZONPAYActiveLabel=Aktiv +PAYONEPAYONEAMAZONPAYActivePossibleValue0=Nein +PAYONEPAYONEAMAZONPAYActivePossibleValue1=Ja +PAYONEPAYONEAMAZONPAYNameLabel=Name +PAYONEPAYONEAMAZONPAYDescriptionLabel=Beschreibung +PAYONEPAYONEAMAZONPAYMinCartAmountLabel=Minimaler Bestellwert +PAYONEPAYONEAMAZONPAYMaxCartAmountLabel=Maximaler Bestellwert +PAYONEPAYONEAMAZONPAYAllowedCountriesLabel=Erlaubte Lieferländer DebuggingTab=Debugging debuggingActiveLabel=Aktiv debuggingActivePossibleValue0=Nein diff --git a/resources/lang/de/General.properties b/resources/lang/de/General.properties new file mode 100644 index 00000000..af1b7ff7 --- /dev/null +++ b/resources/lang/de/General.properties @@ -0,0 +1 @@ +getPaymentsByOrderId = getPaymentsByOrderId \ No newline at end of file diff --git a/resources/lang/en/Config.properties b/resources/lang/en/Config.properties index ca7ca5ba..6d0fd208 100644 --- a/resources/lang/en/Config.properties +++ b/resources/lang/en/Config.properties @@ -121,6 +121,15 @@ PAYONEPAYONEDIRECTDEBITDescriptionLabel=Description PAYONEPAYONEDIRECTDEBITMinCartAmountLabel=Minimum order value PAYONEPAYONEDIRECTDEBITMaxCartAmountLabel=Maximum order value PAYONEPAYONEDIRECTDEBITAllowedCountriesLabel=Allowed countries of delivery +AmazonPayTab=Amazon Pay +PAYONEPAYONEAMAZONPAYActiveLabel=Active +PAYONEPAYONEAMAZONPAYActivePossibleValue0=No +PAYONEPAYONEAMAZONPAYActivePossibleValue1=Yes +PAYONEPAYONEAMAZONPAYNameLabel=Name +PAYONEPAYONEAMAZONPAYDescriptionLabel=Description +PAYONEPAYONEAMAZONPAYMinCartAmountLabel=Minimum order value +PAYONEPAYONEAMAZONPAYMaxCartAmountLabel=Maximum order value +PAYONEPAYONEAMAZONPAYAllowedCountriesLabel=Allowed countries of delivery DebuggingTab=Debugging debuggingActiveLabel=Active debuggingActivePossibleValue0=No diff --git a/resources/lang/en/General.properties b/resources/lang/en/General.properties new file mode 100644 index 00000000..af1b7ff7 --- /dev/null +++ b/resources/lang/en/General.properties @@ -0,0 +1 @@ +getPaymentsByOrderId = getPaymentsByOrderId \ No newline at end of file From adc168f79d06d2c35da7c8a24ff67635fdd938a8 Mon Sep 17 00:00:00 2001 From: Jens Konopka Date: Fri, 23 Aug 2019 14:58:04 +0200 Subject: [PATCH 053/353] fix external orders --- meta/documents/changelog_de.md | 5 +++++ meta/documents/changelog_en.md | 5 +++++ plugin.json | 2 +- src/Providers/PayoneServiceProvider.php | 6 +++++- 4 files changed, 16 insertions(+), 2 deletions(-) mode change 100644 => 100755 src/Providers/PayoneServiceProvider.php diff --git a/meta/documents/changelog_de.md b/meta/documents/changelog_de.md index aaaf789c..e116a3cf 100644 --- a/meta/documents/changelog_de.md +++ b/meta/documents/changelog_de.md @@ -1,5 +1,10 @@ # Release Notes für Payone +## 1.1.5 (2019-08-23) + +### Behoben +- Aufträge die von externe Importiert werden und eine Zahlungsart von Payone nutzen werden nun korrekt angelegt und nicht durch das Plugin abgefangen. + ## 1.1.4 (2019-08-15) ### Geändert diff --git a/meta/documents/changelog_en.md b/meta/documents/changelog_en.md index 20540ca0..2f41a07e 100644 --- a/meta/documents/changelog_en.md +++ b/meta/documents/changelog_en.md @@ -1,5 +1,10 @@ # Release Notes for Payone +## 1.1.5 (2019-08-23) + +### Behoben +- External orders will be created correct without skipping by the plugin. + ## 1.1.4 (2019-08-15) ### Changed diff --git a/plugin.json b/plugin.json index e16c291b..2c5e172c 100644 --- a/plugin.json +++ b/plugin.json @@ -1,5 +1,5 @@ { - "version": "1.1.4", + "version": "1.1.5", "license":"MIT", "pluginIcon":"icon_plugin_xs.png", "price":0.0, diff --git a/src/Providers/PayoneServiceProvider.php b/src/Providers/PayoneServiceProvider.php old mode 100644 new mode 100755 index 016c3719..c54b36ec --- a/src/Providers/PayoneServiceProvider.php +++ b/src/Providers/PayoneServiceProvider.php @@ -325,7 +325,11 @@ function (OrderCreated $event) use ( ) { $order = $event->getOrder(); $logger->info('Event.orderCreated', [$order, $order->id]); - if ($order->typeId != OrderType::TYPE_SALES_ORDER) { + if ($order->typeId != OrderType::TYPE_SALES_ORDER && !in_array($order->referrerId, [ + 0, // Manuell + 1, // Mandant + + ]) ) { return; } $selectedPaymentId = $order->methodOfPaymentId; From ec1218ff16a77eddb7fb1e73475fb84094b41ddb Mon Sep 17 00:00:00 2001 From: Jens Konopka Date: Fri, 23 Aug 2019 15:45:58 +0200 Subject: [PATCH 054/353] fix wrong order creating for shopware orders --- meta/documents/changelog_de.md | 5 +++++ meta/documents/changelog_en.md | 5 +++++ plugin.json | 2 +- src/Providers/PayoneServiceProvider.php | 3 +-- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/meta/documents/changelog_de.md b/meta/documents/changelog_de.md index e116a3cf..2b77d71e 100644 --- a/meta/documents/changelog_de.md +++ b/meta/documents/changelog_de.md @@ -1,5 +1,10 @@ # Release Notes für Payone +## 1.1.6 (2019-08-23) + +### Behoben +- Fehlerhafte Auftragsanlage behoben + ## 1.1.5 (2019-08-23) ### Behoben diff --git a/meta/documents/changelog_en.md b/meta/documents/changelog_en.md index 2f41a07e..1fe2d281 100644 --- a/meta/documents/changelog_en.md +++ b/meta/documents/changelog_en.md @@ -1,5 +1,10 @@ # Release Notes for Payone +## 1.1.6 (2019-08-23) + +### Behoben +- Fix wrong order creation + ## 1.1.5 (2019-08-23) ### Behoben diff --git a/plugin.json b/plugin.json index 2c5e172c..308c0b0d 100644 --- a/plugin.json +++ b/plugin.json @@ -1,5 +1,5 @@ { - "version": "1.1.5", + "version": "1.1.6", "license":"MIT", "pluginIcon":"icon_plugin_xs.png", "price":0.0, diff --git a/src/Providers/PayoneServiceProvider.php b/src/Providers/PayoneServiceProvider.php index c54b36ec..783229e1 100755 --- a/src/Providers/PayoneServiceProvider.php +++ b/src/Providers/PayoneServiceProvider.php @@ -328,7 +328,6 @@ function (OrderCreated $event) use ( if ($order->typeId != OrderType::TYPE_SALES_ORDER && !in_array($order->referrerId, [ 0, // Manuell 1, // Mandant - ]) ) { return; } @@ -340,7 +339,7 @@ function (OrderCreated $event) use ( if (!($payment instanceof Payment)) { $message = 'Payment could not be assigned to order.'; $logger->error($message, $payment); - throw new \Exception($message); + return; } $paymentCreationService->assignPaymentToOrder($payment, $order); $paymentCache->deletePayment($selectedPaymentId); From 223a912f1a6c78457f479cee4c426ea8418b2153 Mon Sep 17 00:00:00 2001 From: Jens Konopka Date: Wed, 25 Sep 2019 13:22:21 +0200 Subject: [PATCH 055/353] add order notes for returns --- config.json | 6 ++++ resources/lang/de/Config.properties | 1 + resources/lang/en/Config.properties | 1 + src/Helpers/OrderHelper.php | 47 +++++++++++++++++++++++++++++ src/Services/Refund.php | 22 ++++++++++++-- 5 files changed, 74 insertions(+), 3 deletions(-) diff --git a/config.json b/config.json index 2dd93a73..87d9775e 100644 --- a/config.json +++ b/config.json @@ -63,6 +63,12 @@ } ] } + }, + "userId": { + "type": "inputText", + "required": false, + "label": "Config.userId", + "options": {} } } }, diff --git a/resources/lang/de/Config.properties b/resources/lang/de/Config.properties index 369cc0c2..f2c87528 100644 --- a/resources/lang/de/Config.properties +++ b/resources/lang/de/Config.properties @@ -3,6 +3,7 @@ midLabel=Merchant ID portalidLabel=Portal ID aidLabel=Account ID keyLabel=Schlüssel +userId=Benutzer ID für Notizen modeLabel=Modus modePossibleValue0=Test modePossibleValue1=Live diff --git a/resources/lang/en/Config.properties b/resources/lang/en/Config.properties index 6d0fd208..a69b57b0 100644 --- a/resources/lang/en/Config.properties +++ b/resources/lang/en/Config.properties @@ -4,6 +4,7 @@ portalidLabel=Portal ID aidLabel=Account ID keyLabel=Key modeLabel=Mode +userId=User ID for order notes modePossibleValue0=Test modePossibleValue1=Live authTypeLabel=Authorisation method diff --git a/src/Helpers/OrderHelper.php b/src/Helpers/OrderHelper.php index 8e8845e4..734369c6 100644 --- a/src/Helpers/OrderHelper.php +++ b/src/Helpers/OrderHelper.php @@ -2,12 +2,18 @@ namespace Payone\Helpers; +use Payone\PluginConstants; +use Plenty\Modules\Authorization\Services\AuthHelper; +use Plenty\Modules\Comment\Contracts\CommentRepositoryContract; use Plenty\Modules\Order\Models\Order; use Plenty\Modules\Order\Property\Models\OrderProperty; use Plenty\Modules\Order\Property\Models\OrderPropertyType; +use Plenty\Plugin\ConfigRepository; +use Plenty\Plugin\Log\Loggable; class OrderHelper { + use Loggable; /** * @param Order $order * @@ -24,4 +30,45 @@ public function getLang(Order $order) return 'DE'; } + + /** + * Adds a note to an order + * + * @param $refValue + * @param $msg + * @param null $backendUserId + * @throws \Throwable + * + */ + public function addOrderComment($refValue, $msg) + { + /** @var ConfigRepository $configRepository */ + $configRepository = pluginApp(ConfigRepository::class); + $backendUserId = $configRepository->get(PluginConstants::NAME . '.userId', null); + + if (isset($backendUserId)) + { + $commentData = []; + $commentData['referenceType'] = 'order'; + $commentData['referenceValue'] = $refValue; + $commentData['text'] = $msg; + $commentData['isVisibleForContact'] = false; + $commentData['userId'] = (int) $backendUserId; + + try + { + /** @var AuthHelper $authHelper */ + $authHelper = pluginApp(AuthHelper::class); + + $authHelper->processUnguarded( + function () use ($commentData) { + /** @var CommentRepositoryContract $commentRepo */ + $commentRepo = pluginApp(CommentRepositoryContract::class); + //unguarded + $commentRepo->createComment($commentData); + } + ); + } catch (\Exception $e) {} + } + } } diff --git a/src/Services/Refund.php b/src/Services/Refund.php index c236775a..8b82aaa4 100644 --- a/src/Services/Refund.php +++ b/src/Services/Refund.php @@ -4,6 +4,7 @@ use Payone\Adapter\Logger; use Payone\Adapter\PaymentHistory; +use Payone\Helpers\OrderHelper; use Payone\Helpers\PaymentHelper; use Payone\Methods\PayoneCCPaymentMethod; use Payone\Models\Api\Response; @@ -57,6 +58,11 @@ class Refund */ private $captureDataProvider; + /** + * @var OrderHelper + */ + protected $orderHelper; + /** * Refund constructor. * @@ -69,6 +75,7 @@ class Refund * @param DebitDataProvider $refundDataProvider * @param Api $api * @param CaptureDataProvider $captureDataProvider + * @param OrderHelper $orderHelper */ public function __construct( PaymentRepositoryContract $paymentRepository, @@ -79,7 +86,8 @@ public function __construct( OrderRepositoryContract $orderRepo, DebitDataProvider $refundDataProvider, Api $api, - CaptureDataProvider $captureDataProvider + CaptureDataProvider $captureDataProvider, + OrderHelper $orderHelper ) { $this->paymentRepository = $paymentRepository; $this->paymentHelper = $paymentHelper; @@ -90,6 +98,7 @@ public function __construct( $this->refundDataProvider = $refundDataProvider; $this->api = $api; $this->captureDataProvider = $captureDataProvider; + $this->orderHelper = $orderHelper; } /** @@ -97,6 +106,8 @@ public function __construct( */ public function executeRefund(Order $order) { + $orderNote = ''; + $this->logger->setIdentifier(__METHOD__)->info('EventProcedure.triggerFunction', ['order' => $order->id]); if (!in_array($order->typeId, $this->getAllowedOrderTypes())) { $this->logger->error('Invalid order type ' . $order->typeId . ' for order ' . $order->id); @@ -112,14 +123,14 @@ public function executeRefund(Order $order) } if (!$originalOrder) { $this->logger->error('Refunding payment failed! The given order is invalid!'); - + $orderNote = 'Refunding payment failed! The given order is invalid!'; return; } try { $payments = $this->paymentRepository->getPaymentsByOrderId($originalOrder->id); } catch (\Exception $e) { $this->logger->error('Error loading payment', $e->getMessage()); - + $orderNote = 'Error loading payment'; return; } $this->logger->debug( @@ -142,6 +153,7 @@ public function executeRefund(Order $order) 'errorMessage' => $text, ] ); + $orderNote = $text . ' Order-ID: ' . $order->id .' Payment-ID: '.$payment->id; $this->paymentHistory->addPaymentHistoryEntry($payment, $text); continue; } @@ -181,13 +193,17 @@ public function executeRefund(Order $order) ] ); $text = 'Refund von event procedure fehlgeschlagen. Meldung: ' . $refundPaymentResult->getErrorMessage(); + $orderNote = $text . ' Meldung: ' . $refundPaymentResult->getErrorMessage() . ' Order-ID: ' . $order->id .' Payment-ID: '.$payment->id; $this->paymentHistory->addPaymentHistoryEntry($payment, $text); continue; } $payment->status = $this->getNewPaymentStatus($payment, $refundPayment); $payment->updateOrderPaymentStatus = true; + $orderNote ='Refund Successful Order-ID: ' . $order->id .' Payment-ID: '.$payment->id; $this->paymentRepository->updatePayment($payment); + + $this->orderHelper->addOrderComment($order->id, $orderNote); } } From 8822046ba44b497d9d149d1da66c67a1bad4558f Mon Sep 17 00:00:00 2001 From: Jens Konopka Date: Thu, 26 Sep 2019 08:32:41 +0200 Subject: [PATCH 056/353] add changelog and update plugin version --- meta/documents/changelog_de.md | 5 +++++ meta/documents/changelog_en.md | 9 +++++++-- plugin.json | 2 +- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/meta/documents/changelog_de.md b/meta/documents/changelog_de.md index 2b77d71e..55218dff 100644 --- a/meta/documents/changelog_de.md +++ b/meta/documents/changelog_de.md @@ -1,5 +1,10 @@ # Release Notes für Payone +## 1.1.7 (2019-09-26) + +### Hinzugefügt +- Rückzahlungen werden nun per Notiz am Auftrag hinterlegt. Dazu muss in der Konfiguration eine UserID hinterlegt werden. + ## 1.1.6 (2019-08-23) ### Behoben diff --git a/meta/documents/changelog_en.md b/meta/documents/changelog_en.md index 1fe2d281..ac41c0d7 100644 --- a/meta/documents/changelog_en.md +++ b/meta/documents/changelog_en.md @@ -1,13 +1,18 @@ # Release Notes for Payone +## 1.1.7 (2019-09-26) + +### Added +- An order note will added for refunds. Please add an user ID in the plugin configurations. + ## 1.1.6 (2019-08-23) -### Behoben +### Fixed - Fix wrong order creation ## 1.1.5 (2019-08-23) -### Behoben +### Fixed - External orders will be created correct without skipping by the plugin. ## 1.1.4 (2019-08-15) diff --git a/plugin.json b/plugin.json index 308c0b0d..b6a1c485 100644 --- a/plugin.json +++ b/plugin.json @@ -1,5 +1,5 @@ { - "version": "1.1.6", + "version": "1.1.7", "license":"MIT", "pluginIcon":"icon_plugin_xs.png", "price":0.0, From 052c850390a859c977ce8960061266cbc8847615 Mon Sep 17 00:00:00 2001 From: Jens Konopka Date: Fri, 25 Oct 2019 07:25:50 +0200 Subject: [PATCH 057/353] use correct order for the refund --- .../Api/Request/DebitDataProvider.php | 22 +++---- src/Services/Refund.php | 58 ++++++++++--------- 2 files changed, 37 insertions(+), 43 deletions(-) diff --git a/src/Providers/Api/Request/DebitDataProvider.php b/src/Providers/Api/Request/DebitDataProvider.php index 1026f614..6831a061 100644 --- a/src/Providers/Api/Request/DebitDataProvider.php +++ b/src/Providers/Api/Request/DebitDataProvider.php @@ -9,21 +9,10 @@ */ class DebitDataProvider extends DataProviderAbstract implements DataProviderOrder { - /** - * {@inheritdoc} - */ public function getDataFromOrder(string $paymentCode, Order $order, string $requestReference = null) { - $requestParams = $this->getDefaultRequestData($paymentCode); - $requestParams['context']['sequencenumber'] = $this->getSequenceNumber($order); - $requestParams['basket'] = $this->getBasketDataFromOrder($order); - $requestParams['basketItems'] = $this->getOrderItemData($order); - $requestParams['order'] = $this->getOrderData($order); - $requestParams['referenceId'] = $requestReference; - - $this->validator->validate($requestParams); - - return $requestParams; + // TODO: Implement getDataFromOrder() method. + return []; } /** @@ -36,9 +25,12 @@ public function getDataFromOrder(string $paymentCode, Order $order, string $requ */ public function getPartialRefundData($paymentCode, Order $order, Order $refund, $preAuthUniqueId) { - $requestParams = $this->getDataFromOrder($paymentCode, $order, $preAuthUniqueId); - + $requestParams = $this->getDefaultRequestData($paymentCode); + $requestParams['context']['sequencenumber'] = $this->getSequenceNumber($order); + $requestParams['basket'] = $this->getBasketDataFromOrder($refund); + $requestParams['basketItems'] = $this->getOrderItemData($order); $requestParams['order'] = $this->getOrderData($refund); + $requestParams['referenceId'] = $preAuthUniqueId; $this->validator->validate($requestParams); diff --git a/src/Services/Refund.php b/src/Services/Refund.php index 8b82aaa4..d2ecab0f 100644 --- a/src/Services/Refund.php +++ b/src/Services/Refund.php @@ -102,28 +102,29 @@ public function __construct( } /** - * @param Order $order + * @param Order $refund */ - public function executeRefund(Order $order) + public function executeRefund(Order $refund) { $orderNote = ''; - $this->logger->setIdentifier(__METHOD__)->info('EventProcedure.triggerFunction', ['order' => $order->id]); - if (!in_array($order->typeId, $this->getAllowedOrderTypes())) { - $this->logger->error('Invalid order type ' . $order->typeId . ' for order ' . $order->id); + $this->logger->setIdentifier(__METHOD__)->info('EventProcedure.triggerFunction', ['order' => $refund->id]); + if (!in_array($refund->typeId, $this->getAllowedOrderTypes())) { + $this->logger->error('Invalid order type ' . $refund->typeId . ' for order ' . $refund->id); return; } try { - $originalOrder = $this->getOriginalOrder($order); + $originalOrder = $this->getOriginalOrder($refund); } catch (\Exception $e) { - $this->logger->error('Error loading original order for order ' . $order->id, $e->getMessage()); + $this->logger->error('Error loading original order for order ' . $refund->id, $e->getMessage()); return; } if (!$originalOrder) { $this->logger->error('Refunding payment failed! The given order is invalid!'); $orderNote = 'Refunding payment failed! The given order is invalid!'; + $this->orderHelper->addOrderComment($refund->id, $orderNote); return; } try { @@ -131,6 +132,7 @@ public function executeRefund(Order $order) } catch (\Exception $e) { $this->logger->error('Error loading payment', $e->getMessage()); $orderNote = 'Error loading payment'; + $this->orderHelper->addOrderComment($refund->id, $orderNote); return; } $this->logger->debug( @@ -148,25 +150,25 @@ public function executeRefund(Order $order) $text = 'No Auth reference found in payment.'; $this->logger->error('Api.doRefund', [ - 'order' => $order->id, + 'order' => $refund->id, 'payment' => $payment, 'errorMessage' => $text, ] ); - $orderNote = $text . ' Order-ID: ' . $order->id .' Payment-ID: '.$payment->id; + $orderNote = $text . ' Order-ID: ' . $refund->id .' Payment-ID: '.$payment->id; $this->paymentHistory->addPaymentHistoryEntry($payment, $text); continue; } - if ($order->typeId != OrderType::TYPE_SALES_ORDER) { + if ($refund->typeId != OrderType::TYPE_SALES_ORDER) { $refundPaymentResult = $this->refundCreditMemo( $payment, $originalOrder, - $order, + $refund, $preAuth ); } else { - $refundPaymentResult = $this->refundOrder($payment, $order, $preAuth); + $refundPaymentResult = $this->refundOrder($payment, $refund, $preAuth); } $paymentCode = $this->paymentHelper->getPaymentCodeByMop($payment->mopId); @@ -180,37 +182,37 @@ public function executeRefund(Order $order) } } - $refundPayment = $this->createRefundPayment($payment->mopId, $payment, $originalOrder, + $refundPayment = $this->createRefundPayment($payment->mopId, $payment, $refund, $refundPaymentResult); if (!$refundPaymentResult->getSuccess()) { $this->logger->error('Api.doRefund', [ - 'order' => $order->id, + 'order' => $refund->id, 'payment' => $payment, 'authReference' => $preAuth, 'errorMessage' => $refundPaymentResult->getErrorMessage(), ] ); $text = 'Refund von event procedure fehlgeschlagen. Meldung: ' . $refundPaymentResult->getErrorMessage(); - $orderNote = $text . ' Meldung: ' . $refundPaymentResult->getErrorMessage() . ' Order-ID: ' . $order->id .' Payment-ID: '.$payment->id; + $orderNote = $text . ' Meldung: ' . $refundPaymentResult->getErrorMessage() . ' Order-ID: ' . $refund->id .' Payment-ID: '.$payment->id; $this->paymentHistory->addPaymentHistoryEntry($payment, $text); continue; } $payment->status = $this->getNewPaymentStatus($payment, $refundPayment); $payment->updateOrderPaymentStatus = true; - $orderNote ='Refund Successful Order-ID: ' . $order->id .' Payment-ID: '.$payment->id; + $orderNote ='Refund Successful Order-ID: ' . $refund->id .' Payment-ID: '.$payment->id; $this->paymentRepository->updatePayment($payment); - - $this->orderHelper->addOrderComment($order->id, $orderNote); } + + $this->orderHelper->addOrderComment($refund->id, $orderNote); } /** * @param $mopId * @param $payment - * @param $order + * @param $refund * @param Response $transaction * * @return Payment @@ -218,7 +220,7 @@ public function executeRefund(Order $order) private function createRefundPayment( $mopId, $payment, - Order $order, + Order $refund, $transaction ) { /* @var Payment $debitPayment */ @@ -226,17 +228,17 @@ private function createRefundPayment( $mopId, $transaction, $payment->currency, - $this->getOrderAmount($order, $payment), + $this->getOrderAmount($refund, $payment), $payment->id ); if (isset($debitPayment) && $debitPayment instanceof Payment) { - $this->paymentCreation->assignPaymentToOrder($debitPayment, $order); + $this->paymentCreation->assignPaymentToOrder($debitPayment, $refund); } $this->logger->debug( 'General.createRefundPayment', - ['orderId' => $order->id, 'payment' => $debitPayment] + ['orderId' => $refund->id, 'payment' => $debitPayment] ); return $debitPayment; @@ -244,12 +246,12 @@ private function createRefundPayment( /** * @param Payment $payment - * @param Order $order + * @param Order $refund * @param $preAuthUniqueId * * @return Response */ - private function refundOrder($payment, Order $order, $preAuthUniqueId) + private function refundOrder($payment, Order $refund, $preAuthUniqueId) { $paymentCode = $this->paymentHelper->getPaymentCodeByMop($payment->mopId); @@ -257,18 +259,18 @@ private function refundOrder($payment, Order $order, $preAuthUniqueId) 'Api.doRefund', [ 'paymentCode' => $paymentCode, - 'order' => $order->toArray(), + 'order' => $refund->toArray(), 'authUniqueId' => $preAuthUniqueId, ] ); if ($paymentCode == PayoneCCPaymentMethod::PAYMENT_CODE) { if (!$payment->amount) {// not captured yet? - return $this->reverseAuth($order, $payment, $preAuthUniqueId); + return $this->reverseAuth($refund, $payment, $preAuthUniqueId); } } - $requestData = $this->refundDataProvider->getDataFromOrder($paymentCode, $order, $preAuthUniqueId); + $requestData = $this->refundDataProvider->getDataFromOrder($paymentCode, $refund, $preAuthUniqueId); return $this->api->doDebit($requestData); } From 49ed03c799514f302c3de9c1a2b3f61fe2d8b6fe Mon Sep 17 00:00:00 2001 From: Jens Konopka Date: Fri, 25 Oct 2019 09:53:21 +0200 Subject: [PATCH 058/353] update and refactor payment creation optimize boot time --- src/Adapter/Logger.php | 4 +- src/Providers/PayoneServiceProvider.php | 195 ++++++++---------------- src/Services/PaymentCreation.php | 9 ++ src/Services/Refund.php | 6 +- 4 files changed, 80 insertions(+), 134 deletions(-) diff --git a/src/Adapter/Logger.php b/src/Adapter/Logger.php index 53d849fc..f3276e7b 100644 --- a/src/Adapter/Logger.php +++ b/src/Adapter/Logger.php @@ -38,8 +38,8 @@ class Logger //implements LoggerContract * * @param ShopHelper $shopHelper */ - public function __construct(ShopHelper $shopHelper - ) { + public function __construct(ShopHelper $shopHelper) + { $this->shopHelper = $shopHelper; $this->identifier = __CLASS__; $this->logger = $this->getLogger($this->identifier); diff --git a/src/Providers/PayoneServiceProvider.php b/src/Providers/PayoneServiceProvider.php index 783229e1..d14a3f46 100755 --- a/src/Providers/PayoneServiceProvider.php +++ b/src/Providers/PayoneServiceProvider.php @@ -39,9 +39,11 @@ use Plenty\Modules\Document\Models\Document; use Plenty\Modules\EventProcedures\Services\Entries\ProcedureEntry; use Plenty\Modules\EventProcedures\Services\EventProceduresService; +use Plenty\Modules\Order\Contracts\OrderRepositoryContract; use Plenty\Modules\Order\Events\OrderCreated; use Plenty\Modules\Order\Models\OrderType; use Plenty\Modules\Payment\Contracts\PaymentRepositoryContract; +use Plenty\Modules\Payment\Events\Checkout\ExecutePayment; use Plenty\Modules\Payment\Events\Checkout\GetPaymentMethodContent; use Plenty\Modules\Payment\Method\Contracts\PaymentMethodContainer; use Plenty\Modules\Payment\Models\Payment; @@ -61,62 +63,24 @@ public function register() /** * @param Dispatcher $eventDispatcher - * @param PaymentHelper $paymentHelper - * @param PaymentService $paymentService * @param BasketRepositoryContract $basket * @param PaymentMethodContainer $payContainer - * @param PaymentRenderer $paymentRenderer - * @param PaymentMethodContent $content - * @param Logger $logger * @param EventProceduresService $eventProceduresService - * @param ErrorMessageRenderer $errorMessageRenderer - * @param PaymentCreation $paymentCreationService - * @param PaymentCache $paymentCache - * @param ReferenceContainer $referenceContainer - * @param OrderPdf $orderPdf - * @param OrderHelper $orderHelper */ public function boot( Dispatcher $eventDispatcher, - PaymentHelper $paymentHelper, - PaymentService $paymentService, BasketRepositoryContract $basket, PaymentMethodContainer $payContainer, - PaymentRenderer $paymentRenderer, - PaymentMethodContent $content, - Logger $logger, - EventProceduresService $eventProceduresService, - ErrorMessageRenderer $errorMessageRenderer, - PaymentCreation $paymentCreationService, - PaymentCache $paymentCache, - ReferenceContainer $referenceContainer, - OrderPdf $orderPdf, - OrderHelper $orderHelper, - AddressHelper $addressHelper, - ShopHelper $shopHelper + EventProceduresService $eventProceduresService ) { $this->registerPaymentMethods($payContainer); $this->registerPaymentRendering( $eventDispatcher, - $paymentHelper, - $paymentService, - $paymentRenderer, - $content, - $logger, - $basket, - $errorMessageRenderer, - $addressHelper, - $shopHelper + $basket ); - $this->registerOrderCreationEvents( - $eventDispatcher, - $paymentHelper, - $logger, - $paymentCreationService, - $paymentCache - ); + $this->registerPaymentExecute($eventDispatcher); $captureProcedureTitle = [ 'de' => 'Versandbestätigung an ' . PluginConstants::NAME, @@ -140,9 +104,7 @@ public function boot( '\Payone\Procedures\RefundEventProcedure@run' ); - $this->registerReferenceTypesForLogging($referenceContainer); - $this->registerInvoicePdfGeneration($eventDispatcher, $paymentHelper, $logger, $orderPdf, $orderHelper); - + $this->registerInvoicePdfGeneration($eventDispatcher); } /** @@ -224,32 +186,20 @@ protected function registerPaymentMethods(PaymentMethodContainer $payContainer) * @param PaymentMethodContent $content * @param Logger $logger */ - private function registerPaymentRendering( + protected function registerPaymentRendering( Dispatcher $eventDispatcher, - PaymentHelper $paymentHelper, - PaymentService $paymentService, - PaymentRenderer $paymentRenderer, - PaymentMethodContent $content, - Logger $logger, - BasketRepositoryContract $basketRepository, - ErrorMessageRenderer $errorMessageRenderer, - AddressHelper $addressHelper, - ShopHelper $shopHelper + BasketRepositoryContract $basketRepository ) { - $logger = $logger->setIdentifier(__METHOD__); $eventDispatcher->listen( GetPaymentMethodContent::class, - function (GetPaymentMethodContent $event) use ( - $paymentService, - $paymentHelper, - $paymentRenderer, - $content, - $logger, - $basketRepository, - $errorMessageRenderer, - $addressHelper, - $shopHelper - ) { + function (GetPaymentMethodContent $event) use ($basketRepository) { + /** @var PaymentService $paymentService */ + $paymentService = pluginApp(PaymentService::class); + /** @var Logger $logger */ + $logger = pluginApp(Logger::class); + /** @var PaymentHelper $paymentHelper */ + $paymentHelper = pluginApp(PaymentHelper::class); + $logger->setIdentifier(__METHOD__)->info('Event.getPaymentMethodContent'); $selectedPaymentMopId = $event->getMop(); if (!$selectedPaymentMopId || !$paymentHelper->isPayonePayment($selectedPaymentMopId)) { @@ -260,13 +210,16 @@ function (GetPaymentMethodContent $event) use ( $payment = PaymentMethodServiceFactory::create($paymentCode); $basket = $basketRepository->load(); + /** @var AddressHelper $addressHelper */ + $addressHelper = pluginApp(AddressHelper::class); $billingAddress = $addressHelper->getBasketBillingAddress($basket); if( $paymentCode == PayoneInvoiceSecurePaymentMethod::PAYMENT_CODE && (!isset($billingAddress->birthday) || !strlen($billingAddress->birthday)) ) { /** @var \Plenty\Plugin\Translation\Translator $translator */ $translator = pluginApp(\Plenty\Plugin\Translation\Translator::class); - + /** @var ShopHelper $shopHelper */ + $shopHelper = pluginApp(ShopHelper::class); $lang = $shopHelper->getCurrentLanguage(); $dateOfBirthMissingMessage = $translator->trans('Payone::Template.missingDateOfBirth', [], $lang); @@ -276,8 +229,14 @@ function (GetPaymentMethodContent $event) use ( return; } - $renderingType = $content->getPaymentContentType($paymentCode); try { + /** @var PaymentMethodContent $content */ + $content = pluginApp(PaymentMethodContent::class); + $renderingType = $content->getPaymentContentType($paymentCode); + + /** @var PaymentRenderer $paymentRenderer */ + $paymentRenderer = pluginApp(PaymentRenderer::class); + $event->setType($renderingType); switch ($renderingType) { case GetPaymentMethodContent::RETURN_TYPE_REDIRECT_URL: @@ -294,6 +253,9 @@ function (GetPaymentMethodContent $event) use ( } catch (\Exception $e) { $errorMessage = $e->getMessage(); $logger->logException($e); + + /** @var ErrorMessageRenderer $errorMessageRenderer */ + $errorMessageRenderer = pluginApp(ErrorMessageRenderer::class); $event->setValue($errorMessageRenderer->render($errorMessage)); $event->setType(GetPaymentMethodContent::RETURN_TYPE_ERROR); } @@ -301,84 +263,57 @@ function (GetPaymentMethodContent $event) use ( ); } - /** - * @param Dispatcher $eventDispatcher - * @param PaymentHelper $paymentHelper - * @param Logger $logger - * @param Capture $captureService - * @param PaymentCreation $paymentCreationService - */ - private function registerOrderCreationEvents( - Dispatcher $eventDispatcher, - PaymentHelper $paymentHelper, - Logger $logger, - PaymentCreation $paymentCreationService, - PaymentCache $paymentCache - ) { - $logger = $logger->setIdentifier(__METHOD__); - $eventDispatcher->listen(OrderCreated::class, - function (OrderCreated $event) use ( - $paymentHelper, - $logger, - $paymentCreationService, - $paymentCache - ) { - $order = $event->getOrder(); - $logger->info('Event.orderCreated', [$order, $order->id]); - if ($order->typeId != OrderType::TYPE_SALES_ORDER && !in_array($order->referrerId, [ - 0, // Manuell - 1, // Mandant - ]) ) { - return; - } - $selectedPaymentId = $order->methodOfPaymentId; - if (!$selectedPaymentId || !$paymentHelper->isPayonePayment($selectedPaymentId)) { - return; - } - $payment = $paymentCache->loadPayment($selectedPaymentId); + protected function registerPaymentExecute(Dispatcher $dispatcher) + { + $dispatcher->listen(ExecutePayment::class, function (ExecutePayment $event) { + /** @var PaymentHelper $paymentHelper */ + $paymentHelper = pluginApp(PaymentHelper::class); + if($paymentHelper->isPayonePayment($event->getMop())) { + /** @var OrderRepositoryContract $orderRepository */ + $orderRepository = pluginApp(OrderRepositoryContract::class); + /** @var PaymentCache $paymentCache */ + $paymentCache = pluginApp(PaymentCache::class); + + $order = $orderRepository->findOrderById($event->getOrderId()); + $payment = $paymentCache->loadPayment($event->getMop()); if (!($payment instanceof Payment)) { $message = 'Payment could not be assigned to order.'; + + /** @var Logger $logger */ + $logger = pluginApp(Logger::class); $logger->error($message, $payment); return; } + + /** @var PaymentCreation $paymentCreationService */ + $paymentCreationService = pluginApp(PaymentCreation::class); $paymentCreationService->assignPaymentToOrder($payment, $order); - $paymentCache->deletePayment($selectedPaymentId); + $paymentCache->deletePayment($event->getMop()); } - ); - } + }); - /** - * @param ReferenceContainer $referenceContainer - */ - private function registerReferenceTypesForLogging(ReferenceContainer $referenceContainer) - { - try { - $referenceContainer->add([Logger::PAYONE_REQUEST_REFERENCE => Logger::PAYONE_REQUEST_REFERENCE]); - } catch (ReferenceTypeException $ex) { - // already registered - } } /** * @param Dispatcher $eventDispatcher - * @param PaymentHelper $paymentHelper - * @param Logger $logger - * @param OrderPdf $orderPdf - * @param OrderHelper $orderHelper */ - private function registerInvoicePdfGeneration( - Dispatcher $eventDispatcher, - PaymentHelper $paymentHelper, - Logger $logger, - OrderPdf $orderPdf, - OrderHelper $orderHelper - ) { + protected function registerInvoicePdfGeneration(Dispatcher $eventDispatcher) + { // Listen for the document generation event $eventDispatcher->listen(OrderPdfGenerationEvent::class, - function (OrderPdfGenerationEvent $event) use ($paymentHelper, $logger, $orderPdf, $orderHelper) { - /** @var Order $order */ + function (OrderPdfGenerationEvent $event) { + + /** @var PaymentHelper $paymentHelper */ + $paymentHelper = pluginApp(PaymentHelper::class); + + /** @var OrderHelper $orderHelper */ + $orderHelper = pluginApp(OrderHelper::class); + + /** @var \Order $order */ $order = $event->getOrder(); + /** @var Logger $logger */ + $logger = pluginApp(Logger::class); $logger->setIdentifier(__METHOD__)->info( 'Event.orderPdfGeneration', ['order' => $order->id, 'documentType' => $event->getDocType()] @@ -401,6 +336,8 @@ function (OrderPdfGenerationEvent $event) use ($paymentHelper, $logger, $orderPd } $lang = $orderHelper->getLang($order); try { + /** @var OrderPdf $orderPdf */ + $orderPdf = pluginApp(OrderPdf::class); $orderPdfGenerationModel = $orderPdf->createPdfNote($payments[0], $lang); } catch (\Exception $e) { $logger->error('Adding PDF comment failed for order ' diff --git a/src/Services/PaymentCreation.php b/src/Services/PaymentCreation.php index 86b05da8..9ebb8652 100644 --- a/src/Services/PaymentCreation.php +++ b/src/Services/PaymentCreation.php @@ -327,6 +327,15 @@ public function createRefundPayment($paymentId, $response, $currency, $grandTota $transactionID ); + /* + * Sequence Number + * First number have to be 0 + */ + $paymentProperties[] = $this->createPaymentProperty( + PaymentProperty::TYPE_TRANSACTION_CODE, + 0 + ); + $paymentProperties[] = $this->createPaymentProperty(PaymentProperty::TYPE_ORIGIN, '' . Payment::ORIGIN_PLUGIN); $paymentText = [ diff --git a/src/Services/Refund.php b/src/Services/Refund.php index d2ecab0f..cceadbd6 100644 --- a/src/Services/Refund.php +++ b/src/Services/Refund.php @@ -182,9 +182,6 @@ public function executeRefund(Order $refund) } } - $refundPayment = $this->createRefundPayment($payment->mopId, $payment, $refund, - $refundPaymentResult); - if (!$refundPaymentResult->getSuccess()) { $this->logger->error('Api.doRefund', [ @@ -200,6 +197,9 @@ public function executeRefund(Order $refund) continue; } + $refundPayment = $this->createRefundPayment($payment->mopId, $payment, $refund, + $refundPaymentResult); + $payment->status = $this->getNewPaymentStatus($payment, $refundPayment); $payment->updateOrderPaymentStatus = true; $orderNote ='Refund Successful Order-ID: ' . $refund->id .' Payment-ID: '.$payment->id; From 5343133786503ac977654d29064c45a10c506a86 Mon Sep 17 00:00:00 2001 From: Jens Konopka Date: Fri, 25 Oct 2019 10:37:22 +0200 Subject: [PATCH 059/353] add changelog and update plugin version --- meta/documents/changelog_de.md | 9 +++++++++ meta/documents/changelog_en.md | 9 +++++++++ plugin.json | 2 +- 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/meta/documents/changelog_de.md b/meta/documents/changelog_de.md index 55218dff..13d53b2f 100644 --- a/meta/documents/changelog_de.md +++ b/meta/documents/changelog_de.md @@ -1,5 +1,14 @@ # Release Notes für Payone +## 1.1.8 (2019-10-25) + +### Behoben +- Teilrückerstattungen werden nun über den korrekten Betrag ausgeführt. + +### Geändert +- Rückerstattungen werden nun dem Auftrag zugeordnet von dem diese ausgeführt wurden. +- Ladezeiten des Plugins wurden verbessert. + ## 1.1.7 (2019-09-26) ### Hinzugefügt diff --git a/meta/documents/changelog_en.md b/meta/documents/changelog_en.md index ac41c0d7..56ac94f7 100644 --- a/meta/documents/changelog_en.md +++ b/meta/documents/changelog_en.md @@ -1,5 +1,14 @@ # Release Notes for Payone +## 1.1.8 (2019-10-25) + +### Fixed +- Partial refunds will use the correct amount from the credit note or return. + +### Changed +- Refund payments will added to the credit note or return from where they were executed. +- The loading times of the plugin have been improved. + ## 1.1.7 (2019-09-26) ### Added diff --git a/plugin.json b/plugin.json index b6a1c485..047745b6 100644 --- a/plugin.json +++ b/plugin.json @@ -1,5 +1,5 @@ { - "version": "1.1.7", + "version": "1.1.8", "license":"MIT", "pluginIcon":"icon_plugin_xs.png", "price":0.0, From e69bf544d8dcbb2d530fc91689f39a83e19b3098 Mon Sep 17 00:00:00 2001 From: Jens Konopka Date: Thu, 7 Nov 2019 09:15:09 +0100 Subject: [PATCH 060/353] add sequence number until inital payment creation. Fix updating payment status while creating an refund payment --- src/Helpers/PaymentHelper.php | 55 ++++++++++++++++++++++++++++++++ src/Services/PaymentCreation.php | 5 +++ src/Services/Refund.php | 4 +-- 3 files changed, 62 insertions(+), 2 deletions(-) diff --git a/src/Helpers/PaymentHelper.php b/src/Helpers/PaymentHelper.php index e03eee83..32403bef 100644 --- a/src/Helpers/PaymentHelper.php +++ b/src/Helpers/PaymentHelper.php @@ -179,4 +179,59 @@ public function getPaymentPropertyValue($payment, $propertyTypeConstant) return ''; } + + public function raiseSequenceNumber(Payment $payment) + { + foreach ($payment->properties as $property) { + if($property->typeId == PaymentProperty::TYPE_TRANSACTION_CODE) { + $property->value++; + return $payment; + } + } + } + + + /** + * @param Payment $payment + * @param int $pamentPropertyTypeId + * @param string $value + * + * @return Payment + */ + public function createOrUpdatePaymentProperty($payment, $pamentPropertyTypeId, $value) + { + foreach ($payment->properties as $property) { + if (!($property instanceof PaymentProperty)) { + continue; + } + if ($property->typeId === $pamentPropertyTypeId) { + $property->value = $value; + return $payment; + } + } + + $paymentProperties = $payment->properties; + $paymentProperties[] = $this->createPaymentProperty($pamentPropertyTypeId, $value); + + return $payment; + } + + /** + * Returns a PaymentProperty with the given params + * + * @param int $typeId + * @param string $value + * + * @return PaymentProperty + */ + protected function createPaymentProperty($typeId, $value) + { + /** @var PaymentProperty $paymentProperty */ + $paymentProperty = pluginApp(PaymentProperty::class); + + $paymentProperty->typeId = $typeId; + $paymentProperty->value = $value . ''; + + return $paymentProperty; + } } diff --git a/src/Services/PaymentCreation.php b/src/Services/PaymentCreation.php index 9ebb8652..03628ad2 100644 --- a/src/Services/PaymentCreation.php +++ b/src/Services/PaymentCreation.php @@ -142,6 +142,11 @@ public function createPayment($mopId, ResponseAbstract $response, Basket $basket $transactionID ); + $paymentProperties[] = $this->createPaymentProperty( + PaymentProperty::TYPE_TRANSACTION_CODE, + 0 + ); + $paymentProperties[] = $this->createPaymentProperty(PaymentProperty::TYPE_ORIGIN, '' . Payment::ORIGIN_PLUGIN); $paymentProperties[] = $this->createPaymentProperty( PaymentProperty::TYPE_INVOICE_ADDRESS_ID, diff --git a/src/Services/Refund.php b/src/Services/Refund.php index cceadbd6..56d97571 100644 --- a/src/Services/Refund.php +++ b/src/Services/Refund.php @@ -193,7 +193,6 @@ public function executeRefund(Order $refund) ); $text = 'Refund von event procedure fehlgeschlagen. Meldung: ' . $refundPaymentResult->getErrorMessage(); $orderNote = $text . ' Meldung: ' . $refundPaymentResult->getErrorMessage() . ' Order-ID: ' . $refund->id .' Payment-ID: '.$payment->id; - $this->paymentHistory->addPaymentHistoryEntry($payment, $text); continue; } @@ -201,9 +200,10 @@ public function executeRefund(Order $refund) $refundPaymentResult); $payment->status = $this->getNewPaymentStatus($payment, $refundPayment); - $payment->updateOrderPaymentStatus = true; + $payment = $this->paymentHelper->raiseSequenceNumber($payment); $orderNote ='Refund Successful Order-ID: ' . $refund->id .' Payment-ID: '.$payment->id; $this->paymentRepository->updatePayment($payment); + $this->paymentHistory->addPaymentHistoryEntry($payment, $orderNote); } $this->orderHelper->addOrderComment($refund->id, $orderNote); From 03c2a89d1ce501843cfcdf8ff20900c8a9fca72e Mon Sep 17 00:00:00 2001 From: Jens Konopka Date: Thu, 7 Nov 2019 09:46:34 +0100 Subject: [PATCH 061/353] add booking text to refund payment --- src/Services/PaymentCreation.php | 9 ++++++++- src/Services/Refund.php | 3 ++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/Services/PaymentCreation.php b/src/Services/PaymentCreation.php index 03628ad2..f83b8bcb 100644 --- a/src/Services/PaymentCreation.php +++ b/src/Services/PaymentCreation.php @@ -297,7 +297,7 @@ public function reAuthorizePayment(Payment $payment, Response $response, Order $ * * @return Payment */ - public function createRefundPayment($paymentId, $response, $currency, $grandTotal, $parentPaymentId) + public function createRefundPayment($paymentId, $response, $currency, $grandTotal, $parentPaymentId, $refundId=0) { $this->logger->setIdentifier(__METHOD__)->debug( 'Payment.createRefundPayment', @@ -353,6 +353,13 @@ public function createRefundPayment($paymentId, $response, $currency, $grandTota json_encode($paymentText) ); + $paymentProperties[] = $this->createPaymentProperty( + PaymentProperty::TYPE_BOOKING_TEXT, + sprintf('Refund (%s) OrderId: (%s)', [ + $refundId, $transactionID + ]) + ); + $payment->properties = $paymentProperties; try { diff --git a/src/Services/Refund.php b/src/Services/Refund.php index 56d97571..033336e4 100644 --- a/src/Services/Refund.php +++ b/src/Services/Refund.php @@ -229,7 +229,8 @@ private function createRefundPayment( $transaction, $payment->currency, $this->getOrderAmount($refund, $payment), - $payment->id + $payment->id, + $refund->id ); if (isset($debitPayment) && $debitPayment instanceof Payment) { From 4b40c43551fe3c8a03cbb0049896ca23537159cf Mon Sep 17 00:00:00 2001 From: Jens Konopka Date: Thu, 7 Nov 2019 10:54:22 +0100 Subject: [PATCH 062/353] add unique transaction id and add exception logging --- src/Services/PaymentCreation.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Services/PaymentCreation.php b/src/Services/PaymentCreation.php index f83b8bcb..de0643a4 100644 --- a/src/Services/PaymentCreation.php +++ b/src/Services/PaymentCreation.php @@ -310,7 +310,7 @@ public function createRefundPayment($paymentId, $response, $currency, $grandTota ] ); - $transactionID = $response->getTransactionID(); + $transactionID = $response->getTransactionID() . '_' . $refundId; /** @var Payment $payment */ $payment = pluginApp(Payment::class); @@ -323,7 +323,6 @@ public function createRefundPayment($paymentId, $response, $currency, $grandTota $payment->receivedAt = date('Y-m-d H:i:s'); $payment->type = 'debit'; $payment->parentId = $parentPaymentId; - $payment->regenerateHash = true; $payment->unaccountable = 0; $paymentProperties = []; @@ -355,7 +354,7 @@ public function createRefundPayment($paymentId, $response, $currency, $grandTota $paymentProperties[] = $this->createPaymentProperty( PaymentProperty::TYPE_BOOKING_TEXT, - sprintf('Refund (%s) OrderId: (%s)', [ + sprintf('Refund (%s) Transaction: (%s)', [ $refundId, $transactionID ]) ); @@ -365,6 +364,7 @@ public function createRefundPayment($paymentId, $response, $currency, $grandTota try { $payment = $this->paymentRepository->createPayment($payment); } catch (\Exception $e) { + $this->logger->logException($e); $storedPayment = $this->paymentRepository->getPaymentById($payment->id); if ($storedPayment) { return $storedPayment; From 79cafd44d54b0cb581012a79bc2dc771c249f265 Mon Sep 17 00:00:00 2001 From: Jens Konopka Date: Thu, 7 Nov 2019 11:00:53 +0100 Subject: [PATCH 063/353] change booking text for refund payments --- src/Services/PaymentCreation.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Services/PaymentCreation.php b/src/Services/PaymentCreation.php index de0643a4..cc63373b 100644 --- a/src/Services/PaymentCreation.php +++ b/src/Services/PaymentCreation.php @@ -354,9 +354,7 @@ public function createRefundPayment($paymentId, $response, $currency, $grandTota $paymentProperties[] = $this->createPaymentProperty( PaymentProperty::TYPE_BOOKING_TEXT, - sprintf('Refund (%s) Transaction: (%s)', [ - $refundId, $transactionID - ]) + 'Refund ('.$refundId.') Transaction: ('.$transactionID.')' ); $payment->properties = $paymentProperties; From c1407c85c12018f2a992d93854438f8e539d0fe9 Mon Sep 17 00:00:00 2001 From: Jens Konopka Date: Thu, 7 Nov 2019 11:20:16 +0100 Subject: [PATCH 064/353] update version --- meta/documents/changelog_de.md | 5 +++++ meta/documents/changelog_en.md | 5 +++++ plugin.json | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/meta/documents/changelog_de.md b/meta/documents/changelog_de.md index 13d53b2f..7c48de98 100644 --- a/meta/documents/changelog_de.md +++ b/meta/documents/changelog_de.md @@ -1,5 +1,10 @@ # Release Notes für Payone +## 1.1.9 (2019-11-07) + +### Behoben +- Teilrückerstattungen können nun auch mehrfach ausgeführt werden, dies führte unter bestimmten Konstelationen zu einem Fehler. + ## 1.1.8 (2019-10-25) ### Behoben diff --git a/meta/documents/changelog_en.md b/meta/documents/changelog_en.md index 56ac94f7..2b9af133 100644 --- a/meta/documents/changelog_en.md +++ b/meta/documents/changelog_en.md @@ -1,5 +1,10 @@ # Release Notes for Payone +## 1.1.9 (2019-11-07) + +### Fixed +- Partial refunds can now be executed more than once. Under certain constellations an error came up. + ## 1.1.8 (2019-10-25) ### Fixed diff --git a/plugin.json b/plugin.json index 047745b6..10008bc9 100644 --- a/plugin.json +++ b/plugin.json @@ -1,5 +1,5 @@ { - "version": "1.1.8", + "version": "1.1.9", "license":"MIT", "pluginIcon":"icon_plugin_xs.png", "price":0.0, From ed325a0949204ca09a18f90a29bd24e9b8981d50 Mon Sep 17 00:00:00 2001 From: Jens Konopka Date: Mon, 9 Dec 2019 16:21:27 +0100 Subject: [PATCH 065/353] fix order notes during the refund process --- meta/documents/changelog_de.md | 5 +++++ meta/documents/changelog_en.md | 5 +++++ plugin.json | 2 +- src/Helpers/PaymentHelper.php | 6 ++++++ 4 files changed, 17 insertions(+), 1 deletion(-) diff --git a/meta/documents/changelog_de.md b/meta/documents/changelog_de.md index 7c48de98..396db6fe 100644 --- a/meta/documents/changelog_de.md +++ b/meta/documents/changelog_de.md @@ -1,5 +1,10 @@ # Release Notes für Payone +## 1.1.10 (2019-12-09) + +### Behoben +- Auftragsnotizen bei Rückerstattungen werden nun wieder korrekt geschrieben. + ## 1.1.9 (2019-11-07) ### Behoben diff --git a/meta/documents/changelog_en.md b/meta/documents/changelog_en.md index 2b9af133..3d1abb89 100644 --- a/meta/documents/changelog_en.md +++ b/meta/documents/changelog_en.md @@ -1,5 +1,10 @@ # Release Notes for Payone +## 1.1.10 (2019-12-09) + +### Fixed +- Writing Order notes during a refund works properly again. + ## 1.1.9 (2019-11-07) ### Fixed diff --git a/plugin.json b/plugin.json index 10008bc9..7da915ae 100644 --- a/plugin.json +++ b/plugin.json @@ -1,5 +1,5 @@ { - "version": "1.1.9", + "version": "1.1.10", "license":"MIT", "pluginIcon":"icon_plugin_xs.png", "price":0.0, diff --git a/src/Helpers/PaymentHelper.php b/src/Helpers/PaymentHelper.php index 32403bef..8a80f7ab 100644 --- a/src/Helpers/PaymentHelper.php +++ b/src/Helpers/PaymentHelper.php @@ -188,6 +188,12 @@ public function raiseSequenceNumber(Payment $payment) return $payment; } } + + $properties = $payment->properties; + $properties[] = $this->createPaymentProperty(PaymentProperty::TYPE_TRANSACTION_CODE, 1); + $payment->properties = $properties; + + return $payment; } From 9f69bf555ce25c0b2556d00a487f2a567b838dc5 Mon Sep 17 00:00:00 2001 From: Kevin Fink Date: Thu, 12 Dec 2019 14:10:10 +0100 Subject: [PATCH 066/353] Added methods for the backend visibility --- meta/documents/changelog_de.md | 4 ++++ meta/documents/changelog_en.md | 4 ++++ src/Methods/PaymentAbstract.php | 20 ++++++++++++++++++++ 3 files changed, 28 insertions(+) diff --git a/meta/documents/changelog_de.md b/meta/documents/changelog_de.md index 396db6fe..80a61702 100644 --- a/meta/documents/changelog_de.md +++ b/meta/documents/changelog_de.md @@ -1,5 +1,9 @@ # Release Notes für Payone +## X.X.X (2019-12-12) +### Geändert +- Funktionalitäten hinzugefügt für Backend-Sichtbarkeiten + ## 1.1.10 (2019-12-09) ### Behoben diff --git a/meta/documents/changelog_en.md b/meta/documents/changelog_en.md index 3d1abb89..5177ec9c 100644 --- a/meta/documents/changelog_en.md +++ b/meta/documents/changelog_en.md @@ -1,5 +1,9 @@ # Release Notes for Payone +## X.X.X (2019-12-12) +### Changed +- Added methods for the backend visibility + ## 1.1.10 (2019-12-09) ### Fixed diff --git a/src/Methods/PaymentAbstract.php b/src/Methods/PaymentAbstract.php index c5bef321..11f8d9ac 100644 --- a/src/Methods/PaymentAbstract.php +++ b/src/Methods/PaymentAbstract.php @@ -131,4 +131,24 @@ public function getAllowedCountries() return $countries; } + + /** + * Check if this payment method should be searchable in the backend + * + * @return bool + */ + public function isBackendSearchable():bool + { + return true; + } + + /** + * Check if this payment method should be active in the backend + * + * @return bool + */ + public function isBackendActive():bool + { + return false; + } } From 754f48638fb9920e1216f54bca085aba1506547f Mon Sep 17 00:00:00 2001 From: Kevin Fink Date: Wed, 18 Dec 2019 11:14:07 +0100 Subject: [PATCH 067/353] added getBackendName method --- meta/documents/changelog_de.md | 4 ++-- meta/documents/changelog_en.md | 4 ++-- src/Methods/PaymentAbstract.php | 11 +++++++++++ 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/meta/documents/changelog_de.md b/meta/documents/changelog_de.md index 80a61702..18070fc2 100644 --- a/meta/documents/changelog_de.md +++ b/meta/documents/changelog_de.md @@ -1,8 +1,8 @@ # Release Notes für Payone -## X.X.X (2019-12-12) +## X.X.X (2019-12-18) ### Geändert -- Funktionalitäten hinzugefügt für Backend-Sichtbarkeiten +- Funktionalitäten hinzugefügt für Backend-Sichtbarkeiten und Backend-Name ## 1.1.10 (2019-12-09) diff --git a/meta/documents/changelog_en.md b/meta/documents/changelog_en.md index 5177ec9c..25e24a59 100644 --- a/meta/documents/changelog_en.md +++ b/meta/documents/changelog_en.md @@ -1,8 +1,8 @@ # Release Notes for Payone -## X.X.X (2019-12-12) +## X.X.X (2019-12-18) ### Changed -- Added methods for the backend visibility +- Added methods for the backend visibility and backend name ## 1.1.10 (2019-12-09) diff --git a/src/Methods/PaymentAbstract.php b/src/Methods/PaymentAbstract.php index 11f8d9ac..003f3d3f 100644 --- a/src/Methods/PaymentAbstract.php +++ b/src/Methods/PaymentAbstract.php @@ -151,4 +151,15 @@ public function isBackendActive():bool { return false; } + + /** + * Get name for the backend + * + * @param string $lang + * @return string + */ + public function getBackendName($lang): string + { + return $this->getName(); + } } From 6680f9da8a24a43797bf3aea51cf4a3b3f289185 Mon Sep 17 00:00:00 2001 From: Kevin Fink Date: Wed, 8 Jan 2020 09:14:09 +0100 Subject: [PATCH 068/353] added argument type for getBackendName --- src/Methods/PaymentAbstract.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Methods/PaymentAbstract.php b/src/Methods/PaymentAbstract.php index 003f3d3f..f65ad039 100644 --- a/src/Methods/PaymentAbstract.php +++ b/src/Methods/PaymentAbstract.php @@ -158,7 +158,7 @@ public function isBackendActive():bool * @param string $lang * @return string */ - public function getBackendName($lang): string + public function getBackendName(string $lang):string { return $this->getName(); } From b7823bb66f08cb70e119867a0f84b0297c0adeae Mon Sep 17 00:00:00 2001 From: Kevin Fink Date: Wed, 22 Jan 2020 11:16:37 +0100 Subject: [PATCH 069/353] added canHandleSubscription method --- src/Methods/PaymentAbstract.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Methods/PaymentAbstract.php b/src/Methods/PaymentAbstract.php index f65ad039..47211e11 100644 --- a/src/Methods/PaymentAbstract.php +++ b/src/Methods/PaymentAbstract.php @@ -162,4 +162,14 @@ public function getBackendName(string $lang):string { return $this->getName(); } + + /** + * Check if this payment method can handle subscriptions + * + * @return bool + */ + public function canHandleSubscriptions():bool + { + return false; + } } From 397d8ac543d4f033ba1ab53ceaac4c00a38a8776 Mon Sep 17 00:00:00 2001 From: Jens Konopka Date: Tue, 3 Mar 2020 11:35:09 +0100 Subject: [PATCH 070/353] Rebranding --- .php_cs.dist | 22 ------- CHANGELOG.md | 55 ------------------ README.md | 6 +- build.xml | 19 ------ meta/documents/changelog_de.md | 7 ++- meta/documents/changelog_en.md | 7 ++- meta/documents/icon_plugin_md.png | Bin 20799 -> 0 bytes meta/documents/user_guide_de.md | 48 +++++++-------- meta/documents/user_guide_en.md | 40 ++++++------- meta/images/icon_plugin_md.png | Bin 17209 -> 28245 bytes meta/images/icon_plugin_sm.png | Bin 9157 -> 14249 bytes meta/images/icon_plugin_xs.png | Bin 1054 -> 2384 bytes meta/images/preview_0.png | Bin 27382 -> 19272 bytes phpunit.ini.dist | 5 -- phpunit.xml | 37 ------------ plugin.json | 4 +- .../logos/PAYONE_PAYONE_CASH_ON_DELIVERY.png | Bin 2316 -> 4582 bytes .../logos/PAYONE_PAYONE_CREDIT_CARD.png | Bin 2316 -> 4582 bytes .../logos/PAYONE_PAYONE_DIRECT_DEBIT.png | Bin 2316 -> 4582 bytes .../images/logos/PAYONE_PAYONE_INVOICE.png | Bin 2316 -> 4582 bytes .../logos/PAYONE_PAYONE_INVOICE_SECURE.png | Bin 2316 -> 4582 bytes .../images/logos/PAYONE_PAYONE_PAYDIREKT.png | Bin 2316 -> 4582 bytes .../images/logos/PAYONE_PAYONE_PAY_PAL.png | Bin 2316 -> 4582 bytes .../logos/PAYONE_PAYONE_PRE_PAYMENT.png | Bin 2316 -> 4582 bytes .../images/logos/PAYONE_PAYONE_SOFORT.png | Bin 2316 -> 4582 bytes 25 files changed, 61 insertions(+), 189 deletions(-) delete mode 100644 .php_cs.dist delete mode 100644 CHANGELOG.md delete mode 100644 build.xml delete mode 100644 meta/documents/icon_plugin_md.png delete mode 100644 phpunit.ini.dist delete mode 100644 phpunit.xml diff --git a/.php_cs.dist b/.php_cs.dist deleted file mode 100644 index a4750896..00000000 --- a/.php_cs.dist +++ /dev/null @@ -1,22 +0,0 @@ -in(__DIR__); -return PhpCsFixer\Config::create() - ->setUsingCache(false) - ->setRules([ - '@PSR2' => true, - '@Symfony' => true, - 'no_useless_else' => true, - 'no_useless_return' => true, - 'ordered_class_elements' => true, - 'ordered_imports' => true, - 'phpdoc_order' => true, - 'phpdoc_summary' => false, - 'phpdoc_to_comment' => false, - 'phpdoc_align' => false, - 'phpdoc_var_without_name' => false, - 'blank_line_after_opening_tag' => true, - 'concat_space' => ['spacing' => 'one'], - 'array_syntax' => ['syntax' => 'short'] - ]) - ->setFinder($finder) -; \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 3ec9a1fe..00000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,55 +0,0 @@ -# Changelog Plentymarkets BS Payone Plugin - -## v1.0.9 (2018-04-10) -* Changed user_guide alert Text - -## v1.0.8 (2018-25-09) -* Changed Support Tab information -* Updated Changelog - -## v1.0.7 (2018-20-09) - -* Updated config.json / new Pluginformat -* Added Translations -* Changed Userguide -* Changed guzzle/httpguzzle Version in dependency for PayPal compatibility - -## v1.0.6 (2018-05-15) - -* enable Sofort display in frontend -* enable Paydirekt display in frontend -* enable invoice secure display in frontend -* enable PayPal display in frontend -* improve rendering of payment error popup - -## v1.0.5 (2018-04-06) - -* update Logos an plugin name - -## v1.0.4 (2018-03-27) - -* update documentation - -## v1.0.3 (2018-03-26) - -* add english documentation -* use current payone php api - -## v1.0.2 (2018-03-21) - -* use Scriptloader to include payone scripts in template - -## v1.0.1 (2018-03-01) - -* update plugin documentation - -## v1.0.1 (2018-03-01) - -Plugin release supporting following payment methods: - -* invoice -* pre payment -* cash on delivery -* debit payment -* credit card -* credit card 3DS \ No newline at end of file diff --git a/README.md b/README.md index 0311d481..3b4bca97 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# BS Payone plugin for plentymarkets 7 +# PAYONE plugin for plentymarkets 7 ## Plugin description and requirements @@ -9,7 +9,7 @@ See the [plugin description](./meta/documents/user_guide_de.md) for the plentyma The plugin has been developed for the Ceres template. The plugins IO and Ceres are required and have to be active. -Also, please configure your payment portal in your BS PAYONE PMI for sha2-384 hashes. The TransactionStatus URL follows this template: +Also, please configure your payment portal in your PAYONE PMI for sha2-384 hashes. The TransactionStatus URL follows this template: https://www.example.com/payone/status/ @@ -85,4 +85,4 @@ See the [changelog](./CHANGELOG.md). ## Need help? -Please contact our technical support team at +49 259 68-500 or tech.support[at]bspayone.com \ No newline at end of file +Please contact our technical support team at +49 259 68-500 or tech.support[at]bspayone.com diff --git a/build.xml b/build.xml deleted file mode 100644 index a5eb6ec4..00000000 --- a/build.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/meta/documents/changelog_de.md b/meta/documents/changelog_de.md index 396db6fe..c6f7abfa 100644 --- a/meta/documents/changelog_de.md +++ b/meta/documents/changelog_de.md @@ -1,4 +1,9 @@ -# Release Notes für Payone +# Release Notes für PAYONE + +## 1.1.11 (2020-03-03) + +### Geändert +- Logos und Bilder getauscht ## 1.1.10 (2019-12-09) diff --git a/meta/documents/changelog_en.md b/meta/documents/changelog_en.md index 3d1abb89..1b9f0a65 100644 --- a/meta/documents/changelog_en.md +++ b/meta/documents/changelog_en.md @@ -1,4 +1,9 @@ -# Release Notes for Payone +# Release Notes for PAYONE + +## 1.1.11 (2020-03-03) + +### Changed +- New logos and images ## 1.1.10 (2019-12-09) diff --git a/meta/documents/icon_plugin_md.png b/meta/documents/icon_plugin_md.png deleted file mode 100644 index 1b7f03f65cbd64bb8f2b346418be553bd6821315..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 20799 zcmdSA19v7(w=f*r#>5jRlT2(oS8Ut1Ik7XrT(NE2wr$&*_|5&`oU_*V3%=f~yQ*t@ zSJ$dt)!pIpvf_wvcyJ&fAc&F@B8ng&poL#`XBeoj>*RHE0tg5KhJ~=Oyri%&vAm<5 zsfD!(2#7>@k{YzS(g;?jmLd!+Jqjpwj$6J2HcSVc1T;PgEQ*wWP`05s7N#~l4HgEb z4yu9!y+0k>`6%h~D>!OWl1q)g@PQ26@yqJdrR$o{C+{2Op#;*g{eLh8{lnYbH~DXiN) zGGf)hW~D?-bc!b*<-{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?e%Ic12-bG2*DZlUc|}e~`19|6W-m7OPJf41ZL~P{6xUl7_ z$qB(`zwiGMRW4D`xNUhwA1ClaC=bUMY+Jh=z0Tg75VkUiqlpkd7o`L0cH&^ShQMo) zA3P@1G31j5)^m;XUE@Hx7!Sl4M4(zM2r{{+<)E|0>7zOo$nALmV3Y^%PRzB{yN_wY zMNnP*NTeZ{uS4go;l)iBLaZso$SdPWVnQTnb3oGg)PYsB zL7wJF)bS}JYFe}pN(us(d2=-NsA+Be-b_p@*j>DO$wFFTBM2^5`S{6>*aU6oGbe57 zy7K}7R`1J%ohpbQnr3p^rLA7L>?2xuQVCBrO}u#Y0P_F~8^emVbsJ!r0ZSLtPr|%P z9YRd6f|}$J1O$P9Bmz;1$^0BsVs!}5ydmoQX|{NNC2rUd^q}W>P9n$=xm?rsN(0sb3Hf1Ox#=zzP8&CM!7PjUXTh2m*pYaw8zb zl-wgA^$P-mfFK|USRo+9WCe%35d;JQK|l~lZUlswl6wTCenCJG5CjAPD+Gj?tl*G0 zf`A|(2nYhnjernSa*u%2F9-+%f`A}kg@6!~6&&(L5D)|e0YM1M?mTq1Ox#=KoGD(K#0i-4tXO82m*qDAduV${2x}i`E!96(EtDd002ovPDHLk FV1hWqo?QR{ diff --git a/meta/documents/user_guide_de.md b/meta/documents/user_guide_de.md index 9d66db76..51da26a8 100644 --- a/meta/documents/user_guide_de.md +++ b/meta/documents/user_guide_de.md @@ -1,10 +1,10 @@ -# BS PAYONE Payment für plentymarkets 7 +# PAYONE Payment für plentymarkets 7 -Das plentymarkets BS PAYONE Plugin bietet Ihnen Zugang zu internationalen und lokalen Zahlungsarten. Gleichzeitig haben Sie Zugriff auf ein integriertes Risikomanagement, automatisierte Gutschriften und schnelle Retourenabwicklung. +Das plentymarkets PAYONE Plugin bietet Ihnen Zugang zu internationalen und lokalen Zahlungsarten. Gleichzeitig haben Sie Zugriff auf ein integriertes Risikomanagement, automatisierte Gutschriften und schnelle Retourenabwicklung. Aktuell beinhaltet das Plugin die folgenden Zahlungsarten: @@ -34,7 +34,7 @@ Telefon: 07344-9592588
E-Mail: plenty@psg-projektmanagement.de
Internet: http://www.psg-projektmanagement.de -Nach Erhalt der Zugangsdaten loggen Sie sich im BS PAYONE Merchant Interface ein und nehmen die folgenden Einstellungen vor. +Nach Erhalt der Zugangsdaten loggen Sie sich im PAYONE Merchant Interface ein und nehmen die folgenden Einstellungen vor. ##### Einstellungen im PAYONE Merchant Interface vornehmen: @@ -44,18 +44,18 @@ Nach Erhalt der Zugangsdaten loggen Sie sich im BS PAYONE Merchant Interface ein 4. Wählen Sie als **Verfahren Hashwert-Prüfung** die Option **md5 oder sha2-384 (für Migration)**. 5. **Speichern** Sie die Einstellungen. -Aktivieren Sie die gewünschten BS PAYONE-Zahlungsarten in Ihrem plentymarkets Backend einmalig im Menü **System » Systemeinstellungen » Aufträge » Zahlung » Zahlungsarten**. Weitere Informationen dazu finden Sie auf der Handbuchseite Zahlungsarten verwalten . +Aktivieren Sie die gewünschten PAYONE-Zahlungsarten in Ihrem plentymarkets Backend einmalig im Menü **System » Systemeinstellungen » Aufträge » Zahlung » Zahlungsarten**. Weitere Informationen dazu finden Sie auf der Handbuchseite Zahlungsarten verwalten . Stellen Sie zudem sicher, dass die Zahlungsart unter dem Punkt **Erlaubte Zahlungsarten** in den Kundenklassen vorhanden ist und nicht im Bereich **Gesperrte Zahlungsarten** in den Versandprofilen aufgeführt ist. ## Einrichtung des Plugins -Die folgenden Einrichtungsschritte für das plentymarkets BS PAYONE Plugins erfolgen direkt in der Plugin-Übersicht Ihres plentymarkets Systems. Gehen Sie dazu wie im Folgenden beschrieben vor. +Die folgenden Einrichtungsschritte für das plentymarkets PAYONE Plugins erfolgen direkt in der Plugin-Übersicht Ihres plentymarkets Systems. Gehen Sie dazu wie im Folgenden beschrieben vor. ##### Grundeinstellungen vornehmen: 1. Öffnen Sie das Menü **Plugins » Plugin-Übersicht**. -2. Klicken Sie in der Liste der Plugins auf den Namen des Plugins **BS BS PAYONE**. +2. Klicken Sie in der Liste der Plugins auf den Namen des Plugins **PAYONE**. → Die Detailansicht des Plugins öffnet sich. 3. Öffnen Sie den Menüpunkt **Konfiguration**. 4. Klicken Sie auf **Grundeinstellungen**. Nehmen Sie die Einstellungen anhand der Informationen in Tabelle 1 vor. @@ -77,7 +77,7 @@ Die folgenden Einrichtungsschritte für das plentymarkets BS PAYONE Plugins erfo Merchant ID
- Geben Sie hier die Kundennummer ein, die Sie bei der Registrierung bei BS PAYONE erhalten haben. + Geben Sie hier die Kundennummer ein, die Sie bei der Registrierung bei PAYONE erhalten haben.
- Geben Sie hier die ID des Zahlungsportals ein, die Sie bei der Registrierung bei BS PAYONE erhalten haben. + Geben Sie hier die ID des Zahlungsportals ein, die Sie bei der Registrierung bei PAYONE erhalten haben.
- Geben Sie hier die Account-ID ein, die Sie bei der Registrierung bei BS PAYONE erhalten haben. + Geben Sie hier die Account-ID ein, die Sie bei der Registrierung bei PAYONE erhalten haben.
- Geben Sie hier den Schlüssel ein, den Sie bei der Registrierung bei BS PAYONE erhalten haben. + Geben Sie hier den Schlüssel ein, den Sie bei der Registrierung bei PAYONE erhalten haben.
- Verknüpfen Sie diesen Content mit dem Container Order confirmation: Additional payment information, um die BS PAYONE-Zahlungsarten auf der Bestellbestätigungsseite im Webshop anzuzeigen. + Verknüpfen Sie diesen Content mit dem Container Order confirmation: Additional payment information, um die PAYONE-Zahlungsarten auf der Bestellbestätigungsseite im Webshop anzuzeigen.
- Verknüpfen Sie diesen Content mit dem Container Script loader: After script loaded, um die BS PAYONE-Zahlungsarten während der Kaufabwicklung im Webshop anzuzeigen. + Verknüpfen Sie diesen Content mit dem Container Script loader: After script loaded, um die PAYONE-Zahlungsarten während der Kaufabwicklung im Webshop anzuzeigen.
-## Automatische Versandbestätigung an BS PAYONE senden +## Automatische Versandbestätigung an PAYONE senden -Richten Sie eine Ereignisaktion ein, um eine automatische Versandbestätigung an BS PAYONE zu senden, sobald Sie den Auftrag versendet haben. +Richten Sie eine Ereignisaktion ein, um eine automatische Versandbestätigung an PAYONE zu senden, sobald Sie den Auftrag versendet haben. **Hinweis:** Die Einrichtung dieser Ereignisaktion ist zwingend notwendig, wenn als **Art der Autorisierung** die Option **Vorautorisierung** gewählt wurde (siehe Tabelle 1). Haben Sie die Option **Autorisierung** gewählt, ist diese Ereignisaktion nicht nutzbar und nicht notwendig. @@ -332,7 +332,7 @@ Richten Sie eine Ereignisaktion ein, um eine automatische Versandbestätigung an @@ -360,15 +360,15 @@ Richten Sie eine Ereignisaktion ein, um eine automatische Versandbestätigung an - +
- Tab. 5: Ereignisaktion zum Senden einer automatischen Versandbestätigung an BS PAYONE + Tab. 5: Ereignisaktion zum Senden einer automatischen Versandbestätigung an PAYONE
AktionPlugin > BS PAYONE | Versandbestätigung sendenPlugin > PAYONE | Versandbestätigung senden
-## BS PAYONE-Zahlung automatisch zurückzahlen +## PAYONE-Zahlung automatisch zurückzahlen -Richten Sie eine Ereignisaktion ein, um die Rückzahlung einer Zahlung über BS PAYONE zu automatisieren. +Richten Sie eine Ereignisaktion ein, um die Rückzahlung einer Zahlung über PAYONE zu automatisieren. ##### Ereignisaktion einrichten: @@ -383,10 +383,10 @@ Richten Sie eine Ereignisaktion ein, um die Rückzahlung einer Zahlung über BS - + @@ -411,7 +411,7 @@ Richten Sie eine Ereignisaktion ein, um die Rückzahlung einer Zahlung über BS - + diff --git a/meta/documents/user_guide_en.md b/meta/documents/user_guide_en.md index 59b2e5ad..060461ed 100644 --- a/meta/documents/user_guide_en.md +++ b/meta/documents/user_guide_en.md @@ -1,10 +1,10 @@ # PAYONE Payment for plentymarkets 7 -The plentymarkets BS PAYONE plugin offers you access to international as well as local payment methods. In addition, the plugin offers the advantages of an integrated risk management system, automated refunds and swift processing of returns. +The plentymarkets PAYONE plugin offers you access to international as well as local payment methods. In addition, the plugin offers the advantages of an integrated risk management system, automated refunds and swift processing of returns. The plugin currently offers the following payment methods: @@ -34,9 +34,9 @@ Phone: 07344-9592588
E-mail: plenty@psg-projektmanagement.de
Website: http://www.psg-projektmanagement.de -Upon receipt of your access data, log in to the BS PAYONE merchant interface and carry out the following settings. +Upon receipt of your access data, log in to the PAYONE merchant interface and carry out the following settings. -##### Carrying out settings in the BS PAYONE merchant interface +##### Carrying out settings in the PAYONE merchant interface 1. Go to **Configuration » Payment portals**. 2. Open the **Extended Tab** of the payment portal belonging to your online store. @@ -50,12 +50,12 @@ In addition, make sure that the payment method is included among the Permitted p ## Setting up the plugin -The following steps for setting up the plentymarkets BS PAYONE plugin are carried out in the plugin overview of your plentymarkets system. Proceed as described below to set up the plugin. +The following steps for setting up the plentymarkets PAYONE plugin are carried out in the plugin overview of your plentymarkets system. Proceed as described below to set up the plugin. ##### Carrying out the basic settings 1. Go to **Plugin » Plugin overview**. -2. In the plugin list, click on the name of the plugin **BS BS PAYONE**.
→ The detail view of the plugin opens. +2. In the plugin list, click on the name of the plugin **PAYONE**.
→ The detail view of the plugin opens. 3. Open the menu entry **Configuration**. 4. Click on **Basic settings**. Carry out the settings according to the information provided in table 1. 5. **Save** the settings. @@ -76,7 +76,7 @@ The following steps for setting up the plentymarkets BS PAYONE plugin are carrie Merchant ID @@ -84,7 +84,7 @@ The following steps for setting up the plentymarkets BS PAYONE plugin are carrie Portal ID @@ -92,7 +92,7 @@ The following steps for setting up the plentymarkets BS PAYONE plugin are carrie Account ID @@ -100,7 +100,7 @@ The following steps for setting up the plentymarkets BS PAYONE plugin are carrie Key @@ -124,7 +124,7 @@ The following steps for setting up the plentymarkets BS PAYONE plugin are carrie ### Setting up payment methods -In the following, you select the BS PAYONE payment methods that should be available for your customers in the online store. In addition, you carry out more detailed settings for the selected payment methods. Proceed as described below. +In the following, you select the PAYONE payment methods that should be available for your customers in the online store. In addition, you carry out more detailed settings for the selected payment methods. Proceed as described below. ##### Setting up payment methods: @@ -271,7 +271,7 @@ In the next step, an adjustment to your Ceres checkout settings is necessary. Th ## Linking template containers -You have multiple options to integrate the payment method BS PAYONE into your online store. For this purpose, the plentymarkets system offers containers at relevant places which can be filled with content to meet your needs. +You have multiple options to integrate the payment method PAYONE into your online store. For this purpose, the plentymarkets system offers containers at relevant places which can be filled with content to meet your needs. ##### Linking template containers: @@ -296,7 +296,7 @@ You have multiple options to integrate the payment method BS PAYONE into your on Payone Order Confirmation Page Payment Data @@ -304,15 +304,15 @@ You have multiple options to integrate the payment method BS PAYONE into your on Payone Checkout JS
- Tab. 6: Ereignisaktion zur automatischen Rückzahlung der BS PAYONE-Zahlung + Tab. 6: Ereignisaktion zur automatischen Rückzahlung der PAYONE-Zahlung
Einstellung
AktionPlugin > BS PAYONE | Rückerstattung sendenPlugin > PAYONE | Rückerstattung senden
- Enter the customer number as received after the registration process with BS PAYONE. + Enter the customer number as received after the registration process with PAYONE.
- Enter the payment portal ID as received after the registration process with BS PAYONE. + Enter the payment portal ID as received after the registration process with PAYONE.
- Enter the account ID as received after the registration process with BS PAYONE. + Enter the account ID as received after the registration process with PAYONE.
- Enter the key as received after the registration process with BS PAYONE. + Enter the key as received after the registration process with PAYONE.
- Link this content to the container Order confirmation: Additional payment information to display the BS PAYONE payment methods on the order confirmation page in the online store. + Link this content to the container Order confirmation: Additional payment information to display the PAYONE payment methods on the order confirmation page in the online store.
- Link this content to the container Script loader: After script loaded to display the BS PAYONE payment methods during the checkout process in the online store. + Link this content to the container Script loader: After script loaded to display the PAYONE payment methods during the checkout process in the online store.
-## Sending an automatic shipping confirmation to BS PAYONE +## Sending an automatic shipping confirmation to PAYONE -Set up an event procedure to send an automatic shipping confirmation to BS PAYONE as soon as you have shipped the order. +Set up an event procedure to send an automatic shipping confirmation to PAYONE as soon as you have shipped the order. **Note:** Sending up the following event procedure is mandatory if you have selected the option **Preauthorisation** as **Authorisation method** (see table 1). This event procedure is not necessary and cannot be used if you have selected the option **Authorisation**. @@ -329,7 +329,7 @@ Set up an event procedure to send an automatic shipping confirmation to BS PAYON @@ -363,9 +363,9 @@ Set up an event procedure to send an automatic shipping confirmation to BS PAYON
- Tab. 5: Event procedure for sending an automatic shipping confirmation to BS PAYONE + Tab. 5: Event procedure for sending an automatic shipping confirmation to PAYONE
-## Automatically refunding BS PAYONE payments +## Automatically refunding PAYONE payments -Set up an event procedure to automatically refund a BS PAYONE payment. +Set up an event procedure to automatically refund a PAYONE payment. ##### Setting up an event procedure: @@ -380,7 +380,7 @@ Set up an event procedure to automatically refund a BS PAYONE payment. diff --git a/meta/images/icon_plugin_md.png b/meta/images/icon_plugin_md.png index b403b32d6c9a43c6b237bdb8683c83f08639f5a7..e3d9ea86054d738fe522b57edfbabbafb24c3f90 100644 GIT binary patch literal 28245 zcmY(p1z21`&o;ccyXyi)io3hJQ>3N17I$ZHDeexXIK|yrT#CDUaV@U<)91DSTRD?6 zCzDJvv&nt!BvMU977dvg82|vF$;(M;007YMBp?70{{8BwGmY}zK)GnhN&u=RNRQrc zC`{!vlmP&5+IOZ90O08#^C1A>#s&Z!8vy_U=>PzMV|JUm(EEcBb6t50Wn}=vJBiv$b~-@D!%{4~M`z{jZyqisC;kt~SC{y2@%4 zk`B)16x=LaENoOF$P^S5Le6Fu0vb{>|2_QuPMFHd)zwjemDR(;gT;fB#lhKFZZT_zLpL`K^q5p9HKYjnL zM~L;G^8ept{>#$;^uC)af-J=PzityjR_dkG0|3MT@>1ejo=|6g2-#$xIw21B%bCjg z1t#LqBeb~E(l^5O>Zd;uS!;h%(NII-Zd@;q!~gE90-s}lM_iCSjex@of>_citgeT! z{E&mDZ(sKQ{nEX;nc;G8-^%IY;jn5p;eWT$%4s?AGT|`6-~A>SoBXq3Gc$hStg1pk zV}#pdJQbg4v_U~X7AKM!Z&4U~F*o!gc))4@;8+>~3!Vy9iZFr=)7U6)Fd%rNz2IRf z5MuWLk|J$Y)jvwmJw1`=`^3&`}&HPgzgCzE{*jofu0^qSV;) zCZZ2XFk4sQcNodLp|<|p)`SY{FtavQ#3!+KK3IqsXK)nI+fMP)X}J>!p}!rEN-o5} z5Nn$(c0vd6vCs8@wEo9k|Iu<}3LXi{-2u|Tu%H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n zI~*wrcDIZW;7vS{-oq^^UG8BJsxoPEdf&gO5xtgy5=I}Q8B3iQ_SWE@ux&@JR@3EX zp23+`iJIww_V*3=Q(dDGNiioz`uFSn&hL)}<9hdN*Th^P1OZZ788w!HI)hg1v__y? zB`*-Q&_ra`3PR8ol9ArS7=ulx71a9=D$zdYF~;%!_TrwxD?ZhKT3~jZBypS!&;nt( z06#_)Sqk546@GwI<7^SfNdmV>=e6%A8&G1paf96X90Bz5i~B z^FWW?!R+a7M~gCi8xLoJSi4g3T0r%N%-(D6j=)WYyBUK z^F$mc31+OAGfWl%iY$d|fQL?^hrgxBQuu4%hPf+?rvm51`67;!01vI0Gi(j`ZB#S4 zVDb5QbK=5}@Szo;95}VeQrP4t`~!iKIA6r^BZmS^UomIc`)v*WbpRh0SqeqqX21hK zn)e{S0vL-dh5dl0R-qT>t}ITNyR!J{xbVmEBNuuP@cR{WhKa!YzF+=7j}D1t{ooMb P00000NkvXXu0mjf?C1%K diff --git a/meta/images/icon_plugin_xs.png b/meta/images/icon_plugin_xs.png index 1df41e41c4ac4a620b7980ae61a705261c1780af..cf8ba97de0d289aca1c6363dd74925471dff0b06 100644 GIT binary patch literal 2384 zcmY*bdpy%^8~?49kmXd)y=GR06BRzVy>ec(+zt4SN-}}10*Y~=v`>)?AJCYSdSWXxK0EqPg0)=Ox z{4FTJI~h??D?9^YP^|Dk)iZ^8e#Gklg$Mvq`v4$52>`zGT=8=N5RL?Z_Z|R%xdZ^x zA$g5tEH98mr&@axiGVr}3j*6f5&)QoK)eqC$pPDbU;wZI$!}r`Nc9(I3jn0}0b74@ zTzQrczwwVv3oZoxRxI4I$%Yn!e`9{$M|ljdUqC42fC~cvNKpO;NyT1%#glUJbD%P* zL|cqkaG*BrNU$een-v(s&jPS43=amU72wm;qFdu}Dp`jrH zi9(=IT0DjpBQl6dV`&93lz)o+SBF4nc!l|eF#UpqpnP4LXK*;v7zX1P+FU>TWcqpk zt`x-hH5P9`1V4h%(MBRRwRx#nz8CXn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IHgG8ji)KM1K8fo7qjVq`0(6e>4!Oc20Fxvx$k3w1!bKw@{J93g! z2@A0)YIm0pa;QzmCKngKm#|fM)$gxUPG?>P4%<6Uv+gFgZP6<|{`CwGUOf?IImDnx zDaQ%1N2u6C7rGPHNVE3w@djOJ()n`%oqyx_1M9>o&c3l3R&t~*kXAzdHN$KzbmoCm z!r%29LUCd&wSgquIBo4Sa>X|b8%`co!Di2t08Im@{C`Z+hfg*XZj@+0Idg(fF))Ai zUXX=>$EfA*`glUUJM8wX#2(+}>YKa$^qK?w7~hs1amqlB2>#*}95VWK5jB5)qj7=6 zpOHZBjel}+&|XF5sBG4%KM!`Z97VPG&{@ul0Z%8rt0pR}>G(e@I*N3SYGd@gcb*}RL-|=? z=jjXrF;&iQ+YhToHUz93&-RWCRtmy>_p_VDqC~6Ycr>*k14pOCam;ksE^-JL?PTTJ zsCPyr%5SLc5;=hNs*6f%82xfDAfB~M^j@hB)(>&Amh}dnpl-$WD+=5;za45S^Mlh~ z;dG)0ap|2NGjpOAhc(pHak6Mn-pi_N?k#>4rK!A^{(=0LjQ#hK|AevsC9HqN*nc1S&lvlU3-B))`|l(F zm9YL}5&YLx`HzM5FGcV-;D1J6{x^x>AA0>C3+sPSU;fnXqn#&)=G>pD$}6Q?6o$uI L2AUZ4r!W5x*Y;Dj diff --git a/phpunit.ini.dist b/phpunit.ini.dist deleted file mode 100644 index 7fc9a4e9..00000000 --- a/phpunit.ini.dist +++ /dev/null @@ -1,5 +0,0 @@ -[api_context] -aid = ;your_account_id -mid = ;your_merchant_id -portalid = -key = \ No newline at end of file diff --git a/phpunit.xml b/phpunit.xml deleted file mode 100644 index 2ca8063f..00000000 --- a/phpunit.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - ./resources/lib/Tests/* - - - - - src - - - - - - - - - - \ No newline at end of file diff --git a/plugin.json b/plugin.json index 7da915ae..2882ce06 100644 --- a/plugin.json +++ b/plugin.json @@ -1,11 +1,11 @@ { - "version": "1.1.10", + "version": "1.1.11", "license":"MIT", "pluginIcon":"icon_plugin_xs.png", "price":0.0, "authorIcon":"icon_author_xs.png", "name": "Payone", - "marketplaceName" : {"de":"BS Payone","en":"BS Payone"}, + "marketplaceName" : {"de":"PAYONE","en":"PAYONE"}, "shortDescription": { "de": "Das offizielle Payone plugin für plentymarkets Webshops. Das Payone Plugin setzt einen Checkout-Prozess auf Basis von Ceres voraus.", "en": "The official Payone plugin for plentymarkets online stores" diff --git a/resources/images/logos/PAYONE_PAYONE_CASH_ON_DELIVERY.png b/resources/images/logos/PAYONE_PAYONE_CASH_ON_DELIVERY.png index 3a4d04e13b92be552fe2dc5e622566e868a294cf..f7055f2cbf4dcec3b1cf30388c231d58c0fc68fb 100644 GIT binary patch literal 4582 zcmY*dXIN8Nw7nz<0Rn_BMGP_Y-jr_WAVolsBGOxE384u{FQG_RK#3TtsDMguf*?qw z7pa0EAWi8YWkes$%yZtm_d92=v(DOU?|pyX1S3OjT51kz003xpbu>&)qukkoP@L|i zaf;lhfy~!LTMek_=UP2Iz#Vl=3;-aQ4*()!0O0tPidX>ve+d9svjYHy8~|X$5*m$_ zPA_7dEp%NB3;>~13<1uOF#_OIM0WZDWE{Y`zcBz@BjfyoO~?fP)qns1j|Ry9)mWXz zGx+mt`xC)Lvi}^3pg(FkBKSXimUq2dBJMO$VRbBh0l*M`w#ZmRAAUZyvP7F&_*od} zD>!1j#O$3g4$fkCys&3kfYKd>Q|RUFXAi&Q<>~FKa7P*Ow?g3*pV8t7_}>yg4`qaf zfe~CCgL8(cfk1jDI*YPh5kJM z^y!Co`LB|<@4sW64k&(hBQ7Z>A^ykvG*#)0Rk)5rJD*lQ^H-5n`dj(`xPR*?iJuk! zKh69z>EG<>s4CP-;(tDy3blSaza;?ByX$JGn!26qvkJnRjk5pl4-K(lgp#pnmBDX@ zGFVaM7~X0k4YJmx+?XeHpT8gm}tca@&3409eZ`^;mr#rg~ZOtI*YSf92!=!^#S-d2|8`hfNa^tT40Qb@i-kBbVdt>nztH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mC0^7q?!0DwQA>KfH0AzhB;1jias zuU4HJo$0s)0CkNm=zmO9bgQNikb`&yBq3nXX-@op#iLgMAS*Swf9=KC8GpiLPY7y? zOF#zfMm-O6n5u{?^V{`+u!kgmO}CC;Pi+pRB2n ztX>JTqgi`V9FQ0tr4NnT2Y&zozklG_uhyow1$deY9G`#$z+uw6pPD!A5CCX(x`?f& z-X(+-oZRRqMc#X214tx~%T7K_MBes}&H=VJuR~MYi$$_R?*%ad6cUF@3UapsfZaMU z%^PFYnq7VrE8(6o159-!dRII){lKkkJ^s+_t3FcfIWqcy5@TGJ<9|OyNVOuaZr9ou?B^kq0?Yn=y3ck}vb zNC;;Sd)h>)O2no#s0g51qr#}6wr!hMeO1!w^@CzhtMhUXPXe=uPe7TGA#nPbE;&cTlKOigKjRQ3SV*D^i7i9Ua+%v;r_L+2=N+Oc3)He+< zzg!_r2{Pp>-HpQl%qnIv)M+V$e0Rg^RAT?q+4)rfFg!gaQhxz}b6$ENAhA>F<&zmm zGvJ(8EMvp=5G|{y?;1*SVjwwg(RC5C+fr96Ytg7 z#@6=mYHvu{UcVp%L$qibYr^uesn+X}vDa+eoxkT)?Q6#_G|upcq;U7|;673gyCozE zd6|y-MTKJ)|8nW%I#ZQzUdnehErCJ)&I0QACN zci=bQop}ppFDfr~Xv;o2G4JHXrl+sAdWsu6dbGWg3@}3@1gr)Pa#F3=#%4MH{*{6e z>lYU0cl4!1%xvoQb|?R#s=IWrn|{_D5Eh{ToSMSXGR;8ehU@u_N7FQKPtHhc1_1o_ abNm-)hixrV$dsx80000 Date: Tue, 3 Mar 2020 11:36:05 +0100 Subject: [PATCH 071/353] update changelog --- meta/documents/changelog_de.md | 3 --- meta/documents/changelog_en.md | 3 --- 2 files changed, 6 deletions(-) diff --git a/meta/documents/changelog_de.md b/meta/documents/changelog_de.md index dd615a3a..a8df3660 100644 --- a/meta/documents/changelog_de.md +++ b/meta/documents/changelog_de.md @@ -4,9 +4,6 @@ ### Geändert - Logos und Bilder getauscht - -## X.X.X (2019-12-18) -### Geändert - Funktionalitäten hinzugefügt für Backend-Sichtbarkeiten und Backend-Name ## 1.1.10 (2019-12-09) diff --git a/meta/documents/changelog_en.md b/meta/documents/changelog_en.md index 25cf4740..a829bc04 100644 --- a/meta/documents/changelog_en.md +++ b/meta/documents/changelog_en.md @@ -4,9 +4,6 @@ ### Changed - New logos and images - -## X.X.X (2019-12-18) -### Changed - Added methods for the backend visibility and backend name ## 1.1.10 (2019-12-09) From ebedaabdc9a99635a4fa6b9939dc95ad459dc702 Mon Sep 17 00:00:00 2001 From: Christopher Tohme Date: Mon, 9 Mar 2020 08:55:55 +0100 Subject: [PATCH 072/353] cleanup data logging - almost all request and responses performed by the payone sdk were logged as critical, sometimes with or without data. This led to confusing customer feedback. - updated logging to debug - changed deprecated methods --- meta/documents/changelog_de.md | 5 +++++ meta/documents/changelog_en.md | 5 +++++ plugin.json | 2 +- src/Adapter/Logger.php | 32 ++++++++-------------------- src/Controllers/StatusController.php | 5 ++--- src/Services/Api.php | 17 +++++++-------- 6 files changed, 30 insertions(+), 36 deletions(-) diff --git a/meta/documents/changelog_de.md b/meta/documents/changelog_de.md index a8df3660..71aec609 100644 --- a/meta/documents/changelog_de.md +++ b/meta/documents/changelog_de.md @@ -1,5 +1,10 @@ # Release Notes für PAYONE +## 1.1.12 (2020-03-09) + +### Geändert +- Logging des Datenaustausches zur Payone Schnittstelle optimiert. + ## 1.1.11 (2020-03-03) ### Geändert diff --git a/meta/documents/changelog_en.md b/meta/documents/changelog_en.md index a829bc04..97f07b7e 100644 --- a/meta/documents/changelog_en.md +++ b/meta/documents/changelog_en.md @@ -1,5 +1,10 @@ # Release Notes for PAYONE +## 1.1.12 (2020-03-09) + +### Geändert +- Optimized logging of the data transfer with the Payone Api. + ## 1.1.11 (2020-03-03) ### Changed diff --git a/plugin.json b/plugin.json index 2882ce06..452cf363 100644 --- a/plugin.json +++ b/plugin.json @@ -1,5 +1,5 @@ { - "version": "1.1.11", + "version": "1.1.12", "license":"MIT", "pluginIcon":"icon_plugin_xs.png", "price":0.0, diff --git a/src/Adapter/Logger.php b/src/Adapter/Logger.php index f3276e7b..85a77c11 100644 --- a/src/Adapter/Logger.php +++ b/src/Adapter/Logger.php @@ -53,8 +53,7 @@ public function __construct(ShopHelper $shopHelper) public function setIdentifier(string $identifier) { $this->logger = $this->getLogger($identifier); - $this->logger->setReferenceType($this->referenceType); - $this->logger->setReferenceValue($this->referenceValue); + $this->addReference($this->referenceType, $this->referenceValue); return $this; } @@ -183,30 +182,17 @@ public function logException( $this->getPlentyLogger()->logException($exception); return $this; } - - /** - * @param string $referenceType - * - * @return Logger - */ - public function setReferenceType( - string $referenceType - ) { - $this->referenceType = $referenceType; - $this->logger->setReferenceType($referenceType); - return $this; - } - + /** - * @param $referenceValue + * Adds a reference to the current logger instance, for a more understanding log message. * - * @return Logger + * @param string $referenceType The reference type to be added to the log (e.g. orderId) + * @param string $referenceValue The reference value for the current log message. + * @return $this */ - public function setReferenceValue( - $referenceValue - ) { - $this->referenceValue = $referenceValue; - $this->logger->setReferenceValue($referenceValue); + public function addReference($referenceType, $referenceValue) + { + $this->logger->addReference($referenceType, $referenceValue); return $this; } diff --git a/src/Controllers/StatusController.php b/src/Controllers/StatusController.php index 8b1e9d54..448121c3 100644 --- a/src/Controllers/StatusController.php +++ b/src/Controllers/StatusController.php @@ -71,9 +71,8 @@ public function index() } $this->logger->setIdentifier(__METHOD__); - $this->logger->setReferenceType(Logger::PAYONE_REQUEST_REFERENCE); - $this->logger->setReferenceValue($txid); - $this->logger->critical('Controller.Status', $this->request->all()); + $this->logger->addReference(Logger::PAYONE_REQUEST_REFERENCE,$txid); + $this->logger->debug('Controller.Status', $this->request->all()); if ($this->request->get('key') != md5($this->config->get('key'))) { return; diff --git a/src/Services/Api.php b/src/Services/Api.php index 30badd8c..9a0da534 100644 --- a/src/Services/Api.php +++ b/src/Services/Api.php @@ -70,7 +70,7 @@ public function doAuth($requestParams): AuthResponse $responseObject = AuthResponseFactory::create($response); - $this->logger->setReferenceValue($responseObject->getTransactionID()); + $this->logger->addReference(Logger::PAYONE_REQUEST_REFERENCE, $responseObject->getTransactionID()); $this->logger->debug('Api.' . $this->getCallAction(self::REQUEST_TYPE_AUTH), $response); return $responseObject; @@ -89,7 +89,7 @@ public function doPreAuth($requestParams): PreAuthResponse $response = $this->doLibCall((self::REQUEST_TYPE_PRE_AUTH), $requestParams); $responseObject = PreAuthResponseFactory::create($response); - $this->logger->setReferenceValue($responseObject->getTransactionID()); + $this->logger->addReference(Logger::PAYONE_REQUEST_REFERENCE, $responseObject->getTransactionID()); $this->logger->debug('Api.' . $this->getCallAction(self::REQUEST_TYPE_PRE_AUTH), $response); return $responseObject; @@ -109,7 +109,7 @@ public function doReversal($requestParams): Response $responseObject = ResponseFactory::create($response); - $this->logger->setReferenceValue($responseObject->getTransactionID()); + $this->logger->addReference(Logger::PAYONE_REQUEST_REFERENCE, $responseObject->getTransactionID()); $this->logger->debug('Api.' . $this->getCallAction(self::REQUEST_TYPE_REVERSAL), $response); return $responseObject; @@ -129,7 +129,7 @@ public function doCapture($requestParams): Response $responseObject = ResponseFactory::create($response); - $this->logger->setReferenceValue($responseObject->getTransactionID()); + $this->logger->addReference(Logger::PAYONE_REQUEST_REFERENCE, $responseObject->getTransactionID()); $this->logger->debug('Api.' . $this->getCallAction(self::REQUEST_TYPE_CAPTURE), $response); return $responseObject; @@ -149,7 +149,7 @@ public function doRefund($requestParams): Response $responseObject = ResponseFactory::create($response); - $this->logger->setReferenceValue($responseObject->getTransactionID()); + $this->logger->addReference(Logger::PAYONE_REQUEST_REFERENCE, $responseObject->getTransactionID()); $this->logger->debug('Api.' . $this->getCallAction(self::REQUEST_TYPE_AUTH), $response); return $responseObject; @@ -167,7 +167,7 @@ public function doReAuth($requestParams): Response $responseObject = ResponseFactory::create($response); - $this->logger->setReferenceValue($responseObject->getTransactionID()); + $this->logger->addReference(Logger::PAYONE_REQUEST_REFERENCE, $responseObject->getTransactionID()); $this->logger->debug('Api.' . $this->getCallAction(self::REQUEST_TYPE_AUTH), $response); return $responseObject; @@ -185,7 +185,7 @@ public function doDebit($requestParams): Response $responseObject = ResponseFactory::create($response); - $this->logger->setReferenceValue($responseObject->getTransactionID()); + $this->logger->addReference(Logger::PAYONE_REQUEST_REFERENCE, $responseObject->getTransactionID()); $this->logger->debug('Api.' . $this->getCallAction(self::REQUEST_TYPE_AUTH), $response); return $responseObject; @@ -203,7 +203,7 @@ public function doManagemandate($requestParams): ManagemandateResponse $responseObject = ManagemandateResponseFactory::create($response); - $this->logger->setReferenceValue($responseObject->getTransactionID()); + $this->logger->addReference(Logger::PAYONE_REQUEST_REFERENCE, $responseObject->getTransactionID()); $this->logger->debug('Api.' . $this->getCallAction(self::REQUEST_TYPE_MANAGEMANDATE), $response); return $responseObject; @@ -217,7 +217,6 @@ public function doManagemandate($requestParams): ManagemandateResponse */ public function doLibCall($call, $requestParams): array { - $this->logger->setReferenceType(Logger::PAYONE_REQUEST_REFERENCE); $this->logger->debug('Api.' . $this->getCallAction($call), $requestParams); try { From 8648e8cfc98eca08d3619f84255acab57f1f0b81 Mon Sep 17 00:00:00 2001 From: Kevin Fink Date: Fri, 29 May 2020 10:13:15 +0200 Subject: [PATCH 073/353] added getBackend icon logic --- src/Methods/PaymentAbstract.php | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/Methods/PaymentAbstract.php b/src/Methods/PaymentAbstract.php index 47211e11..4f4f35d2 100644 --- a/src/Methods/PaymentAbstract.php +++ b/src/Methods/PaymentAbstract.php @@ -4,10 +4,10 @@ use Payone\Adapter\Config as ConfigAdapter; use Payone\PluginConstants; -use Plenty\Modules\Payment\Method\Contracts\PaymentMethodService; +use Plenty\Modules\Payment\Method\Services\PaymentMethodBaseService; use Plenty\Plugin\Application; -abstract class PaymentAbstract extends PaymentMethodService +abstract class PaymentAbstract extends PaymentMethodBaseService { const PAYMENT_CODE = 'Payone'; @@ -45,7 +45,7 @@ public function __construct( /** * @return bool */ - public function isActive() + public function isActive(): bool { return (bool) $this->configRepo->get($this::PAYMENT_CODE . '.active') && $this->paymentValidator->validate($this); @@ -172,4 +172,16 @@ public function canHandleSubscriptions():bool { return false; } + + /** + * Get the url for the backend icon + * + * @return string + */ + public function getBackendIcon(): string + { + $app = pluginApp(Application::class); + $icon = $app->getUrlPath(PluginConstants::NAME).'/images/logos/'.strtolower($this::PAYMENT_CODE).'_backend_icon.svg'; + return $icon; + } } From 2dd279e08eb486b685f11e9b71f6bde902c1f734 Mon Sep 17 00:00:00 2001 From: Kevin Fink Date: Thu, 4 Jun 2020 12:48:44 +0200 Subject: [PATCH 074/353] PaymentMethodBaseService adaptions --- src/Methods/PaymentAbstract.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/Methods/PaymentAbstract.php b/src/Methods/PaymentAbstract.php index 4f4f35d2..68734fd9 100644 --- a/src/Methods/PaymentAbstract.php +++ b/src/Methods/PaymentAbstract.php @@ -54,9 +54,10 @@ public function isActive(): bool /** * Get shown name * + * @param string $lang * @return string */ - public function getName(): string + public function getName(string $lang = 'de'): string { $name = $this->configRepo->get($this::PAYMENT_CODE . '.name'); @@ -72,9 +73,10 @@ public function getFee(): float } /** + * @param string $lang * @return string */ - public function getIcon(): string + public function getIcon(string $lang = 'de'): string { $pluginPath = $this->app->getUrlPath(PluginConstants::NAME); @@ -82,9 +84,10 @@ public function getIcon(): string } /** + * @param string $lang * @return string */ - public function getDescription(): string + public function getDescription(string $lang = 'de'): string { $description = $this->configRepo->get($this::PAYMENT_CODE . '.description'); @@ -158,7 +161,7 @@ public function isBackendActive():bool * @param string $lang * @return string */ - public function getBackendName(string $lang):string + public function getBackendName(string $lang = 'de'):string { return $this->getName(); } From 4a0247f98fc6ca79468422dccaf9d1afabd3a408 Mon Sep 17 00:00:00 2001 From: Kevin Fink Date: Thu, 4 Jun 2020 14:10:08 +0200 Subject: [PATCH 075/353] added backendIcons --- meta/images/logos/payone_payone_amazon_pay_backend_icon.svg | 3 +++ .../logos/payone_payone_cash_on_delivery_backend_icon.svg | 3 +++ meta/images/logos/payone_payone_credit_card_backend_icon.svg | 3 +++ meta/images/logos/payone_payone_direct_debit_backend_icon.svg | 3 +++ meta/images/logos/payone_payone_invoice_backend_icon.svg | 3 +++ .../images/logos/payone_payone_invoice_secure_backend_icon.svg | 3 +++ meta/images/logos/payone_payone_pay_pal_backend_icon.svg | 3 +++ meta/images/logos/payone_payone_paydirekt_backend_icon.svg | 3 +++ .../payone_payone_payolution_installment_backend_icon.svg | 3 +++ meta/images/logos/payone_payone_pre_payment_backend_icon.svg | 3 +++ .../logos/payone_payone_ratepay_installment_backend_icon.svg | 3 +++ meta/images/logos/payone_payone_sofort_backend_icon.svg | 3 +++ 12 files changed, 36 insertions(+) create mode 100644 meta/images/logos/payone_payone_amazon_pay_backend_icon.svg create mode 100644 meta/images/logos/payone_payone_cash_on_delivery_backend_icon.svg create mode 100644 meta/images/logos/payone_payone_credit_card_backend_icon.svg create mode 100644 meta/images/logos/payone_payone_direct_debit_backend_icon.svg create mode 100644 meta/images/logos/payone_payone_invoice_backend_icon.svg create mode 100644 meta/images/logos/payone_payone_invoice_secure_backend_icon.svg create mode 100644 meta/images/logos/payone_payone_pay_pal_backend_icon.svg create mode 100644 meta/images/logos/payone_payone_paydirekt_backend_icon.svg create mode 100644 meta/images/logos/payone_payone_payolution_installment_backend_icon.svg create mode 100644 meta/images/logos/payone_payone_pre_payment_backend_icon.svg create mode 100644 meta/images/logos/payone_payone_ratepay_installment_backend_icon.svg create mode 100644 meta/images/logos/payone_payone_sofort_backend_icon.svg diff --git a/meta/images/logos/payone_payone_amazon_pay_backend_icon.svg b/meta/images/logos/payone_payone_amazon_pay_backend_icon.svg new file mode 100644 index 00000000..2fd501e5 --- /dev/null +++ b/meta/images/logos/payone_payone_amazon_pay_backend_icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/meta/images/logos/payone_payone_cash_on_delivery_backend_icon.svg b/meta/images/logos/payone_payone_cash_on_delivery_backend_icon.svg new file mode 100644 index 00000000..2fd501e5 --- /dev/null +++ b/meta/images/logos/payone_payone_cash_on_delivery_backend_icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/meta/images/logos/payone_payone_credit_card_backend_icon.svg b/meta/images/logos/payone_payone_credit_card_backend_icon.svg new file mode 100644 index 00000000..2fd501e5 --- /dev/null +++ b/meta/images/logos/payone_payone_credit_card_backend_icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/meta/images/logos/payone_payone_direct_debit_backend_icon.svg b/meta/images/logos/payone_payone_direct_debit_backend_icon.svg new file mode 100644 index 00000000..2fd501e5 --- /dev/null +++ b/meta/images/logos/payone_payone_direct_debit_backend_icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/meta/images/logos/payone_payone_invoice_backend_icon.svg b/meta/images/logos/payone_payone_invoice_backend_icon.svg new file mode 100644 index 00000000..2fd501e5 --- /dev/null +++ b/meta/images/logos/payone_payone_invoice_backend_icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/meta/images/logos/payone_payone_invoice_secure_backend_icon.svg b/meta/images/logos/payone_payone_invoice_secure_backend_icon.svg new file mode 100644 index 00000000..2fd501e5 --- /dev/null +++ b/meta/images/logos/payone_payone_invoice_secure_backend_icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/meta/images/logos/payone_payone_pay_pal_backend_icon.svg b/meta/images/logos/payone_payone_pay_pal_backend_icon.svg new file mode 100644 index 00000000..2fd501e5 --- /dev/null +++ b/meta/images/logos/payone_payone_pay_pal_backend_icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/meta/images/logos/payone_payone_paydirekt_backend_icon.svg b/meta/images/logos/payone_payone_paydirekt_backend_icon.svg new file mode 100644 index 00000000..2fd501e5 --- /dev/null +++ b/meta/images/logos/payone_payone_paydirekt_backend_icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/meta/images/logos/payone_payone_payolution_installment_backend_icon.svg b/meta/images/logos/payone_payone_payolution_installment_backend_icon.svg new file mode 100644 index 00000000..2fd501e5 --- /dev/null +++ b/meta/images/logos/payone_payone_payolution_installment_backend_icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/meta/images/logos/payone_payone_pre_payment_backend_icon.svg b/meta/images/logos/payone_payone_pre_payment_backend_icon.svg new file mode 100644 index 00000000..2fd501e5 --- /dev/null +++ b/meta/images/logos/payone_payone_pre_payment_backend_icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/meta/images/logos/payone_payone_ratepay_installment_backend_icon.svg b/meta/images/logos/payone_payone_ratepay_installment_backend_icon.svg new file mode 100644 index 00000000..2fd501e5 --- /dev/null +++ b/meta/images/logos/payone_payone_ratepay_installment_backend_icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/meta/images/logos/payone_payone_sofort_backend_icon.svg b/meta/images/logos/payone_payone_sofort_backend_icon.svg new file mode 100644 index 00000000..2fd501e5 --- /dev/null +++ b/meta/images/logos/payone_payone_sofort_backend_icon.svg @@ -0,0 +1,3 @@ + + + From b99ff7991abed56929a6ffa5ca1a80c0f3a5ecea Mon Sep 17 00:00:00 2001 From: Kevin Fink Date: Thu, 4 Jun 2020 14:41:47 +0200 Subject: [PATCH 076/353] added changelog --- meta/documents/changelog_de.md | 4 ++++ meta/documents/changelog_en.md | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/meta/documents/changelog_de.md b/meta/documents/changelog_de.md index 71aec609..eca40612 100644 --- a/meta/documents/changelog_de.md +++ b/meta/documents/changelog_de.md @@ -1,5 +1,9 @@ # Release Notes für PAYONE +## 1.1.13 (2020-06-04) +### Geändert +- Icon für das Backend hinzugefügt + ## 1.1.12 (2020-03-09) ### Geändert diff --git a/meta/documents/changelog_en.md b/meta/documents/changelog_en.md index 97f07b7e..19a225b0 100644 --- a/meta/documents/changelog_en.md +++ b/meta/documents/changelog_en.md @@ -1,5 +1,9 @@ # Release Notes for PAYONE +## 1.1.13 (2020-06-04) +### Geändert +- Added Icon for the backend + ## 1.1.12 (2020-03-09) ### Geändert From 2f4e4c282db280b90644b53b1f56fbf098bb71cd Mon Sep 17 00:00:00 2001 From: Kevin Fink Date: Fri, 5 Jun 2020 11:37:34 +0200 Subject: [PATCH 077/353] payone logo update --- .../logos/payone_payone_amazon_pay_backend_icon.svg | 8 ++++++-- .../logos/payone_payone_cash_on_delivery_backend_icon.svg | 8 ++++++-- .../logos/payone_payone_credit_card_backend_icon.svg | 8 ++++++-- .../logos/payone_payone_direct_debit_backend_icon.svg | 8 ++++++-- meta/images/logos/payone_payone_invoice_backend_icon.svg | 8 ++++++-- .../logos/payone_payone_invoice_secure_backend_icon.svg | 8 ++++++-- meta/images/logos/payone_payone_pay_pal_backend_icon.svg | 8 ++++++-- .../images/logos/payone_payone_paydirekt_backend_icon.svg | 8 ++++++-- .../payone_payone_payolution_installment_backend_icon.svg | 8 ++++++-- .../logos/payone_payone_pre_payment_backend_icon.svg | 8 ++++++-- .../payone_payone_ratepay_installment_backend_icon.svg | 8 ++++++-- meta/images/logos/payone_payone_sofort_backend_icon.svg | 8 ++++++-- 12 files changed, 72 insertions(+), 24 deletions(-) diff --git a/meta/images/logos/payone_payone_amazon_pay_backend_icon.svg b/meta/images/logos/payone_payone_amazon_pay_backend_icon.svg index 2fd501e5..0e047987 100644 --- a/meta/images/logos/payone_payone_amazon_pay_backend_icon.svg +++ b/meta/images/logos/payone_payone_amazon_pay_backend_icon.svg @@ -1,3 +1,7 @@ - - + + + + + + diff --git a/meta/images/logos/payone_payone_cash_on_delivery_backend_icon.svg b/meta/images/logos/payone_payone_cash_on_delivery_backend_icon.svg index 2fd501e5..0e047987 100644 --- a/meta/images/logos/payone_payone_cash_on_delivery_backend_icon.svg +++ b/meta/images/logos/payone_payone_cash_on_delivery_backend_icon.svg @@ -1,3 +1,7 @@ - - + + + + + + diff --git a/meta/images/logos/payone_payone_credit_card_backend_icon.svg b/meta/images/logos/payone_payone_credit_card_backend_icon.svg index 2fd501e5..0e047987 100644 --- a/meta/images/logos/payone_payone_credit_card_backend_icon.svg +++ b/meta/images/logos/payone_payone_credit_card_backend_icon.svg @@ -1,3 +1,7 @@ - - + + + + + + diff --git a/meta/images/logos/payone_payone_direct_debit_backend_icon.svg b/meta/images/logos/payone_payone_direct_debit_backend_icon.svg index 2fd501e5..0e047987 100644 --- a/meta/images/logos/payone_payone_direct_debit_backend_icon.svg +++ b/meta/images/logos/payone_payone_direct_debit_backend_icon.svg @@ -1,3 +1,7 @@ - - + + + + + + diff --git a/meta/images/logos/payone_payone_invoice_backend_icon.svg b/meta/images/logos/payone_payone_invoice_backend_icon.svg index 2fd501e5..0e047987 100644 --- a/meta/images/logos/payone_payone_invoice_backend_icon.svg +++ b/meta/images/logos/payone_payone_invoice_backend_icon.svg @@ -1,3 +1,7 @@ - - + + + + + + diff --git a/meta/images/logos/payone_payone_invoice_secure_backend_icon.svg b/meta/images/logos/payone_payone_invoice_secure_backend_icon.svg index 2fd501e5..0e047987 100644 --- a/meta/images/logos/payone_payone_invoice_secure_backend_icon.svg +++ b/meta/images/logos/payone_payone_invoice_secure_backend_icon.svg @@ -1,3 +1,7 @@ - - + + + + + + diff --git a/meta/images/logos/payone_payone_pay_pal_backend_icon.svg b/meta/images/logos/payone_payone_pay_pal_backend_icon.svg index 2fd501e5..0e047987 100644 --- a/meta/images/logos/payone_payone_pay_pal_backend_icon.svg +++ b/meta/images/logos/payone_payone_pay_pal_backend_icon.svg @@ -1,3 +1,7 @@ - - + + + + + + diff --git a/meta/images/logos/payone_payone_paydirekt_backend_icon.svg b/meta/images/logos/payone_payone_paydirekt_backend_icon.svg index 2fd501e5..0e047987 100644 --- a/meta/images/logos/payone_payone_paydirekt_backend_icon.svg +++ b/meta/images/logos/payone_payone_paydirekt_backend_icon.svg @@ -1,3 +1,7 @@ - - + + + + + + diff --git a/meta/images/logos/payone_payone_payolution_installment_backend_icon.svg b/meta/images/logos/payone_payone_payolution_installment_backend_icon.svg index 2fd501e5..0e047987 100644 --- a/meta/images/logos/payone_payone_payolution_installment_backend_icon.svg +++ b/meta/images/logos/payone_payone_payolution_installment_backend_icon.svg @@ -1,3 +1,7 @@ - - + + + + + + diff --git a/meta/images/logos/payone_payone_pre_payment_backend_icon.svg b/meta/images/logos/payone_payone_pre_payment_backend_icon.svg index 2fd501e5..0e047987 100644 --- a/meta/images/logos/payone_payone_pre_payment_backend_icon.svg +++ b/meta/images/logos/payone_payone_pre_payment_backend_icon.svg @@ -1,3 +1,7 @@ - - + + + + + + diff --git a/meta/images/logos/payone_payone_ratepay_installment_backend_icon.svg b/meta/images/logos/payone_payone_ratepay_installment_backend_icon.svg index 2fd501e5..0e047987 100644 --- a/meta/images/logos/payone_payone_ratepay_installment_backend_icon.svg +++ b/meta/images/logos/payone_payone_ratepay_installment_backend_icon.svg @@ -1,3 +1,7 @@ - - + + + + + + diff --git a/meta/images/logos/payone_payone_sofort_backend_icon.svg b/meta/images/logos/payone_payone_sofort_backend_icon.svg index 2fd501e5..0e047987 100644 --- a/meta/images/logos/payone_payone_sofort_backend_icon.svg +++ b/meta/images/logos/payone_payone_sofort_backend_icon.svg @@ -1,3 +1,7 @@ - - + + + + + + From 08bfab2554cc6d5103cba22c3d993994721c5a8b Mon Sep 17 00:00:00 2001 From: Daniel Marx Date: Tue, 30 Jun 2020 13:31:53 +0200 Subject: [PATCH 078/353] update lib --- .../Request/Authorization/InvoiceSecure.php | 8 ++++---- .../lib/PayoneApi/Request/Parts/CartFactory.php | 6 +++--- resources/lib/PayoneApi/Request/Parts/CartItem.php | 12 ++++++------ 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/resources/lib/PayoneApi/Request/Authorization/InvoiceSecure.php b/resources/lib/PayoneApi/Request/Authorization/InvoiceSecure.php index 036099fa..4235085d 100644 --- a/resources/lib/PayoneApi/Request/Authorization/InvoiceSecure.php +++ b/resources/lib/PayoneApi/Request/Authorization/InvoiceSecure.php @@ -16,7 +16,7 @@ class InvoiceSecure extends AuthorizationRequestAbstract protected $clearingtype = ClearingTypes::REC; - protected $subclearingtype = self::PAYONE_INVOICE_CLEARING_TYPE; + protected $clearingsubtype = self::PAYONE_INVOICE_CLEARING_TYPE; /** * @var Cart */ @@ -37,13 +37,13 @@ public function __construct( } /** - * Getter for Subclearingtype + * Getter for clearingsubtype * * @return string */ - public function getSubclearingtype() + public function getClearingsubtype() { - return $this->subclearingtype; + return $this->clearingsubtype; } /** diff --git a/resources/lib/PayoneApi/Request/Parts/CartFactory.php b/resources/lib/PayoneApi/Request/Parts/CartFactory.php index 9a227568..52105faa 100644 --- a/resources/lib/PayoneApi/Request/Parts/CartFactory.php +++ b/resources/lib/PayoneApi/Request/Parts/CartFactory.php @@ -14,7 +14,7 @@ static public function create(array $requestData) $cart = new Cart(); foreach ($requestData['basketItems'] as $i => $cartItemData) { $cartItem = new CartItem( - $i, + ($i+1), $cartItemData['itemId'], CartItem::TYPE_GOODS, $cartItemData['quantity'] ?? '', @@ -44,7 +44,7 @@ private static function calculateShipping(array $requestData, Cart $cart) ); } $shippingCost = new CartItem( - count($cart->getCartItems()), + (count($cart->getCartItems())+1), 'shipping', CartItem::TYPE_SHIPMENt, 1, @@ -54,4 +54,4 @@ private static function calculateShipping(array $requestData, Cart $cart) ); return $shippingCost; } -} \ No newline at end of file +} diff --git a/resources/lib/PayoneApi/Request/Parts/CartItem.php b/resources/lib/PayoneApi/Request/Parts/CartItem.php index f885cb23..64075430 100644 --- a/resources/lib/PayoneApi/Request/Parts/CartItem.php +++ b/resources/lib/PayoneApi/Request/Parts/CartItem.php @@ -163,12 +163,12 @@ public function getVa() public function jsonSerialize() { return [ - 'id' . $this->getPosition() => $this->getId(), - 'it' . $this->getPosition() => $this->getIt(), - 'no' . $this->getPosition() => $this->getNo(), - 'pr' . $this->getPosition() => $this->getPr(), - 'de' . $this->getPosition() => $this->getDe(), - 'va' . $this->getPosition() => $this->getva(), + 'id[' . $this->getPosition().']' => $this->getId(), + 'it[' . $this->getPosition().']' => $this->getIt(), + 'no[' . $this->getPosition().']' => $this->getNo(), + 'pr[' . $this->getPosition().']' => $this->getPr(), + 'de[' . $this->getPosition().']' => $this->getDe(), + 'va[' . $this->getPosition().']' => $this->getva(), ]; } } From 64467508295ed6b85437e62941346731eb8e0593 Mon Sep 17 00:00:00 2001 From: Raphael Adam Date: Tue, 30 Jun 2020 14:11:47 +0200 Subject: [PATCH 079/353] test fixed vat rate --- resources/lib/PayoneApi/Request/Parts/CartFactory.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/resources/lib/PayoneApi/Request/Parts/CartFactory.php b/resources/lib/PayoneApi/Request/Parts/CartFactory.php index 52105faa..280cf705 100644 --- a/resources/lib/PayoneApi/Request/Parts/CartFactory.php +++ b/resources/lib/PayoneApi/Request/Parts/CartFactory.php @@ -38,10 +38,7 @@ private static function calculateShipping(array $requestData, Cart $cart) $taxRate = 0; $basket = $requestData['basket']; if ($basket['shippingAmountNet'] > 0) { - $taxRate = (int )round( - ($basket['shippingAmount'] / $basket['shippingAmountNet'] - 1) - * 10000 - ); + $taxRate = 19; } $shippingCost = new CartItem( (count($cart->getCartItems())+1), From 5a3ffc0342d68364490d7caa60567f5853ed9ba2 Mon Sep 17 00:00:00 2001 From: Daniel Marx Date: Tue, 30 Jun 2020 14:38:52 +0200 Subject: [PATCH 080/353] fix price --- resources/lib/PayoneApi/Request/Parts/CartFactory.php | 4 ++-- src/Providers/Api/Request/DataProviderAbstract.php | 7 +++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/resources/lib/PayoneApi/Request/Parts/CartFactory.php b/resources/lib/PayoneApi/Request/Parts/CartFactory.php index 280cf705..d51236a4 100644 --- a/resources/lib/PayoneApi/Request/Parts/CartFactory.php +++ b/resources/lib/PayoneApi/Request/Parts/CartFactory.php @@ -18,7 +18,7 @@ static public function create(array $requestData) $cartItemData['itemId'], CartItem::TYPE_GOODS, $cartItemData['quantity'] ?? '', - $cartItemData['price'], + (int)round($cartItemData['price'] * 100), $cartItemData['vat'], $cartItemData['name'] ?? '' ); @@ -45,7 +45,7 @@ private static function calculateShipping(array $requestData, Cart $cart) 'shipping', CartItem::TYPE_SHIPMENt, 1, - $basket['shippingAmount'], + (int)round($basket['shippingAmount'] * 100), $taxRate, 'shipping' ); diff --git a/src/Providers/Api/Request/DataProviderAbstract.php b/src/Providers/Api/Request/DataProviderAbstract.php index 3ff18bd6..a93f3edb 100644 --- a/src/Providers/Api/Request/DataProviderAbstract.php +++ b/src/Providers/Api/Request/DataProviderAbstract.php @@ -201,7 +201,7 @@ protected function getOrderItemData(Order $order) $orderItemData = $orderItem->toArray(); $amount = $orderItemData['amounts'][0]; $orderItemData['vat'] = $orderItemData['vatRate']; - $orderItemData['price'] = (int)round($amount['priceGross'] * 100); + $orderItemData['price'] = $amount['priceGross']; $orderItemData['name'] = $orderItemData['orderItemName']; $orderItemData['itemId'] = $orderItemData['id']; @@ -546,11 +546,10 @@ private function getShippingAmountNetFromOrder(Order $order) } $orderItemData = $orderItem->toArray(); $amount = $orderItemData['amounts'][0]; - $priceGross = $amount['priceGross']; - return $priceGross * 100 / ($orderItem['vatRate'] + 100.); + return $amount['priceNet']; } - return 0.; + return 0; } } From 59be652b89e4983cd4ccb788d577ebab5ef93a7b Mon Sep 17 00:00:00 2001 From: Raphael Adam Date: Tue, 30 Jun 2020 15:21:36 +0200 Subject: [PATCH 081/353] fix amounts --- .../lib/PayoneApi/Request/Parts/CartFactory.php | 6 +++--- src/Providers/Api/Request/DataProviderAbstract.php | 12 +++++++----- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/resources/lib/PayoneApi/Request/Parts/CartFactory.php b/resources/lib/PayoneApi/Request/Parts/CartFactory.php index d51236a4..d59b255d 100644 --- a/resources/lib/PayoneApi/Request/Parts/CartFactory.php +++ b/resources/lib/PayoneApi/Request/Parts/CartFactory.php @@ -18,7 +18,7 @@ static public function create(array $requestData) $cartItemData['itemId'], CartItem::TYPE_GOODS, $cartItemData['quantity'] ?? '', - (int)round($cartItemData['price'] * 100), + $cartItemData['price'], $cartItemData['vat'], $cartItemData['name'] ?? '' ); @@ -38,14 +38,14 @@ private static function calculateShipping(array $requestData, Cart $cart) $taxRate = 0; $basket = $requestData['basket']; if ($basket['shippingAmountNet'] > 0) { - $taxRate = 19; + $taxRate = (int)round((($basket['shippingAmount'] / $basket['shippingAmountNet']) - 1) * 100); } $shippingCost = new CartItem( (count($cart->getCartItems())+1), 'shipping', CartItem::TYPE_SHIPMENt, 1, - (int)round($basket['shippingAmount'] * 100), + $basket['shippingAmount'], $taxRate, 'shipping' ); diff --git a/src/Providers/Api/Request/DataProviderAbstract.php b/src/Providers/Api/Request/DataProviderAbstract.php index a93f3edb..491fdf2b 100644 --- a/src/Providers/Api/Request/DataProviderAbstract.php +++ b/src/Providers/Api/Request/DataProviderAbstract.php @@ -172,10 +172,12 @@ protected function getCartItemData(Basket $basket) /** @var ItemText $itemText */ $itemText = $item->texts; - $basketItem = $basketItem->toArray(); - $basketItem['name'] = $itemText->first()->name1; + $basketItemArr = $basketItem->toArray(); + $basketItemArr['name'] = $itemText->first()->name1; + $basketItemArr['price'] = (int)round($basketItem->price * 100); + $basketItemArr['vat'] = (int)$basketItem->vat; - $items[] = $basketItem; + $items[] = $basketItemArr; } return $items; @@ -200,8 +202,8 @@ protected function getOrderItemData(Order $order) } $orderItemData = $orderItem->toArray(); $amount = $orderItemData['amounts'][0]; - $orderItemData['vat'] = $orderItemData['vatRate']; - $orderItemData['price'] = $amount['priceGross']; + $orderItemData['vat'] = (int)$orderItemData['vatRate']; + $orderItemData['price'] = (int)round($amount['priceGross'] * 100); $orderItemData['name'] = $orderItemData['orderItemName']; $orderItemData['itemId'] = $orderItemData['id']; From 834ed020fc80f9963522678c143cefdb563264cd Mon Sep 17 00:00:00 2001 From: Raphael Adam Date: Tue, 30 Jun 2020 16:52:14 +0200 Subject: [PATCH 082/353] check if delivery address is the same as invoice address --- src/Methods/PaymentAbstract.php | 10 ++++++++++ src/Methods/PaymentValidator.php | 8 ++++++-- src/Methods/PayoneInvoiceSecurePaymentMethod.php | 10 ++++++++++ 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/src/Methods/PaymentAbstract.php b/src/Methods/PaymentAbstract.php index 68734fd9..8ee7a446 100644 --- a/src/Methods/PaymentAbstract.php +++ b/src/Methods/PaymentAbstract.php @@ -187,4 +187,14 @@ public function getBackendIcon(): string $icon = $app->getUrlPath(PluginConstants::NAME).'/images/logos/'.strtolower($this::PAYMENT_CODE).'_backend_icon.svg'; return $icon; } + + /** + * Can the delivery address be different from the invoice address? + * + * @return bool + */ + public function canHandleDifferingDeliveryAddress(): bool + { + return true; + } } diff --git a/src/Methods/PaymentValidator.php b/src/Methods/PaymentValidator.php index 3065a59c..de4e6def 100644 --- a/src/Methods/PaymentValidator.php +++ b/src/Methods/PaymentValidator.php @@ -58,9 +58,9 @@ public function validate(PaymentAbstract $payment) } $billingAddress = $this->addressHelper->getBasketBillingAddress($this->basket); - $shippingAddress = $this->addressHelper->getBasketShippingAddress($this->basket); + $deliveryAddress = $this->addressHelper->getBasketShippingAddress($this->basket); if (!$billingAddress) { - return true; + return false; } $country = $billingAddress->country->isoCode2; @@ -69,6 +69,10 @@ public function validate(PaymentAbstract $payment) return false; } + + if (!$payment->canHandleDifferingDeliveryAddress() && $deliveryAddress && $billingAddress->id != $deliveryAddress->id) { + return false; + } return true; } diff --git a/src/Methods/PayoneInvoiceSecurePaymentMethod.php b/src/Methods/PayoneInvoiceSecurePaymentMethod.php index 10b293a2..12d20a04 100644 --- a/src/Methods/PayoneInvoiceSecurePaymentMethod.php +++ b/src/Methods/PayoneInvoiceSecurePaymentMethod.php @@ -10,4 +10,14 @@ class PayoneInvoiceSecurePaymentMethod extends PaymentAbstract { const PAYMENT_CODE = 'PAYONE_PAYONE_INVOICE_SECURE'; + + /** + * Can the delivery address be different from the invoice address? + * + * @return bool + */ + public function canHandleDifferingDeliveryAddress(): bool + { + return false; + } } From 5f2e03c17cbb11a87901bc051a9a833ca9680b0d Mon Sep 17 00:00:00 2001 From: Raphael Adam Date: Wed, 1 Jul 2020 11:42:32 +0200 Subject: [PATCH 083/353] set settleaccount to auto in capture --- src/Providers/Api/Request/CaptureDataProvider.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Providers/Api/Request/CaptureDataProvider.php b/src/Providers/Api/Request/CaptureDataProvider.php index 2a7816a9..06c9df9b 100644 --- a/src/Providers/Api/Request/CaptureDataProvider.php +++ b/src/Providers/Api/Request/CaptureDataProvider.php @@ -66,7 +66,6 @@ private function getSettleaccount(string $paymentCode) in_array( $paymentCode, [ - PayoneInvoiceSecurePaymentMethod::PAYMENT_CODE, PayoneInvoicePaymentMethod::PAYMENT_CODE, PayonePrePaymentPaymentMethod::PAYMENT_CODE, PayoneSofortPaymentMethod::PAYMENT_CODE, From b6da3b54e3599d563f464bc234a5f2fa5201b5f9 Mon Sep 17 00:00:00 2001 From: Daniel Marx Date: Wed, 1 Jul 2020 12:49:43 +0200 Subject: [PATCH 084/353] extended payone-api for getinvoice call --- .../Request/GetInvoice/GetInvoice.php | 97 +++++++++++++++++++ .../Request/GetInvoice/RequestFactory.php | 46 +++++++++ resources/lib/PayoneApi/Request/Types.php | 1 + .../Response/ClientErrorResponse.php | 10 +- .../PayoneApi/Response/ResponseFactory.php | 3 + resources/lib/doGetDocument.php | 48 +++++++++ 6 files changed, 200 insertions(+), 5 deletions(-) create mode 100644 resources/lib/PayoneApi/Request/GetInvoice/GetInvoice.php create mode 100644 resources/lib/PayoneApi/Request/GetInvoice/RequestFactory.php create mode 100644 resources/lib/doGetDocument.php diff --git a/resources/lib/PayoneApi/Request/GetInvoice/GetInvoice.php b/resources/lib/PayoneApi/Request/GetInvoice/GetInvoice.php new file mode 100644 index 00000000..4a22c36e --- /dev/null +++ b/resources/lib/PayoneApi/Request/GetInvoice/GetInvoice.php @@ -0,0 +1,97 @@ +config = $config; + $this->invoiceTitle = $invoiceTitle; + $this->info = $info; + } + + /** + * Getter for Request + * + * @return string + */ + public function getRequest() + { + return $this->request; + } + + /** + * Getter for Config + * + * @return Config + */ + public function getConfig() + { + return $this->config; + } + + /** + * Getter for Info + * + * @return SystemInfo + */ + public function getInfo() + { + return $this->info; + } + + /** + * Getter for Sequencenumber + */ + public function getSequencenumber() + { + return null; + } + + /** + * Getter for Amount + * + * @return int + */ + public function getAmount() + { + return null; + } + + /** + * Getter for InvoiceTitle + * + * @return string + */ + public function getInvoiceTitle() + { + return $this->invoiceTitle; + } +} diff --git a/resources/lib/PayoneApi/Request/GetInvoice/RequestFactory.php b/resources/lib/PayoneApi/Request/GetInvoice/RequestFactory.php new file mode 100644 index 00000000..28d6ccb9 --- /dev/null +++ b/resources/lib/PayoneApi/Request/GetInvoice/RequestFactory.php @@ -0,0 +1,46 @@ +message = $message; + $this->errorMessage = $errorMessage; } /** @@ -33,7 +33,7 @@ public function getSuccess() */ public function getErrorMessage() { - return $this->message; + return $this->errorMessage; } /** diff --git a/resources/lib/PayoneApi/Response/ResponseFactory.php b/resources/lib/PayoneApi/Response/ResponseFactory.php index bd150821..cd857f9e 100644 --- a/resources/lib/PayoneApi/Response/ResponseFactory.php +++ b/resources/lib/PayoneApi/Response/ResponseFactory.php @@ -11,6 +11,9 @@ class ResponseFactory */ public static function create($response) { + if (strpos($response, 'PDF-1.') !== false) { + return new GenericResponse(['document' => base64_encode($response)]); + } $responseData = self::parseResponse($response); if (strpos($response, 'clearing') !== false) { $authResponse = new ResponseWithClearing($responseData); diff --git a/resources/lib/doGetDocument.php b/resources/lib/doGetDocument.php new file mode 100644 index 00000000..29ca81c0 --- /dev/null +++ b/resources/lib/doGetDocument.php @@ -0,0 +1,48 @@ +doRequest($request); +} catch (Exception $e) { + $errorResponse = new ClientErrorResponse( + 'SdkRestApi error: ' . $e->getMessage() . PHP_EOL . + 'Lib version: ' . Version::getVersion() . PHP_EOL . + $e->getTraceAsString() + ); + + return $errorResponse; +} + +if (!$response->getSuccess()) { + $errorResponse = new ClientErrorResponse( + 'Request successful but response invalid. ' . PHP_EOL . + 'Lib version: ' . Version::getVersion() . PHP_EOL . + 'Message: ' . $response->getErrorMessage() . PHP_EOL . + 'Request was : ' . json_encode($serializer->serialize($request), JSON_PRETTY_PRINT) . PHP_EOL . + 'Response was: ' . json_encode($serializer->serialize($response), JSON_PRETTY_PRINT) + ); + return $errorResponse->jsonSerialize(); +} + +return $response->jsonSerialize(); From c29f27d09fb9d33e03e10162d976d114560a93d9 Mon Sep 17 00:00:00 2001 From: Raphael Adam Date: Thu, 2 Jul 2020 16:34:18 +0200 Subject: [PATCH 085/353] add settings for own portal for secure invoice --- config.json | 12 +++++++++ src/Models/PaymentConfig/ApiCredentials.php | 27 +++++++++++++++---- .../Api/Request/DataProviderAbstract.php | 7 ++--- 3 files changed, 38 insertions(+), 8 deletions(-) diff --git a/config.json b/config.json index 87d9775e..f23e8f35 100644 --- a/config.json +++ b/config.json @@ -191,6 +191,18 @@ "options": { "defaultValue": "DE,AT,CH" } + }, + "PAYONE_PAYONE_INVOICE_SECURE.portalid": { + "type": "inputText", + "required": false, + "label": "Config.portalidLabel", + "options": {} + }, + "PAYONE_PAYONE_INVOICE_SECURE.key": { + "type": "inputText", + "required": false, + "label": "Config.keyLabel", + "options": {} } } }, diff --git a/src/Models/PaymentConfig/ApiCredentials.php b/src/Models/PaymentConfig/ApiCredentials.php index 45dd0d6c..2e4b1bff 100644 --- a/src/Models/PaymentConfig/ApiCredentials.php +++ b/src/Models/PaymentConfig/ApiCredentials.php @@ -22,10 +22,18 @@ public function __construct( } /** + * @param null $paymentCode * @return string */ - public function getKey() + public function getKey($paymentCode = null) { + if ($paymentCode !== null) { + $key = $this->configRepo->get($paymentCode . '.key'); + if (!empty($key)) { + return $key; + } + } + return $this->configRepo->get('key'); } @@ -46,10 +54,18 @@ public function getMid() } /** + * @param int|null $paymentCode * @return string */ - public function getPortalid() + public function getPortalid($paymentCode = null) { + if ($paymentCode !== null) { + $portalId = $this->configRepo->get($paymentCode . '.portalid'); + if (!empty($portalId)) { + return $portalId; + } + } + return $this->configRepo->get('portalid'); } @@ -64,15 +80,16 @@ public function getMode() } /** + * @param int|null $paymentCode * @return array */ - public function getApiCredentials() + public function getApiCredentials($paymentCode = null) { $apiContextParams = []; $apiContextParams['aid'] = $this->getAid(); $apiContextParams['mid'] = $this->getMid(); - $apiContextParams['portalid'] = $this->getPortalid(); - $apiContextParams['key'] = $this->getKey(); + $apiContextParams['portalid'] = $this->getPortalid($paymentCode); + $apiContextParams['key'] = $this->getKey($paymentCode); $apiContextParams['mode'] = $this->getMode(); return $apiContextParams; diff --git a/src/Providers/Api/Request/DataProviderAbstract.php b/src/Providers/Api/Request/DataProviderAbstract.php index 491fdf2b..c91845e3 100644 --- a/src/Providers/Api/Request/DataProviderAbstract.php +++ b/src/Providers/Api/Request/DataProviderAbstract.php @@ -263,16 +263,17 @@ protected function getDefaultRequestData($paymentCode) return [ 'paymentMethod' => $this->mapPaymentCode($paymentCode), 'systemInfo' => $this->getSystemInfo(), - 'context' => $this->getApiContextParams(), + 'context' => $this->getApiContextParams($paymentCode), ]; } /** + * @param int $paymentCode * @return array */ - protected function getApiContextParams() + protected function getApiContextParams($paymentCode) { - return $this->config->getApiCredentials(); + return $this->config->getApiCredentials($paymentCode); } /** From ee64b4e28bae04d53c03c76df60fe9c32a62685c Mon Sep 17 00:00:00 2001 From: Daniel Marx Date: Thu, 2 Jul 2020 17:16:14 +0200 Subject: [PATCH 086/353] add get invoice for test --- resources/lang/de/Api.properties | 1 + resources/lang/en/Api.properties | 1 + src/Controllers/StatusController.php | 21 +- src/Models/Api/GetInvoiceResponse.php | 46 +++++ src/Models/Api/GetInvoiceResponseFactory.php | 26 +++ .../Api/Request/GetInvoiceDataProvider.php | 21 ++ src/Services/Api.php | 21 ++ src/Services/PaymentDocuments.php | 187 ++++++++++++++++++ 8 files changed, 321 insertions(+), 3 deletions(-) create mode 100644 src/Models/Api/GetInvoiceResponse.php create mode 100644 src/Models/Api/GetInvoiceResponseFactory.php create mode 100644 src/Providers/Api/Request/GetInvoiceDataProvider.php create mode 100644 src/Services/PaymentDocuments.php diff --git a/resources/lang/de/Api.properties b/resources/lang/de/Api.properties index ee4c310a..14248731 100644 --- a/resources/lang/de/Api.properties +++ b/resources/lang/de/Api.properties @@ -6,3 +6,4 @@ doRefund = "doRefund" doReAuth = "doReAuth" doCalculation = "doCalculation" doAuth = "doAuth" +doGetInvoice = "doGetInvoice" diff --git a/resources/lang/en/Api.properties b/resources/lang/en/Api.properties index ee4c310a..14248731 100644 --- a/resources/lang/en/Api.properties +++ b/resources/lang/en/Api.properties @@ -6,3 +6,4 @@ doRefund = "doRefund" doReAuth = "doReAuth" doCalculation = "doCalculation" doAuth = "doAuth" +doGetInvoice = "doGetInvoice" diff --git a/src/Controllers/StatusController.php b/src/Controllers/StatusController.php index 448121c3..9989fb89 100644 --- a/src/Controllers/StatusController.php +++ b/src/Controllers/StatusController.php @@ -6,6 +6,7 @@ use Payone\Adapter\Logger; use Payone\Migrations\CreatePaymentMethods; use Payone\Services\PaymentCreation; +use Payone\Services\PaymentDocuments; use Plenty\Plugin\Controller; use Plenty\Plugin\Http\Request; @@ -32,6 +33,12 @@ class StatusController extends Controller * @var CreatePaymentMethods */ private $paymentMigration; + + /** + * @var PaymentDocuments + */ + private $paymentDocument; + /** * @var Logger */ @@ -43,6 +50,7 @@ class StatusController extends Controller * @param Request $request * @param ConfigAdapter $config * @param PaymentCreation $paymentCreation + * @param PaymentDocuments $paymentDocument * @param CreatePaymentMethods $paymentMigration * @param Logger $logger */ @@ -50,12 +58,15 @@ public function __construct( Request $request, ConfigAdapter $config, PaymentCreation $paymentCreation, + PaymentDocuments $paymentDocument, CreatePaymentMethods $paymentMigration, Logger $logger - ) { + ) + { $this->request = $request; $this->config = $config; $this->paymentCreation = $paymentCreation; + $this->paymentDocument = $paymentDocument; $this->paymentMigration = $paymentMigration; $this->logger = $logger; } @@ -71,14 +82,18 @@ public function index() } $this->logger->setIdentifier(__METHOD__); - $this->logger->addReference(Logger::PAYONE_REQUEST_REFERENCE,$txid); + $this->logger->addReference(Logger::PAYONE_REQUEST_REFERENCE, $txid); $this->logger->debug('Controller.Status', $this->request->all()); if ($this->request->get('key') != md5($this->config->get('key'))) { return; } - $this->paymentCreation->updatePaymentStatus($txid, $txaction, $sequenceNumber); + if ($txaction === 'invoice') { + $this->paymentDocument->uploadDocument($txid, $sequenceNumber); + } else { + $this->paymentCreation->updatePaymentStatus($txid, $txaction, $sequenceNumber); + } return 'TSOK'; } diff --git a/src/Models/Api/GetInvoiceResponse.php b/src/Models/Api/GetInvoiceResponse.php new file mode 100644 index 00000000..2edf5766 --- /dev/null +++ b/src/Models/Api/GetInvoiceResponse.php @@ -0,0 +1,46 @@ +success = $success; + $this->errorMessage = $errorMessage; + $this->base64 = $base64; + return $this; + } + + public function jsonSerialize(): array + { + return parent::jsonSerialize() + + [ + 'document' => $this->base64 + ]; + } + + /** + * Getter for Base64 + * + * @return string + */ + public function getBase64(): string + { + return $this->base64; + } +} diff --git a/src/Models/Api/GetInvoiceResponseFactory.php b/src/Models/Api/GetInvoiceResponseFactory.php new file mode 100644 index 00000000..6acd0932 --- /dev/null +++ b/src/Models/Api/GetInvoiceResponseFactory.php @@ -0,0 +1,26 @@ +init( + $responseData['success'] ?? false, + $responseData['errormessage'] ?? '', + $responseData['responseData'] ?? '' + ); + } +} diff --git a/src/Providers/Api/Request/GetInvoiceDataProvider.php b/src/Providers/Api/Request/GetInvoiceDataProvider.php new file mode 100644 index 00000000..9d1f85d2 --- /dev/null +++ b/src/Providers/Api/Request/GetInvoiceDataProvider.php @@ -0,0 +1,21 @@ +getDefaultRequestData($paymentCode); + $requestParams['context']['documentNumber'] = $documentType.'-'.$requestReference.'-'.$sequenceNumber; + $this->validator->validate($requestParams); + return $requestParams; + } +} diff --git a/src/Services/Api.php b/src/Services/Api.php index 9a0da534..dfb4ffda 100644 --- a/src/Services/Api.php +++ b/src/Services/Api.php @@ -5,6 +5,8 @@ use Payone\Adapter\Logger; use Payone\Models\Api\AuthResponse; use Payone\Models\Api\AuthResponseFactory; +use Payone\Models\Api\GetInvoiceResponse; +use Payone\Models\Api\GetInvoiceResponseFactory; use Payone\Models\Api\ManagemandateResponse; use Payone\Models\Api\ManagemandateResponseFactory; use Payone\Models\Api\PreAuthResponse; @@ -31,6 +33,7 @@ class Api const REQUEST_TYPE_CALCULATION = 'Calculation'; const REQUEST_TYPE_DEBIT = 'Debit'; const REQUEST_TYPE_MANAGEMANDATE = 'Managemandate'; + const REQUEST_TYPE_INVOICE = 'GetDocument'; /** * @var LibraryCallContract @@ -209,6 +212,24 @@ public function doManagemandate($requestParams): ManagemandateResponse return $responseObject; } + /** + * @param $requestParams + * + * @return Response + */ + public function doGetInvoice($requestParams): GetInvoiceResponse + { + $this->logger->setIdentifier(__METHOD__); + $response = $this->doLibCall((self::REQUEST_TYPE_INVOICE), $requestParams); + + $responseObject = GetInvoiceResponseFactory::create($response); + + $this->logger->addReference(Logger::PAYONE_REQUEST_REFERENCE, $responseObject->getTransactionID()); + $this->logger->debug('Api.' . $this->getCallAction(self::REQUEST_TYPE_MANAGEMANDATE), $response); + + return $responseObject; + } + /** * @param string $call request type * @param $requestParams diff --git a/src/Services/PaymentDocuments.php b/src/Services/PaymentDocuments.php new file mode 100644 index 00000000..a3c36896 --- /dev/null +++ b/src/Services/PaymentDocuments.php @@ -0,0 +1,187 @@ +paymentRepository = $paymentRepository; + $this->paymentHelper = $paymentHelper; + $this->orderRepositoryContract = $orderRepositoryContract; + $this->api = $api; + $this->getInvoiceDataProvider = $getInvoiceDataProvider; + $this->logger = $logger; + } + + public function uploadDocument($txid, $sequenceNumber) + { + $payments = $this->paymentRepository->getPaymentsByPropertyTypeAndValue( + PaymentProperty::TYPE_TRANSACTION_ID, + $txid, + 1 + ); + /* @var $payment Payment */ + foreach ($payments as $payment) { + $this->logger->info('Api.doGetInvoice', + [ + 'taxid' => $txid, + 'sequenceNumber' => $sequenceNumber, + 'payment' => $payment, + ] + ); + + //only for secure invoice + if ($this->paymentHelper->getMopId(PayoneInvoiceSecurePaymentMethod::PAYMENT_CODE) != + $payment->mopId) { + continue; + } + + $orderId = $payment->order->orderId; + if ((int)$orderId <= 0) { + continue; + } + + try { + $order = $this->orderRepositoryContract->findOrderById($orderId); + } catch (\Exception $ex) { + $this->logger->error('Api.doGetInvoice', + [ + 'taxid' => $txid, + 'sequenceNumber' => $sequenceNumber, + 'payment' => $payment, + 'errorMessage' => $ex->getMessage(), + ] + ); + continue; + } + + $documentType = 'RG'; + if ($order->typeId == OrderType::TYPE_CREDIT_NOTE) { + $documentType = 'GT'; + } + + $paymentCode = $this->paymentHelper->getPaymentCodeByMop($payment->mopId); + $requestData = $this->getInvoiceDataProvider->getRequestData($paymentCode, $txid, $sequenceNumber, $documentType); + $getInvoiceResult = $this->api->doGetInvoice($requestData); + + if (!$getInvoiceResult->getSuccess()) { + $this->logger->error('Api.doGetInvoice', + [ + 'taxid' => $txid, + 'sequenceNumber' => $sequenceNumber, + 'payment' => $payment, + 'errorMessage' => $getInvoiceResult->getErrorMessage(), + ] + ); + continue; + } + + $this->importInvoice($order, $requestData['context']['documentNumber'], $getInvoiceResult->getBase64()); + } + } + + /** + * Imports one invoice. + * + * @param Order $order + * @param array $invoice + * @throws InvalidDocumentTypeException + * @throws \Plenty\Exceptions\ValidationException + */ + private function importInvoice(Order $order, string $invoiceNumber, string $content) + { + /** @var DocumentRepositoryContract $documentRepository */ + $documentRepository = pluginApp(DocumentRepositoryContract::class); + + // check if the document is already imported + $documentRepository->setFilters([ + 'numberWithPrefix' => $invoiceNumber, + 'orderId' => $order->id + ]); + + /** @var PaginatedResult $result */ + $result = $documentRepository->find(); + + if ($result->getTotalCount() > 0) { + return; + } + $documentType = Document::INVOICE_EXTERNAL; + if ($order->typeId == OrderType::TYPE_CREDIT_NOTE) { + $documentType = Document::CREDIT_NOTE_EXTERNAL; + } + $data = [ + 'documents' => [ + [ + 'content' => $content, + 'numberWithPrefix' => $invoiceNumber, + 'displayDate' => Carbon::now()->toW3cString() + ] + ] + ]; + $documentRepository->uploadOrderDocuments($order->id, $documentType, $data); + } +} From db1a652e59da165075cc61e180c09c724aebd155 Mon Sep 17 00:00:00 2001 From: Daniel Marx Date: Thu, 2 Jul 2020 18:44:19 +0200 Subject: [PATCH 087/353] add get invoice for test --- src/Controllers/StatusController.php | 10 +++- .../Api/Request/GetInvoiceDataProvider.php | 4 +- src/Services/PaymentDocuments.php | 47 ++++++++++++------- 3 files changed, 40 insertions(+), 21 deletions(-) diff --git a/src/Controllers/StatusController.php b/src/Controllers/StatusController.php index 9989fb89..c5af4f6d 100644 --- a/src/Controllers/StatusController.php +++ b/src/Controllers/StatusController.php @@ -4,6 +4,7 @@ use Payone\Adapter\Config as ConfigAdapter; use Payone\Adapter\Logger; +use Payone\Methods\PayoneInvoiceSecurePaymentMethod; use Payone\Migrations\CreatePaymentMethods; use Payone\Services\PaymentCreation; use Payone\Services\PaymentDocuments; @@ -85,12 +86,17 @@ public function index() $this->logger->addReference(Logger::PAYONE_REQUEST_REFERENCE, $txid); $this->logger->debug('Controller.Status', $this->request->all()); - if ($this->request->get('key') != md5($this->config->get('key'))) { + if ( $this->request->get('key') != md5($this->config->get(PayoneInvoiceSecurePaymentMethod::PAYMENT_CODE.'.key')) && + $this->request->get('key') != md5($this->config->get('key')) ) + { return; } if ($txaction === 'invoice') { - $this->paymentDocument->uploadDocument($txid, $sequenceNumber); + + $invoiceId = $this->request->get('invoiceid'); + $invoiceDate = $this->request->get('invoice_date'); + $this->paymentDocument->uploadDocument($txid, $sequenceNumber, $invoiceId, $invoiceDate); } else { $this->paymentCreation->updatePaymentStatus($txid, $txaction, $sequenceNumber); } diff --git a/src/Providers/Api/Request/GetInvoiceDataProvider.php b/src/Providers/Api/Request/GetInvoiceDataProvider.php index 9d1f85d2..17ac659d 100644 --- a/src/Providers/Api/Request/GetInvoiceDataProvider.php +++ b/src/Providers/Api/Request/GetInvoiceDataProvider.php @@ -11,10 +11,10 @@ class GetInvoiceDataProvider extends DataProviderAbstract public function getRequestData(string $paymentCode, string $requestReference = null, string $sequenceNumber = null, - string $documentType = null) + string $documentNumber = null) { $requestParams = $this->getDefaultRequestData($paymentCode); - $requestParams['context']['documentNumber'] = $documentType.'-'.$requestReference.'-'.$sequenceNumber; + $requestParams['context']['documentNumber'] = $documentNumber ; $this->validator->validate($requestParams); return $requestParams; } diff --git a/src/Services/PaymentDocuments.php b/src/Services/PaymentDocuments.php index a3c36896..78625c21 100644 --- a/src/Services/PaymentDocuments.php +++ b/src/Services/PaymentDocuments.php @@ -6,10 +6,11 @@ use Payone\Adapter\Logger; use Payone\Helpers\PaymentHelper; use Payone\Methods\PayoneInvoiceSecurePaymentMethod; +use Plenty\Modules\Authorization\Services\AuthHelper; use Plenty\Modules\Document\Models\Document; -use Plenty\Modules\Order\Contracts\OrderRepositoryContract; use Payone\Providers\Api\Request\GetInvoiceDataProvider; use Plenty\Modules\Document\Contracts\DocumentRepositoryContract; +use Plenty\Modules\Order\Contracts\OrderRepositoryContract; use Plenty\Modules\Order\Models\Order; use Plenty\Modules\Order\Models\OrderType; use Plenty\Modules\Otto\Order\Exceptions\InvalidDocumentTypeException; @@ -33,9 +34,6 @@ class PaymentDocuments */ private $paymentHelper; - /** @var OrderRepositoryContract */ - private $orderRepositoryContract; - /** * @var Api */ @@ -55,7 +53,6 @@ class PaymentDocuments * * @param PaymentRepositoryContract $paymentRepository * @param PaymentHelper $paymentHelper - * @param OrderRepositoryContract $orderRepositoryContract * @param GetInvoiceDataProvider $getInvoiceDataProvider * @param Api $api * @param Logger $logger @@ -63,7 +60,6 @@ class PaymentDocuments public function __construct( PaymentRepositoryContract $paymentRepository, PaymentHelper $paymentHelper, - OrderRepositoryContract $orderRepositoryContract, GetInvoiceDataProvider $getInvoiceDataProvider, Api $api, Logger $logger @@ -71,13 +67,12 @@ public function __construct( { $this->paymentRepository = $paymentRepository; $this->paymentHelper = $paymentHelper; - $this->orderRepositoryContract = $orderRepositoryContract; $this->api = $api; $this->getInvoiceDataProvider = $getInvoiceDataProvider; $this->logger = $logger; } - public function uploadDocument($txid, $sequenceNumber) + public function uploadDocument($txid, $sequenceNumber, $invoiceId, $invoiceDate) { $payments = $this->paymentRepository->getPaymentsByPropertyTypeAndValue( PaymentProperty::TYPE_TRANSACTION_ID, @@ -106,7 +101,13 @@ public function uploadDocument($txid, $sequenceNumber) } try { - $order = $this->orderRepositoryContract->findOrderById($orderId); + $authHelper = pluginApp(AuthHelper::class); + $order = $authHelper->processUnguarded( + function () use ($orderId) { + $orderRepository = pluginApp(OrderRepositoryContract::class); + return $orderRepository->findOrderById($orderId); + } + ); } catch (\Exception $ex) { $this->logger->error('Api.doGetInvoice', [ @@ -119,13 +120,13 @@ public function uploadDocument($txid, $sequenceNumber) continue; } - $documentType = 'RG'; - if ($order->typeId == OrderType::TYPE_CREDIT_NOTE) { - $documentType = 'GT'; + if(strlen($invoiceId) === 0) + { + $invoiceId = (($order->typeId == OrderType::TYPE_CREDIT_NOTE)?'GT':'RG').'-'.$txid.'-'.$sequenceNumber; } $paymentCode = $this->paymentHelper->getPaymentCodeByMop($payment->mopId); - $requestData = $this->getInvoiceDataProvider->getRequestData($paymentCode, $txid, $sequenceNumber, $documentType); + $requestData = $this->getInvoiceDataProvider->getRequestData($paymentCode, $txid, $sequenceNumber, $invoiceId); $getInvoiceResult = $this->api->doGetInvoice($requestData); if (!$getInvoiceResult->getSuccess()) { @@ -140,7 +141,7 @@ public function uploadDocument($txid, $sequenceNumber) continue; } - $this->importInvoice($order, $requestData['context']['documentNumber'], $getInvoiceResult->getBase64()); + $this->importInvoice($order, $requestData['context']['documentNumber'], $getInvoiceResult->getBase64(), $invoiceDate); } } @@ -152,7 +153,7 @@ public function uploadDocument($txid, $sequenceNumber) * @throws InvalidDocumentTypeException * @throws \Plenty\Exceptions\ValidationException */ - private function importInvoice(Order $order, string $invoiceNumber, string $content) + private function importInvoice(Order $order, string $invoiceNumber, string $content, string $invoiceDate) { /** @var DocumentRepositoryContract $documentRepository */ $documentRepository = pluginApp(DocumentRepositoryContract::class); @@ -173,15 +174,27 @@ private function importInvoice(Order $order, string $invoiceNumber, string $cont if ($order->typeId == OrderType::TYPE_CREDIT_NOTE) { $documentType = Document::CREDIT_NOTE_EXTERNAL; } + + $date = Carbon::now()->toW3cString(); + if( strlen($invoiceDate) == 8 ) + { + $date = Carbon::createFromFormat('Ymd', $invoiceDate)->format(\DateTime::W3C); + } + $data = [ 'documents' => [ [ 'content' => $content, 'numberWithPrefix' => $invoiceNumber, - 'displayDate' => Carbon::now()->toW3cString() + 'displayDate' => $date ] ] ]; - $documentRepository->uploadOrderDocuments($order->id, $documentType, $data); + $authHelper = pluginApp(AuthHelper::class); + $documents = $authHelper->processUnguarded( + function () use ($documentRepository, $order, $documentType, $data) { + $documentRepository->uploadOrderDocuments($order->id, $documentType, $data); + } + ); } } From 97e53379f1ef5c45cad0a08694c2f6214aab0a80 Mon Sep 17 00:00:00 2001 From: Daniel Marx Date: Thu, 2 Jul 2020 22:15:19 +0200 Subject: [PATCH 088/353] add get invoice for test --- src/Models/Api/GetInvoiceResponseFactory.php | 2 +- src/Providers/Api/Request/GetInvoiceDataProvider.php | 2 +- src/Services/Api.php | 5 +---- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/Models/Api/GetInvoiceResponseFactory.php b/src/Models/Api/GetInvoiceResponseFactory.php index 6acd0932..d519247c 100644 --- a/src/Models/Api/GetInvoiceResponseFactory.php +++ b/src/Models/Api/GetInvoiceResponseFactory.php @@ -20,7 +20,7 @@ public static function create(array $responseData) return $response->init( $responseData['success'] ?? false, $responseData['errormessage'] ?? '', - $responseData['responseData'] ?? '' + $responseData['responseData']['document'] ?? '' ); } } diff --git a/src/Providers/Api/Request/GetInvoiceDataProvider.php b/src/Providers/Api/Request/GetInvoiceDataProvider.php index 17ac659d..d5d042e7 100644 --- a/src/Providers/Api/Request/GetInvoiceDataProvider.php +++ b/src/Providers/Api/Request/GetInvoiceDataProvider.php @@ -14,7 +14,7 @@ public function getRequestData(string $paymentCode, string $documentNumber = null) { $requestParams = $this->getDefaultRequestData($paymentCode); - $requestParams['context']['documentNumber'] = $documentNumber ; + $requestParams['context']['documentNumber'] = $documentNumber; $this->validator->validate($requestParams); return $requestParams; } diff --git a/src/Services/Api.php b/src/Services/Api.php index dfb4ffda..1233bbf2 100644 --- a/src/Services/Api.php +++ b/src/Services/Api.php @@ -221,12 +221,9 @@ public function doGetInvoice($requestParams): GetInvoiceResponse { $this->logger->setIdentifier(__METHOD__); $response = $this->doLibCall((self::REQUEST_TYPE_INVOICE), $requestParams); - $responseObject = GetInvoiceResponseFactory::create($response); - $this->logger->addReference(Logger::PAYONE_REQUEST_REFERENCE, $responseObject->getTransactionID()); - $this->logger->debug('Api.' . $this->getCallAction(self::REQUEST_TYPE_MANAGEMANDATE), $response); - + $this->logger->debug('Api.' . $this->getCallAction(self::REQUEST_TYPE_INVOICE), $response); return $responseObject; } From d9c6805d9c64151894ae79e64d0395383e52ec15 Mon Sep 17 00:00:00 2001 From: Daniel Marx Date: Fri, 3 Jul 2020 08:48:16 +0200 Subject: [PATCH 089/353] cleanup --- src/Controllers/StatusController.php | 15 +- .../Api/Request/GetInvoiceDataProvider.php | 2 - src/Services/PaymentDocuments.php | 140 ++++++++++-------- 3 files changed, 84 insertions(+), 73 deletions(-) diff --git a/src/Controllers/StatusController.php b/src/Controllers/StatusController.php index c5af4f6d..bffff083 100644 --- a/src/Controllers/StatusController.php +++ b/src/Controllers/StatusController.php @@ -86,17 +86,18 @@ public function index() $this->logger->addReference(Logger::PAYONE_REQUEST_REFERENCE, $txid); $this->logger->debug('Controller.Status', $this->request->all()); - if ( $this->request->get('key') != md5($this->config->get(PayoneInvoiceSecurePaymentMethod::PAYMENT_CODE.'.key')) && - $this->request->get('key') != md5($this->config->get('key')) ) - { + if ($this->request->get('key') != md5($this->config->get(PayoneInvoiceSecurePaymentMethod::PAYMENT_CODE . '.key')) && + $this->request->get('key') != md5($this->config->get('key'))) { return; } if ($txaction === 'invoice') { - - $invoiceId = $this->request->get('invoiceid'); - $invoiceDate = $this->request->get('invoice_date'); - $this->paymentDocument->uploadDocument($txid, $sequenceNumber, $invoiceId, $invoiceDate); + $this + ->paymentDocument + ->uploadDocument($txid, + $this->request->get('invoiceid'), + $this->request->get('invoice_date'), + $this->request->get('invoice_grossamount')); } else { $this->paymentCreation->updatePaymentStatus($txid, $txaction, $sequenceNumber); } diff --git a/src/Providers/Api/Request/GetInvoiceDataProvider.php b/src/Providers/Api/Request/GetInvoiceDataProvider.php index d5d042e7..39f6ee70 100644 --- a/src/Providers/Api/Request/GetInvoiceDataProvider.php +++ b/src/Providers/Api/Request/GetInvoiceDataProvider.php @@ -9,8 +9,6 @@ class GetInvoiceDataProvider extends DataProviderAbstract * {@inheritdoc} */ public function getRequestData(string $paymentCode, - string $requestReference = null, - string $sequenceNumber = null, string $documentNumber = null) { $requestParams = $this->getDefaultRequestData($paymentCode); diff --git a/src/Services/PaymentDocuments.php b/src/Services/PaymentDocuments.php index 78625c21..04332f47 100644 --- a/src/Services/PaymentDocuments.php +++ b/src/Services/PaymentDocuments.php @@ -11,7 +11,6 @@ use Payone\Providers\Api\Request\GetInvoiceDataProvider; use Plenty\Modules\Document\Contracts\DocumentRepositoryContract; use Plenty\Modules\Order\Contracts\OrderRepositoryContract; -use Plenty\Modules\Order\Models\Order; use Plenty\Modules\Order\Models\OrderType; use Plenty\Modules\Otto\Order\Exceptions\InvalidDocumentTypeException; use Plenty\Modules\Payment\Contracts\PaymentRepositoryContract; @@ -72,88 +71,99 @@ public function __construct( $this->logger = $logger; } - public function uploadDocument($txid, $sequenceNumber, $invoiceId, $invoiceDate) + public function uploadDocument($txid, $invoiceId, $invoiceDate, $invoiceTotal) { $payments = $this->paymentRepository->getPaymentsByPropertyTypeAndValue( PaymentProperty::TYPE_TRANSACTION_ID, $txid, 1 ); - /* @var $payment Payment */ - foreach ($payments as $payment) { - $this->logger->info('Api.doGetInvoice', - [ - 'taxid' => $txid, - 'sequenceNumber' => $sequenceNumber, - 'payment' => $payment, - ] + + if (count($payments) !== 1) { + //payment not found + $this->logger->debug( + 'Api.doGetInvoice', + 'No payments found for txid (' . $txid . ')' ); + throw new \Exception('Payment not found.'); + } - //only for secure invoice - if ($this->paymentHelper->getMopId(PayoneInvoiceSecurePaymentMethod::PAYMENT_CODE) != - $payment->mopId) { - continue; - } + /* @var $payment Payment */ + $payments = array_shift($payments); - $orderId = $payment->order->orderId; - if ((int)$orderId <= 0) { - continue; - } + $this->logger->debug('Api.doGetInvoice', + [ + 'taxid' => $txid, + 'invoiceId' => $invoiceId, 'invoiceDate' => $invoiceDate, 'invoiceTotal' => $invoiceTotal, + 'payment' => $payment + ] + ); + + //only for secure invoice + if ($this->paymentHelper->getMopId(PayoneInvoiceSecurePaymentMethod::PAYMENT_CODE) != + $payment->mopId) { + return; + } + + $orderId = $payment->order->orderId; + + if ((int)$orderId <= 0) { + return; + } - try { - $authHelper = pluginApp(AuthHelper::class); - $order = $authHelper->processUnguarded( - function () use ($orderId) { - $orderRepository = pluginApp(OrderRepositoryContract::class); - return $orderRepository->findOrderById($orderId); + if (substr($invoiceId, 0, 2) == 'GT') { + //this is a credit note + $authHelper = pluginApp(AuthHelper::class); + $refundId = $authHelper->processUnguarded( + function () use ($orderId, $invoiceTotal) { + $orderRepository = pluginApp(OrderRepositoryContract::class); + $order = $orderRepository->findOrderById($orderId); + foreach ($order->childOrders as $childOrder) { + if ($childOrder->typeId == OrderType::TYPE_CREDIT_NOTE && + $childOrder->amount->invoiceTotal == abs($invoiceTotal)) { + return $childOrder->id; + } } + } + ); + if ((int)$refundId == 0) { + $this->logger->debug( + 'Api.doGetInvoice', + 'No credit-note found for invoiceId (' . $invoiceId . ')' ); - } catch (\Exception $ex) { - $this->logger->error('Api.doGetInvoice', - [ - 'taxid' => $txid, - 'sequenceNumber' => $sequenceNumber, - 'payment' => $payment, - 'errorMessage' => $ex->getMessage(), - ] - ); - continue; + return; } + $orderId = $refundId; + } - if(strlen($invoiceId) === 0) - { - $invoiceId = (($order->typeId == OrderType::TYPE_CREDIT_NOTE)?'GT':'RG').'-'.$txid.'-'.$sequenceNumber; - } + $requestData = $this->getInvoiceDataProvider + ->getRequestData(PayoneInvoiceSecurePaymentMethod::PAYMENT_CODE, $invoiceId); - $paymentCode = $this->paymentHelper->getPaymentCodeByMop($payment->mopId); - $requestData = $this->getInvoiceDataProvider->getRequestData($paymentCode, $txid, $sequenceNumber, $invoiceId); - $getInvoiceResult = $this->api->doGetInvoice($requestData); - - if (!$getInvoiceResult->getSuccess()) { - $this->logger->error('Api.doGetInvoice', - [ - 'taxid' => $txid, - 'sequenceNumber' => $sequenceNumber, - 'payment' => $payment, - 'errorMessage' => $getInvoiceResult->getErrorMessage(), - ] - ); - continue; - } + $getInvoiceResult = $this->api->doGetInvoice($requestData); - $this->importInvoice($order, $requestData['context']['documentNumber'], $getInvoiceResult->getBase64(), $invoiceDate); + if (!$getInvoiceResult->getSuccess()) { + $this->logger->error('Api.doGetInvoice', + [ + 'invoiceId' => $invoiceId, + 'payment' => $payment, + 'errorMessage' => $getInvoiceResult->getErrorMessage(), + ] + ); + return; } + + $this->importInvoice($orderId, $invoiceId, $getInvoiceResult->getBase64(), $invoiceDate); } /** * Imports one invoice. * - * @param Order $order + * @param int $orderId * @param array $invoice * @throws InvalidDocumentTypeException * @throws \Plenty\Exceptions\ValidationException */ - private function importInvoice(Order $order, string $invoiceNumber, string $content, string $invoiceDate) + private function importInvoice(int $orderId, string $invoiceNumber, string $content, string $invoiceDate) { /** @var DocumentRepositoryContract $documentRepository */ $documentRepository = pluginApp(DocumentRepositoryContract::class); @@ -161,23 +171,24 @@ private function importInvoice(Order $order, string $invoiceNumber, string $cont // check if the document is already imported $documentRepository->setFilters([ 'numberWithPrefix' => $invoiceNumber, - 'orderId' => $order->id + 'orderId' => $orderId ]); /** @var PaginatedResult $result */ $result = $documentRepository->find(); if ($result->getTotalCount() > 0) { + //document exists return; } + $documentType = Document::INVOICE_EXTERNAL; - if ($order->typeId == OrderType::TYPE_CREDIT_NOTE) { + if (substr($invoiceNumber, 0, 2) == 'GT') { $documentType = Document::CREDIT_NOTE_EXTERNAL; } $date = Carbon::now()->toW3cString(); - if( strlen($invoiceDate) == 8 ) - { + if (strlen($invoiceDate) == 8) { $date = Carbon::createFromFormat('Ymd', $invoiceDate)->format(\DateTime::W3C); } @@ -190,10 +201,11 @@ private function importInvoice(Order $order, string $invoiceNumber, string $cont ] ] ]; + $authHelper = pluginApp(AuthHelper::class); - $documents = $authHelper->processUnguarded( - function () use ($documentRepository, $order, $documentType, $data) { - $documentRepository->uploadOrderDocuments($order->id, $documentType, $data); + $authHelper->processUnguarded( + function () use ($documentRepository, $orderId, $documentType, $data) { + $documentRepository->uploadOrderDocuments($orderId, $documentType, $data); } ); } From 17a8525092758d384d024ab7a4104456dad055df Mon Sep 17 00:00:00 2001 From: Daniel Marx Date: Fri, 3 Jul 2020 08:58:21 +0200 Subject: [PATCH 090/353] cleanup --- src/Services/PaymentDocuments.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Services/PaymentDocuments.php b/src/Services/PaymentDocuments.php index 04332f47..8a1fa613 100644 --- a/src/Services/PaymentDocuments.php +++ b/src/Services/PaymentDocuments.php @@ -73,6 +73,8 @@ public function __construct( public function uploadDocument($txid, $invoiceId, $invoiceDate, $invoiceTotal) { + $this->logger->setIdentifier(__METHOD__); + $payments = $this->paymentRepository->getPaymentsByPropertyTypeAndValue( PaymentProperty::TYPE_TRANSACTION_ID, $txid, @@ -89,7 +91,7 @@ public function uploadDocument($txid, $invoiceId, $invoiceDate, $invoiceTotal) } /* @var $payment Payment */ - $payments = array_shift($payments); + $payment = array_shift($payments); $this->logger->debug('Api.doGetInvoice', [ From a477aecefab9a8d360cf37d2511ebee0f7657d86 Mon Sep 17 00:00:00 2001 From: Daniel Marx Date: Fri, 3 Jul 2020 09:22:18 +0200 Subject: [PATCH 091/353] cleanup --- src/Services/PaymentDocuments.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Services/PaymentDocuments.php b/src/Services/PaymentDocuments.php index 8a1fa613..c02f199f 100644 --- a/src/Services/PaymentDocuments.php +++ b/src/Services/PaymentDocuments.php @@ -122,7 +122,7 @@ function () use ($orderId, $invoiceTotal) { $order = $orderRepository->findOrderById($orderId); foreach ($order->childOrders as $childOrder) { if ($childOrder->typeId == OrderType::TYPE_CREDIT_NOTE && - $childOrder->amount->invoiceTotal == abs($invoiceTotal)) { + $childOrder->amount->invoiceTotal == (-$invoiceTotal)) { return $childOrder->id; } } From 212f66b1d7acb08411b8e07fbc006d82b10b52e1 Mon Sep 17 00:00:00 2001 From: Daniel Marx Date: Fri, 3 Jul 2020 09:40:57 +0200 Subject: [PATCH 092/353] cleanup --- src/Services/PaymentDocuments.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Services/PaymentDocuments.php b/src/Services/PaymentDocuments.php index c02f199f..52199dea 100644 --- a/src/Services/PaymentDocuments.php +++ b/src/Services/PaymentDocuments.php @@ -91,7 +91,7 @@ public function uploadDocument($txid, $invoiceId, $invoiceDate, $invoiceTotal) } /* @var $payment Payment */ - $payment = array_shift($payments); + $payment = $payments->shift(); $this->logger->debug('Api.doGetInvoice', [ From 3fe689cb267b60f91d1656fcaf4c1f85e67a191e Mon Sep 17 00:00:00 2001 From: Raphael Adam Date: Fri, 3 Jul 2020 13:08:47 +0200 Subject: [PATCH 093/353] validate if settings are set --- config.json | 24 +++++++++---------- src/Methods/PaymentAbstract.php | 13 +++++++++- src/Methods/PaymentValidator.php | 10 ++++++-- .../PayoneInvoiceSecurePaymentMethod.php | 17 +++++++++++++ 4 files changed, 49 insertions(+), 15 deletions(-) diff --git a/config.json b/config.json index f23e8f35..af155b1d 100644 --- a/config.json +++ b/config.json @@ -168,6 +168,18 @@ "label": "Config.PAYONEPAYONEINVOICESECUREDescriptionLabel", "options": {} }, + "PAYONE_PAYONE_INVOICE_SECURE.portalid": { + "type": "inputText", + "required": false, + "label": "Config.portalidLabel", + "options": {} + }, + "PAYONE_PAYONE_INVOICE_SECURE.key": { + "type": "inputText", + "required": false, + "label": "Config.keyLabel", + "options": {} + }, "PAYONE_PAYONE_INVOICE_SECURE.minCartAmount": { "type": "inputText", "required": false, @@ -191,18 +203,6 @@ "options": { "defaultValue": "DE,AT,CH" } - }, - "PAYONE_PAYONE_INVOICE_SECURE.portalid": { - "type": "inputText", - "required": false, - "label": "Config.portalidLabel", - "options": {} - }, - "PAYONE_PAYONE_INVOICE_SECURE.key": { - "type": "inputText", - "required": false, - "label": "Config.keyLabel", - "options": {} } } }, diff --git a/src/Methods/PaymentAbstract.php b/src/Methods/PaymentAbstract.php index 8ee7a446..839869e1 100644 --- a/src/Methods/PaymentAbstract.php +++ b/src/Methods/PaymentAbstract.php @@ -48,7 +48,7 @@ public function __construct( public function isActive(): bool { return (bool) $this->configRepo->get($this::PAYMENT_CODE . '.active') - && $this->paymentValidator->validate($this); + && $this->paymentValidator->validate($this, $this->configRepo); } /** @@ -197,4 +197,15 @@ public function canHandleDifferingDeliveryAddress(): bool { return true; } + + /** + * Check if all settings for the payment method are set. + * + * @param ConfigAdapter $configRepo + * @return bool + */ + public function validateSettings(ConfigAdapter $configRepo): bool + { + return true; + } } diff --git a/src/Methods/PaymentValidator.php b/src/Methods/PaymentValidator.php index de4e6def..e484bca3 100644 --- a/src/Methods/PaymentValidator.php +++ b/src/Methods/PaymentValidator.php @@ -6,6 +6,7 @@ use Payone\Helpers\AddressHelper; use Plenty\Modules\Basket\Contracts\BasketRepositoryContract; use Plenty\Modules\Basket\Models\Basket; +use Payone\Adapter\Config as ConfigAdapter; class PaymentValidator { @@ -42,7 +43,7 @@ public function __construct(BasketRepositoryContract $basket, AddressHelper $add * * @return bool */ - public function validate(PaymentAbstract $payment) + public function validate(PaymentAbstract $payment, ConfigAdapter $configRepo) { $basketAmount = $this->basket->basketAmount; if ($payment->getMinCartAmount() && $basketAmount < $payment->getMinCartAmount()) { @@ -60,7 +61,8 @@ public function validate(PaymentAbstract $payment) $billingAddress = $this->addressHelper->getBasketBillingAddress($this->basket); $deliveryAddress = $this->addressHelper->getBasketShippingAddress($this->basket); if (!$billingAddress) { - return false; + // TODO: shouldn't this be 'return false'? + return true; } $country = $billingAddress->country->isoCode2; @@ -73,6 +75,10 @@ public function validate(PaymentAbstract $payment) if (!$payment->canHandleDifferingDeliveryAddress() && $deliveryAddress && $billingAddress->id != $deliveryAddress->id) { return false; } + + if (!$payment->validateSettings($configRepo)) { + return false; + } return true; } diff --git a/src/Methods/PayoneInvoiceSecurePaymentMethod.php b/src/Methods/PayoneInvoiceSecurePaymentMethod.php index 12d20a04..0568c5f9 100644 --- a/src/Methods/PayoneInvoiceSecurePaymentMethod.php +++ b/src/Methods/PayoneInvoiceSecurePaymentMethod.php @@ -4,6 +4,8 @@ namespace Payone\Methods; +use Payone\Adapter\Config as ConfigAdapter; + /** * Class PayoneInvoiceSecurePaymentMethod */ @@ -20,4 +22,19 @@ public function canHandleDifferingDeliveryAddress(): bool { return false; } + + /** + * Check if all settings for the payment method are set. + * + * @param ConfigAdapter $configRepo + * @return bool + */ + public function validateSettings(ConfigAdapter $configRepo): bool + { + $portalId = $configRepo->get(self::PAYMENT_CODE . '.portalid'); + $key = $configRepo->get(self::PAYMENT_CODE . '.key'); + + // A separate portal ID and key must be set for this payment method + return (!empty($portalId) && !empty($key)); + } } From 9bb474346598ee04c5f820ef00745a415cafc32a Mon Sep 17 00:00:00 2001 From: Raphael Adam Date: Fri, 3 Jul 2020 13:21:08 +0200 Subject: [PATCH 094/353] check if currency is euro --- src/Methods/PaymentAbstract.php | 11 +++++++++++ src/Methods/PaymentValidator.php | 4 ++++ src/Methods/PayoneInvoiceSecurePaymentMethod.php | 11 +++++++++++ 3 files changed, 26 insertions(+) diff --git a/src/Methods/PaymentAbstract.php b/src/Methods/PaymentAbstract.php index 839869e1..c57f321e 100644 --- a/src/Methods/PaymentAbstract.php +++ b/src/Methods/PaymentAbstract.php @@ -208,4 +208,15 @@ public function validateSettings(ConfigAdapter $configRepo): bool { return true; } + + /** + * Is the payment method active for the given currency? + * + * @param $currency + * @return bool + */ + public function isActiveForCurrency($currency): bool + { + return true; + } } diff --git a/src/Methods/PaymentValidator.php b/src/Methods/PaymentValidator.php index e484bca3..be0f4a22 100644 --- a/src/Methods/PaymentValidator.php +++ b/src/Methods/PaymentValidator.php @@ -79,6 +79,10 @@ public function validate(PaymentAbstract $payment, ConfigAdapter $configRepo) if (!$payment->validateSettings($configRepo)) { return false; } + + if (!$payment->isActiveForCurrency($this->basket->currency)) { + return false; + } return true; } diff --git a/src/Methods/PayoneInvoiceSecurePaymentMethod.php b/src/Methods/PayoneInvoiceSecurePaymentMethod.php index 0568c5f9..d06a84c0 100644 --- a/src/Methods/PayoneInvoiceSecurePaymentMethod.php +++ b/src/Methods/PayoneInvoiceSecurePaymentMethod.php @@ -37,4 +37,15 @@ public function validateSettings(ConfigAdapter $configRepo): bool // A separate portal ID and key must be set for this payment method return (!empty($portalId) && !empty($key)); } + + /** + * Is the payment method active for the given currency? + * + * @param $currency + * @return bool + */ + public function isActiveForCurrency($currency): bool + { + return $currency == 'EUR'; + } } From 8c26703ed8ae28892f248c01b357f8c7a6626c74 Mon Sep 17 00:00:00 2001 From: Raphael Adam Date: Fri, 3 Jul 2020 15:19:32 +0200 Subject: [PATCH 095/353] change text --- resources/lib/PayoneApi/Request/Parts/CartFactory.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/lib/PayoneApi/Request/Parts/CartFactory.php b/resources/lib/PayoneApi/Request/Parts/CartFactory.php index d59b255d..c5a6a1f5 100644 --- a/resources/lib/PayoneApi/Request/Parts/CartFactory.php +++ b/resources/lib/PayoneApi/Request/Parts/CartFactory.php @@ -47,7 +47,7 @@ private static function calculateShipping(array $requestData, Cart $cart) 1, $basket['shippingAmount'], $taxRate, - 'shipping' + 'Porto & Versand' ); return $shippingCost; } From 584bf5b60bfa5a48f5b1de1959638c5388623123 Mon Sep 17 00:00:00 2001 From: Raphael Adam Date: Fri, 3 Jul 2020 15:42:59 +0200 Subject: [PATCH 096/353] change text --- resources/lib/PayoneApi/Request/Parts/CartFactory.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/lib/PayoneApi/Request/Parts/CartFactory.php b/resources/lib/PayoneApi/Request/Parts/CartFactory.php index c5a6a1f5..e8274afc 100644 --- a/resources/lib/PayoneApi/Request/Parts/CartFactory.php +++ b/resources/lib/PayoneApi/Request/Parts/CartFactory.php @@ -42,7 +42,7 @@ private static function calculateShipping(array $requestData, Cart $cart) } $shippingCost = new CartItem( (count($cart->getCartItems())+1), - 'shipping', + 'Shipping', CartItem::TYPE_SHIPMENt, 1, $basket['shippingAmount'], From 7ee8becad9d22a2c1493e0afac4f0f160c328329 Mon Sep 17 00:00:00 2001 From: Raphael Adam Date: Fri, 3 Jul 2020 15:48:56 +0200 Subject: [PATCH 097/353] change text --- resources/lib/PayoneApi/Request/Parts/CartFactory.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/lib/PayoneApi/Request/Parts/CartFactory.php b/resources/lib/PayoneApi/Request/Parts/CartFactory.php index e8274afc..b423f7ee 100644 --- a/resources/lib/PayoneApi/Request/Parts/CartFactory.php +++ b/resources/lib/PayoneApi/Request/Parts/CartFactory.php @@ -42,7 +42,7 @@ private static function calculateShipping(array $requestData, Cart $cart) } $shippingCost = new CartItem( (count($cart->getCartItems())+1), - 'Shipping', + '-', CartItem::TYPE_SHIPMENt, 1, $basket['shippingAmount'], From da42753550839fec7b08b607cf546ebf2653f3f4 Mon Sep 17 00:00:00 2001 From: Raphael Adam Date: Fri, 3 Jul 2020 16:27:45 +0200 Subject: [PATCH 098/353] set businessrelation field --- .../Request/GenericAuthRequestFactory.php | 3 ++- .../Managemandate/ManageMandateRequestFactory.php | 3 ++- resources/lib/PayoneApi/Request/Parts/Customer.php | 14 +++++++++++++- src/Providers/Api/Request/DataProviderAbstract.php | 7 +++++++ 4 files changed, 24 insertions(+), 3 deletions(-) diff --git a/resources/lib/PayoneApi/Request/GenericAuthRequestFactory.php b/resources/lib/PayoneApi/Request/GenericAuthRequestFactory.php index 47227211..782c2207 100644 --- a/resources/lib/PayoneApi/Request/GenericAuthRequestFactory.php +++ b/resources/lib/PayoneApi/Request/GenericAuthRequestFactory.php @@ -34,7 +34,8 @@ public static function create($requestType, $data) $customerData['birthday'], $customerData['language'], $customerData['gender'], - $customerData['ip'] + $customerData['ip'], + $customerData['businessrelation'] ?? 'b2c' ); $reference = isset($data['order']['orderId']) && $data['order']['orderId'] ? 'order-' . $data['order']['orderId'] : 'basket-' . $data['basket']['id']; diff --git a/resources/lib/PayoneApi/Request/Managemandate/ManageMandateRequestFactory.php b/resources/lib/PayoneApi/Request/Managemandate/ManageMandateRequestFactory.php index 237627d2..c037ad94 100644 --- a/resources/lib/PayoneApi/Request/Managemandate/ManageMandateRequestFactory.php +++ b/resources/lib/PayoneApi/Request/Managemandate/ManageMandateRequestFactory.php @@ -49,7 +49,8 @@ public static function create($paymentMethod, $data, $referenceId = null) $customerData['birthday'], $customerData['language'], $customerData['gender'], - $customerData['ip'] + $customerData['ip'], + $customerData['businessrelation'] ?? 'b2c' ); $basket = $data['basket']; diff --git a/resources/lib/PayoneApi/Request/Parts/Customer.php b/resources/lib/PayoneApi/Request/Parts/Customer.php index b4abbfca..0287205e 100644 --- a/resources/lib/PayoneApi/Request/Parts/Customer.php +++ b/resources/lib/PayoneApi/Request/Parts/Customer.php @@ -16,6 +16,7 @@ class Customer private $language; private $gender; private $ip; + private $businessrelation; /** * Customer constructor. @@ -30,6 +31,7 @@ class Customer * @param string $language * @param string $gender * @param string $ip + * @param string $businessrelation */ public function __construct( $title, @@ -41,7 +43,8 @@ public function __construct( $birthday, $language, $gender, - $ip + $ip, + $businessrelation = 'b2c' ) { $this->salutation = $gender == 'm' ? 'Herr' : 'Frau'; $this->title = $title; @@ -54,6 +57,7 @@ public function __construct( $this->language = $language; $this->gender = $gender; $this->ip = $ip; + $this->businessrelation = $businessrelation; } /** @@ -165,4 +169,12 @@ public function getIp() { return $this->ip; } + + /** + * @return string + */ + public function getBusinessrelation() + { + return $this->businessrelation; + } } diff --git a/src/Providers/Api/Request/DataProviderAbstract.php b/src/Providers/Api/Request/DataProviderAbstract.php index c91845e3..abe3f5eb 100644 --- a/src/Providers/Api/Request/DataProviderAbstract.php +++ b/src/Providers/Api/Request/DataProviderAbstract.php @@ -250,6 +250,13 @@ protected function getCustomerData(Address $addressObj, $customerId) $customerData['gender'] = 'f'; } + $taxIdNumber = $addressObj->taxIdNumber; + if (!empty($taxIdNumber)) { + $customerData['businessrelation'] = 'b2b'; + } else { + $customerData['businessrelation'] = 'b2c'; + } + return $customerData; } From 4ff1c91c0347f33d188d852894f76fb939ab4546 Mon Sep 17 00:00:00 2001 From: Daniel Marx Date: Mon, 6 Jul 2020 09:58:54 +0200 Subject: [PATCH 099/353] cleanup --- .../PayoneApi/Request/GetInvoice/RequestFactory.php | 4 ++-- resources/lib/doGetDocument.php | 2 +- src/Services/PaymentDocuments.php | 10 +++------- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/resources/lib/PayoneApi/Request/GetInvoice/RequestFactory.php b/resources/lib/PayoneApi/Request/GetInvoice/RequestFactory.php index 28d6ccb9..deac6130 100644 --- a/resources/lib/PayoneApi/Request/GetInvoice/RequestFactory.php +++ b/resources/lib/PayoneApi/Request/GetInvoice/RequestFactory.php @@ -13,14 +13,14 @@ class RequestFactory implements RequestFactoryContract /** * @param string $paymentMethod * @param array $data - * @param null $referenceId + * @param int|null $referenceId * * @return GetInvoice */ public static function create($paymentMethod, $data, $referenceId = null) { if ($paymentMethod != PaymentTypes::PAYONE_INVOICE_SECURE) { - throw new \Exception('get invoice only by secure invoice'); + throw new \Exception('Get invoice only for secure invoice'); } $context = $data['context']; $config = new Config( diff --git a/resources/lib/doGetDocument.php b/resources/lib/doGetDocument.php index 29ca81c0..1b4d88e5 100644 --- a/resources/lib/doGetDocument.php +++ b/resources/lib/doGetDocument.php @@ -31,7 +31,7 @@ $e->getTraceAsString() ); - return $errorResponse; + return $errorResponse->jsonSerialize(); } if (!$response->getSuccess()) { diff --git a/src/Services/PaymentDocuments.php b/src/Services/PaymentDocuments.php index 52199dea..0c8cb493 100644 --- a/src/Services/PaymentDocuments.php +++ b/src/Services/PaymentDocuments.php @@ -48,8 +48,6 @@ class PaymentDocuments private $logger; /** - * PaymentCreation constructor. - * * @param PaymentRepositoryContract $paymentRepository * @param PaymentHelper $paymentHelper * @param GetInvoiceDataProvider $getInvoiceDataProvider @@ -158,12 +156,10 @@ function () use ($orderId, $invoiceTotal) { } /** - * Imports one invoice. - * * @param int $orderId - * @param array $invoice - * @throws InvalidDocumentTypeException - * @throws \Plenty\Exceptions\ValidationException + * @param string $invoiceNumber + * @param string $content + * @param string $invoiceDate */ private function importInvoice(int $orderId, string $invoiceNumber, string $content, string $invoiceDate) { From b01e43e5486c6ee9f59e67a970cbed64a872258b Mon Sep 17 00:00:00 2001 From: Daniel Marx Date: Mon, 6 Jul 2020 10:16:48 +0200 Subject: [PATCH 100/353] cleanup --- .../Request/GetInvoice/GetInvoice.php | 18 ------------------ src/Models/PaymentConfig/ApiCredentials.php | 2 +- 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/resources/lib/PayoneApi/Request/GetInvoice/GetInvoice.php b/resources/lib/PayoneApi/Request/GetInvoice/GetInvoice.php index 4a22c36e..7f63f868 100644 --- a/resources/lib/PayoneApi/Request/GetInvoice/GetInvoice.php +++ b/resources/lib/PayoneApi/Request/GetInvoice/GetInvoice.php @@ -67,24 +67,6 @@ public function getInfo() return $this->info; } - /** - * Getter for Sequencenumber - */ - public function getSequencenumber() - { - return null; - } - - /** - * Getter for Amount - * - * @return int - */ - public function getAmount() - { - return null; - } - /** * Getter for InvoiceTitle * diff --git a/src/Models/PaymentConfig/ApiCredentials.php b/src/Models/PaymentConfig/ApiCredentials.php index 2e4b1bff..3f4568b8 100644 --- a/src/Models/PaymentConfig/ApiCredentials.php +++ b/src/Models/PaymentConfig/ApiCredentials.php @@ -22,7 +22,7 @@ public function __construct( } /** - * @param null $paymentCode + * @param int|null $paymentCode * @return string */ public function getKey($paymentCode = null) From 24c7616049a9c3fa6220cd5b6b3fcef73c54253a Mon Sep 17 00:00:00 2001 From: Raphael Adam Date: Tue, 7 Jul 2020 09:34:41 +0200 Subject: [PATCH 101/353] add changelog and increase version --- meta/documents/changelog_de.md | 5 ++++- meta/documents/changelog_en.md | 5 ++++- plugin.json | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/meta/documents/changelog_de.md b/meta/documents/changelog_de.md index eca40612..fc902a0a 100644 --- a/meta/documents/changelog_de.md +++ b/meta/documents/changelog_de.md @@ -1,6 +1,9 @@ # Release Notes für PAYONE -## 1.1.13 (2020-06-04) +## 1.1.13 (2020-07-07) +### Hinzugefügt +- Zahlungsart "Secure Invoice" hinzugefügt + ### Geändert - Icon für das Backend hinzugefügt diff --git a/meta/documents/changelog_en.md b/meta/documents/changelog_en.md index 19a225b0..27d78643 100644 --- a/meta/documents/changelog_en.md +++ b/meta/documents/changelog_en.md @@ -1,6 +1,9 @@ # Release Notes for PAYONE -## 1.1.13 (2020-06-04) +## 1.1.13 (2020-07-07) +### Added +- Payment method "Secure Invoice" added + ### Geändert - Added Icon for the backend diff --git a/plugin.json b/plugin.json index 452cf363..8e948b3d 100644 --- a/plugin.json +++ b/plugin.json @@ -1,5 +1,5 @@ { - "version": "1.1.12", + "version": "1.1.13", "license":"MIT", "pluginIcon":"icon_plugin_xs.png", "price":0.0, From 156cfcc2b79c3578f6786d15ea437f48dc9d2940 Mon Sep 17 00:00:00 2001 From: Daniel Marx Date: Tue, 7 Jul 2020 14:33:49 +0200 Subject: [PATCH 102/353] add docu --- src/Services/PaymentDocuments.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Services/PaymentDocuments.php b/src/Services/PaymentDocuments.php index 0c8cb493..38f82ff2 100644 --- a/src/Services/PaymentDocuments.php +++ b/src/Services/PaymentDocuments.php @@ -69,6 +69,13 @@ public function __construct( $this->logger = $logger; } + /** + * @param string $txid + * @param string $invoiceId + * @param string $invoiceDate + * @param float $invoiceTotal + * @throws \Exception + */ public function uploadDocument($txid, $invoiceId, $invoiceDate, $invoiceTotal) { $this->logger->setIdentifier(__METHOD__); From 912548af6fd7b91218b019373003ef3bad5499e6 Mon Sep 17 00:00:00 2001 From: Daniel Marx Date: Tue, 7 Jul 2020 15:00:11 +0200 Subject: [PATCH 103/353] add docu --- src/Controllers/StatusController.php | 2 +- src/Services/PaymentDocuments.php | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Controllers/StatusController.php b/src/Controllers/StatusController.php index bffff083..0d979865 100644 --- a/src/Controllers/StatusController.php +++ b/src/Controllers/StatusController.php @@ -94,7 +94,7 @@ public function index() if ($txaction === 'invoice') { $this ->paymentDocument - ->uploadDocument($txid, + ->addInvoiceToOrder($txid, $this->request->get('invoiceid'), $this->request->get('invoice_date'), $this->request->get('invoice_grossamount')); diff --git a/src/Services/PaymentDocuments.php b/src/Services/PaymentDocuments.php index 38f82ff2..be3ac0e7 100644 --- a/src/Services/PaymentDocuments.php +++ b/src/Services/PaymentDocuments.php @@ -70,13 +70,15 @@ public function __construct( } /** + * This function loads the invoice / credit documents from payone. The OrderId is determined over the taxid. + * * @param string $txid * @param string $invoiceId * @param string $invoiceDate * @param float $invoiceTotal * @throws \Exception */ - public function uploadDocument($txid, $invoiceId, $invoiceDate, $invoiceTotal) + public function addInvoiceToOrder($txid, $invoiceId, $invoiceDate, $invoiceTotal) { $this->logger->setIdentifier(__METHOD__); From bad7ddde3a19cbddb3b7b2c5b2643f988d72088f Mon Sep 17 00:00:00 2001 From: Daniel Marx Date: Tue, 7 Jul 2020 17:04:10 +0200 Subject: [PATCH 104/353] update user guild --- meta/documents/changelog_de.md | 6 ++++-- meta/documents/changelog_en.md | 4 +++- meta/documents/user_guide_de.md | 33 +++++++++++++++++---------------- meta/documents/user_guide_en.md | 33 +++++++++++++++++---------------- plugin.json | 2 +- 5 files changed, 42 insertions(+), 36 deletions(-) diff --git a/meta/documents/changelog_de.md b/meta/documents/changelog_de.md index eca40612..3ad7ae82 100644 --- a/meta/documents/changelog_de.md +++ b/meta/documents/changelog_de.md @@ -1,8 +1,10 @@ # Release Notes für PAYONE -## 1.1.13 (2020-06-04) +## 1.1.13 (2020-07-07 +) ### Geändert - Icon für das Backend hinzugefügt +- User Guide aktualisiert ## 1.1.12 (2020-03-09) @@ -58,7 +60,7 @@ - Die Zahlungsart Amazon Pay wurde für das Backend hinzugefügt. ### Behoben -- Einige Medlungen im Log +- Einige Meldungen im Log ## 1.1.3 (2019-06-13) diff --git a/meta/documents/changelog_en.md b/meta/documents/changelog_en.md index 19a225b0..4fc57538 100644 --- a/meta/documents/changelog_en.md +++ b/meta/documents/changelog_en.md @@ -1,8 +1,10 @@ # Release Notes for PAYONE -## 1.1.13 (2020-06-04) +## 1.1.13 (2020-07-07) + ### Geändert - Added Icon for the backend +- Updated user guide ## 1.1.12 (2020-03-09) diff --git a/meta/documents/user_guide_de.md b/meta/documents/user_guide_de.md index 51da26a8..3fcbcfff 100644 --- a/meta/documents/user_guide_de.md +++ b/meta/documents/user_guide_de.md @@ -8,31 +8,32 @@ Das plentymarkets PAYONE Plugin bietet Ihnen Zugang zu internationalen und lokal Aktuell beinhaltet das Plugin die folgenden Zahlungsarten: -* Rechnung -* Gesicherte Rechnung -* Paydirekt -* Payolution Ratenzahlung -* PayPal -* RatePay Ratenzahlung -* Sofortüberweisung -* Vorkasse -* Kreditkarte -* Nachnahme -* Lastschrift +* Gesicherter Rechnungskauf +* Visa & MasterCard (inkl. Maestro) +* American Express - Anbindung Ihres bestehenden Akzeptanzvertrages +* SEPA Lastschrift +* giropay - Online-Überweisung Deutschland +* Sofortüberweisung - Online-Überweisung international +* Überweisung - Vorkasse & Rechnung & Nachnahme +* PayPal - Anbindung Ihres PayPal-Accounts +* Amazon Pay - Anbindung Ihres Amazon Pay-Accounts (In Kürze verfügbar!) ## Erste Schritte - +Für die Nutzung benötigen Sie einen PAYONE Account und die PAYONE Zugangsdaten. Wenn Sie noch kein PAYONE Kunde sind und demnach keinen PAYONE Account besitzen, wenden Sie sich bitte an: -Kontaktieren Sie uns:
PSG Projektmanagement GmbH
Meergässle 4
89180 Berghülen
Telefon: 07344-9592588
E-Mail: plenty@psg-projektmanagement.de
-Internet: http://www.psg-projektmanagement.de +Internet: http://www.psg-projektmanagement.de
+Oder nutzen Sie folgendes Anmeldeformular
+https://www.psg-projektmanagement.de/payone-plentymarkets/ + + Nach Erhalt der Zugangsdaten loggen Sie sich im PAYONE Merchant Interface ein und nehmen die folgenden Einstellungen vor. diff --git a/meta/documents/user_guide_en.md b/meta/documents/user_guide_en.md index 060461ed..00c8775d 100644 --- a/meta/documents/user_guide_en.md +++ b/meta/documents/user_guide_en.md @@ -8,31 +8,32 @@ The plentymarkets PAYONE plugin offers you access to international as well as lo The plugin currently offers the following payment methods: -* Invoice -* Secure invoice -* Paydirekt -* Payolution Payment in installments -* PayPal -* RatePay Payment in installments -* Sofortüberweisung -* Cash in advance -* Credit card -* Cash on Delivery -* Debit +* Secure Invoice +* Visa & MasterCard (incl. Maestro) +* American Express - Integration of your existing acceptance contract +* SEPA direct debit +* giropay - online bank transfer Germany +* Sofortüberweisung - Online bank transfer international +* Transfer - Cash in advance & Invoice & Cash on Delivery +* PayPal - Integration of your PayPal account +* Amazon Pay - Integration of your Amazon Pay accounts (Available soon!) ## First steps - +The use requires a PAYONE account as well as PAYONE access data. If you are not a PAYONE customer yet and thus do not have a PAYONE account, please contact: -Contact us:
Meergässle 4
89180 Berghülen
Phone: 07344-9592588
E-mail: plenty@psg-projektmanagement.de
-Website: http://www.psg-projektmanagement.de +Website: http://www.psg-projektmanagement.de
+Or use the following registration form:
+https://www.psg-projektmanagement.de/payone-plentymarkets/ + + Upon receipt of your access data, log in to the PAYONE merchant interface and carry out the following settings. diff --git a/plugin.json b/plugin.json index 452cf363..8e948b3d 100644 --- a/plugin.json +++ b/plugin.json @@ -1,5 +1,5 @@ { - "version": "1.1.12", + "version": "1.1.13", "license":"MIT", "pluginIcon":"icon_plugin_xs.png", "price":0.0, From 95581958e7cb401cf93efd53688a501228b45975 Mon Sep 17 00:00:00 2001 From: Daniel Marx Date: Tue, 7 Jul 2020 17:10:46 +0200 Subject: [PATCH 105/353] update user guild --- meta/documents/changelog_de.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta/documents/changelog_de.md b/meta/documents/changelog_de.md index 3ad7ae82..f023c731 100644 --- a/meta/documents/changelog_de.md +++ b/meta/documents/changelog_de.md @@ -1,7 +1,7 @@ # Release Notes für PAYONE -## 1.1.13 (2020-07-07 -) +## 1.1.13 (2020-07-07) + ### Geändert - Icon für das Backend hinzugefügt - User Guide aktualisiert From e2fbf22da4f5a807efee646e8ad3237f59c8fdb2 Mon Sep 17 00:00:00 2001 From: jawendel Date: Thu, 9 Jul 2020 13:11:47 +0200 Subject: [PATCH 106/353] Documentation: updated user guides - User Guides (De and En) updated - added: Hinweis zum Gesicherten Rechnungskauf --- meta/documents/user_guide_de.md | 167 +++++++++++++++++--------------- meta/documents/user_guide_en.md | 36 ++++--- 2 files changed, 113 insertions(+), 90 deletions(-) diff --git a/meta/documents/user_guide_de.md b/meta/documents/user_guide_de.md index 3fcbcfff..f99c09a7 100644 --- a/meta/documents/user_guide_de.md +++ b/meta/documents/user_guide_de.md @@ -2,25 +2,25 @@ Das PAYONE Plugin ist für die Nutzung mit dem Webshop Ceres entwickelt und funktioniert nur mit dessen Logikstruktur oder anderen Template-Plugins. Zur Nutzung des PAYONE Plugins müssen die Plugins IO und Ceres aktiviert sein. -# PAYONE Payment für plentymarkets 7 +# PAYONE Payment für plentymarkets -Das plentymarkets PAYONE Plugin bietet Ihnen Zugang zu internationalen und lokalen Zahlungsarten. Gleichzeitig haben Sie Zugriff auf ein integriertes Risikomanagement, automatisierte Gutschriften und schnelle Retourenabwicklung. +Das plentymarkets PAYONE Plugin bietet Zugang zu internationalen und lokalen Zahlungsarten. Gleichzeitig hast du Zugriff auf ein integriertes Risikomanagement, automatisierte Gutschriften und schnelle Retourenabwicklung. Aktuell beinhaltet das Plugin die folgenden Zahlungsarten: -* Gesicherter Rechnungskauf -* Visa & MasterCard (inkl. Maestro) -* American Express - Anbindung Ihres bestehenden Akzeptanzvertrages -* SEPA Lastschrift +* Gesicherter Rechnungskauf +* Visa & MasterCard (inkl. Maestro) +* American Express - Anbindung Ihres bestehenden Akzeptanzvertrages +* SEPA Lastschrift * giropay - Online-Überweisung Deutschland * Sofortüberweisung - Online-Überweisung international * Überweisung - Vorkasse & Rechnung & Nachnahme * PayPal - Anbindung Ihres PayPal-Accounts -* Amazon Pay - Anbindung Ihres Amazon Pay-Accounts (In Kürze verfügbar!) +* Amazon Pay - Anbindung Ihres Amazon Pay-Accounts (In Kürze verfügbar!) ## Erste Schritte -Für die Nutzung benötigen Sie einen PAYONE Account und die PAYONE Zugangsdaten. Wenn Sie noch kein PAYONE Kunde sind und demnach keinen PAYONE Account besitzen, wenden Sie sich bitte an: +Für die Nutzung benötigst du einen PAYONE Account und die PAYONE Zugangsdaten. Wenn du noch kein PAYONE Kunde bist und demnach keinen PAYONE Account besitzt, wende dich bitte an: PSG Projektmanagement GmbH
Meergässle 4
@@ -28,39 +28,39 @@ Meergässle 4
Telefon: 07344-9592588
E-Mail: plenty@psg-projektmanagement.de
Internet: http://www.psg-projektmanagement.de
-Oder nutzen Sie folgendes Anmeldeformular
+Oder nutze folgendes Anmeldeformular
https://www.psg-projektmanagement.de/payone-plentymarkets/ -Nach Erhalt der Zugangsdaten loggen Sie sich im PAYONE Merchant Interface ein und nehmen die folgenden Einstellungen vor. +Nach Erhalt der Zugangsdaten loggst du dich im PAYONE Merchant Interface ein und nimmst die folgenden Einstellungen vor. ##### Einstellungen im PAYONE Merchant Interface vornehmen: -1. Öffnen Sie das Menü **Konfiguration » Zahlungsportale**. -2. Öffnen Sie das Tab **Erweitert** des Zahlungsportals Ihres Shops. -3. Tragen Sie im Feld **TransactionStatusURL** eine URL nach dem Schema **DOMAIN/payment/payone/status** ein. Den Platzhalter **DOMAIN** durch die URL zu Ihrem Webshop ersetzen. -4. Wählen Sie als **Verfahren Hashwert-Prüfung** die Option **md5 oder sha2-384 (für Migration)**. -5. **Speichern** Sie die Einstellungen. +1. Öffne das Menü **Konfiguration » Zahlungsportale**. +2. Öffne das Tab **Erweitert** des Zahlungsportals deines Shops. +3. Trage im Feld **TransactionStatusURL** eine URL nach dem Schema **DOMAIN/payment/payone/status** ein. Den Platzhalter **DOMAIN** durch die URL zu deinem Webshop ersetzen. +4. Wähle als **Verfahren Hashwert-Prüfung** die Option **md5 oder sha2-384 (für Migration)**. +5. **Speichere** die Einstellungen. -Aktivieren Sie die gewünschten PAYONE-Zahlungsarten in Ihrem plentymarkets Backend einmalig im Menü **System » Systemeinstellungen » Aufträge » Zahlung » Zahlungsarten**. Weitere Informationen dazu finden Sie auf der Handbuchseite
Zahlungsarten verwalten . +Aktiviere die gewünschten PAYONE-Zahlungsarten in deinem plentymarkets Backend einmalig im Menü **Einrichtung » Aufträge » Zahlung » Zahlungsarten**. Weitere Informationen dazu findest du auf der Handbuchseite Zahlungsarten verwalten . -Stellen Sie zudem sicher, dass die Zahlungsart unter dem Punkt **Erlaubte Zahlungsarten** in den Kundenklassen vorhanden ist und nicht im Bereich **Gesperrte Zahlungsarten** in den Versandprofilen aufgeführt ist. +Stelle zudem sicher, dass die Zahlungsart unter dem Punkt **Erlaubte Zahlungsarten** in den Kundenklassen vorhanden ist und nicht im Bereich **Gesperrte Zahlungsarten** in den Versandprofilen aufgeführt ist. ## Einrichtung des Plugins -Die folgenden Einrichtungsschritte für das plentymarkets PAYONE Plugins erfolgen direkt in der Plugin-Übersicht Ihres plentymarkets Systems. Gehen Sie dazu wie im Folgenden beschrieben vor. +Die folgenden Einrichtungsschritte für das plentymarkets PAYONE Plugin erfolgen direkt in der Plugin-Übersicht deines plentymarkets-Systems. Gehe dazu wie im Folgenden beschrieben vor. ##### Grundeinstellungen vornehmen: -1. Öffnen Sie das Menü **Plugins » Plugin-Übersicht**. -2. Klicken Sie in der Liste der Plugins auf den Namen des Plugins **PAYONE**. +1. Öffne das Menü **Plugins » Plugin-Übersicht**. +2. Klicke in der Liste der Plugins auf den Namen des Plugins **PAYONE**. → Die Detailansicht des Plugins öffnet sich. -3. Öffnen Sie den Menüpunkt **Konfiguration**. -4. Klicken Sie auf **Grundeinstellungen**. Nehmen Sie die Einstellungen anhand der Informationen in Tabelle 1 vor. -5. **Speichern** Sie die Einstellungen. +3. Öffne den Menüpunkt **Konfiguration**. +4. Klicke auf **Grundeinstellungen**. Nimm die Einstellungen anhand der Informationen in Tabelle 1 vor. +5. **Speichere** die Einstellungen.
- Tab. 6: Event procedure for automatically refunding BS PAYONE payments + Tab. 6: Event procedure for automatically refunding PAYONE payments
@@ -78,7 +78,7 @@ Die folgenden Einrichtungsschritte für das plentymarkets PAYONE Plugins erfolge Merchant ID @@ -86,7 +86,7 @@ Die folgenden Einrichtungsschritte für das plentymarkets PAYONE Plugins erfolge Portal ID @@ -94,7 +94,7 @@ Die folgenden Einrichtungsschritte für das plentymarkets PAYONE Plugins erfolge Account ID @@ -102,7 +102,7 @@ Die folgenden Einrichtungsschritte für das plentymarkets PAYONE Plugins erfolge Schlüssel @@ -110,7 +110,7 @@ Die folgenden Einrichtungsschritte für das plentymarkets PAYONE Plugins erfolge Modus @@ -118,8 +118,8 @@ Die folgenden Einrichtungsschritte für das plentymarkets PAYONE Plugins erfolge Art der Autorisierung @@ -127,14 +127,14 @@ Die folgenden Einrichtungsschritte für das plentymarkets PAYONE Plugins erfolge ### Zahlungsarten einrichten -Im Folgenden legen Sie fest, welche PAYONE-Zahlungsarten Ihren Kunden im Webshop zur Verfügung stehen sollen. Außerdem nehmen Sie für die festgelegten Zahlungsarten genauere Einstellungen vor. Gehen Sie dazu wie im Folgenden beschrieben vor. +Im Folgenden legst du fest, welche PAYONE-Zahlungsarten deinen Kunden im Webshop zur Verfügung stehen sollen. Außerdem nimmst du für die festgelegten Zahlungsarten genauere Einstellungen vor. Gehe dazu wie im Folgenden beschrieben vor. ##### Zahlungsarten einrichten: -1. Öffnen Sie den Menüpunkt **Konfiguration** in der Detailansicht des Plugins. -2. Klicken Sie auf den Menüpunkt der Zahlungsart. Nehmen Sie die Einstellungen anhand der Informationen in Tabelle 2 vor. -5. **Speichern** Sie die Einstellungen. +1. Öffne den Menüpunkt **Konfiguration** in der Detailansicht des Plugins. +2. Klicke auf den Menüpunkt der Zahlungsart. Nimm die Einstellungen anhand der Informationen in Tabelle 2 vor. +5. **Speichere** die Einstellungen.
Tab. 1: Grundeinstellungen vornehmen
- Geben Sie hier die Kundennummer ein, die Sie bei der Registrierung bei PAYONE erhalten haben. + Gib hier die Kundennummer ein, die du bei der Registrierung bei PAYONE erhalten hast.
- Geben Sie hier die ID des Zahlungsportals ein, die Sie bei der Registrierung bei PAYONE erhalten haben. + Gib hier die ID des Zahlungsportals ein, die du bei der Registrierung bei PAYONE erhalten hast.
- Geben Sie hier die Account-ID ein, die Sie bei der Registrierung bei PAYONE erhalten haben. + Gib hier die Account-ID ein, die du bei der Registrierung bei PAYONE erhalten hast.
- Geben Sie hier den Schlüssel ein, den Sie bei der Registrierung bei PAYONE erhalten haben. + Gib hier den Schlüssel ein, den du bei der Registrierung bei PAYONE erhalten hast.
- Wahlen Sie zwischen den Optionen Test und Live. Wir empfehlen, während der Einrichtung des Plugins den Testmodus zu wählen. Währenddessen ist die Zahlungsart noch nicht in Ihrem Webshop verfügbar. Nach erfolgter Einrichtung wechseln Sie in den Livemodus und machen somit die Zahlungsart in Ihrem Webshop sichtbar. + Wähle zwischen den Optionen Test und Live. Wir empfehlen, während der Einrichtung des Plugins den Testmodus zu wählen. Währenddessen ist die Zahlungsart noch nicht in deinem Webshop verfügbar. Nach erfolgter Einrichtung wechsele in den Livemodus und mach somit die Zahlungsart in deinem Webshop sichtbar.
- Vorautorisierung: Wählen Sie diese Option, wenn der Zahlungseinzug beim Käufer nur vorgemerkt werden soll. Der Zahlungseinzug erfolgt dann durch eine Ereignisaktion, die beim Warenausgang ausgelöst werden muss (siehe Tabelle 5).
- Autorisierung:: Wählen Sie diese Option, wenn der Zahlungseinzug beim Käufer sofort stattfinden soll. Der Zahlungseingang wird somit direkt nach dem Kaufabschluss im Webshop in Ihrem plentymarkets System gebucht. + Vorautorisierung: Wähle diese Option, wenn der Zahlungseinzug beim Käufer nur vorgemerkt werden soll. Der Zahlungseinzug erfolgt dann durch eine Ereignisaktion, die beim Warenausgang ausgelöst werden muss (siehe Tabelle 5).
+ Autorisierung:: Wähle diese Option, wenn der Zahlungseinzug beim Käufer sofort stattfinden soll. Der Zahlungseingang wird somit direkt nach dem Kaufabschluss im Webshop in deinem plentymarkets-System gebucht.
@@ -152,7 +152,7 @@ Im Folgenden legen Sie fest, welche PAYONE-Zahlungsarten Ihren Kunden im Webshop Aktiv @@ -160,7 +160,7 @@ Im Folgenden legen Sie fest, welche PAYONE-Zahlungsarten Ihren Kunden im Webshop Name @@ -168,7 +168,7 @@ Im Folgenden legen Sie fest, welche PAYONE-Zahlungsarten Ihren Kunden im Webshop Beschreibung @@ -176,7 +176,7 @@ Im Folgenden legen Sie fest, welche PAYONE-Zahlungsarten Ihren Kunden im Webshop Minimaler Bestellwert @@ -184,7 +184,7 @@ Im Folgenden legen Sie fest, welche PAYONE-Zahlungsarten Ihren Kunden im Webshop Maximaler Bestellwert @@ -192,7 +192,7 @@ Im Folgenden legen Sie fest, welche PAYONE-Zahlungsarten Ihren Kunden im Webshop Erlaubte Lieferländer @@ -216,7 +216,7 @@ Im Folgenden legen Sie fest, welche PAYONE-Zahlungsarten Ihren Kunden im Webshop Minimale Kartengültigkeit in Tagen @@ -248,41 +248,46 @@ Im Folgenden legen Sie fest, welche PAYONE-Zahlungsarten Ihren Kunden im Webshop Erlaubte Kartentypen
Tab. 2: Zahlungsarten einrichten
- Wählen Sie die Option Ja, um die Zahlungsart zu aktivieren und somit im Webshop anzubieten.
Wählen Sie die Option Nein, wenn die Zahlungsart deaktiviert werden und damit nicht zur Verfügung stehen soll. + Wähle die Option Ja, um die Zahlungsart zu aktivieren und somit im Webshop anzubieten.
Wähle die Option Nein, wenn die Zahlungsart deaktiviert werden und damit nicht zur Verfügung stehen soll.
- Geben Sie einen Namen für die Zahlungsart ein. Dieser Name ist für Ihre Kunden im Webshop sichtbar. + Gib einen Namen für die Zahlungsart ein. Dieser Name ist für deine Kunden im Webshop sichtbar.
- Geben Sie einen Beschreibungstext für die Zahlungsart ein. Dieser Text ist für Ihre Kunden im Webshop sichtbar. + Gib einen Beschreibungstext für die Zahlungsart ein. Dieser Text ist für deine Kunden im Webshop sichtbar.
- Geben Sie einen minimalen Bestellwert ein, ab dem die Zahlungsart im Webshop verfügbar sein soll. + Gib einen minimalen Bestellwert ein, ab dem die Zahlungsart im Webshop verfügbar sein soll.
- Geben Sie einen maximalen Bestellwert ein, bis zu dem die Zahlungsart im Webshop verfügbar sein soll. Wird dieser Wert überschritten, ist die Zahlungsart nicht mehr verfügbar. + Gib einen maximalen Bestellwert ein, bis zu dem die Zahlungsart im Webshop verfügbar sein soll. Wird dieser Wert überschritten, ist die Zahlungsart nicht mehr verfügbar.
- Geben Sie kommasepariert die Lieferländer aus, für die die Zahlungsart verfügbar sein soll. + Gib kommasepariert die Lieferländer aus, für die die Zahlungsart verfügbar sein soll.
- Geben Sie die erforderliche minimale Kartengültigkeit an, über die eine Kreditkarte verfügen muss, um für die Zahlungsart akzeptiert zu werden. + Gib die erforderliche minimale Kartengültigkeit an, über die eine Kreditkarte verfügen muss, um für die Zahlungsart akzeptiert zu werden.
- Aktivieren Sie die Kartentypen, die für die Zahlungsart akzeptiert werden sollen. + Aktiviere die Kartentypen, die für die Zahlungsart akzeptiert werden sollen.
+**Hinweis**: Für die Zahlungsart **Gesicherter Rechnungskauf** sind eine eigene **Portal-ID** sowie ein eigener **Schlüssel** notwendig. Diese Portal-ID und dieser Schlüssel müssen im Plugin unter **Gesicherte Rechnung** bei der Konfiguration separat hinterlegt werden. Die Portal-ID und den Schlüssel erhältst du über das PAYONE Merchant Interface über das Menü **Konfiguration » Zahlungsportale**. + ## Ceres-Checkout anpassen -Als Nächstes ist eine Anpassung im Ceres Checkout notwendig, damit Ihre Kunden bei Bezahlvorgängen mit PAYONE ihr Geburtsdatum (nur für den gesicherten Rechnungskauf) korrekt eingeben können. +Als Nächstes ist eine Anpassung im Ceres Checkout notwendig, damit deine Kunden bei Bezahlvorgängen mit PAYONE ihr Geburtsdatum (nur für den gesicherten Rechnungskauf) korrekt eingeben können. ##### Ceres-Checkout anpassen für den gesicherten Rechnungskauf: -1. Öffnen Sie das Menü **Plugins » Plugin-Übersicht**.
→ Die Plugin-Übersicht wird geöffnet. -2. Klicken Sie auf **Ceres**.
→ Das Plugin wird geöffnet. -3. Klicken Sie im Verzeichnisbaum auf **Konfiguration**. -4. Wechseln Sie in das Tab **Kaufabwicklung und Mein Konto.** -5. Klappen Sie den Bereich **Rechnungsadressfelder im Adressformular anzeigen (DE)** auf. -6. Aktivieren Sie über die Checkbox die Option **Geburtsdatum**. -7. **Speichern** Sie die Einstellungen.
Im Checkout wird Ihren Kunden nun ein Feld zur Eingabe des Geburtsdatums angezeigt. +1. Öffne das Menü **Plugins » Plugin-Übersicht**.
+→ Die Plugin-Übersicht wird geöffnet. +2. Klicke auf **Ceres**.
+→ Das Plugin wird geöffnet. +3. Klicke im Verzeichnisbaum auf **Konfiguration**. +4. Wechsele in das Tab **Kaufabwicklung und Mein Konto.** +5. Klappe den Bereich **Rechnungsadressfelder im Adressformular anzeigen (DE)** auf. +6. Aktiviere über die Checkbox die Option **Geburtsdatum**. +7. **Speichere** die Einstellungen.
Im Checkout wird deinen Kunden nun ein Feld zur Eingabe des Geburtsdatums angezeigt. ## Template-Container verknüpfen -Für die Zahlungsart PAYONE stehen Ihnen verschiedene Möglichkeiten zur Verfügung, um sie in Ihrem Webshop einzubinden. +Für die Zahlungsart PAYONE stehen dir verschiedene Möglichkeiten zur Verfügung, um sie in deinem Webshop einzubinden. Hierfür sind in den Templates in plentymarkets an relevanten Stellen Container hinterlegt, mit denen zur Individualisierung Contents verknüpft werden. ##### Container verknüpfen: -1. Öffnen Sie das Menü **CMS » Container-Verknüpfungen**. -2. Wählen Sie den gewünschten Content, der verknüpft werden soll. -3. Wählen Sie einen oder mehrere Container, in denen der zuvor gewählte Content dargestellt werden soll. Beachten Sie dazu die Erläuterungen in Tabelle 4. -4. **Speichern** Sie die Einstellungen.
→ Die Contents sind mit den Containern verknüpft. +1. Öffne das Menü **CMS » Container-Verknüpfungen**. +2. Wähle den gewünschten Content, der verknüpft werden soll. +3. Wähle einen oder mehrere Container, in denen der zuvor gewählte Content dargestellt werden soll. Beachte dazu die Erläuterungen in Tabelle 4. +4. **Speichere** die Einstellungen.
+→ Die Contents sind mit den Containern verknüpft. @@ -300,7 +305,7 @@ Hierfür sind in den Templates in plentymarkets an relevanten Stellen Container Payone Order Confirmation Page Payment Data @@ -308,7 +313,7 @@ Hierfür sind in den Templates in plentymarkets an relevanten Stellen Container Payone Checkout JS @@ -316,20 +321,23 @@ Hierfür sind in den Templates in plentymarkets an relevanten Stellen Container ## Automatische Versandbestätigung an PAYONE senden -Richten Sie eine Ereignisaktion ein, um eine automatische Versandbestätigung an PAYONE zu senden, sobald Sie den Auftrag versendet haben. +Richte eine Ereignisaktion ein, um eine automatische Versandbestätigung an PAYONE zu senden, sobald du den Auftrag versendet hast. -**Hinweis:** Die Einrichtung dieser Ereignisaktion ist zwingend notwendig, wenn als **Art der Autorisierung** die Option **Vorautorisierung** gewählt wurde (siehe Tabelle 1). Haben Sie die Option **Autorisierung** gewählt, ist diese Ereignisaktion nicht nutzbar und nicht notwendig. +**Hinweis:** Die Einrichtung dieser Ereignisaktion ist zwingend notwendig, wenn als **Art der Autorisierung** die Option **Vorautorisierung** gewählt wurde (siehe Tabelle 1). Hast du die Option **Autorisierung** gewählt, ist diese Ereignisaktion nicht nutzbar und nicht notwendig. ##### Ereignisaktion einrichten: -1. Öffnen Sie das Menü **System » Aufträge » Ereignisaktionen**. -2. Klicken Sie auf **Ereignisaktion hinzufügen**.
→ Das Fenster **Neue Ereignisaktion erstellen** wird geöffnet. -3. Geben Sie einen Namen ein. -4. Wählen Sie das Ereignis gemäß Tabelle 5. -5. **Speichern** Sie die Einstellungen.
→ Die Ereignisaktion wird angelegt. -6. Nehmen Sie die weiteren Einstellungen gemäß Tabelle 5 vor. -7. Setzen Sie ein Häkchen bei **Aktiv**. -8. **Speichern** Sie die Einstellungen.
→ Die Ereignisaktion wird gespeichert. +1. Öffne das Menü **System » Aufträge » Ereignisaktionen**. +2. Klicke auf **Ereignisaktion hinzufügen**.
+→ Das Fenster **Neue Ereignisaktion erstellen** wird geöffnet. +3. Gib einen Namen ein. +4. Wähle das Ereignis gemäß Tabelle 5. +5. **Speichere** die Einstellungen.
+→ Die Ereignisaktion wird angelegt. +6. Nimm die weiteren Einstellungen gemäß Tabelle 5 vor. +7. Setze ein Häkchen bei **Aktiv**. +8. **Speichere** die Einstellungen.
+→ Die Ereignisaktion wird gespeichert.
Tab. 4: Container verknüpfen
- Verknüpfen Sie diesen Content mit dem Container Order confirmation: Additional payment information, um die PAYONE-Zahlungsarten auf der Bestellbestätigungsseite im Webshop anzuzeigen. + Verknüpfe diesen Content mit dem Container Order confirmation: Additional payment information, um die PAYONE-Zahlungsarten auf der Bestellbestätigungsseite im Webshop anzuzeigen.
- Verknüpfen Sie diesen Content mit dem Container Script loader: After script loaded, um die PAYONE-Zahlungsarten während der Kaufabwicklung im Webshop anzuzeigen. + Verknüpfe diesen Content mit dem Container Script loader: After script loaded, um die PAYONE-Zahlungsarten während der Kaufabwicklung im Webshop anzuzeigen.
@@ -369,18 +377,21 @@ Richten Sie eine Ereignisaktion ein, um eine automatische Versandbestätigung an ## PAYONE-Zahlung automatisch zurückzahlen -Richten Sie eine Ereignisaktion ein, um die Rückzahlung einer Zahlung über PAYONE zu automatisieren. +Richte eine Ereignisaktion ein, um die Rückzahlung einer Zahlung über PAYONE zu automatisieren. ##### Ereignisaktion einrichten: -1. Öffnen Sie das Menü **System » Aufträge » Ereignisaktionen**. -2. Klicken Sie auf **Ereignisaktion hinzufügen**.
→ Das Fenster **Neue Ereignisaktion erstellen** wird geöffnet. -3. Geben Sie einen Namen ein. -4. Wählen Sie das Ereignis gemäß Tabelle 6. -5. **Speichern** Sie die Einstellungen.
→ Die Ereignisaktion wird angelegt. -6. Nehmen Sie die weiteren Einstellungen gemäß Tabelle 6 vor. -7. Setzen Sie ein Häkchen bei **Aktiv**. -8. **Speichern** Sie die Einstellungen.
→ Die Ereignisaktion wird gespeichert. +1. Öffne das Menü **System » Aufträge » Ereignisaktionen**. +2. Klicke auf **Ereignisaktion hinzufügen**.
+→ Das Fenster **Neue Ereignisaktion erstellen** wird geöffnet. +3. Gib einen Namen ein. +4. Wähle das Ereignis gemäß Tabelle 6. +5. **Speichere** die Einstellungen.
+→ Die Ereignisaktion wird angelegt. +6. Nimm die weiteren Einstellungen gemäß Tabelle 6 vor. +7. Setze ein Häkchen bei **Aktiv**. +8. **Speichere** die Einstellungen.
+→ Die Ereignisaktion wird gespeichert.
diff --git a/meta/documents/user_guide_en.md b/meta/documents/user_guide_en.md index 00c8775d..20b392c4 100644 --- a/meta/documents/user_guide_en.md +++ b/meta/documents/user_guide_en.md @@ -2,7 +2,7 @@ The PAYONE plugin has been developed for use with the online store Ceres and only works with its structure or other template plugins. The plugins Ceres and IO have to be activated so that the Payone plugin can be used. -# PAYONE Payment for plentymarkets 7 +# PAYONE Payment for plentymarkets The plentymarkets PAYONE plugin offers you access to international as well as local payment methods. In addition, the plugin offers the advantages of an integrated risk management system, automated refunds and swift processing of returns. @@ -45,7 +45,7 @@ Upon receipt of your access data, log in to the PAYONE merchant interface and ca 4. For the option **Method hash calculation**, select the option **md5 or sha2-384 (during migration)**. 5. **Save** the settings. -In your plentymarkets back end, activate the payment method once in the **System » System Settings » Orders » Payment » Methods** menu. More information on carrying out this setting is available on the Managing payment methods page of the manual. +In your plentymarkets back end, activate the payment method once in the **Setup » Orders » Payment » Methods** menu. More information on carrying out this setting is available on the Managing payment methods page of the manual. In addition, make sure that the payment method is included among the Permitted payment methods in the customer classes and that it is not listed among the Blocked payment methods in the shipping profiles. @@ -56,7 +56,8 @@ The following steps for setting up the plentymarkets PAYONE plugin are carried o ##### Carrying out the basic settings 1. Go to **Plugin » Plugin overview**. -2. In the plugin list, click on the name of the plugin **PAYONE**.
→ The detail view of the plugin opens. +2. In the plugin list, click on the name of the plugin **PAYONE**.
+→ The detail view of the plugin opens. 3. Open the menu entry **Configuration**. 4. Click on **Basic settings**. Carry out the settings according to the information provided in table 1. 5. **Save** the settings. @@ -252,6 +253,8 @@ In the following, you select the PAYONE payment methods that should be available
+**Note**: You need a separate **Portal ID** and **Key** for the payment method **Secure Invoice**. This Portal-ID and this key have to be deposited in the plugin while configuring it. You get the Portal ID and the Key via the PAYONE Merchant Interface in the **Configuration » Payment portals** menu. + ## Adjusting the Ceres checkout In the next step, an adjustment to your Ceres checkout settings is necessary. These adjustments need to be made so that customers using PAYONE for payment processes can enter their date of birth (for secure invoice only) correctly. @@ -262,8 +265,10 @@ In the next step, an adjustment to your Ceres checkout settings is necessary. Th ##### Adjusting the Ceres checkout for secure invoice: -1. Go to **Plugins » Plugin overview**.
→ The plugin overview opens. -2. Click on **Ceres**.
→ The plugin opens. +1. Go to **Plugins » Plugin overview**.
+→ The plugin overview opens. +2. Click on **Ceres**.
+→ The plugin opens. 3. Click on **Configuration** in the directory tree. 4. Click on the **Checkout and My account** tab. 5. Open the **Show invoice address fields in the address form (DE)** area. @@ -279,7 +284,8 @@ You have multiple options to integrate the payment method PAYONE into your onlin 1. Go to **CMS » Container links**. 2. Select the content that should be linked. 3. Select one or more containers in which the previously selected content should be displayed. Pay attention to the information provided in table 4. -4. **Save** the settings.
→ The content is linked to the containers +4. **Save** the settings.
+→ The content is linked to the containers @@ -320,13 +326,16 @@ Set up an event procedure to send an automatic shipping confirmation to PAYONE a ##### Setting up an event procedure: 1. Go to **System » Orders » Events**. -2. Click on **Add event procedure**.
→ The **Create new event procedure** window opens. +2. Click on **Add event procedure**.
+→ The **Create new event procedure** window opens. 3. Enter a name. 4. Select the event according to table 5. -5. **Save** the settings.
→ The event procedure is created. +5. **Save** the settings.
+→ The event procedure is created. 6. Carry out the further settings according to table 5. 7. Place a check mark next to the option **Active**. -8. **Save** the settings.
→ The event procedure is saved. +8. **Save** the settings.
+→ The event procedure is saved.
Tab. 4: Linking template containers
@@ -371,13 +380,16 @@ Set up an event procedure to automatically refund a PAYONE payment. ##### Setting up an event procedure: 1. Go to **System » Orders » Events**. -2. Click on **Add event procedure**.
→ The **Create new event procedure** window opens. +2. Click on **Add event procedure**.
+→ The **Create new event procedure** window opens. 3. Enter a name. 4. Select the event according to table 6. -5. **Save** the settings.
→ The event procedure is created. +5. **Save** the settings.
+→ The event procedure is created. 6. Carry out the further settings according to table 6. 7. Place a check mark next to the option **Active**. -8. **Save** the settings.
→ The event procedure is saved. +8. **Save** the settings.
+→ The event procedure is saved.
From 54cfb8e96e5a937fb73281daf9d7eda74c80f55a Mon Sep 17 00:00:00 2001 From: jawendel Date: Fri, 31 Jul 2020 08:04:30 +0200 Subject: [PATCH 107/353] Update User Guide MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - neuer Menüpfad für Containerverknüpfungen hinzugefügt (DE und EN) --- meta/documents/user_guide_de.md | 15 +++++++++------ meta/documents/user_guide_en.md | 13 ++++++++----- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/meta/documents/user_guide_de.md b/meta/documents/user_guide_de.md index f99c09a7..bb90bdc7 100644 --- a/meta/documents/user_guide_de.md +++ b/meta/documents/user_guide_de.md @@ -32,7 +32,7 @@ Oder nutze folgendes Anmeldeformular
https://www.psg-projektmanagement.de/payone-plentymarkets/ Nach Erhalt der Zugangsdaten loggst du dich im PAYONE Merchant Interface ein und nimmst die folgenden Einstellungen vor. @@ -283,11 +283,14 @@ Hierfür sind in den Templates in plentymarkets an relevanten Stellen Container ##### Container verknüpfen: -1. Öffne das Menü **CMS » Container-Verknüpfungen**. -2. Wähle den gewünschten Content, der verknüpft werden soll. -3. Wähle einen oder mehrere Container, in denen der zuvor gewählte Content dargestellt werden soll. Beachte dazu die Erläuterungen in Tabelle 4. -4. **Speichere** die Einstellungen.
-→ Die Contents sind mit den Containern verknüpft. +1. Öffne das Menü **Plugins » Plugin-Set-Übersicht**. +2. Öffne das Plugin-Set, das du bearbeiten möchtest. +3. Öffne die **Einstellungen** des Payone-Plugins. +4. Klicke auf **Container-Verknüpfungen**. +5. Wähle aus der Dropdown-Liste den Datenanbieter aus, den du verknüpfen möchtest. +6. Wähle den Container aus, mit dem du den Datenanbieter verknüpfen möchtest. Beachte dazu die Erläuterungen in Tabelle 4. +7. Wiederhole Schritte 5 und 6 für alle Datenanbieter, die due verknüpfen möchtest. +8. **Speichere** die Einstellungen. diff --git a/meta/documents/user_guide_en.md b/meta/documents/user_guide_en.md index 20b392c4..3f2971b4 100644 --- a/meta/documents/user_guide_en.md +++ b/meta/documents/user_guide_en.md @@ -281,11 +281,14 @@ You have multiple options to integrate the payment method PAYONE into your onlin ##### Linking template containers: -1. Go to **CMS » Container links**. -2. Select the content that should be linked. -3. Select one or more containers in which the previously selected content should be displayed. Pay attention to the information provided in table 4. -4. **Save** the settings.
-→ The content is linked to the containers +1. Go to Plugins » Plugin set overview. +2. Open the plugin set you want to edit. +3. Open the Settings of the Payone plugin. +4. Click on Container links. +5. From the drop-down list, select the data provider you want to link. +6. Select the container you want to link the data provider to. Pay attention to the information provided in table 4. +7. Repeat steps 5 and 6 for all data providers you want to link. +8. Save the settings.
Tab. 4: Container verknüpfen
From 6f659486fa31e8735d359b0dca9a520d8da42b40 Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Fri, 4 Sep 2020 13:53:14 +0200 Subject: [PATCH 108/353] added amazonpay login-widget logics --- config.json | 63 ++++++++++++++++- resources/lib/doGetConfiguration.php | 52 ++++++++++++++ resources/views/Checkout/AmazonPayLogin.twig | 26 +++++++ src/Controllers/CheckoutController.php | 64 +++++++++++++++++ src/Models/Api/GetConfigurationResponse.php | 68 +++++++++++++++++++ .../Api/GetConfigurationResponseFactory.php | 28 ++++++++ src/Providers/PayoneRouteServiceProvider.php | 2 + src/Services/Api.php | 10 +++ 8 files changed, 312 insertions(+), 1 deletion(-) create mode 100644 resources/lib/doGetConfiguration.php create mode 100644 resources/views/Checkout/AmazonPayLogin.twig create mode 100644 src/Models/Api/GetConfigurationResponse.php create mode 100644 src/Models/Api/GetConfigurationResponseFactory.php diff --git a/config.json b/config.json index af155b1d..4c1e8496 100644 --- a/config.json +++ b/config.json @@ -828,6 +828,67 @@ } } } + }, + "Config.AmazonPay": { + "label": "Config.AmazonPayTab", + "formFields": { + "PAYONE_PAYONE_AMAZON_PAY.active": { + "type": "selectBox", + "required": false, + "label": "Config.PAYONEPAYONEAMAZONPAYActiveLabel", + "options": { + "defaultValue": "1", + "selectBoxValues": [ + { + "value": "0", + "caption": "Config.PAYONEPAYONEAMAZONPAYActivePossibleValue0" + }, + { + "value": "1", + "caption": "Config.PAYONEPAYONEAMAZONPAYActivePossibleValue1" + } + ] + } + }, + "PAYONE_PAYONE_AMAZON_PAY.name": { + "type": "inputText", + "required": false, + "label": "Config.PAYONEPAYONEAMAZONPAYNameLabel", + "options": { + "defaultValue": "Amazon Pay" + } + }, + "PAYONE_PAYONE_AMAZON_PAY.description": { + "type": "inputText", + "required": false, + "label": "Config.PAYONEPAYONEAMAZONPAYDescriptionLabel", + "options": {} + }, + "PAYONE_PAYONE_AMAZON_PAY.minCartAmount": { + "type": "inputText", + "required": false, + "label": "Config.PAYONEPAYONEAMAZONPAYMinCartAmountLabel", + "options": { + "defaultValue": "0" + } + }, + "PAYONE_PAYONE_AMAZON_PAY.maxCartAmount": { + "type": "inputText", + "required": false, + "label": "Config.PAYONEPAYONEAMAZONPAYMaxCartAmountLabel", + "options": { + "defaultValue": "2000" + } + }, + "PAYONE_PAYONE_AMAZON_PAY.allowedCountries": { + "type": "inputText", + "required": false, + "label": "Config.PAYONEPAYONEAMAZONPAYAllowedCountriesLabel", + "options": { + "defaultValue": "DE,AT,CH" + } + } + } } } -} \ No newline at end of file +} diff --git a/resources/lib/doGetConfiguration.php b/resources/lib/doGetConfiguration.php new file mode 100644 index 00000000..bb1ceaf9 --- /dev/null +++ b/resources/lib/doGetConfiguration.php @@ -0,0 +1,52 @@ +doRequest($request); +} catch (Exception $e) { + $errorResponse = new ClientErrorResponse( + 'SdkRestApi error: ' . $e->getMessage() . PHP_EOL . + 'Lib version: ' . Version::getVersion() . PHP_EOL . + $e->getTraceAsString() + ); + + return $errorResponse->jsonSerialize(); +} + +if (!$response->getSuccess()) { + $errorResponse = new ClientErrorResponse( + 'Request successful but response invalid. ' . PHP_EOL . + 'Lib version: ' . Version::getVersion() . PHP_EOL . + 'Message: ' . $response->getErrorMessage() . PHP_EOL . + 'Request was : ' . json_encode($serializer->serialize($request), JSON_PRETTY_PRINT) . PHP_EOL . + 'Response was: ' . json_encode($serializer->serialize($response), JSON_PRETTY_PRINT) + ); + + return $errorResponse->jsonSerialize(); +} + +return $response->jsonSerialize(); diff --git a/resources/views/Checkout/AmazonPayLogin.twig b/resources/views/Checkout/AmazonPayLogin.twig new file mode 100644 index 00000000..4432d085 --- /dev/null +++ b/resources/views/Checkout/AmazonPayLogin.twig @@ -0,0 +1,26 @@ +{% if content|trim is empty %} + +{% else %} +
+{% endif %} diff --git a/src/Controllers/CheckoutController.php b/src/Controllers/CheckoutController.php index 9aacf3b3..92995041 100644 --- a/src/Controllers/CheckoutController.php +++ b/src/Controllers/CheckoutController.php @@ -14,11 +14,13 @@ use Payone\Models\PaymentCache; use Payone\Models\SepaMandateCache; use Payone\PluginConstants; +use Payone\Services\Api; use Payone\Services\PaymentService; use Payone\Services\SepaMandate; use Payone\Validator\CardExpireDate; use Payone\Views\ErrorMessageRenderer; use Plenty\Modules\Basket\Contracts\BasketRepositoryContract; +use Plenty\Modules\Webshop\Contracts\LocalizationRepositoryContract; use Plenty\Plugin\Controller; use Plenty\Plugin\Http\Request; use Plenty\Plugin\Http\Response; @@ -292,6 +294,46 @@ public function redirectWithNotice( return $this->response->redirectTo('checkout'); } + public function getAmazonPayLoginWidget(Twig $twig) + { + /** @var Api $api */ + $api = pluginApp(Api::class); + /*$response = $api->doLibCall(Api::REQUEST_TYPE_CONFIGURATION, [ + "paymentMethod" => "Amazon Pay", + "clearingtype" => "wlt", + "wallettype" => "amz" + ]);*/ + + $response = $api->doGetConfiguration([ + "paymentMethod" => "Amazon Pay", + "clearingtype" => "wlt", + "wallettype" => "amz" + ]); + + /** @var LocalizationRepositoryContract $localizationRepositoryContract */ + $localizationRepositoryContract = pluginApp(LocalizationRepositoryContract::class); + $lang = $this->getLanguageCode($localizationRepositoryContract->getLanguage()); + + $content = [ + 'clientId' => 2323, + 'sellerId' => 23232, + 'type' => "LwA", + 'color' => "Gold", + 'size' => "medium", + 'language' => $lang, + 'scopes' => "payments:widget", + 'popup' => "true", + 'redirectUrl' => "", + ]; + + $twig->render(PluginConstants::NAME . '::Checkout.AmazonPayLogin', $content); + } + + public function swapAmazonPayWidgets() + { + // SWAP containers here + } + /** * @param null $data * @@ -315,4 +357,26 @@ private function getJsonErrors($errors) return $this->response->json($data, Response::HTTP_BAD_REQUEST); } + + + private function getLanguageCode(string $lang): string + { + switch($lang){ + case "de": + $lang = "de-De"; + break; + case "en": + $lang = "en-GB"; + break; + case "es": + $lang = "es-ES"; + break; + case "fr": + $lang = "fr-FR"; + break; + default: + $lang = "en-GB"; + } + return $lang; + } } diff --git a/src/Models/Api/GetConfigurationResponse.php b/src/Models/Api/GetConfigurationResponse.php new file mode 100644 index 00000000..aca9d571 --- /dev/null +++ b/src/Models/Api/GetConfigurationResponse.php @@ -0,0 +1,68 @@ +success = $success; + $this->errorMessage = $errorMessage; + $this->clientId = $clientId; + $this->sellerId = $sellerId; + $this->workorderId = $workorderId; + return $this; + } + + public function jsonSerialize(): array + { + return parent::jsonSerialize() + + [ + 'clientId' => $this->clientId, + 'sellerId' => $this->sellerId, + 'workorderId' => $this->workorderId, + ]; + } + + /** + * @return string + */ + public function getClientId(): string + { + return $this->clientId; + } + + /** + * @return string + */ + public function getSellerId(): string + { + return $this->sellerId; + } + + /** + * @return string + */ + public function getWorkorderId(): string + { + return $this->workorderId; + } + +} diff --git a/src/Models/Api/GetConfigurationResponseFactory.php b/src/Models/Api/GetConfigurationResponseFactory.php new file mode 100644 index 00000000..09030cd0 --- /dev/null +++ b/src/Models/Api/GetConfigurationResponseFactory.php @@ -0,0 +1,28 @@ +init( + $responseData['success'] ?? false, + $responseData['errormessage'] ?? '', + $responseData['responseData']['add_paydata[client_id]'] ?? '', + $responseData['responseData']['add_paydata[seller_id]'] ?? '', + $responseData['responseData']['workorderid'] ?? '' + ); + } +} diff --git a/src/Providers/PayoneRouteServiceProvider.php b/src/Providers/PayoneRouteServiceProvider.php index d7dda8b6..481fdeef 100644 --- a/src/Providers/PayoneRouteServiceProvider.php +++ b/src/Providers/PayoneRouteServiceProvider.php @@ -21,6 +21,8 @@ public function map(Router $router) $router->post('payment/payone/checkout/doAuth', 'Payone\Controllers\CheckoutController@doAuth'); $router->post('payment/payone/checkout/storeCCCheckResponse', 'Payone\Controllers\CheckoutController@storeCCCheckResponse'); $router->post('payment/payone/checkout/storeAccountData', 'Payone\Controllers\CheckoutController@storeAccountData'); + $router->get('payment/payone/checkout/amazonPayWidget', 'Payone\Controllers\CheckoutController@getAmazonPayLoginWidget'); + $router->get('payment/payone/checkout/swapAmazonPayWidgets', 'Payone\Controllers\CheckoutController@swapAmazonPayWidgets'); $router->get('payment/payone/error', 'Payone\Controllers\CheckoutController@redirectWithNotice'); $router->get('payment/payone/checkoutSuccess', 'Payone\Controllers\CheckoutController@checkoutSuccess'); $router->get('payment/payone/checkout/getSepaMandateStep', 'Payone\Controllers\CheckoutController@getSepaMandateStep'); diff --git a/src/Services/Api.php b/src/Services/Api.php index 1233bbf2..dd37e05e 100644 --- a/src/Services/Api.php +++ b/src/Services/Api.php @@ -5,6 +5,7 @@ use Payone\Adapter\Logger; use Payone\Models\Api\AuthResponse; use Payone\Models\Api\AuthResponseFactory; +use Payone\Models\Api\GetConfigurationResponseFactory; use Payone\Models\Api\GetInvoiceResponse; use Payone\Models\Api\GetInvoiceResponseFactory; use Payone\Models\Api\ManagemandateResponse; @@ -34,6 +35,7 @@ class Api const REQUEST_TYPE_DEBIT = 'Debit'; const REQUEST_TYPE_MANAGEMANDATE = 'Managemandate'; const REQUEST_TYPE_INVOICE = 'GetDocument'; + const REQUEST_TYPE_CONFIGURATION = 'GetConfiguration'; /** * @var LibraryCallContract @@ -227,6 +229,14 @@ public function doGetInvoice($requestParams): GetInvoiceResponse return $responseObject; } + public function doGetConfiguration($requestParams) + { + $response = $this->doLibCall((self::REQUEST_TYPE_CONFIGURATION), $requestParams); + //$responseObject = GetConfigurationResponseFactory::create($response); + return $response; + //$responseObject; + } + /** * @param string $call request type * @param $requestParams From 49723b1cf658ce673f27d2c7be9bd1468ddff1b9 Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Fri, 4 Sep 2020 17:41:48 +0200 Subject: [PATCH 109/353] added data-provider + scripts --- plugin.json | 27 +++++++++------- .../views/Checkout/AmazonPayCheckout.twig | 23 +++++++++++++ src/Controllers/CheckoutController.php | 6 ++-- .../DataProviders/AmazonPayIntegration.php | 32 +++++++++++++++++++ 4 files changed, 74 insertions(+), 14 deletions(-) create mode 100644 resources/views/Checkout/AmazonPayCheckout.twig create mode 100644 src/Providers/DataProviders/AmazonPayIntegration.php diff --git a/plugin.json b/plugin.json index df3f69f3..1a7629d1 100644 --- a/plugin.json +++ b/plugin.json @@ -33,15 +33,20 @@ "Payone\\Migrations\\CreateAmazonPayPaymentMethod" ], "dataProviders": [ - { - "key":"Payone\\Providers\\DataProviders\\ConfirmationAdditionalPaymentData", - "name":"Payone Order Confirmation Page Payment Data", - "description": "Block to display additional payment data on order success page." - }, - { - "key":"Payone\\Providers\\DataProviders\\Javascript", - "name":"Payone Checkout JS", - "description": "Block to integrate the payone payments into checkout" - } -] + { + "key": "Payone\\Providers\\DataProviders\\ConfirmationAdditionalPaymentData", + "name": "Payone Order Confirmation Page Payment Data", + "description": "Block to display additional payment data on order success page." + }, + { + "key": "Payone\\Providers\\DataProviders\\Javascript", + "name": "Payone Checkout JS", + "description": "Block to integrate the payone payments into checkout" + }, + { + "key": "Payone\\Providers\\DataProviders\\AmazonPayIntegration", + "name": "Payone Checkout Amazon Pay Integration", + "description": "Block to integrate the Amazon Login, as well as the Widgets for Amazon Pay" + } + ] } diff --git a/resources/views/Checkout/AmazonPayCheckout.twig b/resources/views/Checkout/AmazonPayCheckout.twig new file mode 100644 index 00000000..1615d20f --- /dev/null +++ b/resources/views/Checkout/AmazonPayCheckout.twig @@ -0,0 +1,23 @@ +{% if services.template.isCurrentTemplate('tpl.checkout') %} + +{% endif %} diff --git a/src/Controllers/CheckoutController.php b/src/Controllers/CheckoutController.php index 92995041..2b4e229a 100644 --- a/src/Controllers/CheckoutController.php +++ b/src/Controllers/CheckoutController.php @@ -315,8 +315,8 @@ public function getAmazonPayLoginWidget(Twig $twig) $lang = $this->getLanguageCode($localizationRepositoryContract->getLanguage()); $content = [ - 'clientId' => 2323, - 'sellerId' => 23232, + 'clientId' => "32322", + 'sellerId' => "23232", 'type' => "LwA", 'color' => "Gold", 'size' => "medium", @@ -326,7 +326,7 @@ public function getAmazonPayLoginWidget(Twig $twig) 'redirectUrl' => "", ]; - $twig->render(PluginConstants::NAME . '::Checkout.AmazonPayLogin', $content); + return $twig->render(PluginConstants::NAME . '::Checkout.AmazonPayLogin', $content); } public function swapAmazonPayWidgets() diff --git a/src/Providers/DataProviders/AmazonPayIntegration.php b/src/Providers/DataProviders/AmazonPayIntegration.php new file mode 100644 index 00000000..560e7ce4 --- /dev/null +++ b/src/Providers/DataProviders/AmazonPayIntegration.php @@ -0,0 +1,32 @@ +load(); + $selectedPaymentId = $basket->methodOfPaymentId; + $amazonPayMopId = $paymentHelper->getMopId(PayoneAmazonPayPaymentMethod::PAYMENT_CODE); + + + return $twig->render( + PluginConstants::NAME . '::Checkout.AmazonPayCheckout', + [ + 'currentPaymentId' => $selectedPaymentId, + 'amazonPayMopId' => $amazonPayMopId + ]); + } +} From 159149802d483ab28e99e5a1c1ce446d88c34144 Mon Sep 17 00:00:00 2001 From: Jens Konopka Date: Mon, 7 Sep 2020 09:26:30 +0200 Subject: [PATCH 110/353] add payone banner --- meta/documents/user_guide_de.md | 1 + meta/documents/user_guide_en.md | 1 + 2 files changed, 2 insertions(+) diff --git a/meta/documents/user_guide_de.md b/meta/documents/user_guide_de.md index 51da26a8..ab368af3 100644 --- a/meta/documents/user_guide_de.md +++ b/meta/documents/user_guide_de.md @@ -1,6 +1,7 @@ +![Payone Banner][https://www.psg-projektmanagement.de/wp-content/uploads/2020/08/payone-aktion.jpg] # PAYONE Payment für plentymarkets 7 diff --git a/meta/documents/user_guide_en.md b/meta/documents/user_guide_en.md index 060461ed..d48c5bfa 100644 --- a/meta/documents/user_guide_en.md +++ b/meta/documents/user_guide_en.md @@ -1,6 +1,7 @@ +![Payone Banner][https://www.psg-projektmanagement.de/wp-content/uploads/2020/08/payone-aktion.jpg] # PAYONE Payment for plentymarkets 7 From e9357f9e6ee8d05a3bfcf1927789a99828aeee4e Mon Sep 17 00:00:00 2001 From: Jens Konopka Date: Mon, 7 Sep 2020 09:47:54 +0200 Subject: [PATCH 111/353] fix autoloading --- resources/lib/doAuth.php | 2 +- resources/lib/doCapture.php | 2 +- resources/lib/doDebit.php | 2 +- resources/lib/doGetConfiguration.php | 2 +- resources/lib/doGetDocument.php | 2 +- resources/lib/doManagemandate.php | 2 +- resources/lib/doPreAuth.php | 2 +- resources/lib/doRefund.php | 2 +- resources/lib/vendor/autoload.php | 2 +- resources/lib/vendor/composer/autoload_real.php | 8 ++++---- resources/lib/vendor/composer/autoload_static.php | 6 +++--- 11 files changed, 16 insertions(+), 16 deletions(-) diff --git a/resources/lib/doAuth.php b/resources/lib/doAuth.php index ebc41091..7619b1ad 100644 --- a/resources/lib/doAuth.php +++ b/resources/lib/doAuth.php @@ -1,5 +1,5 @@ = 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); if ($useStaticLoader) { require_once __DIR__ . '/autoload_static.php'; - call_user_func(\Composer\Autoload\ComposerStaticInite0e92804b3676dcad52f71f8933f242a::getInitializer($loader)); + call_user_func(\Composer\Autoload\ComposerStaticInit06768f1d3a106595ac0033464aae4c58::getInitializer($loader)); } else { $map = require __DIR__ . '/autoload_namespaces.php'; foreach ($map as $namespace => $path) { diff --git a/resources/lib/vendor/composer/autoload_static.php b/resources/lib/vendor/composer/autoload_static.php index e5a0ebfc..38f6f032 100644 --- a/resources/lib/vendor/composer/autoload_static.php +++ b/resources/lib/vendor/composer/autoload_static.php @@ -4,7 +4,7 @@ namespace Composer\Autoload; -class ComposerStaticInite0e92804b3676dcad52f71f8933f242a +class ComposerStaticInit06768f1d3a106595ac0033464aae4c58 { public static $prefixLengthsPsr4 = array ( 'P' => @@ -23,8 +23,8 @@ class ComposerStaticInite0e92804b3676dcad52f71f8933f242a public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInite0e92804b3676dcad52f71f8933f242a::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInite0e92804b3676dcad52f71f8933f242a::$prefixDirsPsr4; + $loader->prefixLengthsPsr4 = ComposerStaticInit06768f1d3a106595ac0033464aae4c58::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInit06768f1d3a106595ac0033464aae4c58::$prefixDirsPsr4; }, null, ClassLoader::class); } From 22969cca687b15317d3d8ee0705fb486c3dc3b86 Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Tue, 8 Sep 2020 08:52:05 +0200 Subject: [PATCH 112/353] added generic call logic for amazon pay config + added amazon login --- resources/css/payone-amazonpay.css | 45 ++++++++ .../Genericpayment/AmazonPayConfiguration.php | 105 ++++++++++++++++++ .../GetConfigurationRequestFactory.php | 41 +++++++ resources/lib/PayoneApi/Request/Types.php | 1 + resources/lib/doGetConfiguration.php | 10 +- .../Checkout/AmazonPayAdressBookWidget.twig | 1 + .../views/Checkout/AmazonPayCheckout.twig | 2 + resources/views/Checkout/AmazonPayLogin.twig | 54 +++++---- src/Controllers/CheckoutController.php | 29 +++-- .../Request/GenericPaymentDataProvider.php | 26 +++++ src/Services/Api.php | 14 ++- 11 files changed, 282 insertions(+), 46 deletions(-) create mode 100644 resources/css/payone-amazonpay.css create mode 100644 resources/lib/PayoneApi/Request/Genericpayment/AmazonPayConfiguration.php create mode 100644 resources/lib/PayoneApi/Request/Genericpayment/GetConfigurationRequestFactory.php create mode 100644 resources/views/Checkout/AmazonPayAdressBookWidget.twig create mode 100644 src/Providers/Api/Request/GenericPaymentDataProvider.php diff --git a/resources/css/payone-amazonpay.css b/resources/css/payone-amazonpay.css new file mode 100644 index 00000000..d2226b2e --- /dev/null +++ b/resources/css/payone-amazonpay.css @@ -0,0 +1,45 @@ +/* +Include the min-width, max-width, min-height +and max-height if you plan to use a relative CSS unit +measurement to make sure the widget renders in the +optimal size allowed. +*/ + +#addressBookWidgetDiv { + min-width: 300px; + width: 100%; + max-width: 900px; + min-height: 228px; + height: 240px; + max-height: 400px; +} + +#walletWidgetDiv { + min-width: 300px; + width: 100%; + max-width: 900px; + min-height: 228px; + height: 240px; + max-height: 400px; +} + + +/* The following are required only when you use the read-only widgets: */ + +#readOnlyAddressBookWidgetDiv { + min-width: 266px; + width: 100%; + max-width: 900px; + min-height: 145px; + height: 165px; + max-height: 180px; +} + +#readOnlyWalletWidgetDiv { + min-width: 266px; + width: 100%; + max-width: 900px; + min-height: 145px; + height: 165px; + max-height: 180px; +} diff --git a/resources/lib/PayoneApi/Request/Genericpayment/AmazonPayConfiguration.php b/resources/lib/PayoneApi/Request/Genericpayment/AmazonPayConfiguration.php new file mode 100644 index 00000000..e6b0caf0 --- /dev/null +++ b/resources/lib/PayoneApi/Request/Genericpayment/AmazonPayConfiguration.php @@ -0,0 +1,105 @@ + 'getconfiguration']; + + private $currency; + + /** + * @var Config + */ + private $config; + /** + * @var SystemInfo + */ + private $info; + + /** + * ManageMandate constructor. + * + * @param Config $config + * @param SystemInfo $info + * @param string $currency + */ + public function __construct( + Config $config, + SystemInfo $info, + string $currency + ) + { + $this->config = $config; + $this->info = $info; + $this->currency = $currency; + } + + /** + * @return string + */ + public function getRequest(): string + { + return $this->request; + } + + /** + * @return string + */ + public function getClearingtype(): string + { + return $this->clearingtype; + } + + /** + * @return string + */ + public function getWallettype(): string + { + return $this->wallettype; + } + + /** + * @return array + */ + public function getAddPaydata(): array + { + return $this->add_paydata; + } + + /** + * @return string + */ + public function getCurrency(): string + { + return $this->currency; + } + + /** + * @return Config + */ + public function getConfig(): Config + { + return $this->config; + } + + /** + * @return SystemInfo + */ + public function getInfo(): SystemInfo + { + return $this->info; + } + +} diff --git a/resources/lib/PayoneApi/Request/Genericpayment/GetConfigurationRequestFactory.php b/resources/lib/PayoneApi/Request/Genericpayment/GetConfigurationRequestFactory.php new file mode 100644 index 00000000..fb86d316 --- /dev/null +++ b/resources/lib/PayoneApi/Request/Genericpayment/GetConfigurationRequestFactory.php @@ -0,0 +1,41 @@ + diff --git a/resources/views/Checkout/AmazonPayCheckout.twig b/resources/views/Checkout/AmazonPayCheckout.twig index 1615d20f..d16e1e75 100644 --- a/resources/views/Checkout/AmazonPayCheckout.twig +++ b/resources/views/Checkout/AmazonPayCheckout.twig @@ -1,4 +1,6 @@ {% if services.template.isCurrentTemplate('tpl.checkout') %} +
+ -{% else %} -
-{% endif %} + OffAmazonPayments.Button('LoginWithAmazon', '{{ content.sellerId }}', { + type: '{{ content.type }}', + color: '{{ content.color }}', + size: '{{ content.size }}', + language: '{{ content.language }}', + + authorization: function () { + loginOptions = {scope: '{{ content.scopes }}', popup: {{ content.popup }}}; + authRequest = amazon.Login.authorize(loginOptions, '{{ content.redirectUrl }}'); + }, + onError: function (error) { + // your error handling code. + console.log("The following error occurred: " + + error.getErrorCode() + + ' - ' + error.getErrorMessage()); + } + }); + } + + + diff --git a/src/Controllers/CheckoutController.php b/src/Controllers/CheckoutController.php index 2b4e229a..bb02959f 100644 --- a/src/Controllers/CheckoutController.php +++ b/src/Controllers/CheckoutController.php @@ -14,11 +14,13 @@ use Payone\Models\PaymentCache; use Payone\Models\SepaMandateCache; use Payone\PluginConstants; +use Payone\Providers\Api\Request\GenericPaymentDataProvider; use Payone\Services\Api; use Payone\Services\PaymentService; use Payone\Services\SepaMandate; use Payone\Validator\CardExpireDate; use Payone\Views\ErrorMessageRenderer; +use PayoneApi\Request\PaymentTypes; use Plenty\Modules\Basket\Contracts\BasketRepositoryContract; use Plenty\Modules\Webshop\Contracts\LocalizationRepositoryContract; use Plenty\Plugin\Controller; @@ -298,35 +300,30 @@ public function getAmazonPayLoginWidget(Twig $twig) { /** @var Api $api */ $api = pluginApp(Api::class); - /*$response = $api->doLibCall(Api::REQUEST_TYPE_CONFIGURATION, [ - "paymentMethod" => "Amazon Pay", - "clearingtype" => "wlt", - "wallettype" => "amz" - ]);*/ - - $response = $api->doGetConfiguration([ - "paymentMethod" => "Amazon Pay", - "clearingtype" => "wlt", - "wallettype" => "amz" - ]); + + /** @var GenericPaymentDataProvider $genericPaymentDataProvider */ + $genericPaymentDataProvider = pluginApp(GenericPaymentDataProvider::class); + $requestParams = $genericPaymentDataProvider->getGetConfigRequestData("Amazon Pay"); + + $configResponse = $api->doGetConfiguration($requestParams); /** @var LocalizationRepositoryContract $localizationRepositoryContract */ $localizationRepositoryContract = pluginApp(LocalizationRepositoryContract::class); $lang = $this->getLanguageCode($localizationRepositoryContract->getLanguage()); $content = [ - 'clientId' => "32322", - 'sellerId' => "23232", + 'clientId' => $configResponse->getClientId(), + 'sellerId' => $configResponse->getSellerId(), 'type' => "LwA", 'color' => "Gold", 'size' => "medium", 'language' => $lang, 'scopes' => "payments:widget", 'popup' => "true", - 'redirectUrl' => "", + 'redirectUrl' => "https://test.de", ]; - return $twig->render(PluginConstants::NAME . '::Checkout.AmazonPayLogin', $content); + return $twig->render(PluginConstants::NAME . '::Checkout.AmazonPayLogin', ['content' => $content]); } public function swapAmazonPayWidgets() @@ -363,7 +360,7 @@ private function getLanguageCode(string $lang): string { switch($lang){ case "de": - $lang = "de-De"; + $lang = "de-DE"; break; case "en": $lang = "en-GB"; diff --git a/src/Providers/Api/Request/GenericPaymentDataProvider.php b/src/Providers/Api/Request/GenericPaymentDataProvider.php new file mode 100644 index 00000000..48b57c70 --- /dev/null +++ b/src/Providers/Api/Request/GenericPaymentDataProvider.php @@ -0,0 +1,26 @@ +getDefaultRequestData($paymentCode); + $requestParams['request'] = "genericpayment"; + $requestParams['addPaydata']['action'] = "getconfiguration"; + $requestParams['clearingtype'] = "wlt"; + $requestParams['wallettype'] = "AMZ"; + + // Currency not mentioned in API-Doc of Payone + $requestParams['currency'] = "EUR"; + + + + $this->validator->validate($requestParams); + return $requestParams; + } +} diff --git a/src/Services/Api.php b/src/Services/Api.php index dd37e05e..2c2d3fef 100644 --- a/src/Services/Api.php +++ b/src/Services/Api.php @@ -2,9 +2,11 @@ namespace Payone\Services; +use Elasticsearch\Endpoints\Get; use Payone\Adapter\Logger; use Payone\Models\Api\AuthResponse; use Payone\Models\Api\AuthResponseFactory; +use Payone\Models\Api\GetConfigurationResponse; use Payone\Models\Api\GetConfigurationResponseFactory; use Payone\Models\Api\GetInvoiceResponse; use Payone\Models\Api\GetInvoiceResponseFactory; @@ -229,12 +231,16 @@ public function doGetInvoice($requestParams): GetInvoiceResponse return $responseObject; } - public function doGetConfiguration($requestParams) + /** + * @param array $requestParams + * @return GetConfigurationResponse + */ + public function doGetConfiguration(array $requestParams): GetConfigurationResponse { $response = $this->doLibCall((self::REQUEST_TYPE_CONFIGURATION), $requestParams); - //$responseObject = GetConfigurationResponseFactory::create($response); - return $response; - //$responseObject; + $responseObject = GetConfigurationResponseFactory::create($response); + + return $responseObject; } /** From a7a426947b77acbc88e0ab05d15fe16721dfe2a0 Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Tue, 8 Sep 2020 15:24:12 +0200 Subject: [PATCH 113/353] added additional calls + added more generic-logic --- plugin.json | 39 +++++++-- ....php => AmazonPayConfigurationRequest.php} | 2 +- ...y.php => GenericPaymentRequestFactory.php} | 23 +++-- ...Configuration.php => doGenericPayment.php} | 9 +- .../Checkout/AmazonPayAddressBookWidget.twig | 2 + .../views/Checkout/AmazonPayCheckout.twig | 2 +- ...Widget.twig => AmazonPayWalletWidget.twig} | 1 + .../views/Checkout/AmazonPayWidgets.twig | 74 ++++++++++++++++ src/Controllers/CheckoutController.php | 35 +++++++- .../GenericPaymentResponseFactory.php | 66 ++++++++++++++ .../GetConfigurationResponse.php | 4 +- .../GetOrderReferenceDetailsResponse.php | 86 +++++++++++++++++++ .../Api/GetConfigurationResponseFactory.php | 28 ------ .../Request/GenericPaymentDataProvider.php | 31 ++++++- .../Api/Request/Models/GenericPayment.php | 13 +++ .../AmazonPayAddressBookWidget.php | 21 +++++ .../DataProviders/AmazonPayIntegration.php | 10 ++- .../DataProviders/AmazonPayWalletWidget.php | 21 +++++ src/Providers/DataProviders/Javascript.php | 6 +- src/Services/Api.php | 15 ++-- 20 files changed, 423 insertions(+), 65 deletions(-) rename resources/lib/PayoneApi/Request/Genericpayment/{AmazonPayConfiguration.php => AmazonPayConfigurationRequest.php} (98%) rename resources/lib/PayoneApi/Request/Genericpayment/{GetConfigurationRequestFactory.php => GenericPaymentRequestFactory.php} (58%) rename resources/lib/{doGetConfiguration.php => doGenericPayment.php} (86%) create mode 100644 resources/views/Checkout/AmazonPayAddressBookWidget.twig rename resources/views/Checkout/{AmazonPayAdressBookWidget.twig => AmazonPayWalletWidget.twig} (72%) create mode 100644 resources/views/Checkout/AmazonPayWidgets.twig create mode 100644 src/Models/Api/GenericPayment/GenericPaymentResponseFactory.php rename src/Models/Api/{ => GenericPayment}/GetConfigurationResponse.php (94%) create mode 100644 src/Models/Api/GenericPayment/GetOrderReferenceDetailsResponse.php delete mode 100644 src/Models/Api/GetConfigurationResponseFactory.php create mode 100644 src/Providers/Api/Request/Models/GenericPayment.php create mode 100644 src/Providers/DataProviders/AmazonPayAddressBookWidget.php create mode 100644 src/Providers/DataProviders/AmazonPayWalletWidget.php diff --git a/plugin.json b/plugin.json index 1a7629d1..716d06ae 100644 --- a/plugin.json +++ b/plugin.json @@ -1,11 +1,14 @@ { "version": "1.1.14", - "license":"MIT", - "pluginIcon":"icon_plugin_xs.png", - "price":0.0, - "authorIcon":"icon_author_xs.png", + "license": "MIT", + "pluginIcon": "icon_plugin_xs.png", + "price": 0.0, + "authorIcon": "icon_author_xs.png", "name": "Payone", - "marketplaceName" : {"de":"PAYONE","en":"PAYONE"}, + "marketplaceName": { + "de": "PAYONE", + "en": "PAYONE" + }, "shortDescription": { "de": "Das offizielle Payone plugin für plentymarkets Webshops. Das Payone Plugin setzt einen Checkout-Prozess auf Basis von Ceres voraus.", "en": "The official Payone plugin for plentymarkets online stores" @@ -14,14 +17,22 @@ "author": "plentysystems AG", "email": "sales@plentymarkets.com", "phone": "+49 561 98 681 100", - "keywords": ["Payone", "plentymarkets", "payment"], - "categories": [3519], + "keywords": [ + "Payone", + "plentymarkets", + "payment" + ], + "categories": [ + 3519 + ], "type": "payment", "namespace": "Payone", "javaScriptFiles": [], "containers": [], - "require": ["IO"], - "dependencies":{ + "require": [ + "IO" + ], + "dependencies": { "guzzlehttp/guzzle": "6.*", "symfony/serializer": "3.2.7", "symfony/property-access": "3.2.7", @@ -47,6 +58,16 @@ "key": "Payone\\Providers\\DataProviders\\AmazonPayIntegration", "name": "Payone Checkout Amazon Pay Integration", "description": "Block to integrate the Amazon Login, as well as the Widgets for Amazon Pay" + }, + { + "key": "Payone\\Providers\\DataProviders\\AmazonPayAddressBookWidget", + "name": "Payone Checkout Amazon Pay AddressBook-Widget", + "description": "Block to integrate the Amazon Pay address book widget in the checkout." + }, + { + "key": "Payone\\Providers\\DataProviders\\AmazonPayWalletWidget", + "name": "Payone Checkout Amazon Pay Wallet-Widget", + "description": "Block to integrate the Amazon Pay wallet widget in the checkout." } ] } diff --git a/resources/lib/PayoneApi/Request/Genericpayment/AmazonPayConfiguration.php b/resources/lib/PayoneApi/Request/Genericpayment/AmazonPayConfigurationRequest.php similarity index 98% rename from resources/lib/PayoneApi/Request/Genericpayment/AmazonPayConfiguration.php rename to resources/lib/PayoneApi/Request/Genericpayment/AmazonPayConfigurationRequest.php index e6b0caf0..e3059cc3 100644 --- a/resources/lib/PayoneApi/Request/Genericpayment/AmazonPayConfiguration.php +++ b/resources/lib/PayoneApi/Request/Genericpayment/AmazonPayConfigurationRequest.php @@ -7,7 +7,7 @@ use PayoneApi\Request\Parts\SystemInfo; use PayoneApi\Request\Types; -class AmazonPayConfiguration +class AmazonPayConfigurationRequest { private $request = Types::GENERICPAYMENT; diff --git a/resources/lib/PayoneApi/Request/Genericpayment/GetConfigurationRequestFactory.php b/resources/lib/PayoneApi/Request/Genericpayment/GenericPaymentRequestFactory.php similarity index 58% rename from resources/lib/PayoneApi/Request/Genericpayment/GetConfigurationRequestFactory.php rename to resources/lib/PayoneApi/Request/Genericpayment/GenericPaymentRequestFactory.php index fb86d316..c7de0078 100644 --- a/resources/lib/PayoneApi/Request/Genericpayment/GetConfigurationRequestFactory.php +++ b/resources/lib/PayoneApi/Request/Genericpayment/GenericPaymentRequestFactory.php @@ -3,18 +3,19 @@ namespace PayoneApi\Request\Genericpayment; use PayoneApi\Lib\Version; -use PayoneApi\Request\Parts\Config; use PayoneApi\Request\Parts\SystemInfo; +use PayoneApi\Request\Parts\Config; use PayoneApi\Request\RequestFactoryContract; -class GetConfigurationRequestFactory implements RequestFactoryContract +class GenericPaymentRequestFactory implements RequestFactoryContract { + /** * @param string $paymentMethod * @param array $data - * @param null $referenceId + * @param string|bool $referenceId Reference to previous request * - * @return AmazonPayConfiguration + * @return AmazonPayConfigurationRequest */ public static function create($paymentMethod, $data, $referenceId = null) { @@ -35,7 +36,17 @@ public static function create($paymentMethod, $data, $referenceId = null) $systemInfoData['module_version'] ); - return new AmazonPayConfiguration($config, $systemInfo, $data['currency']); + switch($data['add_paydata']['action']) + { + case 'getconfiguration': + // Other configs can be added here. Just add an if-condition for $paymentMethod + return new AmazonPayConfigurationRequest($config, $systemInfo, $data['currency']); + break; + case 'getorderreferencedetails': + //return new AmazonPay + break; + } + + } } - diff --git a/resources/lib/doGetConfiguration.php b/resources/lib/doGenericPayment.php similarity index 86% rename from resources/lib/doGetConfiguration.php rename to resources/lib/doGenericPayment.php index bddec273..f5e920e7 100644 --- a/resources/lib/doGetConfiguration.php +++ b/resources/lib/doGenericPayment.php @@ -5,7 +5,7 @@ use PayoneApi\Api\PostApi; use PayoneApi\Lib\Version; use PayoneApi\Request\ArraySerializer; -use PayoneApi\Request\Genericpayment\GetConfigurationRequestFactory; +use PayoneApi\Request\Genericpayment\GenericPaymentRequestFactory; use PayoneApi\Response\ClientErrorResponse; try { @@ -15,10 +15,11 @@ $sdkRestApi = \SdkRestApi::class; } $data = []; - //$data['request'] = $sdkRestApi::getParam('request'); + + $data['request'] = $sdkRestApi::getParam('request'); $data['clearingtype'] = $sdkRestApi::getParam('clearingtype'); $data['wallettype'] = $sdkRestApi::getParam('wallettype'); - $data['add_paydata'] = $sdkRestApi::getParam('addPaydata'); + $data['add_paydata'] = $sdkRestApi::getParam('add_paydata'); $data['currency'] = $sdkRestApi::getParam('currency'); $data['context'] = $sdkRestApi::getParam('context'); @@ -26,7 +27,7 @@ $paymentMethod = $sdkRestApi::getParam('paymentMethod'); - $request = GetConfigurationRequestFactory::create($paymentMethod, $data); + $request = GenericPaymentRequestFactory::create($paymentMethod, $data); $serializer = new ArraySerializer(); $client = new PostApi(new Client(), $serializer); diff --git a/resources/views/Checkout/AmazonPayAddressBookWidget.twig b/resources/views/Checkout/AmazonPayAddressBookWidget.twig new file mode 100644 index 00000000..b9f123a3 --- /dev/null +++ b/resources/views/Checkout/AmazonPayAddressBookWidget.twig @@ -0,0 +1,2 @@ + +
diff --git a/resources/views/Checkout/AmazonPayCheckout.twig b/resources/views/Checkout/AmazonPayCheckout.twig index d16e1e75..0aa38655 100644 --- a/resources/views/Checkout/AmazonPayCheckout.twig +++ b/resources/views/Checkout/AmazonPayCheckout.twig @@ -16,7 +16,7 @@ if (App.templateType === "checkout") { console.log("loadAmazonLoginButton"); $.get("/payment/payone/checkout/amazonPayWidget", function (data) { - // $('#amazonLoginButton').html(data); + //$('#LoginWithAmazon').append(data); $("body").append(data); }); } diff --git a/resources/views/Checkout/AmazonPayAdressBookWidget.twig b/resources/views/Checkout/AmazonPayWalletWidget.twig similarity index 72% rename from resources/views/Checkout/AmazonPayAdressBookWidget.twig rename to resources/views/Checkout/AmazonPayWalletWidget.twig index d55f1280..d9ccc537 100644 --- a/resources/views/Checkout/AmazonPayAdressBookWidget.twig +++ b/resources/views/Checkout/AmazonPayWalletWidget.twig @@ -1 +1,2 @@ +
diff --git a/resources/views/Checkout/AmazonPayWidgets.twig b/resources/views/Checkout/AmazonPayWidgets.twig new file mode 100644 index 00000000..82d01a6b --- /dev/null +++ b/resources/views/Checkout/AmazonPayWidgets.twig @@ -0,0 +1,74 @@ + + + diff --git a/src/Controllers/CheckoutController.php b/src/Controllers/CheckoutController.php index bb02959f..178ac1e1 100644 --- a/src/Controllers/CheckoutController.php +++ b/src/Controllers/CheckoutController.php @@ -15,6 +15,7 @@ use Payone\Models\SepaMandateCache; use Payone\PluginConstants; use Payone\Providers\Api\Request\GenericPaymentDataProvider; +use Payone\Providers\Api\Request\Models\GenericPayment; use Payone\Services\Api; use Payone\Services\PaymentService; use Payone\Services\SepaMandate; @@ -305,22 +306,24 @@ public function getAmazonPayLoginWidget(Twig $twig) $genericPaymentDataProvider = pluginApp(GenericPaymentDataProvider::class); $requestParams = $genericPaymentDataProvider->getGetConfigRequestData("Amazon Pay"); - $configResponse = $api->doGetConfiguration($requestParams); + $configResponse = $api->doGenericPayment(GenericPayment::ACTIONTYPE_GETCONFIGURATION, $requestParams); /** @var LocalizationRepositoryContract $localizationRepositoryContract */ $localizationRepositoryContract = pluginApp(LocalizationRepositoryContract::class); $lang = $this->getLanguageCode($localizationRepositoryContract->getLanguage()); $content = [ - 'clientId' => $configResponse->getClientId(), - 'sellerId' => $configResponse->getSellerId(), + 'clientId' => "amzn1.application-oa2-client.2c027e55b128457bb16edc2f0fc6bd71", + 'sellerId' => "A13SNST9X74Q8L", + /* 'clientId' => $configResponse->getClientId(), + 'sellerId' => $configResponse->getSellerId(),*/ 'type' => "LwA", 'color' => "Gold", 'size' => "medium", 'language' => $lang, 'scopes' => "payments:widget", 'popup' => "true", - 'redirectUrl' => "https://test.de", + 'redirectUrl' => "http://master.plentymarkets.com/checkout", ]; return $twig->render(PluginConstants::NAME . '::Checkout.AmazonPayLogin', ['content' => $content]); @@ -328,7 +331,31 @@ public function getAmazonPayLoginWidget(Twig $twig) public function swapAmazonPayWidgets() { + $workorderId = "123"; + $amazonReferenceId = "123"; + $amazonAddressToken = "123"; + + /** @var Api $api */ + $api = pluginApp(Api::class); + + /** @var GenericPaymentDataProvider $genericPaymentDataProvider */ + $genericPaymentDataProvider = pluginApp(GenericPaymentDataProvider::class); + $requestParams = $genericPaymentDataProvider->getGetOrderReferenceDetailsRequestData( + "Amazon Pay", + $workorderId, + $amazonReferenceId, + $amazonAddressToken + ); + + + // SWAP containers here + $content = [ + 'clientId' => 1, + 'sellerId' => 2, + 'addressBookScope' => 3, + 'walletScope' => 3, + ]; } /** diff --git a/src/Models/Api/GenericPayment/GenericPaymentResponseFactory.php b/src/Models/Api/GenericPayment/GenericPaymentResponseFactory.php new file mode 100644 index 00000000..1e411708 --- /dev/null +++ b/src/Models/Api/GenericPayment/GenericPaymentResponseFactory.php @@ -0,0 +1,66 @@ +init( + $responseData['success'] ?? false, + $responseData['errormessage'] ?? '', + $responseData['responseData']['add_paydata[client_id]'] ?? '', + $responseData['responseData']['add_paydata[seller_id]'] ?? '', + $responseData['responseData']['workorderid'] ?? '' + ); + } + + /** + * @param array $responseData + * @return GetOrderReferenceDetailsResponse + */ + private static function makeGetOrderReferenceDetailsResponse(array $responseData): GetOrderReferenceDetailsResponse + { + /** @var GetOrderReferenceDetailsResponse $response */ + $response = pluginApp(GetOrderReferenceDetailsResponse::class); + + return $response->init( + $responseData['success'] ?? false, + $responseData['errormessage'] ?? '', + $responseData['responseData']['add_paydata[client_id]'] ?? '', + $responseData['responseData']['add_paydata[seller_id]'] ?? '', + $responseData['responseData']['workorderid'] ?? '' + ); + } +} diff --git a/src/Models/Api/GetConfigurationResponse.php b/src/Models/Api/GenericPayment/GetConfigurationResponse.php similarity index 94% rename from src/Models/Api/GetConfigurationResponse.php rename to src/Models/Api/GenericPayment/GetConfigurationResponse.php index aca9d571..6a48589d 100644 --- a/src/Models/Api/GetConfigurationResponse.php +++ b/src/Models/Api/GenericPayment/GetConfigurationResponse.php @@ -1,6 +1,8 @@ success = $success; + $this->errorMessage = $errorMessage; + $this->clientId = $clientId; + $this->sellerId = $sellerId; + $this->workorderId = $workorderId; + return $this; + } + + public function jsonSerialize(): array + { + return parent::jsonSerialize() + + [ + 'clientId' => $this->clientId, + 'sellerId' => $this->sellerId, + 'workorderId' => $this->workorderId, + ]; + } + + /** + * @return string + */ + public function getClientId(): string + { + return $this->clientId; + } + + /** + * @return string + */ + public function getSellerId(): string + { + return $this->sellerId; + } + + /** + * @return string + */ + public function getWorkorderId(): string + { + return $this->workorderId; + } + +} diff --git a/src/Models/Api/GetConfigurationResponseFactory.php b/src/Models/Api/GetConfigurationResponseFactory.php deleted file mode 100644 index 09030cd0..00000000 --- a/src/Models/Api/GetConfigurationResponseFactory.php +++ /dev/null @@ -1,28 +0,0 @@ -init( - $responseData['success'] ?? false, - $responseData['errormessage'] ?? '', - $responseData['responseData']['add_paydata[client_id]'] ?? '', - $responseData['responseData']['add_paydata[seller_id]'] ?? '', - $responseData['responseData']['workorderid'] ?? '' - ); - } -} diff --git a/src/Providers/Api/Request/GenericPaymentDataProvider.php b/src/Providers/Api/Request/GenericPaymentDataProvider.php index 48b57c70..4972ace2 100644 --- a/src/Providers/Api/Request/GenericPaymentDataProvider.php +++ b/src/Providers/Api/Request/GenericPaymentDataProvider.php @@ -2,6 +2,8 @@ namespace Payone\Providers\Api\Request; +use Payone\Providers\Api\Request\Models\GenericPayment; + class GenericPaymentDataProvider extends DataProviderAbstract { /** @@ -10,15 +12,40 @@ class GenericPaymentDataProvider extends DataProviderAbstract public function getGetConfigRequestData(string $paymentCode): array { $requestParams = $this->getDefaultRequestData($paymentCode); - $requestParams['request'] = "genericpayment"; - $requestParams['addPaydata']['action'] = "getconfiguration"; + $requestParams['request'] = GenericPayment::REQUEST_TYPE; $requestParams['clearingtype'] = "wlt"; $requestParams['wallettype'] = "AMZ"; + // Currency not mentioned in API-Doc of Payone + $requestParams['currency'] = "EUR"; + + $requestParams['add_paydata']['action'] = GenericPayment::ACTIONTYPE_GETCONFIGURATION; + + $this->validator->validate($requestParams); + return $requestParams; + } + /** + * {@inheritdoc} + */ + public function getGetOrderReferenceDetailsRequestData(string $paymentCode, + string $workOrderId, + string $amazonReferenceId, + string $amazonAddressToken): array + { + // TODO: Maybe load creds from cache/session ? + + $requestParams = $this->getDefaultRequestData($paymentCode); + $requestParams['request'] = GenericPayment::REQUEST_TYPE; + $requestParams['clearingtype'] = "wlt"; + $requestParams['wallettype'] = "AMZ"; // Currency not mentioned in API-Doc of Payone $requestParams['currency'] = "EUR"; + $requestParams['add_paydata']['action'] = GenericPayment::ACTIONTYPE_GETORDERREFERENCEDETAILS; + $requestParams['add_paydata']['amazon_address_token'] = $amazonReferenceId; + $requestParams['add_paydata']['amazon_reference_id'] = $amazonAddressToken; + $requestParams['workorderid'] = $workOrderId; $this->validator->validate($requestParams); return $requestParams; diff --git a/src/Providers/Api/Request/Models/GenericPayment.php b/src/Providers/Api/Request/Models/GenericPayment.php new file mode 100644 index 00000000..fe2e0a3a --- /dev/null +++ b/src/Providers/Api/Request/Models/GenericPayment.php @@ -0,0 +1,13 @@ +render(PluginConstants::NAME . '::Checkout.AmazonPayWalletWidget'); + } +} diff --git a/src/Providers/DataProviders/AmazonPayIntegration.php b/src/Providers/DataProviders/AmazonPayIntegration.php index 560e7ce4..5d39858b 100644 --- a/src/Providers/DataProviders/AmazonPayIntegration.php +++ b/src/Providers/DataProviders/AmazonPayIntegration.php @@ -12,6 +12,15 @@ class AmazonPayIntegration { + /** + * @param Twig $twig + * @param BasketRepositoryContract $basketRepository + * @param PaymentHelper $paymentHelper + * @return string + * @throws \Twig_Error_Loader + * @throws \Twig_Error_Runtime + * @throws \Twig_Error_Syntax + */ public function call( Twig $twig, BasketRepositoryContract $basketRepository, @@ -21,7 +30,6 @@ public function call( $selectedPaymentId = $basket->methodOfPaymentId; $amazonPayMopId = $paymentHelper->getMopId(PayoneAmazonPayPaymentMethod::PAYMENT_CODE); - return $twig->render( PluginConstants::NAME . '::Checkout.AmazonPayCheckout', [ diff --git a/src/Providers/DataProviders/AmazonPayWalletWidget.php b/src/Providers/DataProviders/AmazonPayWalletWidget.php new file mode 100644 index 00000000..87b59b52 --- /dev/null +++ b/src/Providers/DataProviders/AmazonPayWalletWidget.php @@ -0,0 +1,21 @@ +render(PluginConstants::NAME . '::Checkout.AmazonPayWalletWidget'); + } +} diff --git a/src/Providers/DataProviders/Javascript.php b/src/Providers/DataProviders/Javascript.php index 18888038..75a24307 100644 --- a/src/Providers/DataProviders/Javascript.php +++ b/src/Providers/DataProviders/Javascript.php @@ -21,7 +21,11 @@ class Javascript * @param CreditcardTypes $creditcardTypes * @param CreditCardStyle $style * @param PaymentHelper $paymentHelper + * @param BasketRepositoryContract $basketRepository * @return string + * @throws \Twig_Error_Loader + * @throws \Twig_Error_Runtime + * @throws \Twig_Error_Syntax */ public function call( Twig $twig, @@ -47,4 +51,4 @@ public function call( ] ); } -} \ No newline at end of file +} diff --git a/src/Services/Api.php b/src/Services/Api.php index 2c2d3fef..83b079c3 100644 --- a/src/Services/Api.php +++ b/src/Services/Api.php @@ -2,12 +2,11 @@ namespace Payone\Services; -use Elasticsearch\Endpoints\Get; use Payone\Adapter\Logger; use Payone\Models\Api\AuthResponse; use Payone\Models\Api\AuthResponseFactory; -use Payone\Models\Api\GetConfigurationResponse; -use Payone\Models\Api\GetConfigurationResponseFactory; +use Payone\Models\Api\GenericPayment\GenericPaymentResponseFactory; +use Payone\Models\Api\GenericPayment\GetConfigurationResponse; use Payone\Models\Api\GetInvoiceResponse; use Payone\Models\Api\GetInvoiceResponseFactory; use Payone\Models\Api\ManagemandateResponse; @@ -17,6 +16,7 @@ use Payone\Models\Api\Response; use Payone\Models\Api\ResponseFactory; use Payone\PluginConstants; +use Payone\Providers\Api\Request\Models\GenericPayment; use Plenty\Modules\Plugin\Libs\Contracts\LibraryCallContract; /** @@ -37,7 +37,7 @@ class Api const REQUEST_TYPE_DEBIT = 'Debit'; const REQUEST_TYPE_MANAGEMANDATE = 'Managemandate'; const REQUEST_TYPE_INVOICE = 'GetDocument'; - const REQUEST_TYPE_CONFIGURATION = 'GetConfiguration'; + const REQUEST_TYPE_GENERIC_PAYMENT = 'GenericPayment'; /** * @var LibraryCallContract @@ -232,13 +232,14 @@ public function doGetInvoice($requestParams): GetInvoiceResponse } /** + * @param string $actionType * @param array $requestParams * @return GetConfigurationResponse */ - public function doGetConfiguration(array $requestParams): GetConfigurationResponse + public function doGenericPayment(string $actionType, array $requestParams): GetConfigurationResponse { - $response = $this->doLibCall((self::REQUEST_TYPE_CONFIGURATION), $requestParams); - $responseObject = GetConfigurationResponseFactory::create($response); + $response = $this->doLibCall(self::REQUEST_TYPE_GENERIC_PAYMENT, $requestParams); + $responseObject = GenericPaymentResponseFactory::create($actionType, $response); return $responseObject; } From 8b4ab49296dea6d637a5dae1b9f24cacefd66925 Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Tue, 8 Sep 2020 17:20:01 +0200 Subject: [PATCH 114/353] added new call and debug-logging --- .../AmazonPayConfigurationRequest.php | 4 +- .../AmazonPayGetOrderReferenceRequest.php | 126 ++++++++++++++++++ .../GenericPaymentRequestFactory.php | 12 +- resources/lib/doGenericPayment.php | 3 +- resources/views/Checkout/AmazonPayLogin.twig | 4 +- src/Controllers/CheckoutController.php | 13 +- 6 files changed, 149 insertions(+), 13 deletions(-) rename resources/lib/PayoneApi/Request/{Genericpayment => GenericPayment}/AmazonPayConfigurationRequest.php (94%) create mode 100644 resources/lib/PayoneApi/Request/GenericPayment/AmazonPayGetOrderReferenceRequest.php rename resources/lib/PayoneApi/Request/{Genericpayment => GenericPayment}/GenericPaymentRequestFactory.php (77%) diff --git a/resources/lib/PayoneApi/Request/Genericpayment/AmazonPayConfigurationRequest.php b/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayConfigurationRequest.php similarity index 94% rename from resources/lib/PayoneApi/Request/Genericpayment/AmazonPayConfigurationRequest.php rename to resources/lib/PayoneApi/Request/GenericPayment/AmazonPayConfigurationRequest.php index e3059cc3..31b2ebf4 100644 --- a/resources/lib/PayoneApi/Request/Genericpayment/AmazonPayConfigurationRequest.php +++ b/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayConfigurationRequest.php @@ -1,6 +1,6 @@ 'getconfiguration', + 'amazon_address_token' => '', + 'amazon_reference_id' => '', + ]; + + /** @var Config */ + private $config; + + /** @var SystemInfo */ + private $info; + + /** + * AmazonPayGetOrderReferenceRequest constructor. + * + * @param Config $config + * @param SystemInfo $info + * @param string $amazonAddressToken + * @param string $amazonReferenceId + * @param string $workOrderId + * @param string $currency + */ + public function __construct( + Config $config, + SystemInfo $info, + string $amazonAddressToken, + string $amazonReferenceId, + string $workOrderId, + string $currency + ) + { + $this->config = $config; + $this->info = $info; + $this->add_paydata['amazon_address_token'] = $amazonAddressToken; + $this->add_paydata['amazon_reference_id'] = $amazonReferenceId; + $this->workorderid = $workOrderId; + $this->currency = $currency; + } + + /** + * @return string + */ + public function getRequest(): string + { + return $this->request; + } + + /** + * @return string + */ + public function getClearingtype(): string + { + return $this->clearingtype; + } + + /** + * @return string + */ + public function getWallettype(): string + { + return $this->wallettype; + } + + /** + * @return string + */ + public function getCurrency(): string + { + return $this->currency; + } + + /** + * @return string + */ + public function getWorkorderid(): string + { + return $this->workorderid; + } + + /** + * @return array + */ + public function getAddPaydata(): array + { + return $this->add_paydata; + } + + /** + * @return Config + */ + public function getConfig(): Config + { + return $this->config; + } + + /** + * @return SystemInfo + */ + public function getInfo(): SystemInfo + { + return $this->info; + } + +} diff --git a/resources/lib/PayoneApi/Request/Genericpayment/GenericPaymentRequestFactory.php b/resources/lib/PayoneApi/Request/GenericPayment/GenericPaymentRequestFactory.php similarity index 77% rename from resources/lib/PayoneApi/Request/Genericpayment/GenericPaymentRequestFactory.php rename to resources/lib/PayoneApi/Request/GenericPayment/GenericPaymentRequestFactory.php index c7de0078..4b0f476b 100644 --- a/resources/lib/PayoneApi/Request/Genericpayment/GenericPaymentRequestFactory.php +++ b/resources/lib/PayoneApi/Request/GenericPayment/GenericPaymentRequestFactory.php @@ -1,6 +1,6 @@ getLanguageCode($localizationRepositoryContract->getLanguage()); $content = [ - 'clientId' => "amzn1.application-oa2-client.2c027e55b128457bb16edc2f0fc6bd71", - 'sellerId' => "A13SNST9X74Q8L", - /* 'clientId' => $configResponse->getClientId(), - 'sellerId' => $configResponse->getSellerId(),*/ +// 'clientId' => "amzn1.application-oa2-client.2c027e55b128457bb16edc2f0fc6bd71", +// 'sellerId' => "A13SNST9X74Q8L", + 'clientId' => $configResponse->getClientId(), + 'sellerId' => $configResponse->getSellerId(), 'type' => "LwA", 'color' => "Gold", 'size' => "medium", 'language' => $lang, - 'scopes' => "payments:widget", + 'scopes' => "profile payments:widget payments:shipping_address payments:billing_address", 'popup' => "true", - 'redirectUrl' => "http://master.plentymarkets.com/checkout", + 'redirectUrl' => "https://pm-order.plentymarkets-cloud01.com/checkout", + 'debug1' => $configResponse->getWorkorderId() ]; return $twig->render(PluginConstants::NAME . '::Checkout.AmazonPayLogin', ['content' => $content]); From c541bcc03fe73c8a401d6de1bb98fe6b8f72f0e7 Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Tue, 8 Sep 2020 17:37:02 +0200 Subject: [PATCH 115/353] changed debug-creds --- src/Controllers/CheckoutController.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Controllers/CheckoutController.php b/src/Controllers/CheckoutController.php index 36471b19..5dcbb09b 100644 --- a/src/Controllers/CheckoutController.php +++ b/src/Controllers/CheckoutController.php @@ -313,10 +313,10 @@ public function getAmazonPayLoginWidget(Twig $twig) $lang = $this->getLanguageCode($localizationRepositoryContract->getLanguage()); $content = [ -// 'clientId' => "amzn1.application-oa2-client.2c027e55b128457bb16edc2f0fc6bd71", -// 'sellerId' => "A13SNST9X74Q8L", - 'clientId' => $configResponse->getClientId(), - 'sellerId' => $configResponse->getSellerId(), + 'clientId' => "amzn1.application-oa2-client.2c027e55b128457bb16edc2f0fc6bd71", + 'sellerId' => "A13SNST9X74Q8L", +// 'clientId' => $configResponse->getClientId(), +// 'sellerId' => $configResponse->getSellerId(), 'type' => "LwA", 'color' => "Gold", 'size' => "medium", From f628958f89e6dcdeb96f9d87b4b9016ea2e3f7f5 Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Wed, 9 Sep 2020 10:30:02 +0200 Subject: [PATCH 116/353] changed init-data for login --- src/Controllers/CheckoutController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Controllers/CheckoutController.php b/src/Controllers/CheckoutController.php index 5dcbb09b..ca1cb0e8 100644 --- a/src/Controllers/CheckoutController.php +++ b/src/Controllers/CheckoutController.php @@ -323,7 +323,7 @@ public function getAmazonPayLoginWidget(Twig $twig) 'language' => $lang, 'scopes' => "profile payments:widget payments:shipping_address payments:billing_address", 'popup' => "true", - 'redirectUrl' => "https://pm-order.plentymarkets-cloud01.com/checkout", + 'redirectUrl' => "", 'debug1' => $configResponse->getWorkorderId() ]; From a34464259e652069ef50fa591f84349b0b003d88 Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Wed, 9 Sep 2020 11:27:56 +0200 Subject: [PATCH 117/353] changed redirect to callback --- resources/views/Checkout/AmazonPayLogin.twig | 6 +++++- src/Controllers/CheckoutController.php | 1 - 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/resources/views/Checkout/AmazonPayLogin.twig b/resources/views/Checkout/AmazonPayLogin.twig index 99816108..4639d49f 100644 --- a/resources/views/Checkout/AmazonPayLogin.twig +++ b/resources/views/Checkout/AmazonPayLogin.twig @@ -19,7 +19,11 @@ authorization: function () { loginOptions = {scope: '{{ content.scopes }}', popup: {{ content.popup }}}; - authRequest = amazon.Login.authorize(loginOptions, '{{ content.redirectUrl }}'); + authRequest = amazon.Login.authorize(loginOptions, function(t) { + console.log(t.access_token); + console.log(t.expires_in); + console.log(t.token_type); + }); }, onError: function (error) { // your error handling code. diff --git a/src/Controllers/CheckoutController.php b/src/Controllers/CheckoutController.php index ca1cb0e8..a632d133 100644 --- a/src/Controllers/CheckoutController.php +++ b/src/Controllers/CheckoutController.php @@ -323,7 +323,6 @@ public function getAmazonPayLoginWidget(Twig $twig) 'language' => $lang, 'scopes' => "profile payments:widget payments:shipping_address payments:billing_address", 'popup' => "true", - 'redirectUrl' => "", 'debug1' => $configResponse->getWorkorderId() ]; From c374f54ca37ac25d719c334d20311c5859d6b053 Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Wed, 9 Sep 2020 11:51:56 +0200 Subject: [PATCH 118/353] added logout button --- resources/views/Checkout/AmazonPayLogin.twig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/resources/views/Checkout/AmazonPayLogin.twig b/resources/views/Checkout/AmazonPayLogin.twig index 4639d49f..a80279c4 100644 --- a/resources/views/Checkout/AmazonPayLogin.twig +++ b/resources/views/Checkout/AmazonPayLogin.twig @@ -20,6 +20,9 @@ authorization: function () { loginOptions = {scope: '{{ content.scopes }}', popup: {{ content.popup }}}; authRequest = amazon.Login.authorize(loginOptions, function(t) { + var $logoutButton = $(''); + + $("body").append($logoutButton); console.log(t.access_token); console.log(t.expires_in); console.log(t.token_type); From c10c49e0b91387d90c536c98de2909591a2277e6 Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Wed, 9 Sep 2020 12:28:22 +0200 Subject: [PATCH 119/353] added callback route + more console-logging --- resources/views/Checkout/AmazonPayLogin.twig | 5 ++++ .../views/Checkout/AmazonPayWidgets.twig | 1 + src/Controllers/CheckoutController.php | 29 +++++++++++-------- src/Providers/PayoneRouteServiceProvider.php | 2 +- 4 files changed, 24 insertions(+), 13 deletions(-) diff --git a/resources/views/Checkout/AmazonPayLogin.twig b/resources/views/Checkout/AmazonPayLogin.twig index a80279c4..6c7417c6 100644 --- a/resources/views/Checkout/AmazonPayLogin.twig +++ b/resources/views/Checkout/AmazonPayLogin.twig @@ -26,6 +26,11 @@ console.log(t.access_token); console.log(t.expires_in); console.log(t.token_type); + + $.post("/payment/payone/checkout/swapAmazonPayWidgets", { "accessToken" : t.access_token}, function (data) { + //$('#LoginWithAmazon').append(data); + $("body").append(data); + }); }); }, onError: function (error) { diff --git a/resources/views/Checkout/AmazonPayWidgets.twig b/resources/views/Checkout/AmazonPayWidgets.twig index 82d01a6b..9676cce3 100644 --- a/resources/views/Checkout/AmazonPayWidgets.twig +++ b/resources/views/Checkout/AmazonPayWidgets.twig @@ -9,6 +9,7 @@ scope: '{{ content.addressBookScope }}', onOrderReferenceCreate: function(orderReference) { // Here is where you can grab the Order Reference ID. + console.log("AmazonOrderReference: " + orderReference.getAmazonOrderReferenceId()); orderReference.getAmazonOrderReferenceId(); }, onAddressSelect: function(orderReference) { diff --git a/src/Controllers/CheckoutController.php b/src/Controllers/CheckoutController.php index a632d133..ae3f4832 100644 --- a/src/Controllers/CheckoutController.php +++ b/src/Controllers/CheckoutController.php @@ -329,8 +329,24 @@ public function getAmazonPayLoginWidget(Twig $twig) return $twig->render(PluginConstants::NAME . '::Checkout.AmazonPayLogin', ['content' => $content]); } - public function swapAmazonPayWidgets() + public function swapAmazonPayWidgets(Twig $twig, Request $request) { + + + // SWAP containers here + $content = [ + 'clientId' => "amzn1.application-oa2-client.2c027e55b128457bb16edc2f0fc6bd71", + 'sellerId' => "A13SNST9X74Q8L", + 'addressBookScope' => "profile payments:widget payments:shipping_address payments:billing_address", + 'walletScope' => "profile payments:widget payments:shipping_address payments:billing_address", + ]; + + return $twig->render(PluginConstants::NAME . '::Checkout.AmazonPayWidgets', ['content' => $content]); + } + + public function otherCalls() + { + $accestoken = "Atza|IwEBIJZWMleom3psDFOhELQjK6lHD-XtaxDJJhI4z7TzpELpshPpyJRSq-Zt3a5yPW7EjwWczlrBF2Vj6TgoRE4HPoGRiYhor5aqphG8iFKj-ATAFKHDspzQXl68xl0nozJSjUXNtdoK_LO-X7P0KZnw8Q2f6uojm1R1MkxGwLjgn96Y5gwE1eJ1_YJVxv-zpQahxJagDyGIlEWbX2AqtEArP_l8cR6n58hxDh_1olffwjk4XxlpVFlBNaI6lnJX15EamZkojPBkNRp3NGBMzJDGlXOapRtTCq5O56LZmVJaH8r2fWzaLYqyWl2cuRI7N6ioFoG-TVr4zQvxvgJzro8vn-jhSvPKq0k-0gusOG-iM6tWPwIxZ12eeljOkKJU8VV_nHS1KhKJRCvucb_X_ulWUoqxhrdmhvr4uRuuDszX7inVZQ"; $workorderId = "123"; $amazonReferenceId = "123"; $amazonAddressToken = "123"; @@ -346,18 +362,7 @@ public function swapAmazonPayWidgets() $amazonReferenceId, $amazonAddressToken ); - - - - // SWAP containers here - $content = [ - 'clientId' => 1, - 'sellerId' => 2, - 'addressBookScope' => 3, - 'walletScope' => 3, - ]; } - /** * @param null $data * diff --git a/src/Providers/PayoneRouteServiceProvider.php b/src/Providers/PayoneRouteServiceProvider.php index 481fdeef..88f948ea 100644 --- a/src/Providers/PayoneRouteServiceProvider.php +++ b/src/Providers/PayoneRouteServiceProvider.php @@ -22,7 +22,7 @@ public function map(Router $router) $router->post('payment/payone/checkout/storeCCCheckResponse', 'Payone\Controllers\CheckoutController@storeCCCheckResponse'); $router->post('payment/payone/checkout/storeAccountData', 'Payone\Controllers\CheckoutController@storeAccountData'); $router->get('payment/payone/checkout/amazonPayWidget', 'Payone\Controllers\CheckoutController@getAmazonPayLoginWidget'); - $router->get('payment/payone/checkout/swapAmazonPayWidgets', 'Payone\Controllers\CheckoutController@swapAmazonPayWidgets'); + $router->post('payment/payone/checkout/swapAmazonPayWidgets', 'Payone\Controllers\CheckoutController@swapAmazonPayWidgets'); $router->get('payment/payone/error', 'Payone\Controllers\CheckoutController@redirectWithNotice'); $router->get('payment/payone/checkoutSuccess', 'Payone\Controllers\CheckoutController@checkoutSuccess'); $router->get('payment/payone/checkout/getSepaMandateStep', 'Payone\Controllers\CheckoutController@getSepaMandateStep'); From b7ac46744868c980469157a6b3e4bec89e129c69 Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Wed, 9 Sep 2020 13:10:30 +0200 Subject: [PATCH 120/353] added additional logging --- resources/views/Checkout/AmazonPayLogin.twig | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/views/Checkout/AmazonPayLogin.twig b/resources/views/Checkout/AmazonPayLogin.twig index 6c7417c6..53fc34a7 100644 --- a/resources/views/Checkout/AmazonPayLogin.twig +++ b/resources/views/Checkout/AmazonPayLogin.twig @@ -29,6 +29,7 @@ $.post("/payment/payone/checkout/swapAmazonPayWidgets", { "accessToken" : t.access_token}, function (data) { //$('#LoginWithAmazon').append(data); + console.log(data); $("body").append(data); }); }); From db71fadd2fb56e2e63927109b99cd7d6345a377d Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Wed, 9 Sep 2020 13:44:49 +0200 Subject: [PATCH 121/353] fixed dataprovider --- src/Providers/DataProviders/AmazonPayAddressBookWidget.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Providers/DataProviders/AmazonPayAddressBookWidget.php b/src/Providers/DataProviders/AmazonPayAddressBookWidget.php index 9aae50c3..159d4c29 100644 --- a/src/Providers/DataProviders/AmazonPayAddressBookWidget.php +++ b/src/Providers/DataProviders/AmazonPayAddressBookWidget.php @@ -16,6 +16,6 @@ class AmazonPayAddressBookWidget */ public function call(Twig $twig) { - return $twig->render(PluginConstants::NAME . '::Checkout.AmazonPayWalletWidget'); + return $twig->render(PluginConstants::NAME . '::Checkout.AmazonPayAddressBookWidget'); } } From 5e5a870eb762167af0b14e012454deaf4db3c39f Mon Sep 17 00:00:00 2001 From: Jens Konopka Date: Wed, 9 Sep 2020 13:49:32 +0200 Subject: [PATCH 122/353] fix loading widgets --- .../Checkout/AmazonPayAddressBookWidget.twig | 3 +-- .../views/Checkout/AmazonPayWalletWidget.twig | 3 +-- resources/views/Checkout/AmazonPayWidgets.twig | 17 ++++++----------- 3 files changed, 8 insertions(+), 15 deletions(-) diff --git a/resources/views/Checkout/AmazonPayAddressBookWidget.twig b/resources/views/Checkout/AmazonPayAddressBookWidget.twig index b9f123a3..909891ea 100644 --- a/resources/views/Checkout/AmazonPayAddressBookWidget.twig +++ b/resources/views/Checkout/AmazonPayAddressBookWidget.twig @@ -1,2 +1 @@ - -
+
diff --git a/resources/views/Checkout/AmazonPayWalletWidget.twig b/resources/views/Checkout/AmazonPayWalletWidget.twig index d9ccc537..c5363892 100644 --- a/resources/views/Checkout/AmazonPayWalletWidget.twig +++ b/resources/views/Checkout/AmazonPayWalletWidget.twig @@ -1,2 +1 @@ - -
+
diff --git a/resources/views/Checkout/AmazonPayWidgets.twig b/resources/views/Checkout/AmazonPayWidgets.twig index 9676cce3..1e800b3b 100644 --- a/resources/views/Checkout/AmazonPayWidgets.twig +++ b/resources/views/Checkout/AmazonPayWidgets.twig @@ -1,9 +1,9 @@ - - - From f9fd0feb8b4656e45203f2ac9e5478673db9e72a Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Wed, 9 Sep 2020 15:24:30 +0200 Subject: [PATCH 123/353] added new routes + js adaptions --- resources/views/Checkout/AmazonPayLogin.twig | 4 +- .../views/Checkout/AmazonPayWidgets.twig | 10 ++ src/Controllers/AmazonPayController.php | 127 ++++++++++++++++++ src/Controllers/CheckoutController.php | 34 ----- .../Request/GenericPaymentDataProvider.php | 32 +++++ .../Api/Request/Models/GenericPayment.php | 1 + src/Providers/PayoneRouteServiceProvider.php | 10 +- 7 files changed, 180 insertions(+), 38 deletions(-) create mode 100644 src/Controllers/AmazonPayController.php diff --git a/resources/views/Checkout/AmazonPayLogin.twig b/resources/views/Checkout/AmazonPayLogin.twig index 53fc34a7..d8d5f0ae 100644 --- a/resources/views/Checkout/AmazonPayLogin.twig +++ b/resources/views/Checkout/AmazonPayLogin.twig @@ -7,7 +7,7 @@ window.onAmazonPaymentsReady = function () { console.log('Client-ID: {{ content.clientId }}'); console.log('Seller-ID: {{ content.sellerId }}'); - console.log('WorkOrder-ID: {{ content.debug1 }}'); + console.log('WorkOrder-ID: {{ content.workOrderId }}'); var authRequest; @@ -27,7 +27,7 @@ console.log(t.expires_in); console.log(t.token_type); - $.post("/payment/payone/checkout/swapAmazonPayWidgets", { "accessToken" : t.access_token}, function (data) { + $.post("/payment/payone/checkout/amazonPay/renderWidgets", { "accessToken" : t.access_token, "workOrderId" : {{ content.workOrderId }}}, function (data) { //$('#LoginWithAmazon').append(data); console.log(data); $("body").append(data); diff --git a/resources/views/Checkout/AmazonPayWidgets.twig b/resources/views/Checkout/AmazonPayWidgets.twig index 1e800b3b..c709d8a8 100644 --- a/resources/views/Checkout/AmazonPayWidgets.twig +++ b/resources/views/Checkout/AmazonPayWidgets.twig @@ -17,6 +17,16 @@ // to perform after the address is selected. The // amazonOrderReferenceId can be used to retrieve the address // details by calling the GetOrderReferenceDetails operation. + console.log("After Event: AccessToken= {{ accessToken }}"); + console.log("After Event: workOrderId= {{ workOrderId }}"); + console.log("After Event: AccessToken= " + orderReference.getAmazonOrderReferenceId()); + + + $.post("/payment/payone/checkout/amazonPay/getOrderReference'", { "accessToken" : t.access_token}, function (data) { + //$('#LoginWithAmazon').append(data); + console.log(data); + $("body").append(data); + }); // If rendering the AddressBook and Wallet widgets // on the same page, you do not have to provide any additional diff --git a/src/Controllers/AmazonPayController.php b/src/Controllers/AmazonPayController.php new file mode 100644 index 00000000..d510905c --- /dev/null +++ b/src/Controllers/AmazonPayController.php @@ -0,0 +1,127 @@ +api = $api; + $this->dataProvider = $dataProvider; + } + + public function getAmazonPayLoginWidget(Twig $twig) + { + $requestParams = $this->dataProvider->getGetConfigRequestData("Amazon Pay"); + + $configResponse = $this->api->doGenericPayment(GenericPayment::ACTIONTYPE_GETCONFIGURATION, $requestParams); + + /** @var LocalizationRepositoryContract $localizationRepositoryContract */ + $localizationRepositoryContract = pluginApp(LocalizationRepositoryContract::class); + $lang = $this->getLanguageCode($localizationRepositoryContract->getLanguage()); + + $content = [ + 'clientId' => "amzn1.application-oa2-client.2c027e55b128457bb16edc2f0fc6bd71", + 'sellerId' => "A13SNST9X74Q8L", +// 'clientId' => $configResponse->getClientId(), +// 'sellerId' => $configResponse->getSellerId(), + 'type' => "LwA", + 'color' => "Gold", + 'size' => "medium", + 'language' => $lang, + 'scopes' => "profile payments:widget payments:shipping_address payments:billing_address", + 'popup' => "true", + 'workOrderId' => $configResponse->getWorkorderId() + ]; + + return $twig->render(PluginConstants::NAME . '::Checkout.AmazonPayLogin', ['content' => $content]); + } + + + public function renderWidgets(Twig $twig, Request $request) + { + // AccessToken in Request + $accessToken = $request->get('accessToken'); + $workdOrderId = $request->get('workOrderId'); + + // SWAP containers here + $content = [ + 'clientId' => "amzn1.application-oa2-client.2c027e55b128457bb16edc2f0fc6bd71", + 'sellerId' => "A13SNST9X74Q8L", + 'addressBookScope' => "profile payments:widget payments:shipping_address payments:billing_address", + 'walletScope' => "profile payments:widget payments:shipping_address payments:billing_address", + ]; + + return $twig->render(PluginConstants::NAME . '::Checkout.AmazonPayWidgets', [ + 'content' => $content, + 'accessToken' => $accessToken, + 'workOrderId' => $workdOrderId + ]); + } + + public function getOrderReference() + { + $accestoken = "Atza|IwEBIJZWMleom3psDFOhELQjK6lHD-XtaxDJJhI4z7TzpELpshPpyJRSq-Zt3a5yPW7EjwWczlrBF2Vj6TgoRE4HPoGRiYhor5aqphG8iFKj-ATAFKHDspzQXl68xl0nozJSjUXNtdoK_LO-X7P0KZnw8Q2f6uojm1R1MkxGwLjgn96Y5gwE1eJ1_YJVxv-zpQahxJagDyGIlEWbX2AqtEArP_l8cR6n58hxDh_1olffwjk4XxlpVFlBNaI6lnJX15EamZkojPBkNRp3NGBMzJDGlXOapRtTCq5O56LZmVJaH8r2fWzaLYqyWl2cuRI7N6ioFoG-TVr4zQvxvgJzro8vn-jhSvPKq0k-0gusOG-iM6tWPwIxZ12eeljOkKJU8VV_nHS1KhKJRCvucb_X_ulWUoqxhrdmhvr4uRuuDszX7inVZQ"; + $workorderId = "123"; + $amazonReferenceId = "123"; + $amazonAddressToken = "123"; + + /** @var Api $api */ + $api = pluginApp(Api::class); + + /** @var GenericPaymentDataProvider $genericPaymentDataProvider */ + $genericPaymentDataProvider = pluginApp(GenericPaymentDataProvider::class); + $requestParams = $genericPaymentDataProvider->getGetOrderReferenceDetailsRequestData( + "Amazon Pay", + $workorderId, + $amazonReferenceId, + $amazonAddressToken + ); + } + + public function setOrderReference(Request $request) + { + $workOrderId = ""; + $amazonReferenceId = ""; + $amazonAddressToken = ""; + $storename = ""; + $amount = ""; + + + $requestParams = $this->dataProvider->getSetOrderReferenceDetailsRequestData( + "Amazon Pay", + $workOrderId, + $amazonReferenceId, + $amazonAddressToken, + $storename, + $amount + ); + + $configResponse = $this->api->doGenericPayment(GenericPayment::ACTIONTYPE_GETCONFIGURATION, $requestParams); + + } + + +} diff --git a/src/Controllers/CheckoutController.php b/src/Controllers/CheckoutController.php index ae3f4832..075d692d 100644 --- a/src/Controllers/CheckoutController.php +++ b/src/Controllers/CheckoutController.php @@ -329,40 +329,6 @@ public function getAmazonPayLoginWidget(Twig $twig) return $twig->render(PluginConstants::NAME . '::Checkout.AmazonPayLogin', ['content' => $content]); } - public function swapAmazonPayWidgets(Twig $twig, Request $request) - { - - - // SWAP containers here - $content = [ - 'clientId' => "amzn1.application-oa2-client.2c027e55b128457bb16edc2f0fc6bd71", - 'sellerId' => "A13SNST9X74Q8L", - 'addressBookScope' => "profile payments:widget payments:shipping_address payments:billing_address", - 'walletScope' => "profile payments:widget payments:shipping_address payments:billing_address", - ]; - - return $twig->render(PluginConstants::NAME . '::Checkout.AmazonPayWidgets', ['content' => $content]); - } - - public function otherCalls() - { - $accestoken = "Atza|IwEBIJZWMleom3psDFOhELQjK6lHD-XtaxDJJhI4z7TzpELpshPpyJRSq-Zt3a5yPW7EjwWczlrBF2Vj6TgoRE4HPoGRiYhor5aqphG8iFKj-ATAFKHDspzQXl68xl0nozJSjUXNtdoK_LO-X7P0KZnw8Q2f6uojm1R1MkxGwLjgn96Y5gwE1eJ1_YJVxv-zpQahxJagDyGIlEWbX2AqtEArP_l8cR6n58hxDh_1olffwjk4XxlpVFlBNaI6lnJX15EamZkojPBkNRp3NGBMzJDGlXOapRtTCq5O56LZmVJaH8r2fWzaLYqyWl2cuRI7N6ioFoG-TVr4zQvxvgJzro8vn-jhSvPKq0k-0gusOG-iM6tWPwIxZ12eeljOkKJU8VV_nHS1KhKJRCvucb_X_ulWUoqxhrdmhvr4uRuuDszX7inVZQ"; - $workorderId = "123"; - $amazonReferenceId = "123"; - $amazonAddressToken = "123"; - - /** @var Api $api */ - $api = pluginApp(Api::class); - - /** @var GenericPaymentDataProvider $genericPaymentDataProvider */ - $genericPaymentDataProvider = pluginApp(GenericPaymentDataProvider::class); - $requestParams = $genericPaymentDataProvider->getGetOrderReferenceDetailsRequestData( - "Amazon Pay", - $workorderId, - $amazonReferenceId, - $amazonAddressToken - ); - } /** * @param null $data * diff --git a/src/Providers/Api/Request/GenericPaymentDataProvider.php b/src/Providers/Api/Request/GenericPaymentDataProvider.php index 4972ace2..f4ea24a2 100644 --- a/src/Providers/Api/Request/GenericPaymentDataProvider.php +++ b/src/Providers/Api/Request/GenericPaymentDataProvider.php @@ -50,4 +50,36 @@ public function getGetOrderReferenceDetailsRequestData(string $paymentCode, $this->validator->validate($requestParams); return $requestParams; } + + /** + * {@inheritdoc} + */ + public function getSetOrderReferenceDetailsRequestData(string $paymentCode, + string $workOrderId, + string $amazonReferenceId, + string $amazonAddressToken, + string $storename, + string $amount): array + { + // TODO: Maybe load creds from cache/session ? + + $requestParams = $this->getDefaultRequestData($paymentCode); + $requestParams['request'] = GenericPayment::REQUEST_TYPE; + $requestParams['clearingtype'] = "wlt"; + $requestParams['wallettype'] = "AMZ"; + // Currency not mentioned in API-Doc of Payone + $requestParams['currency'] = "EUR"; + // amount in smallest unit + $requestParams['amount'] = $amount; + + + $requestParams['add_paydata']['action'] = GenericPayment::ACTIONTYPE_SETORDERREFERENCEDETAILS; + $requestParams['add_paydata']['amazon_address_token'] = $amazonReferenceId; + $requestParams['add_paydata']['amazon_reference_id'] = $amazonAddressToken; + $requestParams['add_paydata']['storename'] = $storename; + $requestParams['workorderid'] = $workOrderId; + + $this->validator->validate($requestParams); + return $requestParams; + } } diff --git a/src/Providers/Api/Request/Models/GenericPayment.php b/src/Providers/Api/Request/Models/GenericPayment.php index fe2e0a3a..ca1fdc16 100644 --- a/src/Providers/Api/Request/Models/GenericPayment.php +++ b/src/Providers/Api/Request/Models/GenericPayment.php @@ -9,5 +9,6 @@ class GenericPayment const ACTIONTYPE_GETCONFIGURATION = "getconfiguration"; const ACTIONTYPE_GETORDERREFERENCEDETAILS = "getorderreferencedetails"; + const ACTIONTYPE_SETORDERREFERENCEDETAILS = "setorderreferencedetails"; } diff --git a/src/Providers/PayoneRouteServiceProvider.php b/src/Providers/PayoneRouteServiceProvider.php index 88f948ea..7bf33846 100644 --- a/src/Providers/PayoneRouteServiceProvider.php +++ b/src/Providers/PayoneRouteServiceProvider.php @@ -2,6 +2,7 @@ namespace Payone\Providers; +use Payone\Controllers\AmazonPayController; use Plenty\Plugin\RouteServiceProvider; use Plenty\Plugin\Routing\Router; @@ -21,8 +22,13 @@ public function map(Router $router) $router->post('payment/payone/checkout/doAuth', 'Payone\Controllers\CheckoutController@doAuth'); $router->post('payment/payone/checkout/storeCCCheckResponse', 'Payone\Controllers\CheckoutController@storeCCCheckResponse'); $router->post('payment/payone/checkout/storeAccountData', 'Payone\Controllers\CheckoutController@storeAccountData'); - $router->get('payment/payone/checkout/amazonPayWidget', 'Payone\Controllers\CheckoutController@getAmazonPayLoginWidget'); - $router->post('payment/payone/checkout/swapAmazonPayWidgets', 'Payone\Controllers\CheckoutController@swapAmazonPayWidgets'); + $router->get('payment/payone/checkout/amazonPayWidget', 'Payone\Controllers\AmazonController@getAmazonPayLoginWidget'); + + $router->post('payment/payone/checkout/amazonPay/renderWidgets', 'Payone\Controllers\AmazonController@renderWidgets'); + $router->post('payment/payone/checkout/amazonPay/setOrderReference', 'Payone\Controllers\AmazonController@setOrderReference'); + $router->get('payment/payone/checkout/amazonPay/getOrderReference', 'Payone\Controllers\AmazonController@getOrderReference'); + + $router->get('payment/payone/error', 'Payone\Controllers\CheckoutController@redirectWithNotice'); $router->get('payment/payone/checkoutSuccess', 'Payone\Controllers\CheckoutController@checkoutSuccess'); $router->get('payment/payone/checkout/getSepaMandateStep', 'Payone\Controllers\CheckoutController@getSepaMandateStep'); From dd3a9ee6b25ae53647fa93f1a30791bc5437dc98 Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Wed, 9 Sep 2020 15:29:58 +0200 Subject: [PATCH 124/353] moved code --- src/Controllers/AmazonPayController.php | 21 +++++++++- src/Controllers/CheckoutController.php | 54 ------------------------- 2 files changed, 20 insertions(+), 55 deletions(-) diff --git a/src/Controllers/AmazonPayController.php b/src/Controllers/AmazonPayController.php index d510905c..04d34563 100644 --- a/src/Controllers/AmazonPayController.php +++ b/src/Controllers/AmazonPayController.php @@ -123,5 +123,24 @@ public function setOrderReference(Request $request) } - + private function getLanguageCode(string $lang): string + { + switch($lang){ + case "de": + $lang = "de-DE"; + break; + case "en": + $lang = "en-GB"; + break; + case "es": + $lang = "es-ES"; + break; + case "fr": + $lang = "fr-FR"; + break; + default: + $lang = "en-GB"; + } + return $lang; + } } diff --git a/src/Controllers/CheckoutController.php b/src/Controllers/CheckoutController.php index 075d692d..ab9e1c15 100644 --- a/src/Controllers/CheckoutController.php +++ b/src/Controllers/CheckoutController.php @@ -297,38 +297,6 @@ public function redirectWithNotice( return $this->response->redirectTo('checkout'); } - public function getAmazonPayLoginWidget(Twig $twig) - { - /** @var Api $api */ - $api = pluginApp(Api::class); - - /** @var GenericPaymentDataProvider $genericPaymentDataProvider */ - $genericPaymentDataProvider = pluginApp(GenericPaymentDataProvider::class); - $requestParams = $genericPaymentDataProvider->getGetConfigRequestData("Amazon Pay"); - - $configResponse = $api->doGenericPayment(GenericPayment::ACTIONTYPE_GETCONFIGURATION, $requestParams); - - /** @var LocalizationRepositoryContract $localizationRepositoryContract */ - $localizationRepositoryContract = pluginApp(LocalizationRepositoryContract::class); - $lang = $this->getLanguageCode($localizationRepositoryContract->getLanguage()); - - $content = [ - 'clientId' => "amzn1.application-oa2-client.2c027e55b128457bb16edc2f0fc6bd71", - 'sellerId' => "A13SNST9X74Q8L", -// 'clientId' => $configResponse->getClientId(), -// 'sellerId' => $configResponse->getSellerId(), - 'type' => "LwA", - 'color' => "Gold", - 'size' => "medium", - 'language' => $lang, - 'scopes' => "profile payments:widget payments:shipping_address payments:billing_address", - 'popup' => "true", - 'debug1' => $configResponse->getWorkorderId() - ]; - - return $twig->render(PluginConstants::NAME . '::Checkout.AmazonPayLogin', ['content' => $content]); - } - /** * @param null $data * @@ -352,26 +320,4 @@ private function getJsonErrors($errors) return $this->response->json($data, Response::HTTP_BAD_REQUEST); } - - - private function getLanguageCode(string $lang): string - { - switch($lang){ - case "de": - $lang = "de-DE"; - break; - case "en": - $lang = "en-GB"; - break; - case "es": - $lang = "es-ES"; - break; - case "fr": - $lang = "fr-FR"; - break; - default: - $lang = "en-GB"; - } - return $lang; - } } From ecd4d68157a256b79dacd956515c3299f7fa6773 Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Wed, 9 Sep 2020 15:36:23 +0200 Subject: [PATCH 125/353] fix --- src/Providers/PayoneRouteServiceProvider.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Providers/PayoneRouteServiceProvider.php b/src/Providers/PayoneRouteServiceProvider.php index 7bf33846..26fe264b 100644 --- a/src/Providers/PayoneRouteServiceProvider.php +++ b/src/Providers/PayoneRouteServiceProvider.php @@ -22,11 +22,11 @@ public function map(Router $router) $router->post('payment/payone/checkout/doAuth', 'Payone\Controllers\CheckoutController@doAuth'); $router->post('payment/payone/checkout/storeCCCheckResponse', 'Payone\Controllers\CheckoutController@storeCCCheckResponse'); $router->post('payment/payone/checkout/storeAccountData', 'Payone\Controllers\CheckoutController@storeAccountData'); - $router->get('payment/payone/checkout/amazonPayWidget', 'Payone\Controllers\AmazonController@getAmazonPayLoginWidget'); + $router->get('payment/payone/checkout/amazonPayWidget', 'Payone\Controllers\AmazonPayController@getAmazonPayLoginWidget'); - $router->post('payment/payone/checkout/amazonPay/renderWidgets', 'Payone\Controllers\AmazonController@renderWidgets'); - $router->post('payment/payone/checkout/amazonPay/setOrderReference', 'Payone\Controllers\AmazonController@setOrderReference'); - $router->get('payment/payone/checkout/amazonPay/getOrderReference', 'Payone\Controllers\AmazonController@getOrderReference'); + $router->post('payment/payone/checkout/amazonPay/renderWidgets', 'Payone\Controllers\AmazonPayController@renderWidgets'); + $router->post('payment/payone/checkout/amazonPay/setOrderReference', 'Payone\Controllers\AmazonPayController@setOrderReference'); + $router->get('payment/payone/checkout/amazonPay/getOrderReference', 'Payone\Controllers\AmazonPayController@getOrderReference'); $router->get('payment/payone/error', 'Payone\Controllers\CheckoutController@redirectWithNotice'); From d1897d89279ff8b4861c094a6b252bd24dcf83fb Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Wed, 9 Sep 2020 15:44:18 +0200 Subject: [PATCH 126/353] renaming of routes --- resources/views/Checkout/AmazonPayCheckout.twig | 2 +- src/Providers/PayoneRouteServiceProvider.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/views/Checkout/AmazonPayCheckout.twig b/resources/views/Checkout/AmazonPayCheckout.twig index 0aa38655..efbb3d97 100644 --- a/resources/views/Checkout/AmazonPayCheckout.twig +++ b/resources/views/Checkout/AmazonPayCheckout.twig @@ -15,7 +15,7 @@ function loadAmazonLoginButton() { if (App.templateType === "checkout") { console.log("loadAmazonLoginButton"); - $.get("/payment/payone/checkout/amazonPayWidget", function (data) { + $.get("/payment/payone/checkout/amazonPay/loginButton", function (data) { //$('#LoginWithAmazon').append(data); $("body").append(data); }); diff --git a/src/Providers/PayoneRouteServiceProvider.php b/src/Providers/PayoneRouteServiceProvider.php index 26fe264b..a20026d4 100644 --- a/src/Providers/PayoneRouteServiceProvider.php +++ b/src/Providers/PayoneRouteServiceProvider.php @@ -22,11 +22,11 @@ public function map(Router $router) $router->post('payment/payone/checkout/doAuth', 'Payone\Controllers\CheckoutController@doAuth'); $router->post('payment/payone/checkout/storeCCCheckResponse', 'Payone\Controllers\CheckoutController@storeCCCheckResponse'); $router->post('payment/payone/checkout/storeAccountData', 'Payone\Controllers\CheckoutController@storeAccountData'); - $router->get('payment/payone/checkout/amazonPayWidget', 'Payone\Controllers\AmazonPayController@getAmazonPayLoginWidget'); $router->post('payment/payone/checkout/amazonPay/renderWidgets', 'Payone\Controllers\AmazonPayController@renderWidgets'); $router->post('payment/payone/checkout/amazonPay/setOrderReference', 'Payone\Controllers\AmazonPayController@setOrderReference'); $router->get('payment/payone/checkout/amazonPay/getOrderReference', 'Payone\Controllers\AmazonPayController@getOrderReference'); + $router->get('payment/payone/checkout/amazonPay/loginButton', 'Payone\Controllers\AmazonPayController@getAmazonPayLoginWidget'); $router->get('payment/payone/error', 'Payone\Controllers\CheckoutController@redirectWithNotice'); From 32c4d28e63fdb155387c27e44f7cebbea1655d51 Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Wed, 9 Sep 2020 15:59:02 +0200 Subject: [PATCH 127/353] route issue? --- src/Providers/PayoneRouteServiceProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Providers/PayoneRouteServiceProvider.php b/src/Providers/PayoneRouteServiceProvider.php index a20026d4..4921eb18 100644 --- a/src/Providers/PayoneRouteServiceProvider.php +++ b/src/Providers/PayoneRouteServiceProvider.php @@ -23,10 +23,10 @@ public function map(Router $router) $router->post('payment/payone/checkout/storeCCCheckResponse', 'Payone\Controllers\CheckoutController@storeCCCheckResponse'); $router->post('payment/payone/checkout/storeAccountData', 'Payone\Controllers\CheckoutController@storeAccountData'); + $router->get('payment/payone/checkout/amazonPay/loginButton', 'Payone\Controllers\AmazonPayController@getAmazonPayLoginWidget'); $router->post('payment/payone/checkout/amazonPay/renderWidgets', 'Payone\Controllers\AmazonPayController@renderWidgets'); $router->post('payment/payone/checkout/amazonPay/setOrderReference', 'Payone\Controllers\AmazonPayController@setOrderReference'); $router->get('payment/payone/checkout/amazonPay/getOrderReference', 'Payone\Controllers\AmazonPayController@getOrderReference'); - $router->get('payment/payone/checkout/amazonPay/loginButton', 'Payone\Controllers\AmazonPayController@getAmazonPayLoginWidget'); $router->get('payment/payone/error', 'Payone\Controllers\CheckoutController@redirectWithNotice'); From 44ece28f3b0d6fb86bc2ff1231d23d560b44f22d Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Wed, 9 Sep 2020 16:11:26 +0200 Subject: [PATCH 128/353] fixed js --- resources/views/Checkout/AmazonPayLogin.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/Checkout/AmazonPayLogin.twig b/resources/views/Checkout/AmazonPayLogin.twig index d8d5f0ae..94a18cd6 100644 --- a/resources/views/Checkout/AmazonPayLogin.twig +++ b/resources/views/Checkout/AmazonPayLogin.twig @@ -27,7 +27,7 @@ console.log(t.expires_in); console.log(t.token_type); - $.post("/payment/payone/checkout/amazonPay/renderWidgets", { "accessToken" : t.access_token, "workOrderId" : {{ content.workOrderId }}}, function (data) { + $.post("/payment/payone/checkout/amazonPay/renderWidgets", { "accessToken" : t.access_token, "workOrderId" : "{{ content.workOrderId }}"}, function (data) { //$('#LoginWithAmazon').append(data); console.log(data); $("body").append(data); From a10e848d050e75e0bd8e5b3476517f0a6a5d5854 Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Wed, 9 Sep 2020 16:46:21 +0200 Subject: [PATCH 129/353] added var for orderRef --- resources/views/Checkout/AmazonPayWidgets.twig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/resources/views/Checkout/AmazonPayWidgets.twig b/resources/views/Checkout/AmazonPayWidgets.twig index c709d8a8..970b4942 100644 --- a/resources/views/Checkout/AmazonPayWidgets.twig +++ b/resources/views/Checkout/AmazonPayWidgets.twig @@ -4,13 +4,14 @@ amazon.Login.setClientId('{{ content.clientId }}'); }; + var $orderReferenceId; addressBookWidget = new OffAmazonPayments.Widgets.AddressBook({ sellerId: '{{ content.sellerId }}', scope: '{{ content.addressBookScope }}', onOrderReferenceCreate: function(orderReference) { // Here is where you can grab the Order Reference ID. console.log("AmazonOrderReference: " + orderReference.getAmazonOrderReferenceId()); - orderReference.getAmazonOrderReferenceId(); + $orderReferenceId = orderReference.getAmazonOrderReferenceId(); }, onAddressSelect: function(orderReference) { // Replace the following code with the action that you want @@ -19,7 +20,7 @@ // details by calling the GetOrderReferenceDetails operation. console.log("After Event: AccessToken= {{ accessToken }}"); console.log("After Event: workOrderId= {{ workOrderId }}"); - console.log("After Event: AccessToken= " + orderReference.getAmazonOrderReferenceId()); + console.log("After Event: AccessToken= " + $orderReferenceId); $.post("/payment/payone/checkout/amazonPay/getOrderReference'", { "accessToken" : t.access_token}, function (data) { From 8438c2c72e845c9d023abb78fe5b1ccf4b8ffcf3 Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Wed, 9 Sep 2020 17:24:38 +0200 Subject: [PATCH 130/353] added frontend call and adapted route + logic --- .../views/Checkout/AmazonPayWidgets.twig | 18 +++++++++++------ src/Controllers/AmazonPayController.php | 20 ++++++++++--------- .../Request/GenericPaymentDataProvider.php | 4 ++-- src/Providers/PayoneRouteServiceProvider.php | 2 +- 4 files changed, 26 insertions(+), 18 deletions(-) diff --git a/resources/views/Checkout/AmazonPayWidgets.twig b/resources/views/Checkout/AmazonPayWidgets.twig index 970b4942..c74d3ebd 100644 --- a/resources/views/Checkout/AmazonPayWidgets.twig +++ b/resources/views/Checkout/AmazonPayWidgets.twig @@ -20,14 +20,20 @@ // details by calling the GetOrderReferenceDetails operation. console.log("After Event: AccessToken= {{ accessToken }}"); console.log("After Event: workOrderId= {{ workOrderId }}"); - console.log("After Event: AccessToken= " + $orderReferenceId); + console.log("After Event: orderReferenceId= " + $orderReferenceId); - $.post("/payment/payone/checkout/amazonPay/getOrderReference'", { "accessToken" : t.access_token}, function (data) { - //$('#LoginWithAmazon').append(data); - console.log(data); - $("body").append(data); - }); + $.post("/payment/payone/checkout/amazonPay/getOrderReference'", + { + "accessToken": "{{ accessToken }}", + "workOrderId": "{{ workOrderId }}", + "amazonReferenceId": $orderReferenceId + }, + function (data) { + //$('#LoginWithAmazon').append(data); + console.log(data); + $("body").append(data); + }); // If rendering the AddressBook and Wallet widgets // on the same page, you do not have to provide any additional diff --git a/src/Controllers/AmazonPayController.php b/src/Controllers/AmazonPayController.php index 04d34563..0a22b2a5 100644 --- a/src/Controllers/AmazonPayController.php +++ b/src/Controllers/AmazonPayController.php @@ -81,24 +81,26 @@ public function renderWidgets(Twig $twig, Request $request) ]); } - public function getOrderReference() + public function getOrderReference(Request $request) { - $accestoken = "Atza|IwEBIJZWMleom3psDFOhELQjK6lHD-XtaxDJJhI4z7TzpELpshPpyJRSq-Zt3a5yPW7EjwWczlrBF2Vj6TgoRE4HPoGRiYhor5aqphG8iFKj-ATAFKHDspzQXl68xl0nozJSjUXNtdoK_LO-X7P0KZnw8Q2f6uojm1R1MkxGwLjgn96Y5gwE1eJ1_YJVxv-zpQahxJagDyGIlEWbX2AqtEArP_l8cR6n58hxDh_1olffwjk4XxlpVFlBNaI6lnJX15EamZkojPBkNRp3NGBMzJDGlXOapRtTCq5O56LZmVJaH8r2fWzaLYqyWl2cuRI7N6ioFoG-TVr4zQvxvgJzro8vn-jhSvPKq0k-0gusOG-iM6tWPwIxZ12eeljOkKJU8VV_nHS1KhKJRCvucb_X_ulWUoqxhrdmhvr4uRuuDszX7inVZQ"; - $workorderId = "123"; - $amazonReferenceId = "123"; - $amazonAddressToken = "123"; - - /** @var Api $api */ - $api = pluginApp(Api::class); + $accessToken = $request->get('accessToken'); + $workOrderId = $request->get('workOrderId'); + $amazonReferenceId = $request->get('amazonReferenceId'); + $amazonAddressToken = $request->get('amazonAddressToken') ?? ""; /** @var GenericPaymentDataProvider $genericPaymentDataProvider */ $genericPaymentDataProvider = pluginApp(GenericPaymentDataProvider::class); $requestParams = $genericPaymentDataProvider->getGetOrderReferenceDetailsRequestData( "Amazon Pay", - $workorderId, + $workOrderId, $amazonReferenceId, $amazonAddressToken ); + + $orderReferenceResponse = $this->api->doGenericPayment(GenericPayment::ACTIONTYPE_GETORDERREFERENCEDETAILS, $requestParams); + + + return $orderReferenceResponse; } public function setOrderReference(Request $request) diff --git a/src/Providers/Api/Request/GenericPaymentDataProvider.php b/src/Providers/Api/Request/GenericPaymentDataProvider.php index f4ea24a2..3c0ffefb 100644 --- a/src/Providers/Api/Request/GenericPaymentDataProvider.php +++ b/src/Providers/Api/Request/GenericPaymentDataProvider.php @@ -43,8 +43,8 @@ public function getGetOrderReferenceDetailsRequestData(string $paymentCode, $requestParams['add_paydata']['action'] = GenericPayment::ACTIONTYPE_GETORDERREFERENCEDETAILS; - $requestParams['add_paydata']['amazon_address_token'] = $amazonReferenceId; - $requestParams['add_paydata']['amazon_reference_id'] = $amazonAddressToken; + $requestParams['add_paydata']['amazon_address_token'] = $amazonAddressToken; + $requestParams['add_paydata']['amazon_reference_id'] = $amazonReferenceId; $requestParams['workorderid'] = $workOrderId; $this->validator->validate($requestParams); diff --git a/src/Providers/PayoneRouteServiceProvider.php b/src/Providers/PayoneRouteServiceProvider.php index 4921eb18..86b047aa 100644 --- a/src/Providers/PayoneRouteServiceProvider.php +++ b/src/Providers/PayoneRouteServiceProvider.php @@ -26,7 +26,7 @@ public function map(Router $router) $router->get('payment/payone/checkout/amazonPay/loginButton', 'Payone\Controllers\AmazonPayController@getAmazonPayLoginWidget'); $router->post('payment/payone/checkout/amazonPay/renderWidgets', 'Payone\Controllers\AmazonPayController@renderWidgets'); $router->post('payment/payone/checkout/amazonPay/setOrderReference', 'Payone\Controllers\AmazonPayController@setOrderReference'); - $router->get('payment/payone/checkout/amazonPay/getOrderReference', 'Payone\Controllers\AmazonPayController@getOrderReference'); + $router->post('payment/payone/checkout/amazonPay/getOrderReference', 'Payone\Controllers\AmazonPayController@getOrderReference'); $router->get('payment/payone/error', 'Payone\Controllers\CheckoutController@redirectWithNotice'); From fbdae836f87d731e6acbd8dc1dc8d954e6b7d430 Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Wed, 9 Sep 2020 17:44:12 +0200 Subject: [PATCH 131/353] removed unnecessary field --- .../GenericPayment/AmazonPayGetOrderReferenceRequest.php | 2 +- src/Controllers/AmazonPayController.php | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayGetOrderReferenceRequest.php b/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayGetOrderReferenceRequest.php index 38e3066f..6169b4b9 100644 --- a/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayGetOrderReferenceRequest.php +++ b/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayGetOrderReferenceRequest.php @@ -53,7 +53,7 @@ public function __construct( { $this->config = $config; $this->info = $info; - $this->add_paydata['amazon_address_token'] = $amazonAddressToken; + //$this->add_paydata['amazon_address_token'] = $amazonAddressToken; $this->add_paydata['amazon_reference_id'] = $amazonReferenceId; $this->workorderid = $workOrderId; $this->currency = $currency; diff --git a/src/Controllers/AmazonPayController.php b/src/Controllers/AmazonPayController.php index 0a22b2a5..4f297731 100644 --- a/src/Controllers/AmazonPayController.php +++ b/src/Controllers/AmazonPayController.php @@ -99,8 +99,7 @@ public function getOrderReference(Request $request) $orderReferenceResponse = $this->api->doGenericPayment(GenericPayment::ACTIONTYPE_GETORDERREFERENCEDETAILS, $requestParams); - - return $orderReferenceResponse; + return json_encode($orderReferenceResponse, true); } public function setOrderReference(Request $request) @@ -122,7 +121,7 @@ public function setOrderReference(Request $request) ); $configResponse = $this->api->doGenericPayment(GenericPayment::ACTIONTYPE_GETCONFIGURATION, $requestParams); - + return $configResponse; } private function getLanguageCode(string $lang): string From 75960215e5b27816389b713983f6f101e00e95b8 Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Wed, 9 Sep 2020 18:08:52 +0200 Subject: [PATCH 132/353] changed seller and client id --- .../GenericPayment/AmazonPayGetOrderReferenceRequest.php | 2 -- .../GenericPayment/GenericPaymentRequestFactory.php | 1 - src/Controllers/AmazonPayController.php | 8 ++++---- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayGetOrderReferenceRequest.php b/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayGetOrderReferenceRequest.php index 6169b4b9..c446bac4 100644 --- a/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayGetOrderReferenceRequest.php +++ b/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayGetOrderReferenceRequest.php @@ -22,7 +22,6 @@ class AmazonPayGetOrderReferenceRequest private $add_paydata = [ 'action' => 'getconfiguration', - 'amazon_address_token' => '', 'amazon_reference_id' => '', ]; @@ -45,7 +44,6 @@ class AmazonPayGetOrderReferenceRequest public function __construct( Config $config, SystemInfo $info, - string $amazonAddressToken, string $amazonReferenceId, string $workOrderId, string $currency diff --git a/resources/lib/PayoneApi/Request/GenericPayment/GenericPaymentRequestFactory.php b/resources/lib/PayoneApi/Request/GenericPayment/GenericPaymentRequestFactory.php index 4b0f476b..8fe80af1 100644 --- a/resources/lib/PayoneApi/Request/GenericPayment/GenericPaymentRequestFactory.php +++ b/resources/lib/PayoneApi/Request/GenericPayment/GenericPaymentRequestFactory.php @@ -46,7 +46,6 @@ public static function create($paymentMethod, $data, $referenceId = null) return new AmazonPayGetOrderReferenceRequest( $config, $systemInfo, - $data['add_paydata']['amazon_address_token'], $data['add_paydata']['amazon_reference_id'], $data['workorderid'], $data['currency']); diff --git a/src/Controllers/AmazonPayController.php b/src/Controllers/AmazonPayController.php index 4f297731..d856e382 100644 --- a/src/Controllers/AmazonPayController.php +++ b/src/Controllers/AmazonPayController.php @@ -43,10 +43,10 @@ public function getAmazonPayLoginWidget(Twig $twig) $lang = $this->getLanguageCode($localizationRepositoryContract->getLanguage()); $content = [ - 'clientId' => "amzn1.application-oa2-client.2c027e55b128457bb16edc2f0fc6bd71", - 'sellerId' => "A13SNST9X74Q8L", -// 'clientId' => $configResponse->getClientId(), -// 'sellerId' => $configResponse->getSellerId(), +// 'clientId' => "amzn1.application-oa2-client.2c027e55b128457bb16edc2f0fc6bd71", +// 'sellerId' => "A13SNST9X74Q8L", + 'clientId' => $configResponse->getClientId(), + 'sellerId' => $configResponse->getSellerId(), 'type' => "LwA", 'color' => "Gold", 'size' => "medium", From 933a07ee83517778f7bd3c67c8fddc97a862fc80 Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Wed, 9 Sep 2020 18:24:48 +0200 Subject: [PATCH 133/353] fixed return value --- src/Controllers/AmazonPayController.php | 2 +- .../Api/GenericPayment/GenericPaymentResponseFactory.php | 2 +- src/Services/Api.php | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Controllers/AmazonPayController.php b/src/Controllers/AmazonPayController.php index d856e382..bd462882 100644 --- a/src/Controllers/AmazonPayController.php +++ b/src/Controllers/AmazonPayController.php @@ -120,7 +120,7 @@ public function setOrderReference(Request $request) $amount ); - $configResponse = $this->api->doGenericPayment(GenericPayment::ACTIONTYPE_GETCONFIGURATION, $requestParams); + $configResponse = $this->api->doGenericPayment(GenericPayment::ACTIONTYPE_SETORDERREFERENCEDETAILS, $requestParams); return $configResponse; } diff --git a/src/Models/Api/GenericPayment/GenericPaymentResponseFactory.php b/src/Models/Api/GenericPayment/GenericPaymentResponseFactory.php index 1e411708..c8afd7e7 100644 --- a/src/Models/Api/GenericPayment/GenericPaymentResponseFactory.php +++ b/src/Models/Api/GenericPayment/GenericPaymentResponseFactory.php @@ -12,7 +12,7 @@ class GenericPaymentResponseFactory /** * @param string $actionType * @param array $responseData - * @return GetConfigurationResponse|GetOrderReferenceDetailsResponse + * @return mixed */ public static function create(string $actionType, array $responseData) { diff --git a/src/Services/Api.php b/src/Services/Api.php index 83b079c3..10253169 100644 --- a/src/Services/Api.php +++ b/src/Services/Api.php @@ -234,9 +234,9 @@ public function doGetInvoice($requestParams): GetInvoiceResponse /** * @param string $actionType * @param array $requestParams - * @return GetConfigurationResponse + * @return mixed */ - public function doGenericPayment(string $actionType, array $requestParams): GetConfigurationResponse + public function doGenericPayment(string $actionType, array $requestParams) { $response = $this->doLibCall(self::REQUEST_TYPE_GENERIC_PAYMENT, $requestParams); $responseObject = GenericPaymentResponseFactory::create($actionType, $response); From df3cc60ddd91ec973f8e39fec6f1d344c9b695f2 Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Wed, 9 Sep 2020 19:13:17 +0200 Subject: [PATCH 134/353] added orderReferenceResponse model --- .../GenericPaymentResponseFactory.php | 18 +- .../GetOrderReferenceDetailsResponse.php | 217 +++++++++++++++--- 2 files changed, 193 insertions(+), 42 deletions(-) diff --git a/src/Models/Api/GenericPayment/GenericPaymentResponseFactory.php b/src/Models/Api/GenericPayment/GenericPaymentResponseFactory.php index c8afd7e7..e3d7b5ce 100644 --- a/src/Models/Api/GenericPayment/GenericPaymentResponseFactory.php +++ b/src/Models/Api/GenericPayment/GenericPaymentResponseFactory.php @@ -16,8 +16,7 @@ class GenericPaymentResponseFactory */ public static function create(string $actionType, array $responseData) { - switch($actionType) - { + switch ($actionType) { case GenericPayment::ACTIONTYPE_GETCONFIGURATION: return self::makeGetConfigurationResponse($responseData); break; @@ -58,8 +57,19 @@ private static function makeGetOrderReferenceDetailsResponse(array $responseData return $response->init( $responseData['success'] ?? false, $responseData['errormessage'] ?? '', - $responseData['responseData']['add_paydata[client_id]'] ?? '', - $responseData['responseData']['add_paydata[seller_id]'] ?? '', + $responseData['responseData']['add_paydata[shipping_zip]'] ?? '', + $responseData['responseData']['add_paydata[shipping_city]'] ?? '', + $responseData['responseData']['add_paydata[shipping_type]'] ?? '', + $responseData['responseData']['add_paydata[shipping_country]'] ?? '', + $responseData['responseData']['add_paydata[shipping_firstname]'] ?? '', + $responseData['responseData']['add_paydata[shipping_lastname]'] ?? '', + $responseData['responseData']['add_paydata[billing_zip]'] ?? '', + $responseData['responseData']['add_paydata[billing_city]'] ?? '', + $responseData['responseData']['add_paydata[billing_type]'] ?? '', + $responseData['responseData']['add_paydata[billing_country]'] ?? '', + $responseData['responseData']['add_paydata[billing_firstname]'] ?? '', + $responseData['responseData']['add_paydata[billing_lastname]'] ?? '', + $responseData['responseData']['add_paydata[storename]'] ?? '', $responseData['responseData']['workorderid'] ?? '' ); } diff --git a/src/Models/Api/GenericPayment/GetOrderReferenceDetailsResponse.php b/src/Models/Api/GenericPayment/GetOrderReferenceDetailsResponse.php index 5bfe660c..49135fe5 100644 --- a/src/Models/Api/GenericPayment/GetOrderReferenceDetailsResponse.php +++ b/src/Models/Api/GenericPayment/GetOrderReferenceDetailsResponse.php @@ -9,43 +9,61 @@ */ class GetOrderReferenceDetailsResponse extends ResponseAbstract implements \JsonSerializable { - /** - status=OK - add_paydata[shipping_zip]=80939 - add_paydata[shipping_city]=München - add_paydata[shipping_type]=Physical - add_paydata[shipping_country]=DE - add_paydata[shipping_firstname]=Alfred - add_paydata[shipping_lastname]=Amazing - add_paydata[billing_zip]=80939 - add_paydata[billing_city]=München - add_paydata[billing_type]=Physical - add_paydata[billing_country]=DE - add_paydata[billing_firstname]=Alfred - add_paydata[billing_lastname]=Amazing - add_paydata[storename]= Your Storename - workorderid= WORKORDERID12345 - */ - private $clientId = ''; - private $sellerId = ''; - private $workorderId = ''; + private $shippingZip; + private $shippingCity; + private $shippingType; + private $shippingCountry; + private $shippingFirstname; + private $shippingLastname; + private $billingZip; + private $billingCity; + private $billingType; + private $billingCountry; + private $billingFirstname; + private $billingLastname; + private $storename; + private $workOrderId; /** * @param $success * @param $errorMessage - * @param $clientId - * @param $sellerId - * @param $workorderId - * + * @param $shippingZip + * @param $shippingCity + * @param $shippingType + * @param $shippingCountry + * @param $shippingFirstname + * @param $shippingLastname + * @param $billingZip + * @param $billingCity + * @param $billingType + * @param $billingCountry + * @param $billingFirstname + * @param $billingLastname + * @param $storename + * @param $workOrderId * @return $this */ - public function init($success, $errorMessage, $clientId, $sellerId, $workorderId) + public function init($success, $errorMessage, $shippingZip, $shippingCity, $shippingType, $shippingCountry, + $shippingFirstname, $shippingLastname, $billingZip, $billingCity, $billingType, $billingCountry, + $billingFirstname, $billingLastname, $storename, $workOrderId) { $this->success = $success; $this->errorMessage = $errorMessage; - $this->clientId = $clientId; - $this->sellerId = $sellerId; - $this->workorderId = $workorderId; + $this->shippingZip = $shippingZip; + $this->shippingCity = $shippingCity; + $this->shippingType = $shippingType; + $this->shippingCountry = $shippingCountry; + $this->shippingFirstname = $shippingFirstname; + $this->shippingLastname = $shippingLastname; + $this->billingZip = $billingZip; + $this->billingCity = $billingCity; + $this->billingType = $billingType; + $this->billingCountry = $billingCountry; + $this->billingFirstname = $billingFirstname; + $this->billingLastname = $billingLastname; + $this->storename = $storename; + $this->workOrderId = $workOrderId; + return $this; } @@ -53,34 +71,157 @@ public function jsonSerialize(): array { return parent::jsonSerialize() + [ - 'clientId' => $this->clientId, - 'sellerId' => $this->sellerId, - 'workorderId' => $this->workorderId, + 'shippingCity' => $this->shippingCity, + 'shippingType' => $this->shippingType, + 'shippingCountry' => $this->shippingCountry, + 'shippingFirstname' => $this->shippingFirstname, + 'shippingLastname' => $this->shippingLastname, + 'billingZip' => $this->billingZip, + 'billingCity' => $this->billingCity, + 'billingType' => $this->billingType, + 'billingCountry' => $this->billingCountry, + 'billingFirstname' => $this->billingFirstname, + 'billingLastname' => $this->billingLastname, + 'storename' => $this->storename, + 'workOrderId' => $this->workOrderId ]; } /** - * @return string + * @return mixed + */ + public function getShippingZip() + { + return $this->shippingZip; + } + + /** + * @return mixed + */ + public function getShippingCity() + { + return $this->shippingCity; + } + + /** + * @return mixed + */ + public function getShippingType() + { + return $this->shippingType; + } + + /** + * @return mixed + */ + public function getShippingCountry() + { + return $this->shippingCountry; + } + + /** + * @return mixed + */ + public function getShippingFirstname() + { + return $this->shippingFirstname; + } + + /** + * @return mixed + */ + public function getShippingLastname() + { + return $this->shippingLastname; + } + + /** + * @return mixed + */ + public function getBillingZip() + { + return $this->billingZip; + } + + /** + * @return mixed + */ + public function getBillingCity() + { + return $this->billingCity; + } + + /** + * @return mixed */ - public function getClientId(): string + public function getBillingType() { - return $this->clientId; + return $this->billingType; + } + + /** + * @return mixed + */ + public function getBillingCountry() + { + return $this->billingCountry; + } + + /** + * @return mixed + */ + public function getBillingFirstname() + { + return $this->billingFirstname; + } + + /** + * @return mixed + */ + public function getBillingLastname() + { + return $this->billingLastname; + } + + /** + * @return mixed + */ + public function getStorename() + { + return $this->storename; + } + + /** + * @return mixed + */ + public function getWorkOrderId() + { + return $this->workOrderId; + } + + /** + * @return bool + */ + public function isSuccess(): bool + { + return $this->success; } /** * @return string */ - public function getSellerId(): string + public function getErrorMessage(): string { - return $this->sellerId; + return $this->errorMessage; } /** * @return string */ - public function getWorkorderId(): string + public function getTransactionID(): string { - return $this->workorderId; + return $this->transactionID; } + } From 2913c315baef0373f034042410a149a6a15c9f5e Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Fri, 11 Sep 2020 13:46:09 +0200 Subject: [PATCH 135/353] added a bunch of functionalities --- config.json | 8 + resources/lang/de/Config.properties | 1 + resources/lang/en/Config.properties | 1 + .../AmazonPayConfirmOrderReferenceRequest.php | 162 +++++++++++++ .../AmazonPayGetOrderReferenceRequest.php | 14 +- .../AmazonPaySetOrderReferenceRequest.php | 135 +++++++++++ .../GenericPaymentRequestFactory.php | 24 +- resources/lib/doGenericPayment.php | 7 +- .../Checkout/AmazonPayAddressBookWidget.twig | 2 + .../views/Checkout/AmazonPayCheckout.twig | 28 ++- resources/views/Checkout/AmazonPayLogin.twig | 14 +- .../views/Checkout/AmazonPayWalletWidget.twig | 1 - .../views/Checkout/AmazonPayWidgets.twig | 31 ++- src/Controllers/AmazonPayController.php | 96 ++++++-- .../ConfirmOrderReferenceResponse.php | 42 ++++ .../GenericPaymentResponseFactory.php | 54 +++++ .../GetConfigurationResponse.php | 28 ++- .../GetOrderReferenceDetailsResponse.php | 141 ++++++++++- .../SetOrderReferenceDetailsResponse.php | 58 +++++ .../Request/GenericPaymentDataProvider.php | 44 +++- .../Api/Request/Models/GenericPayment.php | 1 + .../DataProviders/AmazonPayWalletWidget.php | 21 -- src/Providers/PayoneRouteServiceProvider.php | 2 + src/Providers/PayoneServiceProvider.php | 5 + src/Services/AmazonPayService.php | 221 ++++++++++++++++++ 25 files changed, 1060 insertions(+), 81 deletions(-) create mode 100644 resources/lib/PayoneApi/Request/GenericPayment/AmazonPayConfirmOrderReferenceRequest.php create mode 100644 resources/lib/PayoneApi/Request/GenericPayment/AmazonPaySetOrderReferenceRequest.php delete mode 100644 resources/views/Checkout/AmazonPayWalletWidget.twig create mode 100644 src/Models/Api/GenericPayment/ConfirmOrderReferenceResponse.php create mode 100644 src/Models/Api/GenericPayment/SetOrderReferenceDetailsResponse.php delete mode 100644 src/Providers/DataProviders/AmazonPayWalletWidget.php create mode 100644 src/Services/AmazonPayService.php diff --git a/config.json b/config.json index 4c1e8496..abd6dc21 100644 --- a/config.json +++ b/config.json @@ -887,6 +887,14 @@ "options": { "defaultValue": "DE,AT,CH" } + }, + "PAYONE_PAYONE_AMAZON_PAY.sandbox": { + "type": "checkBox", + "required": false, + "label": "Config.PAYONEPAYONEAMAZONPAYSandboxLabel", + "options": { + "defaultValue": "0" + } } } } diff --git a/resources/lang/de/Config.properties b/resources/lang/de/Config.properties index f2c87528..fc8e2a2b 100644 --- a/resources/lang/de/Config.properties +++ b/resources/lang/de/Config.properties @@ -124,6 +124,7 @@ PAYONEPAYONEDIRECTDEBITMaxCartAmountLabel=Maximaler Bestellwert PAYONEPAYONEDIRECTDEBITAllowedCountriesLabel=Erlaubte Lieferländer AmazonPayTab=Amazon Pay PAYONEPAYONEAMAZONPAYActiveLabel=Aktiv +PAYONEPAYONEAMAZONPAYSandboxLabel=Testumgebung PAYONEPAYONEAMAZONPAYActivePossibleValue0=Nein PAYONEPAYONEAMAZONPAYActivePossibleValue1=Ja PAYONEPAYONEAMAZONPAYNameLabel=Name diff --git a/resources/lang/en/Config.properties b/resources/lang/en/Config.properties index a69b57b0..d1c7cd79 100644 --- a/resources/lang/en/Config.properties +++ b/resources/lang/en/Config.properties @@ -124,6 +124,7 @@ PAYONEPAYONEDIRECTDEBITMaxCartAmountLabel=Maximum order value PAYONEPAYONEDIRECTDEBITAllowedCountriesLabel=Allowed countries of delivery AmazonPayTab=Amazon Pay PAYONEPAYONEAMAZONPAYActiveLabel=Active +PAYONEPAYONEAMAZONPAYSandboxLabel=Test-Environment PAYONEPAYONEAMAZONPAYActivePossibleValue0=No PAYONEPAYONEAMAZONPAYActivePossibleValue1=Yes PAYONEPAYONEAMAZONPAYNameLabel=Name diff --git a/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayConfirmOrderReferenceRequest.php b/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayConfirmOrderReferenceRequest.php new file mode 100644 index 00000000..ef343913 --- /dev/null +++ b/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayConfirmOrderReferenceRequest.php @@ -0,0 +1,162 @@ + 'confirmorderreference', + 'reference' => '', + 'amazon_reference_id' => '', + ]; + + /** @var Config */ + private $config; + + /** @var SystemInfo */ + private $info; + + + /** + * AmazonPayGetOrderReferenceRequest constructor. + * + * @param Config $config + * @param SystemInfo $info + * @param string $amazonReferenceId + * @param string $workOrderId + * @param string $amount + * @param string $currency + * @param string $successurl + * @param string $errorurl + */ + public function __construct( + Config $config, + SystemInfo $info, + string $amazonReferenceId, + string $workOrderId, + string $amount, + string $currency, + string $successurl, + string $errorurl + ) + { + $this->config = $config; + $this->info = $info; + $this->add_paydata['amazon_reference_id'] = $amazonReferenceId; + $this->workorderid = $workOrderId; + $this->amount = $amount; + $this->currency = $currency; + $this->successurl = $successurl; + $this->errorurl = $errorurl; + } + + /** + * @return string + */ + public function getRequest(): string + { + return $this->request; + } + + /** + * @return string + */ + public function getClearingtype(): string + { + return $this->clearingtype; + } + + /** + * @return string + */ + public function getWallettype(): string + { + return $this->wallettype; + } + + /** + * @return string + */ + public function getAmount(): string + { + return $this->amount; + } + + /** + * @return string + */ + public function getCurrency(): string + { + return $this->currency; + } + + /** + * @return string + */ + public function getWorkorderid(): string + { + return $this->workorderid; + } + + /** + * @return string + */ + public function getSuccessurl(): string + { + return $this->successurl; + } + + /** + * @return string + */ + public function getErrorurl(): string + { + return $this->errorurl; + } + + /** + * @return array + */ + public function getAddPaydata(): array + { + return $this->add_paydata; + } + + /** + * @return Config + */ + public function getConfig(): Config + { + return $this->config; + } + + /** + * @return SystemInfo + */ + public function getInfo(): SystemInfo + { + return $this->info; + } +} diff --git a/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayGetOrderReferenceRequest.php b/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayGetOrderReferenceRequest.php index c446bac4..507579ea 100644 --- a/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayGetOrderReferenceRequest.php +++ b/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayGetOrderReferenceRequest.php @@ -16,12 +16,14 @@ class AmazonPayGetOrderReferenceRequest private $wallettype = "AMZ"; + private $amount; + private $currency; private $workorderid; private $add_paydata = [ - 'action' => 'getconfiguration', + 'action' => 'getorderreferencedetails', 'amazon_reference_id' => '', ]; @@ -36,7 +38,6 @@ class AmazonPayGetOrderReferenceRequest * * @param Config $config * @param SystemInfo $info - * @param string $amazonAddressToken * @param string $amazonReferenceId * @param string $workOrderId * @param string $currency @@ -51,7 +52,6 @@ public function __construct( { $this->config = $config; $this->info = $info; - //$this->add_paydata['amazon_address_token'] = $amazonAddressToken; $this->add_paydata['amazon_reference_id'] = $amazonReferenceId; $this->workorderid = $workOrderId; $this->currency = $currency; @@ -81,6 +81,14 @@ public function getWallettype(): string return $this->wallettype; } + /** + * @return mixed + */ + public function getAmount() + { + return $this->amount; + } + /** * @return string */ diff --git a/resources/lib/PayoneApi/Request/GenericPayment/AmazonPaySetOrderReferenceRequest.php b/resources/lib/PayoneApi/Request/GenericPayment/AmazonPaySetOrderReferenceRequest.php new file mode 100644 index 00000000..109750b4 --- /dev/null +++ b/resources/lib/PayoneApi/Request/GenericPayment/AmazonPaySetOrderReferenceRequest.php @@ -0,0 +1,135 @@ + 'setorderreferencedetails', + 'amazon_reference_id' => '', + ]; + + /** @var Config */ + private $config; + + /** @var SystemInfo */ + private $info; + + /** + * AmazonPaySetOrderReferenceRequest constructor. + * + * @param Config $config + * @param SystemInfo $info + * @param string $amazonReferenceId + * @param string $workOrderId + * @param string $amount + * @param string $currency + */ + public function __construct( + Config $config, + SystemInfo $info, + string $amazonReferenceId, + string $workOrderId, + string $amount, + string $currency + ) + { + $this->config = $config; + $this->info = $info; + $this->add_paydata['amazon_reference_id'] = $amazonReferenceId; + $this->workorderid = $workOrderId; + $this->amount = $amount; + $this->currency = $currency; + } + + /** + * @return string + */ + public function getRequest(): string + { + return $this->request; + } + + /** + * @return string + */ + public function getClearingtype(): string + { + return $this->clearingtype; + } + + /** + * @return string + */ + public function getWallettype(): string + { + return $this->wallettype; + } + + /** + * @return string + */ + public function getAmount(): string + { + return $this->amount; + } + + /** + * @return string + */ + public function getCurrency(): string + { + return $this->currency; + } + + /** + * @return string + */ + public function getWorkorderid(): string + { + return $this->workorderid; + } + + /** + * @return array + */ + public function getAddPaydata(): array + { + return $this->add_paydata; + } + + /** + * @return Config + */ + public function getConfig(): Config + { + return $this->config; + } + + /** + * @return SystemInfo + */ + public function getInfo(): SystemInfo + { + return $this->info; + } + +} diff --git a/resources/lib/PayoneApi/Request/GenericPayment/GenericPaymentRequestFactory.php b/resources/lib/PayoneApi/Request/GenericPayment/GenericPaymentRequestFactory.php index 8fe80af1..9e835392 100644 --- a/resources/lib/PayoneApi/Request/GenericPayment/GenericPaymentRequestFactory.php +++ b/resources/lib/PayoneApi/Request/GenericPayment/GenericPaymentRequestFactory.php @@ -3,6 +3,7 @@ namespace PayoneApi\Request\GenericPayment; use PayoneApi\Lib\Version; +use PayoneApi\Request\Parts\RedirectUrls; use PayoneApi\Request\Parts\SystemInfo; use PayoneApi\Request\Parts\Config; use PayoneApi\Request\RequestFactoryContract; @@ -36,8 +37,7 @@ public static function create($paymentMethod, $data, $referenceId = null) $systemInfoData['module_version'] ); - switch($data['add_paydata']['action']) - { + switch ($data['add_paydata']['action']) { case 'getconfiguration': // Other configs can be added here. Just add an if-condition for $paymentMethod return new AmazonPayConfigurationRequest($config, $systemInfo, $data['currency']); @@ -50,6 +50,26 @@ public static function create($paymentMethod, $data, $referenceId = null) $data['workorderid'], $data['currency']); break; + case 'setorderreferencedetails': + return new AmazonPaySetOrderReferenceRequest( + $config, + $systemInfo, + $data['add_paydata']['amazon_reference_id'], + $data['workorderid'], + $data['amount'], + $data['currency']); + break; + case 'confirmorderreference': + return new AmazonPayConfirmOrderReferenceRequest( + $config, + $systemInfo, + $data['add_paydata']['amazon_reference_id'], + $data['workorderid'], + $data['amount'], + $data['currency'], + $data['successurl'], + $data['errorurl']); + break; } diff --git a/resources/lib/doGenericPayment.php b/resources/lib/doGenericPayment.php index 38a156ca..1bca886d 100644 --- a/resources/lib/doGenericPayment.php +++ b/resources/lib/doGenericPayment.php @@ -20,9 +20,14 @@ $data['clearingtype'] = $sdkRestApi::getParam('clearingtype'); $data['wallettype'] = $sdkRestApi::getParam('wallettype'); $data['add_paydata'] = $sdkRestApi::getParam('add_paydata'); - $data['currency'] = $sdkRestApi::getParam('currency'); $data['workorderid'] = $sdkRestApi::getParam('workorderid'); + $data['currency'] = $sdkRestApi::getParam('currency'); + $data['amount'] = $sdkRestApi::getParam('amount'); + + $data['successurl'] = $sdkRestApi::getParam('successurl'); + $data['errorurl'] = $sdkRestApi::getParam('errorurl'); + $data['context'] = $sdkRestApi::getParam('context'); $data['systemInfo'] = $sdkRestApi::getParam('systemInfo'); diff --git a/resources/views/Checkout/AmazonPayAddressBookWidget.twig b/resources/views/Checkout/AmazonPayAddressBookWidget.twig index 909891ea..80508635 100644 --- a/resources/views/Checkout/AmazonPayAddressBookWidget.twig +++ b/resources/views/Checkout/AmazonPayAddressBookWidget.twig @@ -1 +1,3 @@ +
+
diff --git a/resources/views/Checkout/AmazonPayCheckout.twig b/resources/views/Checkout/AmazonPayCheckout.twig index efbb3d97..97ae7727 100644 --- a/resources/views/Checkout/AmazonPayCheckout.twig +++ b/resources/views/Checkout/AmazonPayCheckout.twig @@ -1,24 +1,50 @@ {% if services.template.isCurrentTemplate('tpl.checkout') %} -
+ {#
#} + {##} + diff --git a/resources/views/Checkout/AmazonPayLogin.twig b/resources/views/Checkout/AmazonPayLogin.twig index 94a18cd6..60c2e34b 100644 --- a/resources/views/Checkout/AmazonPayLogin.twig +++ b/resources/views/Checkout/AmazonPayLogin.twig @@ -33,6 +33,10 @@ $("body").append(data); }); }); + document.getElementById("LoginWithAmazon").style.display = "none"; + document.getElementById("walletWidgetDiv").style.display = "block"; + document.getElementById("addressBookWidgetDiv").style.display = "block"; + document.getElementById("LogoutWithAmazon").style.display = "block"; }, onError: function (error) { // your error handling code. @@ -42,8 +46,10 @@ } }); } - - - +{% if config('Payone.PAYONE_PAYONE_AMAZON_PAY.sandbox') == "true" %} + +{% else %} + +{% endif %} + diff --git a/resources/views/Checkout/AmazonPayWalletWidget.twig b/resources/views/Checkout/AmazonPayWalletWidget.twig deleted file mode 100644 index c5363892..00000000 --- a/resources/views/Checkout/AmazonPayWalletWidget.twig +++ /dev/null @@ -1 +0,0 @@ -
diff --git a/resources/views/Checkout/AmazonPayWidgets.twig b/resources/views/Checkout/AmazonPayWidgets.twig index c74d3ebd..a24bed27 100644 --- a/resources/views/Checkout/AmazonPayWidgets.twig +++ b/resources/views/Checkout/AmazonPayWidgets.twig @@ -22,6 +22,14 @@ console.log("After Event: workOrderId= {{ workOrderId }}"); console.log("After Event: orderReferenceId= " + $orderReferenceId); + // ID still required! + var buyNowBtn = document.getElementById("buy-now"); + + buyNowBtn.addEventListener('click', function () { + OffAmazonPayments.initConfirmationFlow("{{ content.sellerId }}", $orderReferenceId, function(confirmationFlow) { + placeOrder(confirmationFlow); + }); + }); $.post("/payment/payone/checkout/amazonPay/getOrderReference'", { @@ -50,11 +58,8 @@ // when the AddressBook widget has been rendered. }, onError: function(error) { - // Your error handling code. - // During development you can use the following - // code to view error messages: - // console.log(error.getErrorCode() + ': ' + error.getErrorMessage()); - // See "Handling Errors" for more information. + document.getElementById("errorCode").innerHTML = error.getErrorCode(); + document.getElementById("errorMessage").innerHTML = error.getErrorMessage(); } }); addressBookWidget.bind("addressBookWidgetDiv"); @@ -83,5 +88,21 @@ walletWidget.setPresentmentCurrency("EUR"); // ISO-4217 currency code, merchant is expected to enter a valid currency supported by Amazon Pay. walletWidget.bind("walletWidgetDiv"); + + // your function to initiate order processing in backend + // recommendation: use the latest version of the jQuery library for the $.ajax function + function placeOrder(confirmationFlow) { + $.ajax({ + url: "/payment/payone/checkout/amazonPay/placeOrder", + success: function (data) { + confirmationFlow.success(); // continue Amazon Pay hosted site + }, + error: function (data) { // called on ajax error and timeout + confirmationFlow.error(); // abort Amazon Pay initConfirmationFlow + // you might want to add additional error handling + }, + timeout: "4000" + }); + } }); diff --git a/src/Controllers/AmazonPayController.php b/src/Controllers/AmazonPayController.php index bd462882..dc746584 100644 --- a/src/Controllers/AmazonPayController.php +++ b/src/Controllers/AmazonPayController.php @@ -2,10 +2,19 @@ namespace Payone\Controllers; +use Payone\Helpers\PaymentHelper; +use Payone\Methods\PayoneAmazonPayPaymentMethod; +use Payone\Models\Api\GenericPayment\GetOrderReferenceDetailsResponse; +use Payone\Models\Api\GenericPayment\SetOrderReferenceDetailsResponse; use Payone\PluginConstants; use Payone\Providers\Api\Request\GenericPaymentDataProvider; use Payone\Providers\Api\Request\Models\GenericPayment; +use Payone\Services\AmazonPayService; use Payone\Services\Api; +use PayoneApi\Request\GenericPayment\AmazonPayGetOrderReferenceRequest; +use Plenty\Modules\Basket\Contracts\BasketRepositoryContract; +use Plenty\Modules\Basket\Models\Basket; +use Plenty\Modules\Frontend\Contracts\Checkout; use Plenty\Modules\Webshop\Contracts\LocalizationRepositoryContract; use Plenty\Plugin\Controller; use Plenty\Plugin\Http\Request; @@ -60,7 +69,7 @@ public function getAmazonPayLoginWidget(Twig $twig) } - public function renderWidgets(Twig $twig, Request $request) + public function renderWidgets(Twig $twig, PaymentHelper $paymentHelper, Request $request) { // AccessToken in Request $accessToken = $request->get('accessToken'); @@ -73,55 +82,106 @@ public function renderWidgets(Twig $twig, Request $request) 'addressBookScope' => "profile payments:widget payments:shipping_address payments:billing_address", 'walletScope' => "profile payments:widget payments:shipping_address payments:billing_address", ]; + $amazonPayMopId = $paymentHelper->getMopId(PayoneAmazonPayPaymentMethod::PAYMENT_CODE); return $twig->render(PluginConstants::NAME . '::Checkout.AmazonPayWidgets', [ 'content' => $content, 'accessToken' => $accessToken, - 'workOrderId' => $workdOrderId + 'workOrderId' => $workdOrderId, + 'amazonPayMopId' => $amazonPayMopId ]); } - public function getOrderReference(Request $request) + public function getOrderReference(Request $request, Checkout $checkout) { - $accessToken = $request->get('accessToken'); $workOrderId = $request->get('workOrderId'); $amazonReferenceId = $request->get('amazonReferenceId'); - $amazonAddressToken = $request->get('amazonAddressToken') ?? ""; + // $amazonAddressToken = $request->get('amazonAddressToken') ?? ""; /** @var GenericPaymentDataProvider $genericPaymentDataProvider */ $genericPaymentDataProvider = pluginApp(GenericPaymentDataProvider::class); $requestParams = $genericPaymentDataProvider->getGetOrderReferenceDetailsRequestData( "Amazon Pay", $workOrderId, - $amazonReferenceId, - $amazonAddressToken + $amazonReferenceId ); + /** @var GetOrderReferenceDetailsResponse $orderReferenceResponse */ $orderReferenceResponse = $this->api->doGenericPayment(GenericPayment::ACTIONTYPE_GETORDERREFERENCEDETAILS, $requestParams); - return json_encode($orderReferenceResponse, true); + /** @var AmazonPayService $amazonPayService */ + $amazonPayService = pluginApp(AmazonPayService::class); + $newAddress = $amazonPayService->registerCustomerFromAmazonPay($orderReferenceResponse); + + $checkout->setCustomerInvoiceAddressId($newAddress->id); + $checkout->setCustomerShippingAddressId($newAddress->id); + + return json_encode($checkout, true); } - public function setOrderReference(Request $request) + public function setOrderReference(Request $request, BasketRepositoryContract $basketRepositoryContract) { - $workOrderId = ""; - $amazonReferenceId = ""; - $amazonAddressToken = ""; - $storename = ""; - $amount = ""; + $basket = $basketRepositoryContract->load(); + $amount = $basket->basketAmount; + //$amount = $request->get('amount'); + $workOrderId = $request->get('workOrderId'); + $amazonReferenceId = $request->get('amazonReferenceId'); + //$amazonAddressToken = $request->get('workOrderId'); + //$storename = $request->get('storename'); $requestParams = $this->dataProvider->getSetOrderReferenceDetailsRequestData( "Amazon Pay", $workOrderId, $amazonReferenceId, - $amazonAddressToken, - $storename, + // $amazonAddressToken, + // $storename, $amount ); - $configResponse = $this->api->doGenericPayment(GenericPayment::ACTIONTYPE_SETORDERREFERENCEDETAILS, $requestParams); - return $configResponse; + $orderReferenceResponse = $this->api->doGenericPayment(GenericPayment::ACTIONTYPE_SETORDERREFERENCEDETAILS, $requestParams); + return $orderReferenceResponse; + } + + public function placeOrder() + { + // setOrder + + + $workOrderId = ""; + $reference = ""; + $amazonReferenceId = ""; + $amount = ""; + + $requestParams = $this->dataProvider->getConfirmOrderReferenceRequestData("Amazon Pay", $workOrderId, $reference, $amazonReferenceId, $amount); + + $confirmOrderReferenceResponse = $this->api->doGenericPayment(GenericPayment::ACTIONTYPE_CONFIRMORDERREFERENCE, $requestParams); + return $confirmOrderReferenceResponse; + } + + public function debugTest() + { + /** @var GetOrderReferenceDetailsResponse $orderRefDetails */ + $orderRefDetails = pluginApp(GetOrderReferenceDetailsResponse::class); + $orderRefDetails->shippingCompany = "TestCompany"; + $orderRefDetails->shippingFirstname = "FirstName"; + $orderRefDetails->shippingLastname = "LastName"; + $orderRefDetails->shippingStreet = "Street 123"; + $orderRefDetails->shippingZip = "12345"; + $orderRefDetails->shippingCity = "Kassel"; + $orderRefDetails->shippingCountry = "DE"; + + + + /** @var AmazonPayService $apiDebug */ + $apiDebug = pluginApp(AmazonPayService::class); + $address = $apiDebug->registerCustomerFromAmazonPay($orderRefDetails); + + // basket setShipping/setBilling... Methode zum Setzen der Addresse + //$createdAddress = $contactAddress->createAddress($address->toArray(), + // AddressRelationType::DELIVERY_ADDRESS); + + return $address; } private function getLanguageCode(string $lang): string diff --git a/src/Models/Api/GenericPayment/ConfirmOrderReferenceResponse.php b/src/Models/Api/GenericPayment/ConfirmOrderReferenceResponse.php new file mode 100644 index 00000000..feeb3a5c --- /dev/null +++ b/src/Models/Api/GenericPayment/ConfirmOrderReferenceResponse.php @@ -0,0 +1,42 @@ +success = $success; + $this->errorMessage = $errorMessage; + $this->workOrderId = $workorderId; + return $this; + } + + public function jsonSerialize(): array + { + return parent::jsonSerialize() + + [ + 'workOrderId' => $this->workOrderId, + ]; + } + + /** + * @return mixed + */ + public function getWorkOrderId() + { + return $this->workOrderId; + } + +} diff --git a/src/Models/Api/GenericPayment/GenericPaymentResponseFactory.php b/src/Models/Api/GenericPayment/GenericPaymentResponseFactory.php index e3d7b5ce..1e89797e 100644 --- a/src/Models/Api/GenericPayment/GenericPaymentResponseFactory.php +++ b/src/Models/Api/GenericPayment/GenericPaymentResponseFactory.php @@ -23,6 +23,12 @@ public static function create(string $actionType, array $responseData) case GenericPayment::ACTIONTYPE_GETORDERREFERENCEDETAILS: return self::makeGetOrderReferenceDetailsResponse($responseData); break; + case GenericPayment::ACTIONTYPE_SETORDERREFERENCEDETAILS: + return self::makeSetOrderReferenceDetailsResponse($responseData); + break; + case GenericPayment::ACTIONTYPE_CONFIRMORDERREFERENCE: + return self::makeConfirmOrderReferenceResponse($responseData); + break; } } @@ -41,6 +47,7 @@ private static function makeGetConfigurationResponse(array $responseData): GetCo $responseData['errormessage'] ?? '', $responseData['responseData']['add_paydata[client_id]'] ?? '', $responseData['responseData']['add_paydata[seller_id]'] ?? '', + $responseData['responseData']['currency'] ?? '', $responseData['responseData']['workorderid'] ?? '' ); } @@ -58,19 +65,66 @@ private static function makeGetOrderReferenceDetailsResponse(array $responseData $responseData['success'] ?? false, $responseData['errormessage'] ?? '', $responseData['responseData']['add_paydata[shipping_zip]'] ?? '', + $responseData['responseData']['add_paydata[shipping_street]'] ?? '', + $responseData['responseData']['add_paydata[shipping_company]'] ?? '', $responseData['responseData']['add_paydata[shipping_city]'] ?? '', $responseData['responseData']['add_paydata[shipping_type]'] ?? '', $responseData['responseData']['add_paydata[shipping_country]'] ?? '', + $responseData['responseData']['add_paydata[shipping_district]'] ?? '', + $responseData['responseData']['add_paydata[shipping_telephonenumber]'] ?? '', + $responseData['responseData']['add_paydata[shipping_state]'] ?? '', $responseData['responseData']['add_paydata[shipping_firstname]'] ?? '', $responseData['responseData']['add_paydata[shipping_lastname]'] ?? '', $responseData['responseData']['add_paydata[billing_zip]'] ?? '', + $responseData['responseData']['add_paydata[billing_street]'] ?? '', + $responseData['responseData']['add_paydata[billing_company]'] ?? '', $responseData['responseData']['add_paydata[billing_city]'] ?? '', $responseData['responseData']['add_paydata[billing_type]'] ?? '', $responseData['responseData']['add_paydata[billing_country]'] ?? '', $responseData['responseData']['add_paydata[billing_firstname]'] ?? '', $responseData['responseData']['add_paydata[billing_lastname]'] ?? '', + $responseData['responseData']['add_paydata[billing_district]'] ?? '', + $responseData['responseData']['add_paydata[billing_telephonenumber]'] ?? '', + $responseData['responseData']['add_paydata[billing_state]'] ?? '', $responseData['responseData']['add_paydata[storename]'] ?? '', $responseData['responseData']['workorderid'] ?? '' ); } + + /** + * @param array $responseData + * @return SetOrderReferenceDetailsResponse + */ + private static function makeSetOrderReferenceDetailsResponse(array $responseData): SetOrderReferenceDetailsResponse + { + /** @var SetOrderReferenceDetailsResponse $response */ + $response = pluginApp(SetOrderReferenceDetailsResponse::class); + + return $response->init( + $responseData['success'] ?? false, + $responseData['errormessage'] ?? '', + $responseData['responseData']['add_paydata[amazonAddressToken]'] ?? '', + $responseData['responseData']['add_paydata[amazonReferenceId]'] ?? '', + $responseData['responseData']['add_paydata[storename]'] ?? '', + $responseData['responseData']['amount'] ?? '', + $responseData['responseData']['currency'] ?? '', + $responseData['responseData']['workorderid'] ?? '' + ); + } + + /** + * @param array $responseData + * @return ConfirmOrderReferenceResponse + */ + private static function makeConfirmOrderReferenceResponse(array $responseData) + { + /** @var ConfirmOrderReferenceResponse $response */ + $response = pluginApp(ConfirmOrderReferenceResponse::class); + + return $response->init( + $responseData['success'] ?? false, + $responseData['errormessage'] ?? '', + $responseData['responseData']['workorderid'] ?? '' + ); + } } diff --git a/src/Models/Api/GenericPayment/GetConfigurationResponse.php b/src/Models/Api/GenericPayment/GetConfigurationResponse.php index 6a48589d..0efdb350 100644 --- a/src/Models/Api/GenericPayment/GetConfigurationResponse.php +++ b/src/Models/Api/GenericPayment/GetConfigurationResponse.php @@ -10,26 +10,29 @@ class GetConfigurationResponse extends ResponseAbstract implements \JsonSerializable { - private $clientId = ''; - private $sellerId = ''; - private $workorderId = ''; + private $clientId; + private $sellerId; + private $currency; + private $workOrderId; /** * @param $success * @param $errorMessage * @param $clientId * @param $sellerId + * @param $currency * @param $workorderId * * @return $this */ - public function init($success, $errorMessage, $clientId, $sellerId, $workorderId) + public function init($success, $errorMessage, $clientId, $sellerId, $currency, $workorderId) { $this->success = $success; $this->errorMessage = $errorMessage; $this->clientId = $clientId; $this->sellerId = $sellerId; - $this->workorderId = $workorderId; + $this->currency = $currency; + $this->workOrderId = $workorderId; return $this; } @@ -39,7 +42,8 @@ public function jsonSerialize(): array [ 'clientId' => $this->clientId, 'sellerId' => $this->sellerId, - 'workorderId' => $this->workorderId, + 'currency' => $this->currency, + 'workOrderId' => $this->workOrderId, ]; } @@ -62,9 +66,17 @@ public function getSellerId(): string /** * @return string */ - public function getWorkorderId(): string + public function getCurrency(): string { - return $this->workorderId; + return $this->currency; + } + + /** + * @return string + */ + public function getWorkOrderId(): string + { + return $this->workOrderId; } } diff --git a/src/Models/Api/GenericPayment/GetOrderReferenceDetailsResponse.php b/src/Models/Api/GenericPayment/GetOrderReferenceDetailsResponse.php index 49135fe5..10c61dee 100644 --- a/src/Models/Api/GenericPayment/GetOrderReferenceDetailsResponse.php +++ b/src/Models/Api/GenericPayment/GetOrderReferenceDetailsResponse.php @@ -9,18 +9,28 @@ */ class GetOrderReferenceDetailsResponse extends ResponseAbstract implements \JsonSerializable { - private $shippingZip; - private $shippingCity; - private $shippingType; - private $shippingCountry; - private $shippingFirstname; - private $shippingLastname; + public $shippingZip; + public $shippingStreet; + public $shippingCompany; + public $shippingCity; + public $shippingType; + public $shippingCountry; + public $shippingDistrict; + public $shippingTelephonenumber; + public $shippingState; + public $shippingFirstname; + public $shippingLastname; private $billingZip; + private $billingStreet; + private $billingCompany; private $billingCity; private $billingType; private $billingCountry; private $billingFirstname; private $billingLastname; + private $billingDistrict; + private $billingTelephonenumber; + private $billingState; private $storename; private $workOrderId; @@ -28,39 +38,61 @@ class GetOrderReferenceDetailsResponse extends ResponseAbstract implements \Json * @param $success * @param $errorMessage * @param $shippingZip + * @param $shippingStreet + * @param $shippingCompany * @param $shippingCity * @param $shippingType * @param $shippingCountry + * @param $shippingDistrict + * @param $shippingTelephonenumber + * @param $shippingState * @param $shippingFirstname * @param $shippingLastname * @param $billingZip + * @param $billingStreet + * @param $billingCompany * @param $billingCity * @param $billingType * @param $billingCountry * @param $billingFirstname * @param $billingLastname + * @param $billingDistrict + * @param $billingTelephonenumber + * @param $billingState * @param $storename * @param $workOrderId * @return $this */ - public function init($success, $errorMessage, $shippingZip, $shippingCity, $shippingType, $shippingCountry, - $shippingFirstname, $shippingLastname, $billingZip, $billingCity, $billingType, $billingCountry, - $billingFirstname, $billingLastname, $storename, $workOrderId) + public function init($success, $errorMessage, $shippingZip, $shippingStreet, $shippingCompany, $shippingCity, + $shippingType, $shippingCountry, $shippingDistrict, $shippingTelephonenumber, $shippingState, + $shippingFirstname, $shippingLastname, $billingZip, $billingStreet, $billingCompany, $billingCity, $billingType, + $billingCountry, $billingFirstname, $billingLastname, $billingDistrict, $billingTelephonenumber, + $billingState, $storename, $workOrderId) { $this->success = $success; $this->errorMessage = $errorMessage; $this->shippingZip = $shippingZip; + $this->shippingStreet = $shippingStreet; + $this->shippingCompany = $shippingCompany; $this->shippingCity = $shippingCity; $this->shippingType = $shippingType; $this->shippingCountry = $shippingCountry; + $this->shippingDistrict = $shippingDistrict; + $this->shippingTelephonenumber = $shippingTelephonenumber; + $this->shippingState = $shippingState; $this->shippingFirstname = $shippingFirstname; $this->shippingLastname = $shippingLastname; $this->billingZip = $billingZip; + $this->billingStreet = $billingStreet; + $this->billingCompany = $billingCompany; $this->billingCity = $billingCity; $this->billingType = $billingType; $this->billingCountry = $billingCountry; $this->billingFirstname = $billingFirstname; $this->billingLastname = $billingLastname; + $this->billingDistrict = $billingDistrict; + $this->billingTelephonenumber = $billingTelephonenumber; + $this->billingState = $billingState; $this->storename = $storename; $this->workOrderId = $workOrderId; @@ -71,17 +103,28 @@ public function jsonSerialize(): array { return parent::jsonSerialize() + [ + 'shippingZip' => $this->shippingZip, + 'shippingStreet' => $this->shippingStreet, + 'shippingCompany' => $this->shippingCompany, 'shippingCity' => $this->shippingCity, 'shippingType' => $this->shippingType, 'shippingCountry' => $this->shippingCountry, + 'shippingDistrict' => $this->shippingDistrict, + 'shippingTelephonenumber' => $this->shippingTelephonenumber, + 'shippingState' => $this->shippingState, 'shippingFirstname' => $this->shippingFirstname, 'shippingLastname' => $this->shippingLastname, 'billingZip' => $this->billingZip, + 'billingStreet' => $this->billingStreet, + 'billingCompany' => $this->billingCompany, 'billingCity' => $this->billingCity, 'billingType' => $this->billingType, 'billingCountry' => $this->billingCountry, 'billingFirstname' => $this->billingFirstname, 'billingLastname' => $this->billingLastname, + 'billingDistrict' => $this->billingDistrict, + 'billingTelephonenumber' => $this->billingTelephonenumber, + 'billingState' => $this->billingState, 'storename' => $this->storename, 'workOrderId' => $this->workOrderId ]; @@ -95,6 +138,22 @@ public function getShippingZip() return $this->shippingZip; } + /** + * @return mixed + */ + public function getShippingStreet() + { + return $this->shippingStreet; + } + + /** + * @return mixed + */ + public function getShippingCompany() + { + return $this->shippingCompany; + } + /** * @return mixed */ @@ -119,6 +178,30 @@ public function getShippingCountry() return $this->shippingCountry; } + /** + * @return mixed + */ + public function getShippingDistrict() + { + return $this->shippingDistrict; + } + + /** + * @return mixed + */ + public function getShippingTelephonenumber() + { + return $this->shippingTelephonenumber; + } + + /** + * @return mixed + */ + public function getShippingState() + { + return $this->shippingState; + } + /** * @return mixed */ @@ -143,6 +226,22 @@ public function getBillingZip() return $this->billingZip; } + /** + * @return mixed + */ + public function getBillingStreet() + { + return $this->billingStreet; + } + + /** + * @return mixed + */ + public function getBillingCompany() + { + return $this->billingCompany; + } + /** * @return mixed */ @@ -183,6 +282,30 @@ public function getBillingLastname() return $this->billingLastname; } + /** + * @return mixed + */ + public function getBillingDistrict() + { + return $this->billingDistrict; + } + + /** + * @return mixed + */ + public function getBillingTelephonenumber() + { + return $this->billingTelephonenumber; + } + + /** + * @return mixed + */ + public function getBillingState() + { + return $this->billingState; + } + /** * @return mixed */ diff --git a/src/Models/Api/GenericPayment/SetOrderReferenceDetailsResponse.php b/src/Models/Api/GenericPayment/SetOrderReferenceDetailsResponse.php new file mode 100644 index 00000000..a09336bd --- /dev/null +++ b/src/Models/Api/GenericPayment/SetOrderReferenceDetailsResponse.php @@ -0,0 +1,58 @@ +success = $success; + $this->errorMessage = $errorMessage; + $this->amazonAddressToken = $amazonAddressToken; + $this->amazonReferenceId = $amazonReferenceId; + $this->storename = $storename; + $this->amount = $amount; + $this->currency = $currency; + $this->workOrderId = $workOrderId; + + return $this; + } + + public function jsonSerialize(): array + { + return parent::jsonSerialize() + + [ + 'amazonAddressToken' => $this->amazonAddressToken, + 'amazonReferenceId' => $this->amazonReferenceId, + 'storename' => $this->storename, + 'amount' => $this->amount, + 'currency' => $this->currency, + 'workOrderId' => $this->workOrderId + ]; + } + +} diff --git a/src/Providers/Api/Request/GenericPaymentDataProvider.php b/src/Providers/Api/Request/GenericPaymentDataProvider.php index 3c0ffefb..219ca726 100644 --- a/src/Providers/Api/Request/GenericPaymentDataProvider.php +++ b/src/Providers/Api/Request/GenericPaymentDataProvider.php @@ -2,6 +2,7 @@ namespace Payone\Providers\Api\Request; +use Payone\Helpers\ShopHelper; use Payone\Providers\Api\Request\Models\GenericPayment; class GenericPaymentDataProvider extends DataProviderAbstract @@ -29,8 +30,7 @@ public function getGetConfigRequestData(string $paymentCode): array */ public function getGetOrderReferenceDetailsRequestData(string $paymentCode, string $workOrderId, - string $amazonReferenceId, - string $amazonAddressToken): array + string $amazonReferenceId): array { // TODO: Maybe load creds from cache/session ? @@ -43,7 +43,7 @@ public function getGetOrderReferenceDetailsRequestData(string $paymentCode, $requestParams['add_paydata']['action'] = GenericPayment::ACTIONTYPE_GETORDERREFERENCEDETAILS; - $requestParams['add_paydata']['amazon_address_token'] = $amazonAddressToken; + //$requestParams['add_paydata']['amazon_address_token'] = $amazonAddressToken; $requestParams['add_paydata']['amazon_reference_id'] = $amazonReferenceId; $requestParams['workorderid'] = $workOrderId; @@ -57,8 +57,8 @@ public function getGetOrderReferenceDetailsRequestData(string $paymentCode, public function getSetOrderReferenceDetailsRequestData(string $paymentCode, string $workOrderId, string $amazonReferenceId, - string $amazonAddressToken, - string $storename, + //string $amazonAddressToken, + // string $storename, string $amount): array { // TODO: Maybe load creds from cache/session ? @@ -74,12 +74,40 @@ public function getSetOrderReferenceDetailsRequestData(string $paymentCode, $requestParams['add_paydata']['action'] = GenericPayment::ACTIONTYPE_SETORDERREFERENCEDETAILS; - $requestParams['add_paydata']['amazon_address_token'] = $amazonReferenceId; - $requestParams['add_paydata']['amazon_reference_id'] = $amazonAddressToken; - $requestParams['add_paydata']['storename'] = $storename; + $requestParams['add_paydata']['amazon_reference_id'] = $amazonReferenceId; + //$requestParams['add_paydata']['amazon_address_token'] = $amazonAddressToken; + //$requestParams['add_paydata']['storename'] = $storename; $requestParams['workorderid'] = $workOrderId; $this->validator->validate($requestParams); return $requestParams; } + + /** + * {@inheritdoc} + */ + public function getConfirmOrderReferenceRequestData(string $paymentCode, string $workOrderId, string $reference, string $amazonReferenceId, string $amount) + { + $requestParams = $this->getDefaultRequestData($paymentCode); + $requestParams['request'] = GenericPayment::REQUEST_TYPE; + $requestParams['clearingtype'] = "wlt"; + $requestParams['wallettype'] = "AMZ"; + // Currency not mentioned in API-Doc of Payone + $requestParams['currency'] = "EUR"; + // amount in smallest unit + $requestParams['amount'] = $amount; + + $requestParams['add_paydata']['action'] = GenericPayment::ACTIONTYPE_CONFIRMORDERREFERENCE; + $requestParams['add_paydata']['reference'] = $reference; + $requestParams['add_paydata']['amazon_reference_id'] = $amazonReferenceId; + $requestParams['workorderid'] = $workOrderId; + + /** @var ShopHelper $shopHelper */ + $shopHelper = pluginApp(ShopHelper::class); + + $requestParams['successurl'] = $shopHelper->getPlentyDomain() . '/payment/payone/checkoutSuccess'; + $requestParams['errorurl'] = $shopHelper->getPlentyDomain() . '/payment/payone/checkoutSuccess'; + + return $requestParams; + } } diff --git a/src/Providers/Api/Request/Models/GenericPayment.php b/src/Providers/Api/Request/Models/GenericPayment.php index ca1fdc16..32c42763 100644 --- a/src/Providers/Api/Request/Models/GenericPayment.php +++ b/src/Providers/Api/Request/Models/GenericPayment.php @@ -10,5 +10,6 @@ class GenericPayment const ACTIONTYPE_GETCONFIGURATION = "getconfiguration"; const ACTIONTYPE_GETORDERREFERENCEDETAILS = "getorderreferencedetails"; const ACTIONTYPE_SETORDERREFERENCEDETAILS = "setorderreferencedetails"; + const ACTIONTYPE_CONFIRMORDERREFERENCE = "confirmorderreference"; } diff --git a/src/Providers/DataProviders/AmazonPayWalletWidget.php b/src/Providers/DataProviders/AmazonPayWalletWidget.php deleted file mode 100644 index 87b59b52..00000000 --- a/src/Providers/DataProviders/AmazonPayWalletWidget.php +++ /dev/null @@ -1,21 +0,0 @@ -render(PluginConstants::NAME . '::Checkout.AmazonPayWalletWidget'); - } -} diff --git a/src/Providers/PayoneRouteServiceProvider.php b/src/Providers/PayoneRouteServiceProvider.php index 86b047aa..0b75ac67 100644 --- a/src/Providers/PayoneRouteServiceProvider.php +++ b/src/Providers/PayoneRouteServiceProvider.php @@ -27,6 +27,8 @@ public function map(Router $router) $router->post('payment/payone/checkout/amazonPay/renderWidgets', 'Payone\Controllers\AmazonPayController@renderWidgets'); $router->post('payment/payone/checkout/amazonPay/setOrderReference', 'Payone\Controllers\AmazonPayController@setOrderReference'); $router->post('payment/payone/checkout/amazonPay/getOrderReference', 'Payone\Controllers\AmazonPayController@getOrderReference'); + $router->get('payment/payone/checkout/amazonPay/placeOrder', 'Payone\Controllers\AmazonPayController@placeOrder'); + $router->post('payment/payone/checkout/amazonPay/debugTest', 'Payone\Controllers\AmazonPayController@debugTest'); $router->get('payment/payone/error', 'Payone\Controllers\CheckoutController@redirectWithNotice'); diff --git a/src/Providers/PayoneServiceProvider.php b/src/Providers/PayoneServiceProvider.php index d14a3f46..d65c76e0 100755 --- a/src/Providers/PayoneServiceProvider.php +++ b/src/Providers/PayoneServiceProvider.php @@ -356,4 +356,9 @@ function (OrderPdfGenerationEvent $event) { } ); } + + public function registerAmazonPayIntegration(Dispatcher $eventDispatcher) + { + //$eventDispatcher->listen(); + } } diff --git a/src/Services/AmazonPayService.php b/src/Services/AmazonPayService.php new file mode 100644 index 00000000..f50889ae --- /dev/null +++ b/src/Services/AmazonPayService.php @@ -0,0 +1,221 @@ +getShippingCompany() ?? ""; + $addressData['name2'] = $orderRefDetails->getShippingFirstname() ?? ""; + $addressData['name3'] = $orderRefDetails->getShippingLastname() ?? ""; + $addressData['address1'] = $orderRefDetails->getShippingStreet() ?? ""; + // How to handle this issue? + $addressData['address2'] = " "; + $addressData['postalCode'] = $orderRefDetails->getShippingZip() ?? ""; + $addressData['town'] = $orderRefDetails->getShippingCity() ?? ""; + $addressData['countryId'] = $orderRefDetails->getShippingCountry() ?? ""; + $addressData['gender'] = null; + + + $newAddress = $this->mapAmazonAddressToAddress($orderRefDetails); + + // Guest or logged-in user? + + /** @var AddressRepositoryContract $contactAddressRepo */ + $addressRepo = pluginApp(AddressRepositoryContract::class); + $createdAddress = $addressRepo->createAddress($newAddress->toArray()); + + + return $createdAddress; + } + + /** + * @param GetOrderReferenceDetailsResponse $amazonAddress + * @param int $isCompany + * @return Address + */ + private function mapAmazonAddressToAddress(GetOrderReferenceDetailsResponse $amazonAddress) + { + /** @var Address $address */ + $address = pluginApp(\Plenty\Modules\Account\Address\Models\Address::class); + + if (strlen($amazonAddress->getShippingCompany())) { + $address->name1 = $amazonAddress->getShippingCompany(); + /** @var AddressOption $addressOption */ + $addressOption = pluginApp(\Plenty\Modules\Account\Address\Models\AddressOption::class); + + $addressOption->typeId = AddressOption::TYPE_CONTACT_PERSON; + $addressOption->value = $amazonAddress->getShippingFirstname()." ".$amazonAddress->getShippingLastname(); + + $address->options->push($addressOption->toArray()); + } + + $address->name2 = $amazonAddress->getShippingFirstname(); + $address->name3 = $amazonAddress->getShippingLastname(); + + /** @var CountryRepositoryContract $countryContract */ + $countryContract = pluginApp(\Plenty\Modules\Order\Shipping\Countries\Contracts\CountryRepositoryContract::class); + + /** @var Country $country */ + $country = $countryContract->getCountryByIso($amazonAddress->getShippingCountry(), 'isoCode2'); + + $addressArr = $this->extractAddress($amazonAddress->getShippingStreet(), '', $country->id == 12); //UK + + $address->address1 = $addressArr[0]; + $address->address2 = $addressArr[1]; + if (strlen($addressArr[2])) { + $address->address3 = $addressArr[2]; + } + $address->town = $amazonAddress->getShippingCity(); + $address->postalCode = $amazonAddress->getShippingZip(); + $address->countryId = $country->id; + + if (strlen($amazonAddress->getShippingState())) { + /** @var CountryState $state */ + $state = $countryContract->getCountryStateByIso($country->id, $amazonAddress->getShippingState()); + $address->state = $state; + $address->stateId = $state->id; + } + + if (strlen($amazonAddress->getShippingTelephonenumber())) { + /** @var AddressOption $addressOption */ + $addressOption = pluginApp(\Plenty\Modules\Account\Address\Models\AddressOption::class); + + $addressOption->typeId = AddressOption::TYPE_TELEPHONE; + $addressOption->value = $amazonAddress->getShippingTelephonenumber(); + + $address->options->push($addressOption->toArray()); + } + + return $address; + } + + public function confirmOrderReference($workOrderId, $reference, $amazonReferenceId, $amount) + { + $workOrderId = ""; + $reference = ""; + $amazonReferenceId = ""; + $amount = ""; + + /** @var GenericPaymentDataProvider $dataProvider */ + $dataProvider = pluginApp(GenericPaymentDataProvider::class); + /** @var Api $api */ + $api = pluginApp(Api::class); + + $requestParams = $dataProvider->getConfirmOrderReferenceRequestData("Amazon Pay", $workOrderId, $reference, $amazonReferenceId, $amount); + + $confirmOrderReferenceResponse = $api->doGenericPayment(GenericPayment::ACTIONTYPE_CONFIRMORDERREFERENCE, $requestParams); + return $confirmOrderReferenceResponse; + } + + + /** + * extract the house number, the street and the additional name from the specified address fields + * @param string $street1 + * @param string $street2 + * @param bool $checkUKAddress + * @return array (street, houseNo, additionalAddress) + */ + private function extractAddress(String $street1, String $street2, $checkUKAddress=false) + { + $address = trim($street1 . ' ' . $street2); + + $reqex = '/(?(.*?)[\D]{3}[\s,.])(?'; + $reqex .= '|[0-9]{1,3}[ a-zA-Z-\/\.]{0,6}'; // f.e. "Rosenstr. 14" + $reqex .= '|[0-9]{1,3}[ a-zA-Z-\/\.]{1,6}[0-9]{1,4}[ a-zA-Z-\/\.]{0,6}[0-9]{0,3}[ a-zA-Z-\/\.]{0,6}[0-9]{0,3}'; // f.e. "Straße in Österreich 30/4/12.2" + $reqex .= ')$/'; + $reqex4foreign = '/^(?[0-9]{1,4}([\D]{0,2}([\s]|[^a-zA-Z0-9])))(?([\D]+))$/'; // f.e. "16 Bellevue Road" + if (stripos($address, 'POSTFILIALE') !== false) { + $id = ''; + $result = array(); + + if (preg_match("/([\D].*?)(([\d]{4,})|(?[\d]{3}))([\D]*?)/i", $address, $result) > 0) { + $id = $result['id']; + + $address = preg_replace("/([\D].*?)" . $result['id'] . "([\D]*)/i", '\1\2', $address); + + if ($id + && preg_match("/(?[\d\s]{6,14})/i", $address, $result) > 0) { + $street = preg_replace("/\s/", '', $result['id']) . ' POSTFILIALE'; + $houseNo = $id; + $additionalAddress = ''; + + return array( + $street, + $houseNo, + $additionalAddress, + ); + } + } + } + + if($checkUKAddress && preg_match($reqex4foreign, $street1, $machtes) > 0) { + $street = trim($machtes['ad']); + $houseNo = trim($machtes['no']); + $additionalAddress = $street2; + } elseif (preg_match($reqex4foreign, $street1, $matches) > 0) { + // house number is in street1 - foreign address + $street = trim($matches['no']) . ' ' . trim($matches['ad']); + $houseNo = ''; + $additionalAddress = $street2; + } else { + if (preg_match($reqex, $street1, $matches) > 0) { + // house number is in street1 + $street = trim($matches['ad']); + $houseNo = trim($matches['no']); + $additionalAddress = $street2; + } else { + if (preg_match($reqex4foreign, $street2, $matches) > 0) { + // house number is in street2 - foreign address + $street = trim($matches['no']) . ' ' . trim($matches['ad']); + $houseNo = ''; + $additionalAddress = $street1; + } else { + if (preg_match($reqex, $street2, $matches) > 0) { + // house number is in street2 + $street = trim($matches['ad']); + $houseNo = trim($matches['no']); + $additionalAddress = $street1; + } else { + if (preg_match($reqex, $address, $matches) > 0) { + // house number is in street2 + $street = trim($matches['ad']); + $houseNo = trim($matches['no']); + $additionalAddress = ''; + } else { + // no house number was found + $street = $address; + $houseNo = ''; + $additionalAddress = ''; + } + } + } + } + } + + return array( + $street, + $houseNo, + $additionalAddress, + ); + } +} From 8532f2de537f17f7b94f5a4901086c048263dbca Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Fri, 11 Sep 2020 13:59:33 +0200 Subject: [PATCH 136/353] removed unnecessary container --- plugin.json | 5 ----- 1 file changed, 5 deletions(-) diff --git a/plugin.json b/plugin.json index 716d06ae..0dc033da 100644 --- a/plugin.json +++ b/plugin.json @@ -63,11 +63,6 @@ "key": "Payone\\Providers\\DataProviders\\AmazonPayAddressBookWidget", "name": "Payone Checkout Amazon Pay AddressBook-Widget", "description": "Block to integrate the Amazon Pay address book widget in the checkout." - }, - { - "key": "Payone\\Providers\\DataProviders\\AmazonPayWalletWidget", - "name": "Payone Checkout Amazon Pay Wallet-Widget", - "description": "Block to integrate the Amazon Pay wallet widget in the checkout." } ] } From f64759d2ed660e18f1c7b174337de2ff951372e6 Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Fri, 11 Sep 2020 14:13:28 +0200 Subject: [PATCH 137/353] removed null --- resources/views/Checkout/AmazonPayWidgets.twig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/views/Checkout/AmazonPayWidgets.twig b/resources/views/Checkout/AmazonPayWidgets.twig index a24bed27..4a04c25d 100644 --- a/resources/views/Checkout/AmazonPayWidgets.twig +++ b/resources/views/Checkout/AmazonPayWidgets.twig @@ -23,13 +23,13 @@ console.log("After Event: orderReferenceId= " + $orderReferenceId); // ID still required! - var buyNowBtn = document.getElementById("buy-now"); + /*var buyNowBtn = document.getElementById("buy-now"); buyNowBtn.addEventListener('click', function () { OffAmazonPayments.initConfirmationFlow("{{ content.sellerId }}", $orderReferenceId, function(confirmationFlow) { placeOrder(confirmationFlow); }); - }); + });*/ $.post("/payment/payone/checkout/amazonPay/getOrderReference'", { From ff082743667c4028f9b2b4d02e1f44608b31c2a4 Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Fri, 11 Sep 2020 15:03:17 +0200 Subject: [PATCH 138/353] added css --- resources/css/payone-amazonpay.css | 4 ++-- resources/views/Checkout/AmazonPayAddressBookWidget.twig | 2 +- resources/views/Checkout/AmazonPayCheckout.twig | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/resources/css/payone-amazonpay.css b/resources/css/payone-amazonpay.css index d2226b2e..c64799ae 100644 --- a/resources/css/payone-amazonpay.css +++ b/resources/css/payone-amazonpay.css @@ -5,7 +5,7 @@ measurement to make sure the widget renders in the optimal size allowed. */ -#addressBookWidgetDiv { +.addressBookWidgetDiv { min-width: 300px; width: 100%; max-width: 900px; @@ -14,7 +14,7 @@ optimal size allowed. max-height: 400px; } -#walletWidgetDiv { +.walletWidgetDiv { min-width: 300px; width: 100%; max-width: 900px; diff --git a/resources/views/Checkout/AmazonPayAddressBookWidget.twig b/resources/views/Checkout/AmazonPayAddressBookWidget.twig index 80508635..be546d2c 100644 --- a/resources/views/Checkout/AmazonPayAddressBookWidget.twig +++ b/resources/views/Checkout/AmazonPayAddressBookWidget.twig @@ -1,3 +1,3 @@
-
+
diff --git a/resources/views/Checkout/AmazonPayCheckout.twig b/resources/views/Checkout/AmazonPayCheckout.twig index 97ae7727..f4fb8e92 100644 --- a/resources/views/Checkout/AmazonPayCheckout.twig +++ b/resources/views/Checkout/AmazonPayCheckout.twig @@ -32,7 +32,8 @@ $("li.method-list-item[data-id={{ amazonPayMopId }}]").append(""); $("li.method-list-item[data-id={{ amazonPayMopId }}]").append(""); - $("li.method-list-item[data-id={{ amazonPayMopId }}]").after(""); + $("li.method-list-item[data-id={{ amazonPayMopId }}]").after("
"); + $.get("/payment/payone/checkout/amazonPay/loginButton", function (data) { //$('#LoginWithAmazon').append(data); From 2d10dbc282fd0e336a0518dba52d0e2b4213b791 Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Fri, 11 Sep 2020 15:49:34 +0200 Subject: [PATCH 139/353] added css-class --- resources/views/Checkout/AmazonPayCheckout.twig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/views/Checkout/AmazonPayCheckout.twig b/resources/views/Checkout/AmazonPayCheckout.twig index f4fb8e92..9747f634 100644 --- a/resources/views/Checkout/AmazonPayCheckout.twig +++ b/resources/views/Checkout/AmazonPayCheckout.twig @@ -1,7 +1,7 @@ {% if services.template.isCurrentTemplate('tpl.checkout') %} {#
#} {##} - + diff --git a/src/Controllers/AmazonPayController.php b/src/Controllers/AmazonPayController.php index dc746584..c4d15e5f 100644 --- a/src/Controllers/AmazonPayController.php +++ b/src/Controllers/AmazonPayController.php @@ -2,6 +2,7 @@ namespace Payone\Controllers; +use Payone\Adapter\SessionStorage; use Payone\Helpers\PaymentHelper; use Payone\Methods\PayoneAmazonPayPaymentMethod; use Payone\Models\Api\GenericPayment\GetOrderReferenceDetailsResponse; @@ -96,7 +97,11 @@ public function getOrderReference(Request $request, Checkout $checkout) { $workOrderId = $request->get('workOrderId'); $amazonReferenceId = $request->get('amazonReferenceId'); - // $amazonAddressToken = $request->get('amazonAddressToken') ?? ""; + + /** @var SessionStorage $sessionStorage */ + $sessionStorage = pluginApp(SessionStorage::class); + $sessionStorage->setSessionValue('workOrderId', $workOrderId); + $sessionStorage->setSessionValue('amazonReferenceId', $amazonReferenceId); /** @var GenericPaymentDataProvider $genericPaymentDataProvider */ $genericPaymentDataProvider = pluginApp(GenericPaymentDataProvider::class); @@ -119,45 +124,6 @@ public function getOrderReference(Request $request, Checkout $checkout) return json_encode($checkout, true); } - public function setOrderReference(Request $request, BasketRepositoryContract $basketRepositoryContract) - { - $basket = $basketRepositoryContract->load(); - $amount = $basket->basketAmount; - - //$amount = $request->get('amount'); - $workOrderId = $request->get('workOrderId'); - $amazonReferenceId = $request->get('amazonReferenceId'); - //$amazonAddressToken = $request->get('workOrderId'); - //$storename = $request->get('storename'); - - $requestParams = $this->dataProvider->getSetOrderReferenceDetailsRequestData( - "Amazon Pay", - $workOrderId, - $amazonReferenceId, - // $amazonAddressToken, - // $storename, - $amount - ); - - $orderReferenceResponse = $this->api->doGenericPayment(GenericPayment::ACTIONTYPE_SETORDERREFERENCEDETAILS, $requestParams); - return $orderReferenceResponse; - } - - public function placeOrder() - { - // setOrder - - - $workOrderId = ""; - $reference = ""; - $amazonReferenceId = ""; - $amount = ""; - - $requestParams = $this->dataProvider->getConfirmOrderReferenceRequestData("Amazon Pay", $workOrderId, $reference, $amazonReferenceId, $amount); - - $confirmOrderReferenceResponse = $this->api->doGenericPayment(GenericPayment::ACTIONTYPE_CONFIRMORDERREFERENCE, $requestParams); - return $confirmOrderReferenceResponse; - } public function debugTest() { @@ -171,8 +137,6 @@ public function debugTest() $orderRefDetails->shippingCity = "Kassel"; $orderRefDetails->shippingCountry = "DE"; - - /** @var AmazonPayService $apiDebug */ $apiDebug = pluginApp(AmazonPayService::class); $address = $apiDebug->registerCustomerFromAmazonPay($orderRefDetails); diff --git a/src/Providers/PayoneRouteServiceProvider.php b/src/Providers/PayoneRouteServiceProvider.php index 0b75ac67..85cbd1d3 100644 --- a/src/Providers/PayoneRouteServiceProvider.php +++ b/src/Providers/PayoneRouteServiceProvider.php @@ -25,7 +25,6 @@ public function map(Router $router) $router->get('payment/payone/checkout/amazonPay/loginButton', 'Payone\Controllers\AmazonPayController@getAmazonPayLoginWidget'); $router->post('payment/payone/checkout/amazonPay/renderWidgets', 'Payone\Controllers\AmazonPayController@renderWidgets'); - $router->post('payment/payone/checkout/amazonPay/setOrderReference', 'Payone\Controllers\AmazonPayController@setOrderReference'); $router->post('payment/payone/checkout/amazonPay/getOrderReference', 'Payone\Controllers\AmazonPayController@getOrderReference'); $router->get('payment/payone/checkout/amazonPay/placeOrder', 'Payone\Controllers\AmazonPayController@placeOrder'); $router->post('payment/payone/checkout/amazonPay/debugTest', 'Payone\Controllers\AmazonPayController@debugTest'); diff --git a/src/Providers/PayoneServiceProvider.php b/src/Providers/PayoneServiceProvider.php index d65c76e0..2e2ce7b3 100755 --- a/src/Providers/PayoneServiceProvider.php +++ b/src/Providers/PayoneServiceProvider.php @@ -21,9 +21,12 @@ use Payone\Methods\PayonePrePaymentPaymentMethod; use Payone\Methods\PayoneRatePayInstallmentPaymentMethod; use Payone\Methods\PayoneSofortPaymentMethod; +use Payone\Models\Api\GenericPayment\ConfirmOrderReferenceResponse; +use Payone\Models\Api\GenericPayment\SetOrderReferenceDetailsResponse; use Payone\Models\PaymentCache; use Payone\Models\PaymentMethodContent; use Payone\PluginConstants; +use Payone\Services\AmazonPayService; use Payone\Services\Capture; use Payone\Services\OrderPdf; use Payone\Services\PaymentCreation; @@ -36,6 +39,7 @@ use Plenty\Modules\Basket\Events\Basket\AfterBasketChanged; use Plenty\Modules\Basket\Events\Basket\AfterBasketCreate; use Plenty\Modules\Basket\Events\BasketItem\AfterBasketItemAdd; +use Plenty\Modules\Basket\Models\Basket; use Plenty\Modules\Document\Models\Document; use Plenty\Modules\EventProcedures\Services\Entries\ProcedureEntry; use Plenty\Modules\EventProcedures\Services\EventProceduresService; @@ -357,8 +361,31 @@ function (OrderPdfGenerationEvent $event) { ); } - public function registerAmazonPayIntegration(Dispatcher $eventDispatcher) + public function registerAmazonPayIntegration(Dispatcher $eventDispatcher, BasketRepositoryContract $basketRepository, AmazonPayService $amazonPayService) { - //$eventDispatcher->listen(); + $eventDispatcher->listen(GetPaymentMethodContent::class, function (GetPaymentMethodContent $event) use ($basketRepository, $amazonPayService) { + /** @var PaymentHelper $paymentHelper */ + $paymentHelper = pluginApp(PaymentHelper::class); + if($event->getMop() == $paymentHelper->getMopId(PayoneAmazonPayPaymentMethod::PAYMENT_CODE)) { + + /** @var Basket $basket */ + $basket = $basketRepository->load(); + + /** @var SetOrderReferenceDetailsResponse $setOrderRefResponse */ + $setOrderRefResponse = $amazonPayService->setOrderReference($basket); + + /** @var ConfirmOrderReferenceResponse $confirmOrderRefResponse */ + $confirmOrderRefResponse = $amazonPayService->confirmOrderReference($basket); + + + if($confirmOrderRefResponse->getSuccess() == true) { + $content = "OffAmazonPayments.initConfirmationFlow(sellerId, id, function(confirmationFlow) {confirmationFlow.success();});"; + } else { + $content = "OffAmazonPayments.initConfirmationFlow(sellerId, id, function(confirmationFlow) {confirmationFlow.error();});"; + } + + return $content; // muss in html gerendert werden + } + }); } } diff --git a/src/Services/AmazonPayService.php b/src/Services/AmazonPayService.php index f50889ae..cf6c81ad 100644 --- a/src/Services/AmazonPayService.php +++ b/src/Services/AmazonPayService.php @@ -7,12 +7,16 @@ use IO\Builder\Order\AddressType; use IO\Services\CustomerService; use function Matrix\add; +use Payone\Adapter\SessionStorage; +use Payone\Models\Api\GenericPayment\ConfirmOrderReferenceResponse; use Payone\Models\Api\GenericPayment\GetOrderReferenceDetailsResponse; +use Payone\Models\Api\GenericPayment\SetOrderReferenceDetailsResponse; use Payone\Providers\Api\Request\GenericPaymentDataProvider; use Payone\Providers\Api\Request\Models\GenericPayment; use Plenty\Modules\Account\Address\Contracts\AddressRepositoryContract; use Plenty\Modules\Account\Address\Models\AddressOption; use Plenty\Modules\Account\Contact\Contracts\ContactAddressRepositoryContract; +use Plenty\Modules\Basket\Models\Basket; use Plenty\Modules\Frontend\Services\AccountService; use Plenty\Modules\Order\Shipping\Countries\Contracts\CountryRepositoryContract; use Plenty\Modules\Order\Shipping\Countries\Models\Country; @@ -20,6 +24,23 @@ class AmazonPayService { + /** @var Api */ + private $api; + + /** @var GenericPaymentDataProvider */ + private $dataProvider; + + /** + * AmazonPayService constructor. + * @param Api $api + * @param GenericPaymentDataProvider $dataProvider + */ + public function __construct(Api $api, + GenericPaymentDataProvider $dataProvider) + { + $this->api = $api; + $this->dataProvider = $dataProvider; + } public function registerCustomerFromAmazonPay(GetOrderReferenceDetailsResponse $orderRefDetails) { @@ -50,7 +71,6 @@ public function registerCustomerFromAmazonPay(GetOrderReferenceDetailsResponse $ /** * @param GetOrderReferenceDetailsResponse $amazonAddress - * @param int $isCompany * @return Address */ private function mapAmazonAddressToAddress(GetOrderReferenceDetailsResponse $amazonAddress) @@ -109,12 +129,46 @@ private function mapAmazonAddressToAddress(GetOrderReferenceDetailsResponse $ama return $address; } - public function confirmOrderReference($workOrderId, $reference, $amazonReferenceId, $amount) + /** + * @param Basket $basket + * @return mixed + */ + public function setOrderReference(Basket $basket) { - $workOrderId = ""; + /** @var SessionStorage $sessionStorage */ + $sessionStorage = pluginApp(SessionStorage::class); + $amount = $basket->basketAmount; + $workOrderId = $sessionStorage->getSessionValue('workOrderId'); + $amazonReferenceId = $sessionStorage->getSessionValue('amazonReferenceId'); + + $requestParams = $this->dataProvider->getSetOrderReferenceDetailsRequestData( + "Amazon Pay", + $workOrderId, + $amazonReferenceId, + // $amazonAddressToken, + // $storename, + $amount + ); + + /** @var SetOrderReferenceDetailsResponse $orderReferenceResponse */ + $orderReferenceResponse = $this->api->doGenericPayment(GenericPayment::ACTIONTYPE_SETORDERREFERENCEDETAILS, $requestParams); + return $orderReferenceResponse; + } + + /** + * @param Basket $basket + * @return mixed + */ + public function confirmOrderReference(Basket $basket) + { + /** @var SessionStorage $sessionStorage */ + $sessionStorage = pluginApp(SessionStorage::class); + + $workOrderId = $sessionStorage->getSessionValue('workOrderId'); + $amazonReferenceId = $sessionStorage->getSessionValue('amazonReferenceId'); + $amount = $basket->basketAmount; + $reference = ""; - $amazonReferenceId = ""; - $amount = ""; /** @var GenericPaymentDataProvider $dataProvider */ $dataProvider = pluginApp(GenericPaymentDataProvider::class); @@ -123,6 +177,7 @@ public function confirmOrderReference($workOrderId, $reference, $amazonReference $requestParams = $dataProvider->getConfirmOrderReferenceRequestData("Amazon Pay", $workOrderId, $reference, $amazonReferenceId, $amount); + /** @var ConfirmOrderReferenceResponse $confirmOrderReferenceResponse */ $confirmOrderReferenceResponse = $api->doGenericPayment(GenericPayment::ACTIONTYPE_CONFIRMORDERREFERENCE, $requestParams); return $confirmOrderReferenceResponse; } From 3ad98f8540d84828ac977c535d414be90fc3eebb Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Mon, 14 Sep 2020 08:40:49 +0200 Subject: [PATCH 141/353] added mapping for both addresses --- src/Controllers/AmazonPayController.php | 17 ++++-- src/Services/AmazonPayService.php | 72 ++++++++++++++----------- 2 files changed, 54 insertions(+), 35 deletions(-) diff --git a/src/Controllers/AmazonPayController.php b/src/Controllers/AmazonPayController.php index c4d15e5f..04b27ddc 100644 --- a/src/Controllers/AmazonPayController.php +++ b/src/Controllers/AmazonPayController.php @@ -116,10 +116,12 @@ public function getOrderReference(Request $request, Checkout $checkout) /** @var AmazonPayService $amazonPayService */ $amazonPayService = pluginApp(AmazonPayService::class); - $newAddress = $amazonPayService->registerCustomerFromAmazonPay($orderReferenceResponse); + $shippingAddress = $amazonPayService->registerCustomerFromAmazonPay($orderReferenceResponse); + $billingAddress = $amazonPayService->registerCustomerFromAmazonPay($orderReferenceResponse, true); - $checkout->setCustomerInvoiceAddressId($newAddress->id); - $checkout->setCustomerShippingAddressId($newAddress->id); + + $checkout->setCustomerInvoiceAddressId($shippingAddress->id); + $checkout->setCustomerShippingAddressId($billingAddress->id); return json_encode($checkout, true); } @@ -136,10 +138,17 @@ public function debugTest() $orderRefDetails->shippingZip = "12345"; $orderRefDetails->shippingCity = "Kassel"; $orderRefDetails->shippingCountry = "DE"; + $orderRefDetails->shippingState = "Hessen"; + $orderRefDetails->shippingTelephonenumber = "01726265233"; /** @var AmazonPayService $apiDebug */ $apiDebug = pluginApp(AmazonPayService::class); - $address = $apiDebug->registerCustomerFromAmazonPay($orderRefDetails); + //$address = $apiDebug->registerCustomerFromAmazonPay($orderRefDetails); + + + $address = $apiDebug->registerCustomerFromAmazonPay($orderRefDetails, true); + + // basket setShipping/setBilling... Methode zum Setzen der Addresse //$createdAddress = $contactAddress->createAddress($address->toArray(), diff --git a/src/Services/AmazonPayService.php b/src/Services/AmazonPayService.php index cf6c81ad..9066ba1f 100644 --- a/src/Services/AmazonPayService.php +++ b/src/Services/AmazonPayService.php @@ -42,86 +42,96 @@ public function __construct(Api $api, $this->dataProvider = $dataProvider; } - public function registerCustomerFromAmazonPay(GetOrderReferenceDetailsResponse $orderRefDetails) + public function registerCustomerFromAmazonPay(GetOrderReferenceDetailsResponse $orderRefDetails, $billingAddress = false) { + $addressData = []; + if ($billingAddress) + { + $addressData['company'] = $orderRefDetails->getBillingCompany() ?? ""; + $addressData['firstName'] = $orderRefDetails->getBillingFirstname() ?? ""; + $addressData['lastName'] = $orderRefDetails->getBillingLastname() ?? ""; + $addressData['streetAndNumber'] = $orderRefDetails->getBillingStreet() ?? ""; + $addressData['postalCode'] = $orderRefDetails->getBillingZip() ?? ""; + $addressData['city'] = $orderRefDetails->getBillingCity() ?? ""; + $addressData['state'] = $orderRefDetails->getBillingState() ?? ""; + $addressData['countryId'] = $orderRefDetails->getBillingCountry() ?? ""; + $addressData['telNo'] = $orderRefDetails->getBillingTelephonenumber() ?? ""; + } else { + $addressData['company'] = $orderRefDetails->getShippingCompany() ?? ""; + $addressData['firstName'] = $orderRefDetails->getShippingFirstname() ?? ""; + $addressData['lastName'] = $orderRefDetails->getShippingLastname() ?? ""; + $addressData['streetAndNumber'] = $orderRefDetails->getShippingStreet() ?? ""; + $addressData['postalCode'] = $orderRefDetails->getShippingZip() ?? ""; + $addressData['city'] = $orderRefDetails->getShippingCity() ?? ""; + $addressData['state'] = $orderRefDetails->getShippingState() ?? ""; + $addressData['countryId'] = $orderRefDetails->getShippingCountry() ?? ""; + $addressData['telNo'] = $orderRefDetails->getShippingTelephonenumber() ?? ""; + } - $addressData['name1'] = $orderRefDetails->getShippingCompany() ?? ""; - $addressData['name2'] = $orderRefDetails->getShippingFirstname() ?? ""; - $addressData['name3'] = $orderRefDetails->getShippingLastname() ?? ""; - $addressData['address1'] = $orderRefDetails->getShippingStreet() ?? ""; - // How to handle this issue? - $addressData['address2'] = " "; - $addressData['postalCode'] = $orderRefDetails->getShippingZip() ?? ""; - $addressData['town'] = $orderRefDetails->getShippingCity() ?? ""; - $addressData['countryId'] = $orderRefDetails->getShippingCountry() ?? ""; - $addressData['gender'] = null; - - - $newAddress = $this->mapAmazonAddressToAddress($orderRefDetails); - - // Guest or logged-in user? + $newAddress = $this->mapAmazonAddressToAddress($addressData); /** @var AddressRepositoryContract $contactAddressRepo */ $addressRepo = pluginApp(AddressRepositoryContract::class); $createdAddress = $addressRepo->createAddress($newAddress->toArray()); - return $createdAddress; } + + /** * @param GetOrderReferenceDetailsResponse $amazonAddress * @return Address */ - private function mapAmazonAddressToAddress(GetOrderReferenceDetailsResponse $amazonAddress) + private function mapAmazonAddressToAddress(array $amazonAddress) { /** @var Address $address */ $address = pluginApp(\Plenty\Modules\Account\Address\Models\Address::class); - if (strlen($amazonAddress->getShippingCompany())) { - $address->name1 = $amazonAddress->getShippingCompany(); + if (strlen($amazonAddress['company'])) { + $address->name1 = $amazonAddress['company']; /** @var AddressOption $addressOption */ $addressOption = pluginApp(\Plenty\Modules\Account\Address\Models\AddressOption::class); $addressOption->typeId = AddressOption::TYPE_CONTACT_PERSON; - $addressOption->value = $amazonAddress->getShippingFirstname()." ".$amazonAddress->getShippingLastname(); + $addressOption->value = $amazonAddress['firstName']." ".$amazonAddress['lastName']; $address->options->push($addressOption->toArray()); } - $address->name2 = $amazonAddress->getShippingFirstname(); - $address->name3 = $amazonAddress->getShippingLastname(); + $address->name2 = $amazonAddress['firstName']; + $address->name3 = $amazonAddress['lastName']; /** @var CountryRepositoryContract $countryContract */ $countryContract = pluginApp(\Plenty\Modules\Order\Shipping\Countries\Contracts\CountryRepositoryContract::class); /** @var Country $country */ - $country = $countryContract->getCountryByIso($amazonAddress->getShippingCountry(), 'isoCode2'); + $country = $countryContract->getCountryByIso($amazonAddress['countryId'], 'isoCode2'); - $addressArr = $this->extractAddress($amazonAddress->getShippingStreet(), '', $country->id == 12); //UK + $addressArr = $this->extractAddress($amazonAddress['streetAndNumber'], '', $country->id == 12); //UK $address->address1 = $addressArr[0]; $address->address2 = $addressArr[1]; if (strlen($addressArr[2])) { $address->address3 = $addressArr[2]; } - $address->town = $amazonAddress->getShippingCity(); - $address->postalCode = $amazonAddress->getShippingZip(); + $address->town = $amazonAddress['city']; + $address->postalCode = $amazonAddress['postalCode']; $address->countryId = $country->id; - if (strlen($amazonAddress->getShippingState())) { + if (strlen($amazonAddress['state'])) { /** @var CountryState $state */ - $state = $countryContract->getCountryStateByIso($country->id, $amazonAddress->getShippingState()); + $state = $countryContract->getCountryStateByIso($country->id, $amazonAddress['state']); $address->state = $state; $address->stateId = $state->id; } - if (strlen($amazonAddress->getShippingTelephonenumber())) { + if (strlen($amazonAddress['telNo'])) { /** @var AddressOption $addressOption */ $addressOption = pluginApp(\Plenty\Modules\Account\Address\Models\AddressOption::class); $addressOption->typeId = AddressOption::TYPE_TELEPHONE; - $addressOption->value = $amazonAddress->getShippingTelephonenumber(); + $addressOption->value = $amazonAddress['telNo']; $address->options->push($addressOption->toArray()); } From b0db06c673724b077ebc5972d0a24cbc562cdf9a Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Mon, 14 Sep 2020 08:59:10 +0200 Subject: [PATCH 142/353] added js adaptions --- resources/views/Checkout/AmazonPayCheckout.twig | 5 ++++- resources/views/Checkout/AmazonPayLogin.twig | 4 ++++ src/Controllers/AmazonPayController.php | 5 +++-- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/resources/views/Checkout/AmazonPayCheckout.twig b/resources/views/Checkout/AmazonPayCheckout.twig index 22697559..ca4b1f84 100644 --- a/resources/views/Checkout/AmazonPayCheckout.twig +++ b/resources/views/Checkout/AmazonPayCheckout.twig @@ -29,7 +29,7 @@ console.log("loadAmazonLoginButton"); $("li.method-list-item[data-id={{ amazonPayMopId }}]").append(""); - $("li.method-list-item[data-id={{ amazonPayMopId }}]").append(""); + $("li.method-list-item[data-id={{ amazonPayMopId }}]").append(""); $("li.method-list-item[data-id={{ amazonPayMopId }}]").after(""); @@ -43,6 +43,9 @@ document.getElementById("LogoutWithAmazon").style.display = "none"; document.getElementById("addressBookWidgetDiv").style.display = "none"; document.getElementById("walletWidgetDiv").style.display = "none"; + + document.getElementById("invoice-addresses-select").style.display = "block"; + document.getElementById("shipping-addresses-select").style.display = "block"; }; } } diff --git a/resources/views/Checkout/AmazonPayLogin.twig b/resources/views/Checkout/AmazonPayLogin.twig index 60c2e34b..e59bfd36 100644 --- a/resources/views/Checkout/AmazonPayLogin.twig +++ b/resources/views/Checkout/AmazonPayLogin.twig @@ -33,6 +33,10 @@ $("body").append(data); }); }); + + document.getElementById("invoice-addresses-select").style.display = "none"; + document.getElementById("shipping-addresses-select").style.display = "none"; + document.getElementById("LoginWithAmazon").style.display = "none"; document.getElementById("walletWidgetDiv").style.display = "block"; document.getElementById("addressBookWidgetDiv").style.display = "block"; diff --git a/src/Controllers/AmazonPayController.php b/src/Controllers/AmazonPayController.php index 04b27ddc..8be4fb8e 100644 --- a/src/Controllers/AmazonPayController.php +++ b/src/Controllers/AmazonPayController.php @@ -117,11 +117,12 @@ public function getOrderReference(Request $request, Checkout $checkout) /** @var AmazonPayService $amazonPayService */ $amazonPayService = pluginApp(AmazonPayService::class); $shippingAddress = $amazonPayService->registerCustomerFromAmazonPay($orderReferenceResponse); - $billingAddress = $amazonPayService->registerCustomerFromAmazonPay($orderReferenceResponse, true); + //$billingAddress = $amazonPayService->registerCustomerFromAmazonPay($orderReferenceResponse, true); $checkout->setCustomerInvoiceAddressId($shippingAddress->id); - $checkout->setCustomerShippingAddressId($billingAddress->id); + $checkout->setCustomerShippingAddressId($shippingAddress->id); + //$checkout->setCustomerShippingAddressId($billingAddress->id); return json_encode($checkout, true); } From 5e9ba00ada3cb49bda0699aa5411d471bab2475c Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Mon, 14 Sep 2020 09:08:07 +0200 Subject: [PATCH 143/353] fix for js --- .../views/Checkout/AmazonPayCheckout.twig | 7 +++++-- resources/views/Checkout/AmazonPayLogin.twig | 4 ---- .../views/Checkout/AmazonPayWidgets.twig | 21 ++++++++++++------- 3 files changed, 19 insertions(+), 13 deletions(-) diff --git a/resources/views/Checkout/AmazonPayCheckout.twig b/resources/views/Checkout/AmazonPayCheckout.twig index ca4b1f84..175a0361 100644 --- a/resources/views/Checkout/AmazonPayCheckout.twig +++ b/resources/views/Checkout/AmazonPayCheckout.twig @@ -44,8 +44,11 @@ document.getElementById("addressBookWidgetDiv").style.display = "none"; document.getElementById("walletWidgetDiv").style.display = "none"; - document.getElementById("invoice-addresses-select").style.display = "block"; - document.getElementById("shipping-addresses-select").style.display = "block"; + if (document.getElementById("invoice-addresses-select") !== undefined && document.getElementById("shipping-addresses-select") !== undefined) + { + document.getElementById("invoice-addresses-select").style.display = "block"; + document.getElementById("shipping-addresses-select").style.display = "block"; + } }; } } diff --git a/resources/views/Checkout/AmazonPayLogin.twig b/resources/views/Checkout/AmazonPayLogin.twig index e59bfd36..60c2e34b 100644 --- a/resources/views/Checkout/AmazonPayLogin.twig +++ b/resources/views/Checkout/AmazonPayLogin.twig @@ -33,10 +33,6 @@ $("body").append(data); }); }); - - document.getElementById("invoice-addresses-select").style.display = "none"; - document.getElementById("shipping-addresses-select").style.display = "none"; - document.getElementById("LoginWithAmazon").style.display = "none"; document.getElementById("walletWidgetDiv").style.display = "block"; document.getElementById("addressBookWidgetDiv").style.display = "block"; diff --git a/resources/views/Checkout/AmazonPayWidgets.twig b/resources/views/Checkout/AmazonPayWidgets.twig index 9e35448f..0a863624 100644 --- a/resources/views/Checkout/AmazonPayWidgets.twig +++ b/resources/views/Checkout/AmazonPayWidgets.twig @@ -1,6 +1,6 @@ From 8c5770586e2feccb42225367218ce9ac0e651c05 Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Mon, 14 Sep 2020 09:13:12 +0200 Subject: [PATCH 144/353] undo js --- resources/views/Checkout/AmazonPayCheckout.twig | 4 ++-- resources/views/Checkout/AmazonPayWidgets.twig | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/resources/views/Checkout/AmazonPayCheckout.twig b/resources/views/Checkout/AmazonPayCheckout.twig index 175a0361..d586b514 100644 --- a/resources/views/Checkout/AmazonPayCheckout.twig +++ b/resources/views/Checkout/AmazonPayCheckout.twig @@ -44,11 +44,11 @@ document.getElementById("addressBookWidgetDiv").style.display = "none"; document.getElementById("walletWidgetDiv").style.display = "none"; - if (document.getElementById("invoice-addresses-select") !== undefined && document.getElementById("shipping-addresses-select") !== undefined) + /* if (document.getElementById("invoice-addresses-select") !== undefined && document.getElementById("shipping-addresses-select") !== undefined) { document.getElementById("invoice-addresses-select").style.display = "block"; document.getElementById("shipping-addresses-select").style.display = "block"; - } + }*/ }; } } diff --git a/resources/views/Checkout/AmazonPayWidgets.twig b/resources/views/Checkout/AmazonPayWidgets.twig index 0a863624..22850d89 100644 --- a/resources/views/Checkout/AmazonPayWidgets.twig +++ b/resources/views/Checkout/AmazonPayWidgets.twig @@ -89,10 +89,10 @@ walletWidget.setPresentmentCurrency("EUR"); // ISO-4217 currency code, merchant is expected to enter a valid currency supported by Amazon Pay. walletWidget.bind("walletWidgetDiv"); - if (document.getElementById("invoice-addresses-select") !== undefined && document.getElementById("shipping-addresses-select") !== undefined) + /*if (document.getElementById("invoice-addresses-select") !== undefined && document.getElementById("shipping-addresses-select") !== undefined) { document.getElementById("invoice-addresses-select").style.display = "none"; document.getElementById("shipping-addresses-select").style.display = "none"; - } + }*/ }); From b7abacf13a11934d1815c0480337f8eb2dc44ca2 Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Mon, 14 Sep 2020 09:16:03 +0200 Subject: [PATCH 145/353] changed route --- src/Providers/PayoneRouteServiceProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Providers/PayoneRouteServiceProvider.php b/src/Providers/PayoneRouteServiceProvider.php index 85cbd1d3..9ce3134b 100644 --- a/src/Providers/PayoneRouteServiceProvider.php +++ b/src/Providers/PayoneRouteServiceProvider.php @@ -25,7 +25,7 @@ public function map(Router $router) $router->get('payment/payone/checkout/amazonPay/loginButton', 'Payone\Controllers\AmazonPayController@getAmazonPayLoginWidget'); $router->post('payment/payone/checkout/amazonPay/renderWidgets', 'Payone\Controllers\AmazonPayController@renderWidgets'); - $router->post('payment/payone/checkout/amazonPay/getOrderReference', 'Payone\Controllers\AmazonPayController@getOrderReference'); + $router->get('payment/payone/checkout/amazonPay/getOrderReference', 'Payone\Controllers\AmazonPayController@getOrderReference'); $router->get('payment/payone/checkout/amazonPay/placeOrder', 'Payone\Controllers\AmazonPayController@placeOrder'); $router->post('payment/payone/checkout/amazonPay/debugTest', 'Payone\Controllers\AmazonPayController@debugTest'); From fa5f4eeee4c43b173385cd6764805c5d050d4787 Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Mon, 14 Sep 2020 09:25:34 +0200 Subject: [PATCH 146/353] fix --- resources/views/Checkout/AmazonPayWidgets.twig | 2 +- src/Providers/PayoneRouteServiceProvider.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/views/Checkout/AmazonPayWidgets.twig b/resources/views/Checkout/AmazonPayWidgets.twig index 22850d89..51db668a 100644 --- a/resources/views/Checkout/AmazonPayWidgets.twig +++ b/resources/views/Checkout/AmazonPayWidgets.twig @@ -31,7 +31,7 @@ }); });*/ - $.post("/payment/payone/checkout/amazonPay/getOrderReference'", + $.post("/payment/payone/checkout/amazonPay/getOrderReference", { "accessToken": "{{ accessToken }}", "workOrderId": "{{ workOrderId }}", diff --git a/src/Providers/PayoneRouteServiceProvider.php b/src/Providers/PayoneRouteServiceProvider.php index 9ce3134b..85cbd1d3 100644 --- a/src/Providers/PayoneRouteServiceProvider.php +++ b/src/Providers/PayoneRouteServiceProvider.php @@ -25,7 +25,7 @@ public function map(Router $router) $router->get('payment/payone/checkout/amazonPay/loginButton', 'Payone\Controllers\AmazonPayController@getAmazonPayLoginWidget'); $router->post('payment/payone/checkout/amazonPay/renderWidgets', 'Payone\Controllers\AmazonPayController@renderWidgets'); - $router->get('payment/payone/checkout/amazonPay/getOrderReference', 'Payone\Controllers\AmazonPayController@getOrderReference'); + $router->post('payment/payone/checkout/amazonPay/getOrderReference', 'Payone\Controllers\AmazonPayController@getOrderReference'); $router->get('payment/payone/checkout/amazonPay/placeOrder', 'Payone\Controllers\AmazonPayController@placeOrder'); $router->post('payment/payone/checkout/amazonPay/debugTest', 'Payone\Controllers\AmazonPayController@debugTest'); From 72d05ef25acdaa3882618f680021c3ed1ad9cb07 Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Mon, 14 Sep 2020 09:36:11 +0200 Subject: [PATCH 147/353] added logging --- src/Controllers/AmazonPayController.php | 8 ++++++++ src/Services/AmazonPayService.php | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/src/Controllers/AmazonPayController.php b/src/Controllers/AmazonPayController.php index 8be4fb8e..de973f96 100644 --- a/src/Controllers/AmazonPayController.php +++ b/src/Controllers/AmazonPayController.php @@ -19,11 +19,14 @@ use Plenty\Modules\Webshop\Contracts\LocalizationRepositoryContract; use Plenty\Plugin\Controller; use Plenty\Plugin\Http\Request; +use Plenty\Plugin\Log\Loggable; use Plenty\Plugin\Templates\Twig; class AmazonPayController extends Controller { + use Loggable; + /** @var Api */ private $api; @@ -110,10 +113,15 @@ public function getOrderReference(Request $request, Checkout $checkout) $workOrderId, $amazonReferenceId ); + $this->getLogger(__METHOD__) + ->debug('Payone::Payone.payoneLog', $requestParams); /** @var GetOrderReferenceDetailsResponse $orderReferenceResponse */ $orderReferenceResponse = $this->api->doGenericPayment(GenericPayment::ACTIONTYPE_GETORDERREFERENCEDETAILS, $requestParams); + $this->getLogger(__METHOD__) + ->debug('Payone::Payone.payoneLog', json_decode($orderReferenceResponse, true)); + /** @var AmazonPayService $amazonPayService */ $amazonPayService = pluginApp(AmazonPayService::class); $shippingAddress = $amazonPayService->registerCustomerFromAmazonPay($orderReferenceResponse); diff --git a/src/Services/AmazonPayService.php b/src/Services/AmazonPayService.php index 9066ba1f..0ca1c72d 100644 --- a/src/Services/AmazonPayService.php +++ b/src/Services/AmazonPayService.php @@ -21,9 +21,12 @@ use Plenty\Modules\Order\Shipping\Countries\Contracts\CountryRepositoryContract; use Plenty\Modules\Order\Shipping\Countries\Models\Country; use Plenty\Modules\Order\Shipping\Countries\Models\CountryState; +use Plenty\Plugin\Log\Loggable; class AmazonPayService { + use Loggable; + /** @var Api */ private $api; @@ -44,6 +47,9 @@ public function __construct(Api $api, public function registerCustomerFromAmazonPay(GetOrderReferenceDetailsResponse $orderRefDetails, $billingAddress = false) { + $this->getLogger(__METHOD__) + ->debug('Payone::Payone.payoneLog', json_decode($orderRefDetails, true)); + $addressData = []; if ($billingAddress) { From 9cd883ccd250b71d4e303812be5e1543b9bdbfcc Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Mon, 14 Sep 2020 09:45:14 +0200 Subject: [PATCH 148/353] changed logging --- src/Controllers/AmazonPayController.php | 2 +- src/Services/AmazonPayService.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Controllers/AmazonPayController.php b/src/Controllers/AmazonPayController.php index de973f96..b1be7b37 100644 --- a/src/Controllers/AmazonPayController.php +++ b/src/Controllers/AmazonPayController.php @@ -120,7 +120,7 @@ public function getOrderReference(Request $request, Checkout $checkout) $orderReferenceResponse = $this->api->doGenericPayment(GenericPayment::ACTIONTYPE_GETORDERREFERENCEDETAILS, $requestParams); $this->getLogger(__METHOD__) - ->debug('Payone::Payone.payoneLog', json_decode($orderReferenceResponse, true)); + ->debug('Payone::Payone.payoneLog', (array)$orderReferenceResponse); /** @var AmazonPayService $amazonPayService */ $amazonPayService = pluginApp(AmazonPayService::class); diff --git a/src/Services/AmazonPayService.php b/src/Services/AmazonPayService.php index 0ca1c72d..c5eae5f0 100644 --- a/src/Services/AmazonPayService.php +++ b/src/Services/AmazonPayService.php @@ -48,7 +48,7 @@ public function __construct(Api $api, public function registerCustomerFromAmazonPay(GetOrderReferenceDetailsResponse $orderRefDetails, $billingAddress = false) { $this->getLogger(__METHOD__) - ->debug('Payone::Payone.payoneLog', json_decode($orderRefDetails, true)); + ->debug('Payone::Payone.payoneLog', (array)$orderRefDetails); $addressData = []; if ($billingAddress) From f91752cae7d8fa9825a90c10ca50c32295faa60b Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Mon, 14 Sep 2020 09:53:32 +0200 Subject: [PATCH 149/353] changed logging --- src/Controllers/AmazonPayController.php | 4 ++-- src/Services/AmazonPayService.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Controllers/AmazonPayController.php b/src/Controllers/AmazonPayController.php index b1be7b37..5c10f036 100644 --- a/src/Controllers/AmazonPayController.php +++ b/src/Controllers/AmazonPayController.php @@ -114,13 +114,13 @@ public function getOrderReference(Request $request, Checkout $checkout) $amazonReferenceId ); $this->getLogger(__METHOD__) - ->debug('Payone::Payone.payoneLog', $requestParams); + ->error('Payone::Payone.payoneLog', $requestParams); /** @var GetOrderReferenceDetailsResponse $orderReferenceResponse */ $orderReferenceResponse = $this->api->doGenericPayment(GenericPayment::ACTIONTYPE_GETORDERREFERENCEDETAILS, $requestParams); $this->getLogger(__METHOD__) - ->debug('Payone::Payone.payoneLog', (array)$orderReferenceResponse); + ->error('Payone::Payone.payoneLog', (array)$orderReferenceResponse); /** @var AmazonPayService $amazonPayService */ $amazonPayService = pluginApp(AmazonPayService::class); diff --git a/src/Services/AmazonPayService.php b/src/Services/AmazonPayService.php index c5eae5f0..ece2529f 100644 --- a/src/Services/AmazonPayService.php +++ b/src/Services/AmazonPayService.php @@ -48,7 +48,7 @@ public function __construct(Api $api, public function registerCustomerFromAmazonPay(GetOrderReferenceDetailsResponse $orderRefDetails, $billingAddress = false) { $this->getLogger(__METHOD__) - ->debug('Payone::Payone.payoneLog', (array)$orderRefDetails); + ->error('Payone::Payone.payoneLog', (array)$orderRefDetails); $addressData = []; if ($billingAddress) From 6b4c02043d41bc8d10d8c41c567823ead6d35b8d Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Mon, 14 Sep 2020 10:48:09 +0200 Subject: [PATCH 150/353] fix for incomplete address --- resources/views/Checkout/AmazonPayLogin.twig | 9 ++++++++- resources/views/Checkout/AmazonPayWidgets.twig | 2 ++ src/Controllers/AmazonPayController.php | 7 ++++++- src/Providers/Api/Request/GenericPaymentDataProvider.php | 3 ++- 4 files changed, 18 insertions(+), 3 deletions(-) diff --git a/resources/views/Checkout/AmazonPayLogin.twig b/resources/views/Checkout/AmazonPayLogin.twig index 60c2e34b..ffafbd74 100644 --- a/resources/views/Checkout/AmazonPayLogin.twig +++ b/resources/views/Checkout/AmazonPayLogin.twig @@ -26,8 +26,15 @@ console.log(t.access_token); console.log(t.expires_in); console.log(t.token_type); + console.log(t.amazonAddressToken); - $.post("/payment/payone/checkout/amazonPay/renderWidgets", { "accessToken" : t.access_token, "workOrderId" : "{{ content.workOrderId }}"}, function (data) { + $.post("/payment/payone/checkout/amazonPay/renderWidgets", + { + "accessToken" : t.access_token, + "workOrderId" : "{{ content.workOrderId }}", + "amazonAddressToken" : t.amazonAddressToken, + }, + function (data) { //$('#LoginWithAmazon').append(data); console.log(data); $("body").append(data); diff --git a/resources/views/Checkout/AmazonPayWidgets.twig b/resources/views/Checkout/AmazonPayWidgets.twig index 51db668a..9696e3bc 100644 --- a/resources/views/Checkout/AmazonPayWidgets.twig +++ b/resources/views/Checkout/AmazonPayWidgets.twig @@ -21,6 +21,7 @@ console.log("After Event: AccessToken= {{ accessToken }}"); console.log("After Event: workOrderId= {{ workOrderId }}"); console.log("After Event: orderReferenceId= " + $orderReferenceId); + console.log("After Event: amazonAddressToken= " + {{ amazonAddressToken }}); // ID still required! /*var buyNowBtn = document.getElementById("buy-now"); @@ -35,6 +36,7 @@ { "accessToken": "{{ accessToken }}", "workOrderId": "{{ workOrderId }}", + "amazonAddressToken": "{{ amazonAddressToken }}", "amazonReferenceId": $orderReferenceId }, function (data) { diff --git a/src/Controllers/AmazonPayController.php b/src/Controllers/AmazonPayController.php index 5c10f036..6f4a5604 100644 --- a/src/Controllers/AmazonPayController.php +++ b/src/Controllers/AmazonPayController.php @@ -78,6 +78,7 @@ public function renderWidgets(Twig $twig, PaymentHelper $paymentHelper, Request // AccessToken in Request $accessToken = $request->get('accessToken'); $workdOrderId = $request->get('workOrderId'); + $amazonAddressToken = $request->get('amazonAddressToken'); // SWAP containers here $content = [ @@ -92,7 +93,8 @@ public function renderWidgets(Twig $twig, PaymentHelper $paymentHelper, Request 'content' => $content, 'accessToken' => $accessToken, 'workOrderId' => $workdOrderId, - 'amazonPayMopId' => $amazonPayMopId + 'amazonPayMopId' => $amazonPayMopId, + 'amazonAddressToken' => $amazonAddressToken ]); } @@ -100,17 +102,20 @@ public function getOrderReference(Request $request, Checkout $checkout) { $workOrderId = $request->get('workOrderId'); $amazonReferenceId = $request->get('amazonReferenceId'); + $amazonAddressToken = $request->get('amazonAddressToken'); /** @var SessionStorage $sessionStorage */ $sessionStorage = pluginApp(SessionStorage::class); $sessionStorage->setSessionValue('workOrderId', $workOrderId); $sessionStorage->setSessionValue('amazonReferenceId', $amazonReferenceId); + $sessionStorage->setSessionValue('amazonAddressToken', $amazonAddressToken); /** @var GenericPaymentDataProvider $genericPaymentDataProvider */ $genericPaymentDataProvider = pluginApp(GenericPaymentDataProvider::class); $requestParams = $genericPaymentDataProvider->getGetOrderReferenceDetailsRequestData( "Amazon Pay", $workOrderId, + $amazonAddressToken, $amazonReferenceId ); $this->getLogger(__METHOD__) diff --git a/src/Providers/Api/Request/GenericPaymentDataProvider.php b/src/Providers/Api/Request/GenericPaymentDataProvider.php index 219ca726..9f1b5cfa 100644 --- a/src/Providers/Api/Request/GenericPaymentDataProvider.php +++ b/src/Providers/Api/Request/GenericPaymentDataProvider.php @@ -30,6 +30,7 @@ public function getGetConfigRequestData(string $paymentCode): array */ public function getGetOrderReferenceDetailsRequestData(string $paymentCode, string $workOrderId, + string $amazonAddressToken, string $amazonReferenceId): array { // TODO: Maybe load creds from cache/session ? @@ -43,7 +44,7 @@ public function getGetOrderReferenceDetailsRequestData(string $paymentCode, $requestParams['add_paydata']['action'] = GenericPayment::ACTIONTYPE_GETORDERREFERENCEDETAILS; - //$requestParams['add_paydata']['amazon_address_token'] = $amazonAddressToken; + $requestParams['add_paydata']['amazon_address_token'] = $amazonAddressToken; $requestParams['add_paydata']['amazon_reference_id'] = $amazonReferenceId; $requestParams['workorderid'] = $workOrderId; From bceb3a178d01a6f7fb280d60b51f4ba52c60f642 Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Mon, 14 Sep 2020 11:11:23 +0200 Subject: [PATCH 151/353] error-fix? --- resources/views/Checkout/AmazonPayLogin.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/Checkout/AmazonPayLogin.twig b/resources/views/Checkout/AmazonPayLogin.twig index ffafbd74..63563848 100644 --- a/resources/views/Checkout/AmazonPayLogin.twig +++ b/resources/views/Checkout/AmazonPayLogin.twig @@ -32,7 +32,7 @@ { "accessToken" : t.access_token, "workOrderId" : "{{ content.workOrderId }}", - "amazonAddressToken" : t.amazonAddressToken, + "amazonAddressToken" : t.amazonAddressToken }, function (data) { //$('#LoginWithAmazon').append(data); From b9c94eb18991443db73fb187d92419db7d8a1c6e Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Mon, 14 Sep 2020 12:08:36 +0200 Subject: [PATCH 152/353] changed addressToken to accessToken --- resources/views/Checkout/AmazonPayLogin.twig | 5 ++--- resources/views/Checkout/AmazonPayWidgets.twig | 2 -- src/Controllers/AmazonPayController.php | 10 ++++------ 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/resources/views/Checkout/AmazonPayLogin.twig b/resources/views/Checkout/AmazonPayLogin.twig index 63563848..7db0b687 100644 --- a/resources/views/Checkout/AmazonPayLogin.twig +++ b/resources/views/Checkout/AmazonPayLogin.twig @@ -26,13 +26,12 @@ console.log(t.access_token); console.log(t.expires_in); console.log(t.token_type); - console.log(t.amazonAddressToken); + // console.log(t.amazonAddressToken); $.post("/payment/payone/checkout/amazonPay/renderWidgets", { "accessToken" : t.access_token, - "workOrderId" : "{{ content.workOrderId }}", - "amazonAddressToken" : t.amazonAddressToken + "workOrderId" : "{{ content.workOrderId }}" }, function (data) { //$('#LoginWithAmazon').append(data); diff --git a/resources/views/Checkout/AmazonPayWidgets.twig b/resources/views/Checkout/AmazonPayWidgets.twig index 9696e3bc..51db668a 100644 --- a/resources/views/Checkout/AmazonPayWidgets.twig +++ b/resources/views/Checkout/AmazonPayWidgets.twig @@ -21,7 +21,6 @@ console.log("After Event: AccessToken= {{ accessToken }}"); console.log("After Event: workOrderId= {{ workOrderId }}"); console.log("After Event: orderReferenceId= " + $orderReferenceId); - console.log("After Event: amazonAddressToken= " + {{ amazonAddressToken }}); // ID still required! /*var buyNowBtn = document.getElementById("buy-now"); @@ -36,7 +35,6 @@ { "accessToken": "{{ accessToken }}", "workOrderId": "{{ workOrderId }}", - "amazonAddressToken": "{{ amazonAddressToken }}", "amazonReferenceId": $orderReferenceId }, function (data) { diff --git a/src/Controllers/AmazonPayController.php b/src/Controllers/AmazonPayController.php index 6f4a5604..13d876f4 100644 --- a/src/Controllers/AmazonPayController.php +++ b/src/Controllers/AmazonPayController.php @@ -78,7 +78,6 @@ public function renderWidgets(Twig $twig, PaymentHelper $paymentHelper, Request // AccessToken in Request $accessToken = $request->get('accessToken'); $workdOrderId = $request->get('workOrderId'); - $amazonAddressToken = $request->get('amazonAddressToken'); // SWAP containers here $content = [ @@ -93,8 +92,7 @@ public function renderWidgets(Twig $twig, PaymentHelper $paymentHelper, Request 'content' => $content, 'accessToken' => $accessToken, 'workOrderId' => $workdOrderId, - 'amazonPayMopId' => $amazonPayMopId, - 'amazonAddressToken' => $amazonAddressToken + 'amazonPayMopId' => $amazonPayMopId ]); } @@ -102,20 +100,20 @@ public function getOrderReference(Request $request, Checkout $checkout) { $workOrderId = $request->get('workOrderId'); $amazonReferenceId = $request->get('amazonReferenceId'); - $amazonAddressToken = $request->get('amazonAddressToken'); + $accessToken = $request->get('accessToken'); /** @var SessionStorage $sessionStorage */ $sessionStorage = pluginApp(SessionStorage::class); $sessionStorage->setSessionValue('workOrderId', $workOrderId); $sessionStorage->setSessionValue('amazonReferenceId', $amazonReferenceId); - $sessionStorage->setSessionValue('amazonAddressToken', $amazonAddressToken); + $sessionStorage->setSessionValue('accessToken', $accessToken); /** @var GenericPaymentDataProvider $genericPaymentDataProvider */ $genericPaymentDataProvider = pluginApp(GenericPaymentDataProvider::class); $requestParams = $genericPaymentDataProvider->getGetOrderReferenceDetailsRequestData( "Amazon Pay", $workOrderId, - $amazonAddressToken, + $accessToken, $amazonReferenceId ); $this->getLogger(__METHOD__) From 61f7122203807eb623a293b484c8dd27d18c0277 Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Mon, 14 Sep 2020 12:16:02 +0200 Subject: [PATCH 153/353] added token to request --- .../GenericPayment/AmazonPayGetOrderReferenceRequest.php | 3 +++ .../Request/GenericPayment/GenericPaymentRequestFactory.php | 1 + 2 files changed, 4 insertions(+) diff --git a/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayGetOrderReferenceRequest.php b/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayGetOrderReferenceRequest.php index 507579ea..6bd44820 100644 --- a/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayGetOrderReferenceRequest.php +++ b/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayGetOrderReferenceRequest.php @@ -25,6 +25,7 @@ class AmazonPayGetOrderReferenceRequest private $add_paydata = [ 'action' => 'getorderreferencedetails', 'amazon_reference_id' => '', + 'amazon_address_token' => '', ]; /** @var Config */ @@ -46,6 +47,7 @@ public function __construct( Config $config, SystemInfo $info, string $amazonReferenceId, + string $amazonAddressToken, string $workOrderId, string $currency ) @@ -53,6 +55,7 @@ public function __construct( $this->config = $config; $this->info = $info; $this->add_paydata['amazon_reference_id'] = $amazonReferenceId; + $this->add_paydata['amazon_address_token'] = $amazonAddressToken; $this->workorderid = $workOrderId; $this->currency = $currency; } diff --git a/resources/lib/PayoneApi/Request/GenericPayment/GenericPaymentRequestFactory.php b/resources/lib/PayoneApi/Request/GenericPayment/GenericPaymentRequestFactory.php index 9e835392..c68d9821 100644 --- a/resources/lib/PayoneApi/Request/GenericPayment/GenericPaymentRequestFactory.php +++ b/resources/lib/PayoneApi/Request/GenericPayment/GenericPaymentRequestFactory.php @@ -47,6 +47,7 @@ public static function create($paymentMethod, $data, $referenceId = null) $config, $systemInfo, $data['add_paydata']['amazon_reference_id'], + $data['add_paydata']['amazon_address_token'], $data['workorderid'], $data['currency']); break; From 6a2df0ee158157605a7c32b59d4814a95df51cdf Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Mon, 14 Sep 2020 13:14:37 +0200 Subject: [PATCH 154/353] fixed initialization of amazonpay --- src/Methods/PaymentMethodServiceFactory.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Methods/PaymentMethodServiceFactory.php b/src/Methods/PaymentMethodServiceFactory.php index c0fa6ecf..086c145c 100644 --- a/src/Methods/PaymentMethodServiceFactory.php +++ b/src/Methods/PaymentMethodServiceFactory.php @@ -38,7 +38,7 @@ public static function create($paymentCode) case PayoneInvoiceSecurePaymentMethod::PAYMENT_CODE; return pluginApp(PayoneInvoiceSecurePaymentMethod::class); case PayoneAmazonPayPaymentMethod::PAYMENT_CODE; - return pluginApp(PayoneAmazonPayPaymentMethod::PAYMENT_CODE); + return pluginApp(PayoneAmazonPayPaymentMethod::class); } throw new \InvalidArgumentException('Unknown payment method ' . $paymentCode); } From 4b5dab7014f82c584fbcf0bc77291d3ab405ac6a Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Mon, 14 Sep 2020 17:33:05 +0200 Subject: [PATCH 155/353] fixed payment code --- resources/lib/PayoneApi/Request/PaymentTypes.php | 2 +- src/Controllers/AmazonPayController.php | 4 ++-- src/Services/AmazonPayService.php | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/resources/lib/PayoneApi/Request/PaymentTypes.php b/resources/lib/PayoneApi/Request/PaymentTypes.php index 0f7ceda7..f6642388 100644 --- a/resources/lib/PayoneApi/Request/PaymentTypes.php +++ b/resources/lib/PayoneApi/Request/PaymentTypes.php @@ -17,7 +17,7 @@ class PaymentTypes const PAYONE_PAYDIREKT = 'Paydirekt'; const PAYONE_INVOICE_SECURE = 'InvoiceSecure'; const PAYONE_ON_LINE_BANK_TRANSFER = 'OnlineBankTransfer'; - const PAYONE_AMAZON_PAY = 'Amazon Pay'; + const PAYONE_AMAZON_PAY = 'AmazonPay'; /** * @return mixed diff --git a/src/Controllers/AmazonPayController.php b/src/Controllers/AmazonPayController.php index 13d876f4..09760eeb 100644 --- a/src/Controllers/AmazonPayController.php +++ b/src/Controllers/AmazonPayController.php @@ -47,7 +47,7 @@ public function __construct(Api $api, public function getAmazonPayLoginWidget(Twig $twig) { - $requestParams = $this->dataProvider->getGetConfigRequestData("Amazon Pay"); + $requestParams = $this->dataProvider->getGetConfigRequestData(PayoneAmazonPayPaymentMethod::PAYMENT_CODE); $configResponse = $this->api->doGenericPayment(GenericPayment::ACTIONTYPE_GETCONFIGURATION, $requestParams); @@ -111,7 +111,7 @@ public function getOrderReference(Request $request, Checkout $checkout) /** @var GenericPaymentDataProvider $genericPaymentDataProvider */ $genericPaymentDataProvider = pluginApp(GenericPaymentDataProvider::class); $requestParams = $genericPaymentDataProvider->getGetOrderReferenceDetailsRequestData( - "Amazon Pay", + PayoneAmazonPayPaymentMethod::PAYMENT_CODE, $workOrderId, $accessToken, $amazonReferenceId diff --git a/src/Services/AmazonPayService.php b/src/Services/AmazonPayService.php index ece2529f..a777d940 100644 --- a/src/Services/AmazonPayService.php +++ b/src/Services/AmazonPayService.php @@ -8,6 +8,7 @@ use IO\Services\CustomerService; use function Matrix\add; use Payone\Adapter\SessionStorage; +use Payone\Methods\PayoneAmazonPayPaymentMethod; use Payone\Models\Api\GenericPayment\ConfirmOrderReferenceResponse; use Payone\Models\Api\GenericPayment\GetOrderReferenceDetailsResponse; use Payone\Models\Api\GenericPayment\SetOrderReferenceDetailsResponse; @@ -158,7 +159,7 @@ public function setOrderReference(Basket $basket) $amazonReferenceId = $sessionStorage->getSessionValue('amazonReferenceId'); $requestParams = $this->dataProvider->getSetOrderReferenceDetailsRequestData( - "Amazon Pay", + PayoneAmazonPayPaymentMethod::PAYMENT_CODE, $workOrderId, $amazonReferenceId, // $amazonAddressToken, From b023ce35112bb5c540e96bdc70b0e16cf7c4e8ab Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Tue, 15 Sep 2020 15:35:36 +0200 Subject: [PATCH 156/353] added additonal logging --- src/Providers/PayoneServiceProvider.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/Providers/PayoneServiceProvider.php b/src/Providers/PayoneServiceProvider.php index 2e2ce7b3..c415b903 100755 --- a/src/Providers/PayoneServiceProvider.php +++ b/src/Providers/PayoneServiceProvider.php @@ -368,15 +368,26 @@ public function registerAmazonPayIntegration(Dispatcher $eventDispatcher, Basket $paymentHelper = pluginApp(PaymentHelper::class); if($event->getMop() == $paymentHelper->getMopId(PayoneAmazonPayPaymentMethod::PAYMENT_CODE)) { + /** @var Logger $logger */ + $logger = pluginApp(Logger::class); + $logger + ->setIdentifier(__METHOD__) + ->info('Event.checkout', ['event' => (array) $event]); + /** @var Basket $basket */ $basket = $basketRepository->load(); /** @var SetOrderReferenceDetailsResponse $setOrderRefResponse */ $setOrderRefResponse = $amazonPayService->setOrderReference($basket); + $logger + ->setIdentifier(__METHOD__) + ->info('Event.checkout', ['setOrderRefResponse' => (array) $setOrderRefResponse]); /** @var ConfirmOrderReferenceResponse $confirmOrderRefResponse */ $confirmOrderRefResponse = $amazonPayService->confirmOrderReference($basket); - + $logger + ->setIdentifier(__METHOD__) + ->info('Event.checkout', ['confirmOrderRefResponse' => (array) $confirmOrderRefResponse]); if($confirmOrderRefResponse->getSuccess() == true) { $content = "OffAmazonPayments.initConfirmationFlow(sellerId, id, function(confirmationFlow) {confirmationFlow.success();});"; From dc266f6dbc69294fcf72a5b8cfbcfba389262e1f Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Tue, 15 Sep 2020 16:13:19 +0200 Subject: [PATCH 157/353] added more logging --- src/Controllers/AmazonPayController.php | 56 +++++++++++-------- .../GetOrderReferenceDetailsResponse.php | 23 ++++---- src/Services/AmazonPayService.php | 46 +++++++++++---- 3 files changed, 79 insertions(+), 46 deletions(-) diff --git a/src/Controllers/AmazonPayController.php b/src/Controllers/AmazonPayController.php index 09760eeb..a4abb724 100644 --- a/src/Controllers/AmazonPayController.php +++ b/src/Controllers/AmazonPayController.php @@ -2,6 +2,7 @@ namespace Payone\Controllers; +use Payone\Adapter\Logger; use Payone\Adapter\SessionStorage; use Payone\Helpers\PaymentHelper; use Payone\Methods\PayoneAmazonPayPaymentMethod; @@ -25,24 +26,29 @@ class AmazonPayController extends Controller { - use Loggable; - + /** @var Api */ private $api; /** @var GenericPaymentDataProvider */ private $dataProvider; + /** @var Logger */ + private $logger; + /** * AmazonPayController constructor. * @param Api $api * @param GenericPaymentDataProvider $dataProvider + * @param Logger $logger */ public function __construct(Api $api, - GenericPaymentDataProvider $dataProvider) + GenericPaymentDataProvider $dataProvider, + Logger $logger) { $this->api = $api; $this->dataProvider = $dataProvider; + $this->logger = $logger; } public function getAmazonPayLoginWidget(Twig $twig) @@ -51,13 +57,15 @@ public function getAmazonPayLoginWidget(Twig $twig) $configResponse = $this->api->doGenericPayment(GenericPayment::ACTIONTYPE_GETCONFIGURATION, $requestParams); + $this->logger + ->setIdentifier(__METHOD__) + ->debug('Config for login button', (array)$configResponse); + /** @var LocalizationRepositoryContract $localizationRepositoryContract */ $localizationRepositoryContract = pluginApp(LocalizationRepositoryContract::class); $lang = $this->getLanguageCode($localizationRepositoryContract->getLanguage()); $content = [ -// 'clientId' => "amzn1.application-oa2-client.2c027e55b128457bb16edc2f0fc6bd71", -// 'sellerId' => "A13SNST9X74Q8L", 'clientId' => $configResponse->getClientId(), 'sellerId' => $configResponse->getSellerId(), 'type' => "LwA", @@ -116,14 +124,20 @@ public function getOrderReference(Request $request, Checkout $checkout) $accessToken, $amazonReferenceId ); - $this->getLogger(__METHOD__) - ->error('Payone::Payone.payoneLog', $requestParams); /** @var GetOrderReferenceDetailsResponse $orderReferenceResponse */ $orderReferenceResponse = $this->api->doGenericPayment(GenericPayment::ACTIONTYPE_GETORDERREFERENCEDETAILS, $requestParams); - $this->getLogger(__METHOD__) - ->error('Payone::Payone.payoneLog', (array)$orderReferenceResponse); + $this->logger + ->setIdentifier(__METHOD__) + ->debug('Get order reference from Amazon', [ + "workOrderId" => $workOrderId, + "amazonReferenceId" => $amazonReferenceId, + "accessToken" => $accessToken, + "requestParams" => $requestParams, + "orderReferenceResponse" => (array)$orderReferenceResponse + ]); + /** @var AmazonPayService $amazonPayService */ $amazonPayService = pluginApp(AmazonPayService::class); @@ -135,7 +149,6 @@ public function getOrderReference(Request $request, Checkout $checkout) $checkout->setCustomerShippingAddressId($shippingAddress->id); //$checkout->setCustomerShippingAddressId($billingAddress->id); - return json_encode($checkout, true); } @@ -143,15 +156,15 @@ public function debugTest() { /** @var GetOrderReferenceDetailsResponse $orderRefDetails */ $orderRefDetails = pluginApp(GetOrderReferenceDetailsResponse::class); - $orderRefDetails->shippingCompany = "TestCompany"; - $orderRefDetails->shippingFirstname = "FirstName"; - $orderRefDetails->shippingLastname = "LastName"; - $orderRefDetails->shippingStreet = "Street 123"; - $orderRefDetails->shippingZip = "12345"; - $orderRefDetails->shippingCity = "Kassel"; - $orderRefDetails->shippingCountry = "DE"; - $orderRefDetails->shippingState = "Hessen"; - $orderRefDetails->shippingTelephonenumber = "01726265233"; +// $orderRefDetails->shippingCompany = "TestCompany"; +// $orderRefDetails->shippingFirstname = "FirstName"; +// $orderRefDetails->shippingLastname = "LastName"; +// $orderRefDetails->shippingStreet = "Street 123"; +// $orderRefDetails->shippingZip = "12345"; +// $orderRefDetails->shippingCity = "Kassel"; +// $orderRefDetails->shippingCountry = "DE"; +// $orderRefDetails->shippingState = "Hessen"; +// $orderRefDetails->shippingTelephonenumber = "01726265233"; /** @var AmazonPayService $apiDebug */ $apiDebug = pluginApp(AmazonPayService::class); @@ -161,17 +174,16 @@ public function debugTest() $address = $apiDebug->registerCustomerFromAmazonPay($orderRefDetails, true); - // basket setShipping/setBilling... Methode zum Setzen der Addresse //$createdAddress = $contactAddress->createAddress($address->toArray(), - // AddressRelationType::DELIVERY_ADDRESS); + // AddressRelationType::DELIVERY_ADDRESS); return $address; } private function getLanguageCode(string $lang): string { - switch($lang){ + switch ($lang) { case "de": $lang = "de-DE"; break; diff --git a/src/Models/Api/GenericPayment/GetOrderReferenceDetailsResponse.php b/src/Models/Api/GenericPayment/GetOrderReferenceDetailsResponse.php index 10c61dee..d5f6d0a2 100644 --- a/src/Models/Api/GenericPayment/GetOrderReferenceDetailsResponse.php +++ b/src/Models/Api/GenericPayment/GetOrderReferenceDetailsResponse.php @@ -9,17 +9,17 @@ */ class GetOrderReferenceDetailsResponse extends ResponseAbstract implements \JsonSerializable { - public $shippingZip; - public $shippingStreet; - public $shippingCompany; - public $shippingCity; - public $shippingType; - public $shippingCountry; - public $shippingDistrict; - public $shippingTelephonenumber; - public $shippingState; - public $shippingFirstname; - public $shippingLastname; + private $shippingZip; + private $shippingStreet; + private $shippingCompany; + private $shippingCity; + private $shippingType; + private $shippingCountry; + private $shippingDistrict; + private $shippingTelephonenumber; + private $shippingState; + private $shippingFirstname; + private $shippingLastname; private $billingZip; private $billingStreet; private $billingCompany; @@ -346,5 +346,4 @@ public function getTransactionID(): string return $this->transactionID; } - } diff --git a/src/Services/AmazonPayService.php b/src/Services/AmazonPayService.php index a777d940..83846f4d 100644 --- a/src/Services/AmazonPayService.php +++ b/src/Services/AmazonPayService.php @@ -7,6 +7,7 @@ use IO\Builder\Order\AddressType; use IO\Services\CustomerService; use function Matrix\add; +use Payone\Adapter\Logger; use Payone\Adapter\SessionStorage; use Payone\Methods\PayoneAmazonPayPaymentMethod; use Payone\Models\Api\GenericPayment\ConfirmOrderReferenceResponse; @@ -26,30 +27,35 @@ class AmazonPayService { - use Loggable; - /** @var Api */ private $api; /** @var GenericPaymentDataProvider */ private $dataProvider; + /** @var Logger */ + private $logger; + /** * AmazonPayService constructor. * @param Api $api * @param GenericPaymentDataProvider $dataProvider + * @param Logger $logger */ public function __construct(Api $api, - GenericPaymentDataProvider $dataProvider) + GenericPaymentDataProvider $dataProvider, + Logger $logger) { $this->api = $api; $this->dataProvider = $dataProvider; + $this->logger = $logger; } public function registerCustomerFromAmazonPay(GetOrderReferenceDetailsResponse $orderRefDetails, $billingAddress = false) { - $this->getLogger(__METHOD__) - ->error('Payone::Payone.payoneLog', (array)$orderRefDetails); + $this->logger + ->setIdentifier(__METHOD__) + ->debug('Customer addresses from Amazon', (array)$orderRefDetails); $addressData = []; if ($billingAddress) @@ -169,6 +175,16 @@ public function setOrderReference(Basket $basket) /** @var SetOrderReferenceDetailsResponse $orderReferenceResponse */ $orderReferenceResponse = $this->api->doGenericPayment(GenericPayment::ACTIONTYPE_SETORDERREFERENCEDETAILS, $requestParams); + + $this->logger + ->setIdentifier(__METHOD__) + ->debug('Set order reference on Amazon', [ + "workOrderId" => $workOrderId, + "amazonReferenceId" => $amazonReferenceId, + "requestParams" => $requestParams, + "setOrderReferenceResponse" => (array)$orderReferenceResponse + ]); + return $orderReferenceResponse; } @@ -187,15 +203,21 @@ public function confirmOrderReference(Basket $basket) $reference = ""; - /** @var GenericPaymentDataProvider $dataProvider */ - $dataProvider = pluginApp(GenericPaymentDataProvider::class); - /** @var Api $api */ - $api = pluginApp(Api::class); - - $requestParams = $dataProvider->getConfirmOrderReferenceRequestData("Amazon Pay", $workOrderId, $reference, $amazonReferenceId, $amount); + $requestParams = $this->dataProvider->getConfirmOrderReferenceRequestData("Amazon Pay", $workOrderId, $reference, $amazonReferenceId, $amount); /** @var ConfirmOrderReferenceResponse $confirmOrderReferenceResponse */ - $confirmOrderReferenceResponse = $api->doGenericPayment(GenericPayment::ACTIONTYPE_CONFIRMORDERREFERENCE, $requestParams); + $confirmOrderReferenceResponse = $this->api->doGenericPayment(GenericPayment::ACTIONTYPE_CONFIRMORDERREFERENCE, $requestParams); + + $this->logger + ->setIdentifier(__METHOD__) + ->debug('Confirm order reference on Amazon', [ + "workOrderId" => $workOrderId, + "amazonReferenceId" => $amazonReferenceId, + "amount" => $amount, + "requestParams" => $requestParams, + "confirmOrderReferenceResponse" => (array)$confirmOrderReferenceResponse + ]); + return $confirmOrderReferenceResponse; } From f075beb1aa95e7bc912f78a29e557759ed779556 Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Tue, 15 Sep 2020 16:26:52 +0200 Subject: [PATCH 158/353] added try-catch --- src/Controllers/AmazonPayController.php | 93 +++++++++++++------------ 1 file changed, 50 insertions(+), 43 deletions(-) diff --git a/src/Controllers/AmazonPayController.php b/src/Controllers/AmazonPayController.php index a4abb724..1bd62c45 100644 --- a/src/Controllers/AmazonPayController.php +++ b/src/Controllers/AmazonPayController.php @@ -26,7 +26,7 @@ class AmazonPayController extends Controller { - + /** @var Api */ private $api; @@ -106,48 +106,55 @@ public function renderWidgets(Twig $twig, PaymentHelper $paymentHelper, Request public function getOrderReference(Request $request, Checkout $checkout) { - $workOrderId = $request->get('workOrderId'); - $amazonReferenceId = $request->get('amazonReferenceId'); - $accessToken = $request->get('accessToken'); - - /** @var SessionStorage $sessionStorage */ - $sessionStorage = pluginApp(SessionStorage::class); - $sessionStorage->setSessionValue('workOrderId', $workOrderId); - $sessionStorage->setSessionValue('amazonReferenceId', $amazonReferenceId); - $sessionStorage->setSessionValue('accessToken', $accessToken); - - /** @var GenericPaymentDataProvider $genericPaymentDataProvider */ - $genericPaymentDataProvider = pluginApp(GenericPaymentDataProvider::class); - $requestParams = $genericPaymentDataProvider->getGetOrderReferenceDetailsRequestData( - PayoneAmazonPayPaymentMethod::PAYMENT_CODE, - $workOrderId, - $accessToken, - $amazonReferenceId - ); - - /** @var GetOrderReferenceDetailsResponse $orderReferenceResponse */ - $orderReferenceResponse = $this->api->doGenericPayment(GenericPayment::ACTIONTYPE_GETORDERREFERENCEDETAILS, $requestParams); - - $this->logger - ->setIdentifier(__METHOD__) - ->debug('Get order reference from Amazon', [ - "workOrderId" => $workOrderId, - "amazonReferenceId" => $amazonReferenceId, - "accessToken" => $accessToken, - "requestParams" => $requestParams, - "orderReferenceResponse" => (array)$orderReferenceResponse - ]); - - - /** @var AmazonPayService $amazonPayService */ - $amazonPayService = pluginApp(AmazonPayService::class); - $shippingAddress = $amazonPayService->registerCustomerFromAmazonPay($orderReferenceResponse); - //$billingAddress = $amazonPayService->registerCustomerFromAmazonPay($orderReferenceResponse, true); - - - $checkout->setCustomerInvoiceAddressId($shippingAddress->id); - $checkout->setCustomerShippingAddressId($shippingAddress->id); - //$checkout->setCustomerShippingAddressId($billingAddress->id); + try{ + $workOrderId = $request->get('workOrderId'); + $amazonReferenceId = $request->get('amazonReferenceId'); + $accessToken = $request->get('accessToken'); + + /** @var SessionStorage $sessionStorage */ + $sessionStorage = pluginApp(SessionStorage::class); + $sessionStorage->setSessionValue('workOrderId', $workOrderId); + $sessionStorage->setSessionValue('amazonReferenceId', $amazonReferenceId); + $sessionStorage->setSessionValue('accessToken', $accessToken); + + /** @var GenericPaymentDataProvider $genericPaymentDataProvider */ + $genericPaymentDataProvider = pluginApp(GenericPaymentDataProvider::class); + $requestParams = $genericPaymentDataProvider->getGetOrderReferenceDetailsRequestData( + PayoneAmazonPayPaymentMethod::PAYMENT_CODE, + $workOrderId, + $accessToken, + $amazonReferenceId + ); + + /** @var GetOrderReferenceDetailsResponse $orderReferenceResponse */ + $orderReferenceResponse = $this->api->doGenericPayment(GenericPayment::ACTIONTYPE_GETORDERREFERENCEDETAILS, $requestParams); + + $this->logger + ->setIdentifier(__METHOD__) + ->debug('Get order reference from Amazon', [ + "workOrderId" => $workOrderId, + "amazonReferenceId" => $amazonReferenceId, + "accessToken" => $accessToken, + "requestParams" => $requestParams, + "orderReferenceResponse" => (array)$orderReferenceResponse + ]); + + + /** @var AmazonPayService $amazonPayService */ + $amazonPayService = pluginApp(AmazonPayService::class); + $shippingAddress = $amazonPayService->registerCustomerFromAmazonPay($orderReferenceResponse); + //$billingAddress = $amazonPayService->registerCustomerFromAmazonPay($orderReferenceResponse, true); + + + $checkout->setCustomerInvoiceAddressId($shippingAddress->id); + $checkout->setCustomerShippingAddressId($shippingAddress->id); + //$checkout->setCustomerShippingAddressId($billingAddress->id); + } catch (\Exception $exception) + { + $this->logger + ->setIdentifier(__METHOD__) + ->error('Get order reference from Amazon', $exception); + } } From 954288c62c51961b87b46ecf2ab9f0fb373e7c12 Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Wed, 16 Sep 2020 13:22:44 +0200 Subject: [PATCH 159/353] added more logging --- src/Controllers/AmazonPayController.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/Controllers/AmazonPayController.php b/src/Controllers/AmazonPayController.php index 1bd62c45..25ad2025 100644 --- a/src/Controllers/AmazonPayController.php +++ b/src/Controllers/AmazonPayController.php @@ -77,6 +77,12 @@ public function getAmazonPayLoginWidget(Twig $twig) 'workOrderId' => $configResponse->getWorkorderId() ]; + $this->logger + ->setIdentifier(__METHOD__) + ->debug('Render login widgets', [ + "content" => (array)$content + ]); + return $twig->render(PluginConstants::NAME . '::Checkout.AmazonPayLogin', ['content' => $content]); } @@ -96,6 +102,12 @@ public function renderWidgets(Twig $twig, PaymentHelper $paymentHelper, Request ]; $amazonPayMopId = $paymentHelper->getMopId(PayoneAmazonPayPaymentMethod::PAYMENT_CODE); + $this->logger + ->setIdentifier(__METHOD__) + ->debug('Render widgets', [ + "content" => (array)$content + ]); + return $twig->render(PluginConstants::NAME . '::Checkout.AmazonPayWidgets', [ 'content' => $content, 'accessToken' => $accessToken, From 5273b8b141f727bf89e8033c22d04e70e434b857 Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Wed, 16 Sep 2020 13:47:57 +0200 Subject: [PATCH 160/353] fixed logging --- resources/lang/de/AmazonPay.properties | 8 ++++++++ resources/lang/en/AmazonPay.properties | 8 ++++++++ src/Controllers/AmazonPayController.php | 13 ++++++------- src/Services/AmazonPayService.php | 6 +++--- src/Services/Api.php | 10 ++++++++++ 5 files changed, 35 insertions(+), 10 deletions(-) create mode 100644 resources/lang/de/AmazonPay.properties create mode 100644 resources/lang/en/AmazonPay.properties diff --git a/resources/lang/de/AmazonPay.properties b/resources/lang/de/AmazonPay.properties new file mode 100644 index 00000000..29243760 --- /dev/null +++ b/resources/lang/de/AmazonPay.properties @@ -0,0 +1,8 @@ +apiCall=Calling the API +configLoginButton=Config for login button +renderLoginWidget=Render login widget +renderWidgets=Render widgets +getOrderReference=Get order reference +registerCustomer=Customer addresses from Amazon +setOrderReference=Set order reference +confirmOrderReference=Confirm order reference on Amazon diff --git a/resources/lang/en/AmazonPay.properties b/resources/lang/en/AmazonPay.properties new file mode 100644 index 00000000..29243760 --- /dev/null +++ b/resources/lang/en/AmazonPay.properties @@ -0,0 +1,8 @@ +apiCall=Calling the API +configLoginButton=Config for login button +renderLoginWidget=Render login widget +renderWidgets=Render widgets +getOrderReference=Get order reference +registerCustomer=Customer addresses from Amazon +setOrderReference=Set order reference +confirmOrderReference=Confirm order reference on Amazon diff --git a/src/Controllers/AmazonPayController.php b/src/Controllers/AmazonPayController.php index 25ad2025..65bc2de5 100644 --- a/src/Controllers/AmazonPayController.php +++ b/src/Controllers/AmazonPayController.php @@ -59,7 +59,7 @@ public function getAmazonPayLoginWidget(Twig $twig) $this->logger ->setIdentifier(__METHOD__) - ->debug('Config for login button', (array)$configResponse); + ->debug('AmazonPay.configLoginButton', (array)$configResponse); /** @var LocalizationRepositoryContract $localizationRepositoryContract */ $localizationRepositoryContract = pluginApp(LocalizationRepositoryContract::class); @@ -79,7 +79,7 @@ public function getAmazonPayLoginWidget(Twig $twig) $this->logger ->setIdentifier(__METHOD__) - ->debug('Render login widgets', [ + ->debug('AmazonPay.renderLoginWidget', [ "content" => (array)$content ]); @@ -104,7 +104,7 @@ public function renderWidgets(Twig $twig, PaymentHelper $paymentHelper, Request $this->logger ->setIdentifier(__METHOD__) - ->debug('Render widgets', [ + ->debug('AmazonPay.renderWidgets', [ "content" => (array)$content ]); @@ -143,7 +143,7 @@ public function getOrderReference(Request $request, Checkout $checkout) $this->logger ->setIdentifier(__METHOD__) - ->debug('Get order reference from Amazon', [ + ->debug('AmazonPay.getOrderReference', [ "workOrderId" => $workOrderId, "amazonReferenceId" => $amazonReferenceId, "accessToken" => $accessToken, @@ -161,11 +161,10 @@ public function getOrderReference(Request $request, Checkout $checkout) $checkout->setCustomerInvoiceAddressId($shippingAddress->id); $checkout->setCustomerShippingAddressId($shippingAddress->id); //$checkout->setCustomerShippingAddressId($billingAddress->id); - } catch (\Exception $exception) - { + } catch (\Exception $exception) { $this->logger ->setIdentifier(__METHOD__) - ->error('Get order reference from Amazon', $exception); + ->error('AmazonPay.getOrderReference', $exception); } } diff --git a/src/Services/AmazonPayService.php b/src/Services/AmazonPayService.php index 83846f4d..e6596936 100644 --- a/src/Services/AmazonPayService.php +++ b/src/Services/AmazonPayService.php @@ -55,7 +55,7 @@ public function registerCustomerFromAmazonPay(GetOrderReferenceDetailsResponse $ { $this->logger ->setIdentifier(__METHOD__) - ->debug('Customer addresses from Amazon', (array)$orderRefDetails); + ->debug('AmazonPay.registerCustomer', (array)$orderRefDetails); $addressData = []; if ($billingAddress) @@ -178,7 +178,7 @@ public function setOrderReference(Basket $basket) $this->logger ->setIdentifier(__METHOD__) - ->debug('Set order reference on Amazon', [ + ->debug('AmazonPay.setOrderReference', [ "workOrderId" => $workOrderId, "amazonReferenceId" => $amazonReferenceId, "requestParams" => $requestParams, @@ -210,7 +210,7 @@ public function confirmOrderReference(Basket $basket) $this->logger ->setIdentifier(__METHOD__) - ->debug('Confirm order reference on Amazon', [ + ->debug('AmazonPay.confirmOrderReference', [ "workOrderId" => $workOrderId, "amazonReferenceId" => $amazonReferenceId, "amount" => $amount, diff --git a/src/Services/Api.php b/src/Services/Api.php index 10253169..7d4ea261 100644 --- a/src/Services/Api.php +++ b/src/Services/Api.php @@ -241,6 +241,16 @@ public function doGenericPayment(string $actionType, array $requestParams) $response = $this->doLibCall(self::REQUEST_TYPE_GENERIC_PAYMENT, $requestParams); $responseObject = GenericPaymentResponseFactory::create($actionType, $response); + $this->logger + ->setIdentifier(__METHOD__) + ->addReference('requestType', self::REQUEST_TYPE_GENERIC_PAYMENT) + ->debug('AmazonPay.apiCall', [ + 'actionType' => $actionType, + 'requestParams' => $requestParams, + 'response' => $response, + 'responseObject' => $responseObject + ]); + return $responseObject; } From 347b72dcda5334e12be7c63e1ceed4497f91dd35 Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Wed, 16 Sep 2020 14:27:47 +0200 Subject: [PATCH 161/353] added missing return type --- resources/lang/de/AmazonPay.properties | 1 + resources/lang/en/AmazonPay.properties | 1 + src/Models/PaymentMethodContent.php | 3 +++ src/Providers/PayoneServiceProvider.php | 19 ++++++++----------- 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/resources/lang/de/AmazonPay.properties b/resources/lang/de/AmazonPay.properties index 29243760..d2f7146a 100644 --- a/resources/lang/de/AmazonPay.properties +++ b/resources/lang/de/AmazonPay.properties @@ -6,3 +6,4 @@ getOrderReference=Get order reference registerCustomer=Customer addresses from Amazon setOrderReference=Set order reference confirmOrderReference=Confirm order reference on Amazon +paymentMethodContent=Within the paymentMethodContent-Event diff --git a/resources/lang/en/AmazonPay.properties b/resources/lang/en/AmazonPay.properties index 29243760..d2f7146a 100644 --- a/resources/lang/en/AmazonPay.properties +++ b/resources/lang/en/AmazonPay.properties @@ -6,3 +6,4 @@ getOrderReference=Get order reference registerCustomer=Customer addresses from Amazon setOrderReference=Set order reference confirmOrderReference=Confirm order reference on Amazon +paymentMethodContent=Within the paymentMethodContent-Event diff --git a/src/Models/PaymentMethodContent.php b/src/Models/PaymentMethodContent.php index eb9dd599..75beb108 100644 --- a/src/Models/PaymentMethodContent.php +++ b/src/Models/PaymentMethodContent.php @@ -2,6 +2,7 @@ namespace Payone\Models; +use Payone\Methods\PayoneAmazonPayPaymentMethod; use Payone\Methods\PayoneCCPaymentMethod; use Payone\Methods\PayoneDirectDebitPaymentMethod; use Payone\Methods\PayonePaydirektPaymentMethod; @@ -30,6 +31,8 @@ public function getPaymentContentType($paymentCode) case PayonePaydirektPaymentMethod::PAYMENT_CODE: case PayoneSofortPaymentMethod::PAYMENT_CODE: return GetPaymentMethodContent::RETURN_TYPE_REDIRECT_URL; + case PayoneAmazonPayPaymentMethod::PAYMENT_CODE: + return GetPaymentMethodContent::RETURN_TYPE_HTML; } return GetPaymentMethodContent::RETURN_TYPE_CONTINUE; diff --git a/src/Providers/PayoneServiceProvider.php b/src/Providers/PayoneServiceProvider.php index c415b903..f3d83b84 100755 --- a/src/Providers/PayoneServiceProvider.php +++ b/src/Providers/PayoneServiceProvider.php @@ -368,26 +368,23 @@ public function registerAmazonPayIntegration(Dispatcher $eventDispatcher, Basket $paymentHelper = pluginApp(PaymentHelper::class); if($event->getMop() == $paymentHelper->getMopId(PayoneAmazonPayPaymentMethod::PAYMENT_CODE)) { - /** @var Logger $logger */ - $logger = pluginApp(Logger::class); - $logger - ->setIdentifier(__METHOD__) - ->info('Event.checkout', ['event' => (array) $event]); - /** @var Basket $basket */ $basket = $basketRepository->load(); /** @var SetOrderReferenceDetailsResponse $setOrderRefResponse */ $setOrderRefResponse = $amazonPayService->setOrderReference($basket); - $logger - ->setIdentifier(__METHOD__) - ->info('Event.checkout', ['setOrderRefResponse' => (array) $setOrderRefResponse]); /** @var ConfirmOrderReferenceResponse $confirmOrderRefResponse */ $confirmOrderRefResponse = $amazonPayService->confirmOrderReference($basket); - $logger + + $this->logger ->setIdentifier(__METHOD__) - ->info('Event.checkout', ['confirmOrderRefResponse' => (array) $confirmOrderRefResponse]); + ->debug('AmazonPay.paymentMethodContent', [ + "event" => (array) $event, + "setOrderRefResponse" => (array) $setOrderRefResponse, + "confirmOrderRefResponse" => (array) $confirmOrderRefResponse + ]); + if($confirmOrderRefResponse->getSuccess() == true) { $content = "OffAmazonPayments.initConfirmationFlow(sellerId, id, function(confirmationFlow) {confirmationFlow.success();});"; From 0b60957e299da77e8a5808055e60fc010fee9ce9 Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Wed, 16 Sep 2020 14:57:09 +0200 Subject: [PATCH 162/353] fix --- src/Providers/PayoneServiceProvider.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Providers/PayoneServiceProvider.php b/src/Providers/PayoneServiceProvider.php index f3d83b84..8f11d856 100755 --- a/src/Providers/PayoneServiceProvider.php +++ b/src/Providers/PayoneServiceProvider.php @@ -79,6 +79,8 @@ public function boot( ) { $this->registerPaymentMethods($payContainer); + $this->registerAmazonPayIntegration($eventDispatcher, $basket); + $this->registerPaymentRendering( $eventDispatcher, $basket @@ -392,7 +394,8 @@ public function registerAmazonPayIntegration(Dispatcher $eventDispatcher, Basket $content = "OffAmazonPayments.initConfirmationFlow(sellerId, id, function(confirmationFlow) {confirmationFlow.error();});"; } - return $content; // muss in html gerendert werden + $event->setValue($content); + $event->setType(GetPaymentMethodContent::RETURN_TYPE_HTML); } }); } From bf70f804e091114cf5908f83ebbfcbc648666ffc Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Wed, 16 Sep 2020 14:59:07 +0200 Subject: [PATCH 163/353] fix --- src/Providers/PayoneServiceProvider.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Providers/PayoneServiceProvider.php b/src/Providers/PayoneServiceProvider.php index 8f11d856..238b355c 100755 --- a/src/Providers/PayoneServiceProvider.php +++ b/src/Providers/PayoneServiceProvider.php @@ -366,6 +366,8 @@ function (OrderPdfGenerationEvent $event) { public function registerAmazonPayIntegration(Dispatcher $eventDispatcher, BasketRepositoryContract $basketRepository, AmazonPayService $amazonPayService) { $eventDispatcher->listen(GetPaymentMethodContent::class, function (GetPaymentMethodContent $event) use ($basketRepository, $amazonPayService) { + /** @var Logger $logger */ + $logger = pluginApp(Logger::class); /** @var PaymentHelper $paymentHelper */ $paymentHelper = pluginApp(PaymentHelper::class); if($event->getMop() == $paymentHelper->getMopId(PayoneAmazonPayPaymentMethod::PAYMENT_CODE)) { @@ -379,7 +381,7 @@ public function registerAmazonPayIntegration(Dispatcher $eventDispatcher, Basket /** @var ConfirmOrderReferenceResponse $confirmOrderRefResponse */ $confirmOrderRefResponse = $amazonPayService->confirmOrderReference($basket); - $this->logger + $logger ->setIdentifier(__METHOD__) ->debug('AmazonPay.paymentMethodContent', [ "event" => (array) $event, From 23e6a5e6695b4a78b2587aeecebc084ee9127fbf Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Wed, 16 Sep 2020 15:23:18 +0200 Subject: [PATCH 164/353] fixed event-listener --- src/Providers/PayoneServiceProvider.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Providers/PayoneServiceProvider.php b/src/Providers/PayoneServiceProvider.php index 238b355c..9507885b 100755 --- a/src/Providers/PayoneServiceProvider.php +++ b/src/Providers/PayoneServiceProvider.php @@ -363,13 +363,18 @@ function (OrderPdfGenerationEvent $event) { ); } - public function registerAmazonPayIntegration(Dispatcher $eventDispatcher, BasketRepositoryContract $basketRepository, AmazonPayService $amazonPayService) + public function registerAmazonPayIntegration(Dispatcher $eventDispatcher, BasketRepositoryContract $basketRepository) { - $eventDispatcher->listen(GetPaymentMethodContent::class, function (GetPaymentMethodContent $event) use ($basketRepository, $amazonPayService) { + $eventDispatcher->listen(GetPaymentMethodContent::class, function (GetPaymentMethodContent $event) use ($basketRepository) { + + /** @var AmazonPayService $amazonPayService */ + $amazonPayService = pluginApp(AmazonPayService::class); /** @var Logger $logger */ $logger = pluginApp(Logger::class); /** @var PaymentHelper $paymentHelper */ $paymentHelper = pluginApp(PaymentHelper::class); + + if($event->getMop() == $paymentHelper->getMopId(PayoneAmazonPayPaymentMethod::PAYMENT_CODE)) { /** @var Basket $basket */ From 4b2262a688a4ea16f355ef392fdfdab86bd2a3df Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Wed, 16 Sep 2020 15:31:58 +0200 Subject: [PATCH 165/353] removed referenceId --- .../GenericPayment/AmazonPayConfirmOrderReferenceRequest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayConfirmOrderReferenceRequest.php b/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayConfirmOrderReferenceRequest.php index ef343913..ef68910c 100644 --- a/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayConfirmOrderReferenceRequest.php +++ b/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayConfirmOrderReferenceRequest.php @@ -29,7 +29,7 @@ class AmazonPayConfirmOrderReferenceRequest private $add_paydata = [ 'action' => 'confirmorderreference', 'reference' => '', - 'amazon_reference_id' => '', +// 'amazon_reference_id' => '', ]; /** @var Config */ @@ -64,7 +64,7 @@ public function __construct( { $this->config = $config; $this->info = $info; - $this->add_paydata['amazon_reference_id'] = $amazonReferenceId; +// $this->add_paydata['amazon_reference_id'] = $amazonReferenceId; $this->workorderid = $workOrderId; $this->amount = $amount; $this->currency = $currency; From 0835b8472017e731af3c258cfd7935fdbce40c33 Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Wed, 16 Sep 2020 15:47:39 +0200 Subject: [PATCH 166/353] removed wrong field --- .../AmazonPayConfirmOrderReferenceRequest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayConfirmOrderReferenceRequest.php b/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayConfirmOrderReferenceRequest.php index ef68910c..4ab30af7 100644 --- a/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayConfirmOrderReferenceRequest.php +++ b/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayConfirmOrderReferenceRequest.php @@ -28,8 +28,8 @@ class AmazonPayConfirmOrderReferenceRequest private $add_paydata = [ 'action' => 'confirmorderreference', - 'reference' => '', -// 'amazon_reference_id' => '', +// 'reference' => '', + 'amazon_reference_id' => '', ]; /** @var Config */ @@ -64,7 +64,7 @@ public function __construct( { $this->config = $config; $this->info = $info; -// $this->add_paydata['amazon_reference_id'] = $amazonReferenceId; + $this->add_paydata['amazon_reference_id'] = $amazonReferenceId; $this->workorderid = $workOrderId; $this->amount = $amount; $this->currency = $currency; From 9aea2b7ee7a52b87ac868da62c3ded6a3a4a601e Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Wed, 16 Sep 2020 16:05:49 +0200 Subject: [PATCH 167/353] fixed confirm call --- .../AmazonPayConfirmOrderReferenceRequest.php | 5 ++++- .../GenericPayment/GenericPaymentRequestFactory.php | 1 + src/Services/AmazonPayService.php | 10 ++++++++-- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayConfirmOrderReferenceRequest.php b/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayConfirmOrderReferenceRequest.php index 4ab30af7..b5b60e00 100644 --- a/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayConfirmOrderReferenceRequest.php +++ b/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayConfirmOrderReferenceRequest.php @@ -28,7 +28,7 @@ class AmazonPayConfirmOrderReferenceRequest private $add_paydata = [ 'action' => 'confirmorderreference', -// 'reference' => '', + 'reference' => '', 'amazon_reference_id' => '', ]; @@ -45,6 +45,7 @@ class AmazonPayConfirmOrderReferenceRequest * @param Config $config * @param SystemInfo $info * @param string $amazonReferenceId + * @param string $reference * @param string $workOrderId * @param string $amount * @param string $currency @@ -55,6 +56,7 @@ public function __construct( Config $config, SystemInfo $info, string $amazonReferenceId, + string $reference, string $workOrderId, string $amount, string $currency, @@ -65,6 +67,7 @@ public function __construct( $this->config = $config; $this->info = $info; $this->add_paydata['amazon_reference_id'] = $amazonReferenceId; + $this->add_paydata['amazon_reference'] = $reference; $this->workorderid = $workOrderId; $this->amount = $amount; $this->currency = $currency; diff --git a/resources/lib/PayoneApi/Request/GenericPayment/GenericPaymentRequestFactory.php b/resources/lib/PayoneApi/Request/GenericPayment/GenericPaymentRequestFactory.php index c68d9821..357ddad9 100644 --- a/resources/lib/PayoneApi/Request/GenericPayment/GenericPaymentRequestFactory.php +++ b/resources/lib/PayoneApi/Request/GenericPayment/GenericPaymentRequestFactory.php @@ -65,6 +65,7 @@ public static function create($paymentMethod, $data, $referenceId = null) $config, $systemInfo, $data['add_paydata']['amazon_reference_id'], + $data['add_paydata']['amazon_reference'], $data['workorderid'], $data['amount'], $data['currency'], diff --git a/src/Services/AmazonPayService.php b/src/Services/AmazonPayService.php index e6596936..1e4b94bc 100644 --- a/src/Services/AmazonPayService.php +++ b/src/Services/AmazonPayService.php @@ -201,9 +201,15 @@ public function confirmOrderReference(Basket $basket) $amazonReferenceId = $sessionStorage->getSessionValue('amazonReferenceId'); $amount = $basket->basketAmount; - $reference = ""; + $reference = $basket->orderId; - $requestParams = $this->dataProvider->getConfirmOrderReferenceRequestData("Amazon Pay", $workOrderId, $reference, $amazonReferenceId, $amount); + $requestParams = $this->dataProvider->getConfirmOrderReferenceRequestData( + PayoneAmazonPayPaymentMethod::PAYMENT_CODE, + $workOrderId, + $reference, + $amazonReferenceId, + $amount + ); /** @var ConfirmOrderReferenceResponse $confirmOrderReferenceResponse */ $confirmOrderReferenceResponse = $this->api->doGenericPayment(GenericPayment::ACTIONTYPE_CONFIRMORDERREFERENCE, $requestParams); From bc36a347628d0b02210d93c53062fdaaa8ef00fc Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Wed, 16 Sep 2020 16:16:12 +0200 Subject: [PATCH 168/353] added logging for confirm call --- src/Services/AmazonPayService.php | 61 ++++++++++++++++++------------- 1 file changed, 36 insertions(+), 25 deletions(-) diff --git a/src/Services/AmazonPayService.php b/src/Services/AmazonPayService.php index 1e4b94bc..c969151a 100644 --- a/src/Services/AmazonPayService.php +++ b/src/Services/AmazonPayService.php @@ -194,37 +194,48 @@ public function setOrderReference(Basket $basket) */ public function confirmOrderReference(Basket $basket) { - /** @var SessionStorage $sessionStorage */ - $sessionStorage = pluginApp(SessionStorage::class); + try { - $workOrderId = $sessionStorage->getSessionValue('workOrderId'); - $amazonReferenceId = $sessionStorage->getSessionValue('amazonReferenceId'); - $amount = $basket->basketAmount; - $reference = $basket->orderId; + /** @var SessionStorage $sessionStorage */ + $sessionStorage = pluginApp(SessionStorage::class); - $requestParams = $this->dataProvider->getConfirmOrderReferenceRequestData( - PayoneAmazonPayPaymentMethod::PAYMENT_CODE, - $workOrderId, - $reference, - $amazonReferenceId, - $amount - ); + $workOrderId = $sessionStorage->getSessionValue('workOrderId'); + $amazonReferenceId = $sessionStorage->getSessionValue('amazonReferenceId'); + $amount = $basket->basketAmount; - /** @var ConfirmOrderReferenceResponse $confirmOrderReferenceResponse */ - $confirmOrderReferenceResponse = $this->api->doGenericPayment(GenericPayment::ACTIONTYPE_CONFIRMORDERREFERENCE, $requestParams); + $reference = $basket->orderId; - $this->logger - ->setIdentifier(__METHOD__) - ->debug('AmazonPay.confirmOrderReference', [ - "workOrderId" => $workOrderId, - "amazonReferenceId" => $amazonReferenceId, - "amount" => $amount, - "requestParams" => $requestParams, - "confirmOrderReferenceResponse" => (array)$confirmOrderReferenceResponse - ]); + $requestParams = $this->dataProvider->getConfirmOrderReferenceRequestData( + PayoneAmazonPayPaymentMethod::PAYMENT_CODE, + $workOrderId, + $reference, + $amazonReferenceId, + $amount + ); - return $confirmOrderReferenceResponse; + /** @var ConfirmOrderReferenceResponse $confirmOrderReferenceResponse */ + $confirmOrderReferenceResponse = $this->api->doGenericPayment(GenericPayment::ACTIONTYPE_CONFIRMORDERREFERENCE, $requestParams); + + $this->logger + ->setIdentifier(__METHOD__) + ->debug('AmazonPay.confirmOrderReference', [ + "workOrderId" => $workOrderId, + "amazonReferenceId" => $amazonReferenceId, + "amount" => $amount, + "requestParams" => $requestParams, + "confirmOrderReferenceResponse" => (array)$confirmOrderReferenceResponse + ]); + + return $confirmOrderReferenceResponse; + } catch (\Exception $exception) + { + $this->logger + ->setIdentifier(__METHOD__) + ->error('AmazonPay.confirmOrderReference', $exception); + + return $exception; + } } From fbf212e69605aa7315c0ddc9c826baff536841bc Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Wed, 16 Sep 2020 16:34:14 +0200 Subject: [PATCH 169/353] added more logging --- src/Providers/PayoneServiceProvider.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Providers/PayoneServiceProvider.php b/src/Providers/PayoneServiceProvider.php index 9507885b..b3c18b38 100755 --- a/src/Providers/PayoneServiceProvider.php +++ b/src/Providers/PayoneServiceProvider.php @@ -374,6 +374,8 @@ public function registerAmazonPayIntegration(Dispatcher $eventDispatcher, Basket /** @var PaymentHelper $paymentHelper */ $paymentHelper = pluginApp(PaymentHelper::class); + try { + if($event->getMop() == $paymentHelper->getMopId(PayoneAmazonPayPaymentMethod::PAYMENT_CODE)) { @@ -404,6 +406,11 @@ public function registerAmazonPayIntegration(Dispatcher $eventDispatcher, Basket $event->setValue($content); $event->setType(GetPaymentMethodContent::RETURN_TYPE_HTML); } + } catch (\Exception $exception) { + $logger + ->setIdentifier(__METHOD__) + ->error('AmazonPay.paymentMethodContent', $exception); + } }); } } From 89359a484eddc28f8daacf9ea14c3ba9d5524e28 Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Wed, 16 Sep 2020 16:58:57 +0200 Subject: [PATCH 170/353] fixed params --- src/Providers/Api/Request/GenericPaymentDataProvider.php | 2 +- src/Services/AmazonPayService.php | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Providers/Api/Request/GenericPaymentDataProvider.php b/src/Providers/Api/Request/GenericPaymentDataProvider.php index 9f1b5cfa..ff30a34b 100644 --- a/src/Providers/Api/Request/GenericPaymentDataProvider.php +++ b/src/Providers/Api/Request/GenericPaymentDataProvider.php @@ -87,7 +87,7 @@ public function getSetOrderReferenceDetailsRequestData(string $paymentCode, /** * {@inheritdoc} */ - public function getConfirmOrderReferenceRequestData(string $paymentCode, string $workOrderId, string $reference, string $amazonReferenceId, string $amount) + public function getConfirmOrderReferenceRequestData(string $paymentCode, string $workOrderId, $reference, string $amazonReferenceId, string $amount) { $requestParams = $this->getDefaultRequestData($paymentCode); $requestParams['request'] = GenericPayment::REQUEST_TYPE; diff --git a/src/Services/AmazonPayService.php b/src/Services/AmazonPayService.php index c969151a..ace3319a 100644 --- a/src/Services/AmazonPayService.php +++ b/src/Services/AmazonPayService.php @@ -195,8 +195,6 @@ public function setOrderReference(Basket $basket) public function confirmOrderReference(Basket $basket) { try { - - /** @var SessionStorage $sessionStorage */ $sessionStorage = pluginApp(SessionStorage::class); @@ -204,7 +202,7 @@ public function confirmOrderReference(Basket $basket) $amazonReferenceId = $sessionStorage->getSessionValue('amazonReferenceId'); $amount = $basket->basketAmount; - $reference = $basket->orderId; + $reference = null; $requestParams = $this->dataProvider->getConfirmOrderReferenceRequestData( PayoneAmazonPayPaymentMethod::PAYMENT_CODE, From 7e99f65f635cc5836f3568d1762998b88f280e27 Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Thu, 17 Sep 2020 09:15:58 +0200 Subject: [PATCH 171/353] fixed js --- .../views/Checkout/AmazonPayCheckout.twig | 95 ++++++++++--------- resources/views/Checkout/AmazonPayLogin.twig | 29 +++--- 2 files changed, 63 insertions(+), 61 deletions(-) diff --git a/resources/views/Checkout/AmazonPayCheckout.twig b/resources/views/Checkout/AmazonPayCheckout.twig index d586b514..655c5deb 100644 --- a/resources/views/Checkout/AmazonPayCheckout.twig +++ b/resources/views/Checkout/AmazonPayCheckout.twig @@ -2,55 +2,58 @@ {% endif %} diff --git a/resources/views/Checkout/AmazonPayLogin.twig b/resources/views/Checkout/AmazonPayLogin.twig index 7db0b687..ec462d72 100644 --- a/resources/views/Checkout/AmazonPayLogin.twig +++ b/resources/views/Checkout/AmazonPayLogin.twig @@ -19,30 +19,29 @@ authorization: function () { loginOptions = {scope: '{{ content.scopes }}', popup: {{ content.popup }}}; - authRequest = amazon.Login.authorize(loginOptions, function(t) { - var $logoutButton = $(''); - - $("body").append($logoutButton); + authRequest = amazon.Login.authorize(loginOptions, function (t) { console.log(t.access_token); console.log(t.expires_in); console.log(t.token_type); - // console.log(t.amazonAddressToken); + + userLoggedIn = true; $.post("/payment/payone/checkout/amazonPay/renderWidgets", { - "accessToken" : t.access_token, - "workOrderId" : "{{ content.workOrderId }}" + "accessToken": t.access_token, + "workOrderId": "{{ content.workOrderId }}" }, function (data) { - //$('#LoginWithAmazon').append(data); - console.log(data); - $("body").append(data); - }); + //$('#LoginWithAmazon').append(data); + console.log(data); + $("body").append(data); + }); + + showWidgets(true); + + document.getElementById("LoginWithAmazon").style.display = "none"; + document.getElementById("LogoutWithAmazon").style.display = "block"; }); - document.getElementById("LoginWithAmazon").style.display = "none"; - document.getElementById("walletWidgetDiv").style.display = "block"; - document.getElementById("addressBookWidgetDiv").style.display = "block"; - document.getElementById("LogoutWithAmazon").style.display = "block"; }, onError: function (error) { // your error handling code. From 6fdaaeee0b394c477319d4fbc58608ed7b2aa0e3 Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Thu, 17 Sep 2020 10:00:44 +0200 Subject: [PATCH 172/353] fixed js --- resources/views/Checkout/AmazonPayLogin.twig | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/resources/views/Checkout/AmazonPayLogin.twig b/resources/views/Checkout/AmazonPayLogin.twig index ec462d72..78dbd5ed 100644 --- a/resources/views/Checkout/AmazonPayLogin.twig +++ b/resources/views/Checkout/AmazonPayLogin.twig @@ -24,8 +24,6 @@ console.log(t.expires_in); console.log(t.token_type); - userLoggedIn = true; - $.post("/payment/payone/checkout/amazonPay/renderWidgets", { "accessToken": t.access_token, @@ -37,7 +35,12 @@ $("body").append(data); }); - showWidgets(true); + + if (document.getElementById("walletWidgetDiv") !== undefined && + document.getElementById("addressBookWidgetDiv") !== undefined) { + document.getElementById("walletWidgetDiv").style.display = "block"; + document.getElementById("addressBookWidgetDiv").style.display = "block"; + } document.getElementById("LoginWithAmazon").style.display = "none"; document.getElementById("LogoutWithAmazon").style.display = "block"; From ec1b1c6dbd9a88ca40ecbd78dc4bd14896472a3f Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Fri, 18 Sep 2020 09:53:14 +0200 Subject: [PATCH 173/353] added fix for event --- resources/lang/de/AmazonPay.properties | 1 + resources/lang/en/AmazonPay.properties | 1 + src/Providers/PayoneServiceProvider.php | 26 ++++++++++++++++++++++--- 3 files changed, 25 insertions(+), 3 deletions(-) diff --git a/resources/lang/de/AmazonPay.properties b/resources/lang/de/AmazonPay.properties index d2f7146a..69933c78 100644 --- a/resources/lang/de/AmazonPay.properties +++ b/resources/lang/de/AmazonPay.properties @@ -7,3 +7,4 @@ registerCustomer=Customer addresses from Amazon setOrderReference=Set order reference confirmOrderReference=Confirm order reference on Amazon paymentMethodContent=Within the paymentMethodContent-Event +paymentExecute=Within the paymentExecute-Event diff --git a/resources/lang/en/AmazonPay.properties b/resources/lang/en/AmazonPay.properties index d2f7146a..69933c78 100644 --- a/resources/lang/en/AmazonPay.properties +++ b/resources/lang/en/AmazonPay.properties @@ -7,3 +7,4 @@ registerCustomer=Customer addresses from Amazon setOrderReference=Set order reference confirmOrderReference=Confirm order reference on Amazon paymentMethodContent=Within the paymentMethodContent-Event +paymentExecute=Within the paymentExecute-Event diff --git a/src/Providers/PayoneServiceProvider.php b/src/Providers/PayoneServiceProvider.php index b3c18b38..5b4fd467 100755 --- a/src/Providers/PayoneServiceProvider.php +++ b/src/Providers/PayoneServiceProvider.php @@ -86,7 +86,7 @@ public function boot( $basket ); - $this->registerPaymentExecute($eventDispatcher); + $this->registerPaymentExecute($eventDispatcher, $basket); $captureProcedureTitle = [ 'de' => 'Versandbestätigung an ' . PluginConstants::NAME, @@ -210,6 +210,9 @@ function (GetPaymentMethodContent $event) use ($basketRepository) { $selectedPaymentMopId = $event->getMop(); if (!$selectedPaymentMopId || !$paymentHelper->isPayonePayment($selectedPaymentMopId)) { return; + } elseif ($event->getMop() == $paymentHelper->getMopId(PayoneAmazonPayPaymentMethod::PAYMENT_CODE)){ + // Because AmazonPay has its own event-handler + return; } $paymentCode = $paymentHelper->getPaymentCodeByMop($selectedPaymentMopId); /** @var PaymentAbstract $payment */ @@ -269,12 +272,28 @@ function (GetPaymentMethodContent $event) use ($basketRepository) { ); } - protected function registerPaymentExecute(Dispatcher $dispatcher) + protected function registerPaymentExecute(Dispatcher $dispatcher, Basket $basket) { - $dispatcher->listen(ExecutePayment::class, function (ExecutePayment $event) { + $dispatcher->listen(ExecutePayment::class, function (ExecutePayment $event) use ($basket){ /** @var PaymentHelper $paymentHelper */ $paymentHelper = pluginApp(PaymentHelper::class); + /** @var Logger $logger */ + $logger = pluginApp(Logger::class); + if($paymentHelper->isPayonePayment($event->getMop())) { + if($event->getMop() == $paymentHelper->getMopId(PayoneAmazonPayPaymentMethod::PAYMENT_CODE)) { + /** @var PaymentService $paymentService */ + $paymentService = pluginApp(PaymentService::class); + + $auth = $paymentService->openTransaction($basket); + $logger + ->setIdentifier(__METHOD__) + ->debug('AmazonPay.paymentExecute', [ + "auth" => (array) $auth + ]); + } + + /** @var OrderRepositoryContract $orderRepository */ $orderRepository = pluginApp(OrderRepositoryContract::class); /** @var PaymentCache $paymentCache */ @@ -382,6 +401,7 @@ public function registerAmazonPayIntegration(Dispatcher $eventDispatcher, Basket /** @var Basket $basket */ $basket = $basketRepository->load(); + // send orderID as reference if order exists? /** @var SetOrderReferenceDetailsResponse $setOrderRefResponse */ $setOrderRefResponse = $amazonPayService->setOrderReference($basket); From b9416bc2ade0b3d508d087e0b0125c28cf5f69a4 Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Fri, 18 Sep 2020 09:56:59 +0200 Subject: [PATCH 174/353] fix wrong param type --- src/Providers/PayoneServiceProvider.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Providers/PayoneServiceProvider.php b/src/Providers/PayoneServiceProvider.php index 5b4fd467..49a299d5 100755 --- a/src/Providers/PayoneServiceProvider.php +++ b/src/Providers/PayoneServiceProvider.php @@ -272,9 +272,9 @@ function (GetPaymentMethodContent $event) use ($basketRepository) { ); } - protected function registerPaymentExecute(Dispatcher $dispatcher, Basket $basket) + protected function registerPaymentExecute(Dispatcher $dispatcher, BasketRepositoryContract $basketRepository) { - $dispatcher->listen(ExecutePayment::class, function (ExecutePayment $event) use ($basket){ + $dispatcher->listen(ExecutePayment::class, function (ExecutePayment $event) use ($basketRepository){ /** @var PaymentHelper $paymentHelper */ $paymentHelper = pluginApp(PaymentHelper::class); /** @var Logger $logger */ @@ -284,6 +284,7 @@ protected function registerPaymentExecute(Dispatcher $dispatcher, Basket $basket if($event->getMop() == $paymentHelper->getMopId(PayoneAmazonPayPaymentMethod::PAYMENT_CODE)) { /** @var PaymentService $paymentService */ $paymentService = pluginApp(PaymentService::class); + $basket = $basketRepository->load(); $auth = $paymentService->openTransaction($basket); $logger From 66300f916abd697102c18ad13f11772c1c919cd6 Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Fri, 18 Sep 2020 11:16:32 +0200 Subject: [PATCH 175/353] added frontend-fix for addresses --- src/Controllers/AmazonPayController.php | 29 ++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/src/Controllers/AmazonPayController.php b/src/Controllers/AmazonPayController.php index 65bc2de5..ab3135ea 100644 --- a/src/Controllers/AmazonPayController.php +++ b/src/Controllers/AmazonPayController.php @@ -2,6 +2,8 @@ namespace Payone\Controllers; +use IO\Services\BasketService; +use IO\Services\CheckoutService; use Payone\Adapter\Logger; use Payone\Adapter\SessionStorage; use Payone\Helpers\PaymentHelper; @@ -17,9 +19,11 @@ use Plenty\Modules\Basket\Contracts\BasketRepositoryContract; use Plenty\Modules\Basket\Models\Basket; use Plenty\Modules\Frontend\Contracts\Checkout; +use Plenty\Modules\Webshop\Contracts\ContactRepositoryContract; use Plenty\Modules\Webshop\Contracts\LocalizationRepositoryContract; use Plenty\Plugin\Controller; use Plenty\Plugin\Http\Request; +use Plenty\Plugin\Http\Response; use Plenty\Plugin\Log\Loggable; use Plenty\Plugin\Templates\Twig; @@ -116,7 +120,7 @@ public function renderWidgets(Twig $twig, PaymentHelper $paymentHelper, Request ]); } - public function getOrderReference(Request $request, Checkout $checkout) + public function getOrderReference(Request $request, Response $response, Checkout $checkout) { try{ $workOrderId = $request->get('workOrderId'); @@ -160,6 +164,29 @@ public function getOrderReference(Request $request, Checkout $checkout) $checkout->setCustomerInvoiceAddressId($shippingAddress->id); $checkout->setCustomerShippingAddressId($shippingAddress->id); + + /** @var BasketService $basketService */ + $basketService = pluginApp(BasketService::class); + + /** @var ContactRepositoryContract $contactRepository */ + $contactRepository = pluginApp(ContactRepositoryContract::class); + + /** @var CheckoutService $checkoutService */ + $checkoutService = pluginApp(CheckoutService::class); + + $responseData['events']['AfterBasketChanged']['basket'] = $basketService->getBasketForTemplate(); + $responseData['events']['AfterBasketChanged']['showNetPrices'] = $contactRepository->showNetPrices(); + $responseData['events']['AfterBasketChanged']['basketItems'] = $basketService->getBasketItemsForTemplate( + '', + false + ); + $responseData['events']['CheckoutChanged']['checkout'] = $checkoutService->getCheckout(); + + + + return $response->json(['success' => true, 'message' => null, 'data' => $responseData]); + + //$checkout->setCustomerShippingAddressId($billingAddress->id); } catch (\Exception $exception) { $this->logger From 8e003d6c30c12591dfc6ea5d170c9ccc4cbccf1b Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Fri, 18 Sep 2020 11:32:19 +0200 Subject: [PATCH 176/353] fixed null --- src/Controllers/AmazonPayController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Controllers/AmazonPayController.php b/src/Controllers/AmazonPayController.php index ab3135ea..92ae4d53 100644 --- a/src/Controllers/AmazonPayController.php +++ b/src/Controllers/AmazonPayController.php @@ -184,7 +184,7 @@ public function getOrderReference(Request $request, Response $response, Checkout - return $response->json(['success' => true, 'message' => null, 'data' => $responseData]); + return $response->json(['success' => true, 'data' => $responseData]); //$checkout->setCustomerShippingAddressId($billingAddress->id); From 88e720b4b30eaf59813f445f3dda85e89f1d5640 Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Fri, 18 Sep 2020 12:05:37 +0200 Subject: [PATCH 177/353] fixed return value --- src/Controllers/AmazonPayController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Controllers/AmazonPayController.php b/src/Controllers/AmazonPayController.php index 92ae4d53..4fea06d7 100644 --- a/src/Controllers/AmazonPayController.php +++ b/src/Controllers/AmazonPayController.php @@ -184,7 +184,7 @@ public function getOrderReference(Request $request, Response $response, Checkout - return $response->json(['success' => true, 'data' => $responseData]); + return $response->json(['success' => true, 'message' => "Address changed", 'data' => $responseData]); //$checkout->setCustomerShippingAddressId($billingAddress->id); From 7ec72c1c6f555406bda6b65691bc2e73151c25df Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Fri, 18 Sep 2020 12:12:42 +0200 Subject: [PATCH 178/353] changed response --- src/Controllers/AmazonPayController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Controllers/AmazonPayController.php b/src/Controllers/AmazonPayController.php index 4fea06d7..463be8d9 100644 --- a/src/Controllers/AmazonPayController.php +++ b/src/Controllers/AmazonPayController.php @@ -182,9 +182,9 @@ public function getOrderReference(Request $request, Response $response, Checkout ); $responseData['events']['CheckoutChanged']['checkout'] = $checkoutService->getCheckout(); + return $response->make(json_encode($responseData), 200); - - return $response->json(['success' => true, 'message' => "Address changed", 'data' => $responseData]); + //return $response->json(['success' => true, 'message' => "Address changed", 'data' => $responseData]); //$checkout->setCustomerShippingAddressId($billingAddress->id); From 5104a9c39a3060b6ad1198f481c61b224624b10b Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Fri, 18 Sep 2020 14:52:31 +0200 Subject: [PATCH 179/353] removed debug --- resources/views/Checkout/AmazonPayCheckout.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/Checkout/AmazonPayCheckout.twig b/resources/views/Checkout/AmazonPayCheckout.twig index 655c5deb..6f2d7d66 100644 --- a/resources/views/Checkout/AmazonPayCheckout.twig +++ b/resources/views/Checkout/AmazonPayCheckout.twig @@ -15,7 +15,7 @@ $.get("/payment/payone/checkout/amazonPay/loginButton", function (data) { //$('#LoginWithAmazon').append(data); - $("body").append(data); + // $("body").append(data); }); document.getElementById('LogoutWithAmazon').onclick = function () { From 2e0fabfc0113feb7a53666ace9f648545db89717 Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Fri, 18 Sep 2020 14:56:37 +0200 Subject: [PATCH 180/353] fixed js --- resources/views/Checkout/AmazonPayCheckout.twig | 2 +- resources/views/Checkout/AmazonPayWidgets.twig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/views/Checkout/AmazonPayCheckout.twig b/resources/views/Checkout/AmazonPayCheckout.twig index 6f2d7d66..655c5deb 100644 --- a/resources/views/Checkout/AmazonPayCheckout.twig +++ b/resources/views/Checkout/AmazonPayCheckout.twig @@ -15,7 +15,7 @@ $.get("/payment/payone/checkout/amazonPay/loginButton", function (data) { //$('#LoginWithAmazon').append(data); - // $("body").append(data); + $("body").append(data); }); document.getElementById('LogoutWithAmazon').onclick = function () { diff --git a/resources/views/Checkout/AmazonPayWidgets.twig b/resources/views/Checkout/AmazonPayWidgets.twig index 51db668a..b9921968 100644 --- a/resources/views/Checkout/AmazonPayWidgets.twig +++ b/resources/views/Checkout/AmazonPayWidgets.twig @@ -40,7 +40,7 @@ function (data) { //$('#LoginWithAmazon').append(data); console.log(data); - $("body").append(data); + //$("body").append(data); }); // If rendering the AddressBook and Wallet widgets From f12d02850b8ee731133c97c594807059cc4d9ee3 Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Fri, 18 Sep 2020 15:02:26 +0200 Subject: [PATCH 181/353] fix checkout data not up to date --- src/Controllers/AmazonPayController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Controllers/AmazonPayController.php b/src/Controllers/AmazonPayController.php index 463be8d9..89ced55d 100644 --- a/src/Controllers/AmazonPayController.php +++ b/src/Controllers/AmazonPayController.php @@ -180,7 +180,7 @@ public function getOrderReference(Request $request, Response $response, Checkout '', false ); - $responseData['events']['CheckoutChanged']['checkout'] = $checkoutService->getCheckout(); + $responseData['events']['CheckoutChanged']['checkout'] = (array) $checkout; return $response->make(json_encode($responseData), 200); From 97f153e5dd0f365d0cff7439a08e797027e12083 Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Fri, 18 Sep 2020 15:32:51 +0200 Subject: [PATCH 182/353] added workaround for bug --- src/Controllers/AmazonPayController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Controllers/AmazonPayController.php b/src/Controllers/AmazonPayController.php index 89ced55d..1f485354 100644 --- a/src/Controllers/AmazonPayController.php +++ b/src/Controllers/AmazonPayController.php @@ -173,6 +173,8 @@ public function getOrderReference(Request $request, Response $response, Checkout /** @var CheckoutService $checkoutService */ $checkoutService = pluginApp(CheckoutService::class); + $checkoutService->setBillingAddressId($shippingAddress->id); + $checkoutService->setDeliveryAddressId($shippingAddress->id); $responseData['events']['AfterBasketChanged']['basket'] = $basketService->getBasketForTemplate(); $responseData['events']['AfterBasketChanged']['showNetPrices'] = $contactRepository->showNetPrices(); @@ -180,7 +182,7 @@ public function getOrderReference(Request $request, Response $response, Checkout '', false ); - $responseData['events']['CheckoutChanged']['checkout'] = (array) $checkout; + $responseData['events']['CheckoutChanged']['checkout'] = $checkoutService->getCheckout(); return $response->make(json_encode($responseData), 200); From 1b3130f5c45e97daa072897d87c5be104e4fd3bb Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Fri, 18 Sep 2020 15:53:12 +0200 Subject: [PATCH 183/353] added debugging --- .../GenericPayment/AmazonPayConfirmOrderReferenceRequest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayConfirmOrderReferenceRequest.php b/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayConfirmOrderReferenceRequest.php index b5b60e00..a7d0f551 100644 --- a/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayConfirmOrderReferenceRequest.php +++ b/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayConfirmOrderReferenceRequest.php @@ -45,7 +45,7 @@ class AmazonPayConfirmOrderReferenceRequest * @param Config $config * @param SystemInfo $info * @param string $amazonReferenceId - * @param string $reference + * @param $reference * @param string $workOrderId * @param string $amount * @param string $currency @@ -56,7 +56,7 @@ public function __construct( Config $config, SystemInfo $info, string $amazonReferenceId, - string $reference, + $reference, string $workOrderId, string $amount, string $currency, From fec3805638a43ceb5b8aa3c2e1ca73e52a410ad8 Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Fri, 18 Sep 2020 15:53:24 +0200 Subject: [PATCH 184/353] added debugging case --- src/Services/AmazonPayService.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Services/AmazonPayService.php b/src/Services/AmazonPayService.php index ace3319a..cbab58c3 100644 --- a/src/Services/AmazonPayService.php +++ b/src/Services/AmazonPayService.php @@ -202,7 +202,8 @@ public function confirmOrderReference(Basket $basket) $amazonReferenceId = $sessionStorage->getSessionValue('amazonReferenceId'); $amount = $basket->basketAmount; - $reference = null; + // Added for debugging + $reference = $basket->basketAmount == 80 ? "DebugTest" : null; $requestParams = $this->dataProvider->getConfirmOrderReferenceRequestData( PayoneAmazonPayPaymentMethod::PAYMENT_CODE, From d246c2ac76b2c62c20d3d3ecf5a5fb6cc39f089c Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Fri, 18 Sep 2020 16:01:28 +0200 Subject: [PATCH 185/353] fixed wrong param --- .../GenericPayment/AmazonPayConfirmOrderReferenceRequest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayConfirmOrderReferenceRequest.php b/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayConfirmOrderReferenceRequest.php index a7d0f551..4c6dd8e1 100644 --- a/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayConfirmOrderReferenceRequest.php +++ b/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayConfirmOrderReferenceRequest.php @@ -66,8 +66,8 @@ public function __construct( { $this->config = $config; $this->info = $info; + $this->add_paydata['reference'] = $reference; $this->add_paydata['amazon_reference_id'] = $amazonReferenceId; - $this->add_paydata['amazon_reference'] = $reference; $this->workorderid = $workOrderId; $this->amount = $amount; $this->currency = $currency; From 564ed3b23d469498381dc3e49260d77742d24d08 Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Fri, 18 Sep 2020 18:42:07 +0200 Subject: [PATCH 186/353] fix for return js --- src/Providers/PayoneServiceProvider.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Providers/PayoneServiceProvider.php b/src/Providers/PayoneServiceProvider.php index 49a299d5..ce102766 100755 --- a/src/Providers/PayoneServiceProvider.php +++ b/src/Providers/PayoneServiceProvider.php @@ -419,11 +419,10 @@ public function registerAmazonPayIntegration(Dispatcher $eventDispatcher, Basket if($confirmOrderRefResponse->getSuccess() == true) { - $content = "OffAmazonPayments.initConfirmationFlow(sellerId, id, function(confirmationFlow) {confirmationFlow.success();});"; + $content = "{{ OffAmazonPayments.initConfirmationFlow(sellerId, id, function(confirmationFlow) {confirmationFlow.success();}); }}"; } else { - $content = "OffAmazonPayments.initConfirmationFlow(sellerId, id, function(confirmationFlow) {confirmationFlow.error();});"; + $content = "{{ OffAmazonPayments.initConfirmationFlow(sellerId, id, function(confirmationFlow) {confirmationFlow.error();}); }}"; } - $event->setValue($content); $event->setType(GetPaymentMethodContent::RETURN_TYPE_HTML); } From 886334436adafe74073f2d4a9f060163103a88d9 Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Fri, 18 Sep 2020 19:49:21 +0200 Subject: [PATCH 187/353] fixed param --- .../GenericPaymentRequestFactory.php | 2 +- resources/views/Checkout/Confirmation.twig | 18 ++++++++++++ src/Controllers/AmazonPayController.php | 28 ++++++++----------- src/Providers/PayoneServiceProvider.php | 15 ++++++++-- src/Services/AmazonPayService.php | 6 ++++ 5 files changed, 49 insertions(+), 20 deletions(-) create mode 100644 resources/views/Checkout/Confirmation.twig diff --git a/resources/lib/PayoneApi/Request/GenericPayment/GenericPaymentRequestFactory.php b/resources/lib/PayoneApi/Request/GenericPayment/GenericPaymentRequestFactory.php index 357ddad9..6fbcab46 100644 --- a/resources/lib/PayoneApi/Request/GenericPayment/GenericPaymentRequestFactory.php +++ b/resources/lib/PayoneApi/Request/GenericPayment/GenericPaymentRequestFactory.php @@ -65,7 +65,7 @@ public static function create($paymentMethod, $data, $referenceId = null) $config, $systemInfo, $data['add_paydata']['amazon_reference_id'], - $data['add_paydata']['amazon_reference'], + $data['add_paydata']['reference'], $data['workorderid'], $data['amount'], $data['currency'], diff --git a/resources/views/Checkout/Confirmation.twig b/resources/views/Checkout/Confirmation.twig new file mode 100644 index 00000000..5c158972 --- /dev/null +++ b/resources/views/Checkout/Confirmation.twig @@ -0,0 +1,18 @@ + +{% if config('Payone.PAYONE_PAYONE_AMAZON_PAY.sandbox') == "true" %} + +{% else %} + +{% endif %} + diff --git a/src/Controllers/AmazonPayController.php b/src/Controllers/AmazonPayController.php index 1f485354..8f862f27 100644 --- a/src/Controllers/AmazonPayController.php +++ b/src/Controllers/AmazonPayController.php @@ -184,6 +184,14 @@ public function getOrderReference(Request $request, Response $response, Checkout ); $responseData['events']['CheckoutChanged']['checkout'] = $checkoutService->getCheckout(); + $this->logger + ->setIdentifier(__METHOD__) + ->debug('AmazonPay.getOrderReference', [ + "shippingAddress" => (array) $shippingAddress, + "checkout" => (array) $checkout, + "checkoutViaService" => (array)$checkoutService->getCheckout() + ]); + return $response->make(json_encode($responseData), 200); //return $response->json(['success' => true, 'message' => "Address changed", 'data' => $responseData]); @@ -199,33 +207,21 @@ public function getOrderReference(Request $request, Response $response, Checkout } - public function debugTest() + public function debugTest(BasketRepositoryContract $basketRepo) { - /** @var GetOrderReferenceDetailsResponse $orderRefDetails */ - $orderRefDetails = pluginApp(GetOrderReferenceDetailsResponse::class); -// $orderRefDetails->shippingCompany = "TestCompany"; -// $orderRefDetails->shippingFirstname = "FirstName"; -// $orderRefDetails->shippingLastname = "LastName"; -// $orderRefDetails->shippingStreet = "Street 123"; -// $orderRefDetails->shippingZip = "12345"; -// $orderRefDetails->shippingCity = "Kassel"; -// $orderRefDetails->shippingCountry = "DE"; -// $orderRefDetails->shippingState = "Hessen"; -// $orderRefDetails->shippingTelephonenumber = "01726265233"; - /** @var AmazonPayService $apiDebug */ $apiDebug = pluginApp(AmazonPayService::class); - //$address = $apiDebug->registerCustomerFromAmazonPay($orderRefDetails); + $basket = $basketRepo->load(); - $address = $apiDebug->registerCustomerFromAmazonPay($orderRefDetails, true); + $confirmOrderResponse = $apiDebug->confirmOrderReference($basket); // basket setShipping/setBilling... Methode zum Setzen der Addresse //$createdAddress = $contactAddress->createAddress($address->toArray(), // AddressRelationType::DELIVERY_ADDRESS); - return $address; + return (array)$confirmOrderResponse; } private function getLanguageCode(string $lang): string diff --git a/src/Providers/PayoneServiceProvider.php b/src/Providers/PayoneServiceProvider.php index ce102766..bcc16919 100755 --- a/src/Providers/PayoneServiceProvider.php +++ b/src/Providers/PayoneServiceProvider.php @@ -54,6 +54,7 @@ use Plenty\Plugin\Events\Dispatcher; use Plenty\Plugin\ServiceProvider; use Plenty\Modules\Order\Pdf\Events\OrderPdfGenerationEvent; +use Plenty\Plugin\Templates\Twig; class PayoneServiceProvider extends ServiceProvider { @@ -393,6 +394,8 @@ public function registerAmazonPayIntegration(Dispatcher $eventDispatcher, Basket $logger = pluginApp(Logger::class); /** @var PaymentHelper $paymentHelper */ $paymentHelper = pluginApp(PaymentHelper::class); + /** @var Twig $twig */ + $twig = pluginApp(Twig::class); try { @@ -418,12 +421,18 @@ public function registerAmazonPayIntegration(Dispatcher $eventDispatcher, Basket ]); - if($confirmOrderRefResponse->getSuccess() == true) { + /*if($confirmOrderRefResponse->getSuccess() == true) { $content = "{{ OffAmazonPayments.initConfirmationFlow(sellerId, id, function(confirmationFlow) {confirmationFlow.success();}); }}"; } else { $content = "{{ OffAmazonPayments.initConfirmationFlow(sellerId, id, function(confirmationFlow) {confirmationFlow.error();}); }}"; - } - $event->setValue($content); + }*/ + + $event->setValue($twig->render( + PluginConstants::NAME . '::Checkout.Confirmation', + [ + 'success' => $confirmOrderRefResponse->getSuccess() + ] + )); $event->setType(GetPaymentMethodContent::RETURN_TYPE_HTML); } } catch (\Exception $exception) { diff --git a/src/Services/AmazonPayService.php b/src/Services/AmazonPayService.php index cbab58c3..ea51066f 100644 --- a/src/Services/AmazonPayService.php +++ b/src/Services/AmazonPayService.php @@ -205,6 +205,12 @@ public function confirmOrderReference(Basket $basket) // Added for debugging $reference = $basket->basketAmount == 80 ? "DebugTest" : null; + $workOrderId = "WX1A2TQ0H7BD69KQ"; + $amazonReferenceId = "S02-8373658-0172780"; + $reference = "Debug"; + $amount = 2323; + + $requestParams = $this->dataProvider->getConfirmOrderReferenceRequestData( PayoneAmazonPayPaymentMethod::PAYMENT_CODE, $workOrderId, From a62b17792c93b34195f85abe926e546282acc556 Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Fri, 18 Sep 2020 20:11:31 +0200 Subject: [PATCH 188/353] changed to session handling --- resources/views/Checkout/Confirmation.twig | 4 ++-- src/Controllers/AmazonPayController.php | 24 +++++++++++++--------- src/Providers/PayoneServiceProvider.php | 7 ++++++- src/Services/AmazonPayService.php | 8 +------- 4 files changed, 23 insertions(+), 20 deletions(-) diff --git a/resources/views/Checkout/Confirmation.twig b/resources/views/Checkout/Confirmation.twig index 5c158972..2a0d61e8 100644 --- a/resources/views/Checkout/Confirmation.twig +++ b/resources/views/Checkout/Confirmation.twig @@ -1,10 +1,10 @@ {% if config('Payone.PAYONE_PAYONE_AMAZON_PAY.sandbox') == "true" %} diff --git a/src/Providers/Api/Request/AuthDataProvider.php b/src/Providers/Api/Request/AuthDataProvider.php index 2f65eb30..08b92283 100644 --- a/src/Providers/Api/Request/AuthDataProvider.php +++ b/src/Providers/Api/Request/AuthDataProvider.php @@ -2,6 +2,7 @@ namespace Payone\Providers\Api\Request; +use Payone\Methods\PayoneAmazonPayPaymentMethod; use Payone\Methods\PayoneCCPaymentMethod; use Payone\Methods\PayoneDirectDebitPaymentMethod; use Payone\Methods\PayoneSofortPaymentMethod; @@ -51,6 +52,10 @@ public function getDataFromBasket(string $paymentCode, Basket $basket, string $r if ($paymentCode == PayoneDirectDebitPaymentMethod::PAYMENT_CODE) { $requestParams['sepaMandate'] = $this->getSepaMandateData(); } + if ($paymentCode == PayoneAmazonPayPaymentMethod::PAYMENT_CODE) { + $requestParams['amazonPayAuth'] = $this->getAmazonPayData($basket->basketAmount, $basket->currency); + } + $requestParams['referenceId'] = $requestReference; $requestParams['shippingProvider'] = $this->getShippingProvider($basket->shippingProfileId); $this->validator->validate($requestParams); diff --git a/src/Providers/Api/Request/DataProviderAbstract.php b/src/Providers/Api/Request/DataProviderAbstract.php index abe3f5eb..ef9f7af0 100644 --- a/src/Providers/Api/Request/DataProviderAbstract.php +++ b/src/Providers/Api/Request/DataProviderAbstract.php @@ -2,8 +2,10 @@ namespace Payone\Providers\Api\Request; +use Payone\Adapter\SessionStorage; use Payone\Helpers\AddressHelper; use Payone\Helpers\ShopHelper; +use Payone\Methods\PayoneAmazonPayPaymentMethod; use Payone\Methods\PayoneCCPaymentMethod; use Payone\Methods\PayonePaydirektPaymentMethod; use Payone\Methods\PayonePayPalPaymentMethod; @@ -523,6 +525,26 @@ protected function getBankAccount() return $account->jsonSerialize(); } + /** + * @param $basketAmount + * @param $currency + * @return array + */ + protected function getAmazonPayData($basketAmount, $currency) + { + /** @var SessionStorage $sessionStorage */ + $sessionStorage = pluginApp(SessionStorage::class); + $amazonAuthConfig = []; + $amazonAuthConfig['workOrderId'] = $sessionStorage->getSessionValue('workOrderId'); + $amazonAuthConfig['amazonReferenceId'] = $sessionStorage->getSessionValue('amazonReferenceId'); + $amazonAuthConfig['reference'] = "DebugReference"; + + $amazonAuthConfig['currency'] = $currency; + $amazonAuthConfig['amount'] = $basketAmount; + + return $amazonAuthConfig; + } + /** * @param Order $order * @return float From 46f9d4767f864dbbbd4f6ae75ce6ea150bf8f0c6 Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Mon, 21 Sep 2020 15:44:24 +0200 Subject: [PATCH 196/353] added urls for auth --- src/Providers/Api/Request/DataProviderAbstract.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Providers/Api/Request/DataProviderAbstract.php b/src/Providers/Api/Request/DataProviderAbstract.php index ef9f7af0..37d4a440 100644 --- a/src/Providers/Api/Request/DataProviderAbstract.php +++ b/src/Providers/Api/Request/DataProviderAbstract.php @@ -469,6 +469,7 @@ protected function paymentHasRedirect($paymentCode) PayonePayPalPaymentMethod::PAYMENT_CODE, PayonePaydirektPaymentMethod::PAYMENT_CODE, PayoneSofortPaymentMethod::PAYMENT_CODE, + PayoneAmazonPayPaymentMethod::PAYMENT_CODE, ] ) ) { From 4e7be6dad3631cf95852bc0738a1200a29c96ddd Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Mon, 21 Sep 2020 16:15:15 +0200 Subject: [PATCH 197/353] test debug --- resources/lib/PayoneApi/Request/Authorization/RequestFactory.php | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/lib/PayoneApi/Request/Authorization/RequestFactory.php b/resources/lib/PayoneApi/Request/Authorization/RequestFactory.php index 30350850..0ce98751 100644 --- a/resources/lib/PayoneApi/Request/Authorization/RequestFactory.php +++ b/resources/lib/PayoneApi/Request/Authorization/RequestFactory.php @@ -117,6 +117,7 @@ public static function create($paymentMethod, $data, $referenceId = null) ); case PaymentTypes::PAYONE_AMAZON_PAY: $amazonPayAuth = $data['amazonPayAuth']; + return $amazonPayAuth; return new AmazonPay( $genericAuthRequest, self::createUrls($data['redirect']), From bf2fd83f331c3400b9f46b00847f6dede4fbb3f2 Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Mon, 21 Sep 2020 16:29:59 +0200 Subject: [PATCH 198/353] undo debug --- resources/lib/PayoneApi/Request/Authorization/RequestFactory.php | 1 - 1 file changed, 1 deletion(-) diff --git a/resources/lib/PayoneApi/Request/Authorization/RequestFactory.php b/resources/lib/PayoneApi/Request/Authorization/RequestFactory.php index 0ce98751..30350850 100644 --- a/resources/lib/PayoneApi/Request/Authorization/RequestFactory.php +++ b/resources/lib/PayoneApi/Request/Authorization/RequestFactory.php @@ -117,7 +117,6 @@ public static function create($paymentMethod, $data, $referenceId = null) ); case PaymentTypes::PAYONE_AMAZON_PAY: $amazonPayAuth = $data['amazonPayAuth']; - return $amazonPayAuth; return new AmazonPay( $genericAuthRequest, self::createUrls($data['redirect']), From 45dfe603e06f0c708d914297dd3bf797a22da8dd Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Mon, 21 Sep 2020 16:35:42 +0200 Subject: [PATCH 199/353] addded getter --- .../Request/Authorization/AmazonPay.php | 62 ++++++++++++++++--- 1 file changed, 54 insertions(+), 8 deletions(-) diff --git a/resources/lib/PayoneApi/Request/Authorization/AmazonPay.php b/resources/lib/PayoneApi/Request/Authorization/AmazonPay.php index ee3c20e9..73c55d7c 100644 --- a/resources/lib/PayoneApi/Request/Authorization/AmazonPay.php +++ b/resources/lib/PayoneApi/Request/Authorization/AmazonPay.php @@ -68,22 +68,68 @@ public function __construct( } /** - * Getter for Urls - * - * @return RedirectUrls + * @return string */ - public function getUrls() + public function getClearingtype(): string { - return $this->urls; + return $this->clearingtype; } /** - * Getter for Wallettype - * * @return string */ - public function getWallettype() + public function getWallettype(): string { return $this->wallettype; } + + /** + * @return mixed + */ + public function getAmount() + { + return $this->amount; + } + + /** + * @return mixed + */ + public function getWorkorderid() + { + return $this->workorderid; + } + + /** + * @return mixed + */ + public function getReference() + { + return $this->reference; + } + + /** + * @return mixed + */ + public function getCurrency() + { + return $this->currency; + } + + /** + * @return array + */ + public function getAddPaydata(): array + { + return $this->add_paydata; + } + + /** + * @return RedirectUrls + */ + public function getUrls(): RedirectUrls + { + return $this->urls; + } + + } From 48d6b34449e8a8fd60bf6741217d61d0fe9a338d Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Mon, 21 Sep 2020 17:16:47 +0200 Subject: [PATCH 200/353] added some refactoring --- .../Request/Authorization/AmazonPay.php | 58 ++++++++++--------- src/Methods/PayoneAmazonPayPaymentMethod.php | 3 + .../Api/Request/DataProviderAbstract.php | 2 +- .../Request/GenericPaymentDataProvider.php | 56 +++++++++--------- src/Services/AmazonPayService.php | 8 +-- 5 files changed, 68 insertions(+), 59 deletions(-) diff --git a/resources/lib/PayoneApi/Request/Authorization/AmazonPay.php b/resources/lib/PayoneApi/Request/Authorization/AmazonPay.php index 73c55d7c..d76440ce 100644 --- a/resources/lib/PayoneApi/Request/Authorization/AmazonPay.php +++ b/resources/lib/PayoneApi/Request/Authorization/AmazonPay.php @@ -8,26 +8,30 @@ use PayoneApi\Request\Parts\RedirectUrls; /** - * Class PayPal + * Class AmazonPay */ class AmazonPay extends AuthorizationRequestAbstract { + /** @var string */ const WALLET_TYPE = 'AMZ'; + /** @var string */ protected $clearingtype = ClearingTypes::WALLET; - /** - * @var string - */ - private $wallettype = self::WALLET_TYPE; - private $amount; + /** @var string */ + private $wallettype = self::WALLET_TYPE; + /** @var string */ private $workorderid; + /** @var string */ private $reference; + /** @var string */ private $currency; + private $amount; + private $add_paydata = [ 'amazon_reference_id' => '', ]; @@ -43,20 +47,21 @@ class AmazonPay extends AuthorizationRequestAbstract * @param GenericAuthorizationRequest $authorizationRequest * @param RedirectUrls $urls * @param $amount - * @param $workOrderId - * @param $reference - * @param $currency - * @param $amazonReferenceId + * @param string $workOrderId + * @param string $reference + * @param string $currency + * @param string $amazonReferenceId */ public function __construct( GenericAuthorizationRequest $authorizationRequest, RedirectUrls $urls, $amount, - $workOrderId, - $reference, - $currency, - $amazonReferenceId - ) { + string $workOrderId, + string $reference, + string $currency, + string $amazonReferenceId + ) + { $this->authorizationRequest = $authorizationRequest; $this->urls = $urls; @@ -84,35 +89,35 @@ public function getWallettype(): string } /** - * @return mixed + * @return string */ - public function getAmount() + public function getWorkorderid(): string { - return $this->amount; + return $this->workorderid; } /** - * @return mixed + * @return string */ - public function getWorkorderid() + public function getReference(): string { - return $this->workorderid; + return $this->reference; } /** - * @return mixed + * @return string */ - public function getReference() + public function getCurrency(): string { - return $this->reference; + return $this->currency; } /** * @return mixed */ - public function getCurrency() + public function getAmount() { - return $this->currency; + return $this->amount; } /** @@ -131,5 +136,4 @@ public function getUrls(): RedirectUrls return $this->urls; } - } diff --git a/src/Methods/PayoneAmazonPayPaymentMethod.php b/src/Methods/PayoneAmazonPayPaymentMethod.php index 5979e569..89e29eb6 100644 --- a/src/Methods/PayoneAmazonPayPaymentMethod.php +++ b/src/Methods/PayoneAmazonPayPaymentMethod.php @@ -5,4 +5,7 @@ class PayoneAmazonPayPaymentMethod extends PaymentAbstract { const PAYMENT_CODE = 'PAYONE_PAYONE_AMAZON_PAY'; + + const CLEARING_TYPE = "wlt"; + const WALLET_TYPE = "AMZ"; } diff --git a/src/Providers/Api/Request/DataProviderAbstract.php b/src/Providers/Api/Request/DataProviderAbstract.php index 37d4a440..6289e8a4 100644 --- a/src/Providers/Api/Request/DataProviderAbstract.php +++ b/src/Providers/Api/Request/DataProviderAbstract.php @@ -541,7 +541,7 @@ protected function getAmazonPayData($basketAmount, $currency) $amazonAuthConfig['reference'] = "DebugReference"; $amazonAuthConfig['currency'] = $currency; - $amazonAuthConfig['amount'] = $basketAmount; + $amazonAuthConfig['amount'] = $basketAmount*100; return $amazonAuthConfig; } diff --git a/src/Providers/Api/Request/GenericPaymentDataProvider.php b/src/Providers/Api/Request/GenericPaymentDataProvider.php index 714e3ff7..57dbf5a2 100644 --- a/src/Providers/Api/Request/GenericPaymentDataProvider.php +++ b/src/Providers/Api/Request/GenericPaymentDataProvider.php @@ -3,19 +3,31 @@ namespace Payone\Providers\Api\Request; use Payone\Helpers\ShopHelper; +use Payone\Methods\PayoneAmazonPayPaymentMethod; use Payone\Providers\Api\Request\Models\GenericPayment; class GenericPaymentDataProvider extends DataProviderAbstract { + + private function getDefaultPaymentRequestData(string $paymentCode) + { + $requestParams = $this->getDefaultRequestData($paymentCode); + $requestParams['request'] = GenericPayment::REQUEST_TYPE; + + if ($paymentCode == PayoneAmazonPayPaymentMethod::PAYMENT_CODE) { + $requestParams['clearingtype'] = PayoneAmazonPayPaymentMethod::CLEARING_TYPE; + $requestParams['wallettype'] = PayoneAmazonPayPaymentMethod::CLEARING_TYPE; + } + + return $requestParams; + } /** * {@inheritdoc} */ public function getGetConfigRequestData(string $paymentCode): array { - $requestParams = $this->getDefaultRequestData($paymentCode); - $requestParams['request'] = GenericPayment::REQUEST_TYPE; - $requestParams['clearingtype'] = "wlt"; - $requestParams['wallettype'] = "AMZ"; + $requestParams = $this->getDefaultPaymentRequestData($paymentCode); + // Currency not mentioned in API-Doc of Payone $requestParams['currency'] = "EUR"; @@ -33,12 +45,8 @@ public function getGetOrderReferenceDetailsRequestData(string $paymentCode, string $amazonAddressToken, string $amazonReferenceId): array { - // TODO: Maybe load creds from cache/session ? + $requestParams = $this->getDefaultPaymentRequestData($paymentCode); - $requestParams = $this->getDefaultRequestData($paymentCode); - $requestParams['request'] = GenericPayment::REQUEST_TYPE; - $requestParams['clearingtype'] = "wlt"; - $requestParams['wallettype'] = "AMZ"; // Currency not mentioned in API-Doc of Payone $requestParams['currency'] = "EUR"; @@ -58,26 +66,19 @@ public function getGetOrderReferenceDetailsRequestData(string $paymentCode, public function getSetOrderReferenceDetailsRequestData(string $paymentCode, string $workOrderId, string $amazonReferenceId, - //string $amazonAddressToken, - // string $storename, + string $currency, string $amount): array { - // TODO: Maybe load creds from cache/session ? + $requestParams = $this->getDefaultPaymentRequestData($paymentCode); - $requestParams = $this->getDefaultRequestData($paymentCode); - $requestParams['request'] = GenericPayment::REQUEST_TYPE; - $requestParams['clearingtype'] = "wlt"; - $requestParams['wallettype'] = "AMZ"; // Currency not mentioned in API-Doc of Payone - $requestParams['currency'] = "EUR"; + $requestParams['currency'] = $currency; // amount in smallest unit - $requestParams['amount'] = $amount; + $requestParams['amount'] = $amount * 100; $requestParams['add_paydata']['action'] = GenericPayment::ACTIONTYPE_SETORDERREFERENCEDETAILS; $requestParams['add_paydata']['amazon_reference_id'] = $amazonReferenceId; - //$requestParams['add_paydata']['amazon_address_token'] = $amazonAddressToken; - //$requestParams['add_paydata']['storename'] = $storename; $requestParams['workorderid'] = $workOrderId; $this->validator->validate($requestParams); @@ -87,13 +88,15 @@ public function getSetOrderReferenceDetailsRequestData(string $paymentCode, /** * {@inheritdoc} */ - public function getConfirmOrderReferenceRequestData(string $paymentCode, string $workOrderId, $reference, - string $amazonReferenceId, string $amount, string $basketId = "") + public function getConfirmOrderReferenceRequestData(string $paymentCode, + string $workOrderId, + string $reference, + string $amazonReferenceId, + string $amount, + string $basketId) { - $requestParams = $this->getDefaultRequestData($paymentCode); - $requestParams['request'] = GenericPayment::REQUEST_TYPE; - $requestParams['clearingtype'] = "wlt"; - $requestParams['wallettype'] = "AMZ"; + $requestParams = $this->getDefaultPaymentRequestData($paymentCode); + // Currency not mentioned in API-Doc of Payone $requestParams['currency'] = "EUR"; // amount in smallest unit @@ -115,6 +118,7 @@ public function getConfirmOrderReferenceRequestData(string $paymentCode, string $requestParams['successurl'] = $shopHelper->getPlentyDomain() . '/payment/payone/checkoutSuccess' . $successParam; $requestParams['errorurl'] = $shopHelper->getPlentyDomain() . '/payment/payone/error'; + $this->validator->validate($requestParams); return $requestParams; } } diff --git a/src/Services/AmazonPayService.php b/src/Services/AmazonPayService.php index 16f9f660..c0e5ad5b 100644 --- a/src/Services/AmazonPayService.php +++ b/src/Services/AmazonPayService.php @@ -160,7 +160,6 @@ public function setOrderReference(Basket $basket) { /** @var SessionStorage $sessionStorage */ $sessionStorage = pluginApp(SessionStorage::class); - $amount = $basket->basketAmount; $workOrderId = $sessionStorage->getSessionValue('workOrderId'); $amazonReferenceId = $sessionStorage->getSessionValue('amazonReferenceId'); @@ -168,9 +167,8 @@ public function setOrderReference(Basket $basket) PayoneAmazonPayPaymentMethod::PAYMENT_CODE, $workOrderId, $amazonReferenceId, - // $amazonAddressToken, - // $storename, - $amount + $basket->currency, + $basket->basketAmount ); /** @var SetOrderReferenceDetailsResponse $orderReferenceResponse */ @@ -200,7 +198,7 @@ public function confirmOrderReference(Basket $basket) $workOrderId = $sessionStorage->getSessionValue('workOrderId'); $amazonReferenceId = $sessionStorage->getSessionValue('amazonReferenceId'); - $amount = $basket->basketAmount; + $amount = $basket->basketAmount*100; // Added for debugging $reference = "DebugReference"; From f7cc89b389ea5c14c4e1d20b3c15896e3b11395c Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Mon, 21 Sep 2020 17:31:07 +0200 Subject: [PATCH 201/353] changed reference to null --- src/Providers/Api/Request/DataProviderAbstract.php | 4 ++-- src/Providers/Api/Request/GenericPaymentDataProvider.php | 2 +- src/Services/AmazonPayService.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Providers/Api/Request/DataProviderAbstract.php b/src/Providers/Api/Request/DataProviderAbstract.php index 6289e8a4..08d4263f 100644 --- a/src/Providers/Api/Request/DataProviderAbstract.php +++ b/src/Providers/Api/Request/DataProviderAbstract.php @@ -538,10 +538,10 @@ protected function getAmazonPayData($basketAmount, $currency) $amazonAuthConfig = []; $amazonAuthConfig['workOrderId'] = $sessionStorage->getSessionValue('workOrderId'); $amazonAuthConfig['amazonReferenceId'] = $sessionStorage->getSessionValue('amazonReferenceId'); - $amazonAuthConfig['reference'] = "DebugReference"; + $amazonAuthConfig['reference'] = null; $amazonAuthConfig['currency'] = $currency; - $amazonAuthConfig['amount'] = $basketAmount*100; + $amazonAuthConfig['amount'] = $basketAmount * 100; return $amazonAuthConfig; } diff --git a/src/Providers/Api/Request/GenericPaymentDataProvider.php b/src/Providers/Api/Request/GenericPaymentDataProvider.php index 57dbf5a2..1a105c74 100644 --- a/src/Providers/Api/Request/GenericPaymentDataProvider.php +++ b/src/Providers/Api/Request/GenericPaymentDataProvider.php @@ -90,7 +90,7 @@ public function getSetOrderReferenceDetailsRequestData(string $paymentCode, */ public function getConfirmOrderReferenceRequestData(string $paymentCode, string $workOrderId, - string $reference, + $reference, string $amazonReferenceId, string $amount, string $basketId) diff --git a/src/Services/AmazonPayService.php b/src/Services/AmazonPayService.php index c0e5ad5b..85f09ba6 100644 --- a/src/Services/AmazonPayService.php +++ b/src/Services/AmazonPayService.php @@ -201,7 +201,7 @@ public function confirmOrderReference(Basket $basket) $amount = $basket->basketAmount*100; // Added for debugging - $reference = "DebugReference"; + $reference = null; $requestParams = $this->dataProvider->getConfirmOrderReferenceRequestData( PayoneAmazonPayPaymentMethod::PAYMENT_CODE, From 4e004b2944f7797ffec2e1c05fa1c8623a893b9e Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Mon, 21 Sep 2020 17:50:17 +0200 Subject: [PATCH 202/353] changed reference --- .../AmazonPayConfirmOrderReferenceRequest.php | 4 ++-- src/Providers/Api/Request/AuthDataProvider.php | 2 +- src/Providers/Api/Request/DataProviderAbstract.php | 7 ++++--- src/Providers/Api/Request/GenericPaymentDataProvider.php | 4 ++-- src/Services/AmazonPayService.php | 9 ++------- 5 files changed, 11 insertions(+), 15 deletions(-) diff --git a/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayConfirmOrderReferenceRequest.php b/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayConfirmOrderReferenceRequest.php index 4c6dd8e1..1f09f349 100644 --- a/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayConfirmOrderReferenceRequest.php +++ b/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayConfirmOrderReferenceRequest.php @@ -45,7 +45,7 @@ class AmazonPayConfirmOrderReferenceRequest * @param Config $config * @param SystemInfo $info * @param string $amazonReferenceId - * @param $reference + * @param string $reference * @param string $workOrderId * @param string $amount * @param string $currency @@ -56,7 +56,7 @@ public function __construct( Config $config, SystemInfo $info, string $amazonReferenceId, - $reference, + string $reference, string $workOrderId, string $amount, string $currency, diff --git a/src/Providers/Api/Request/AuthDataProvider.php b/src/Providers/Api/Request/AuthDataProvider.php index 08b92283..f652e220 100644 --- a/src/Providers/Api/Request/AuthDataProvider.php +++ b/src/Providers/Api/Request/AuthDataProvider.php @@ -53,7 +53,7 @@ public function getDataFromBasket(string $paymentCode, Basket $basket, string $r $requestParams['sepaMandate'] = $this->getSepaMandateData(); } if ($paymentCode == PayoneAmazonPayPaymentMethod::PAYMENT_CODE) { - $requestParams['amazonPayAuth'] = $this->getAmazonPayData($basket->basketAmount, $basket->currency); + $requestParams['amazonPayAuth'] = $this->getAmazonPayData($basket->id, $basket->basketAmount, $basket->currency); } $requestParams['referenceId'] = $requestReference; diff --git a/src/Providers/Api/Request/DataProviderAbstract.php b/src/Providers/Api/Request/DataProviderAbstract.php index 08d4263f..dda37a88 100644 --- a/src/Providers/Api/Request/DataProviderAbstract.php +++ b/src/Providers/Api/Request/DataProviderAbstract.php @@ -527,18 +527,19 @@ protected function getBankAccount() } /** + * @param string $basketId * @param $basketAmount - * @param $currency + * @param string $currency * @return array */ - protected function getAmazonPayData($basketAmount, $currency) + protected function getAmazonPayData(string $basketId, $basketAmount, string $currency) { /** @var SessionStorage $sessionStorage */ $sessionStorage = pluginApp(SessionStorage::class); $amazonAuthConfig = []; $amazonAuthConfig['workOrderId'] = $sessionStorage->getSessionValue('workOrderId'); $amazonAuthConfig['amazonReferenceId'] = $sessionStorage->getSessionValue('amazonReferenceId'); - $amazonAuthConfig['reference'] = null; + $amazonAuthConfig['reference'] = $basketId; $amazonAuthConfig['currency'] = $currency; $amazonAuthConfig['amount'] = $basketAmount * 100; diff --git a/src/Providers/Api/Request/GenericPaymentDataProvider.php b/src/Providers/Api/Request/GenericPaymentDataProvider.php index 1a105c74..02a9e056 100644 --- a/src/Providers/Api/Request/GenericPaymentDataProvider.php +++ b/src/Providers/Api/Request/GenericPaymentDataProvider.php @@ -90,7 +90,7 @@ public function getSetOrderReferenceDetailsRequestData(string $paymentCode, */ public function getConfirmOrderReferenceRequestData(string $paymentCode, string $workOrderId, - $reference, + string $reference, string $amazonReferenceId, string $amount, string $basketId) @@ -100,7 +100,7 @@ public function getConfirmOrderReferenceRequestData(string $paymentCode, // Currency not mentioned in API-Doc of Payone $requestParams['currency'] = "EUR"; // amount in smallest unit - $requestParams['amount'] = $amount; + $requestParams['amount'] = $amount * 100; $requestParams['add_paydata']['action'] = GenericPayment::ACTIONTYPE_CONFIRMORDERREFERENCE; $requestParams['add_paydata']['reference'] = $reference; diff --git a/src/Services/AmazonPayService.php b/src/Services/AmazonPayService.php index 85f09ba6..781ab884 100644 --- a/src/Services/AmazonPayService.php +++ b/src/Services/AmazonPayService.php @@ -198,17 +198,13 @@ public function confirmOrderReference(Basket $basket) $workOrderId = $sessionStorage->getSessionValue('workOrderId'); $amazonReferenceId = $sessionStorage->getSessionValue('amazonReferenceId'); - $amount = $basket->basketAmount*100; - - // Added for debugging - $reference = null; $requestParams = $this->dataProvider->getConfirmOrderReferenceRequestData( PayoneAmazonPayPaymentMethod::PAYMENT_CODE, $workOrderId, - $reference, + $basket->id, $amazonReferenceId, - $amount, + $basket->basketAmount, $basket->id ); @@ -220,7 +216,6 @@ public function confirmOrderReference(Basket $basket) ->debug('AmazonPay.confirmOrderReference', [ "workOrderId" => $workOrderId, "amazonReferenceId" => $amazonReferenceId, - "amount" => $amount, "requestParams" => $requestParams, "confirmOrderReferenceResponse" => (array)$confirmOrderReferenceResponse ]); From 14671488c57342d938cf9ce6efbc1d3a79fbe025 Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Tue, 22 Sep 2020 09:57:38 +0200 Subject: [PATCH 203/353] changed js logic --- .../views/Checkout/AmazonPayCheckout.twig | 29 +++++++------------ resources/views/Checkout/AmazonPayLogin.twig | 20 ++++++++++++- src/Controllers/AmazonPayController.php | 15 ++++++++-- 3 files changed, 43 insertions(+), 21 deletions(-) diff --git a/resources/views/Checkout/AmazonPayCheckout.twig b/resources/views/Checkout/AmazonPayCheckout.twig index 655c5deb..0cb1a9a1 100644 --- a/resources/views/Checkout/AmazonPayCheckout.twig +++ b/resources/views/Checkout/AmazonPayCheckout.twig @@ -6,7 +6,7 @@ console.log("{{ amazonPayMopId }}"); - $("li.method-list-item[data-id={{ amazonPayMopId }}]").append(""); + $("li.method-list-item[data-id={{ amazonPayMopId }}]").append(""); $("li.method-list-item[data-id={{ amazonPayMopId }}]").append(""); // $("li.method-list-item[data-id={{ amazonPayMopId }}]").after(""); @@ -25,26 +25,14 @@ document.getElementById("addressBookWidgetDiv").style.display = "none"; document.getElementById("walletWidgetDiv").style.display = "none"; - /* if (document.getElementById("invoice-addresses-select") !== undefined && document.getElementById("shipping-addresses-select") !== undefined) - { - document.getElementById("invoice-addresses-select").style.display = "block"; - document.getElementById("shipping-addresses-select").style.display = "block"; - }*/ - }; + if (document.getElementsByClassName("invoice-addresses-select")[0] !== undefined && document.getElementsByClassName("shipping-addresses-select")[0] !== undefined) { + document.getElementsByClassName("invoice-addresses-select")[0].style.display = 'block'; + document.getElementsByClassName("shipping-addresses-select")[0].style.display = 'block'; + } - var userLoggedIn = false; + }; - if ({{ currentPaymentId }} == {{ amazonPayMopId }}) { - // Do nothing, because user isnt logged in - } - document.addEventListener("afterPaymentMethodChanged", function (e) { - if (e.detail == {{ amazonPayMopId }}) { - userLoggedIn ? showWidgets(true) : showWidgets(false); - } else { - showWidgets(false); - } - }); function showWidgets(show) { if (document.getElementById("walletWidgetDiv") !== undefined && @@ -52,6 +40,11 @@ document.getElementById("walletWidgetDiv").style.display = (show ? "block" : "none"); document.getElementById("addressBookWidgetDiv").style.display = (show ? "block" : "none"); } + if (document.getElementsByClassName("invoice-addresses-select")[0] !== undefined && document.getElementsByClassName("shipping-addresses-select")[0] !== undefined) { + document.getElementsByClassName("invoice-addresses-select")[0].style.display = (show ? "none" : "block"); + document.getElementsByClassName("shipping-addresses-select")[0].style.display = (show ? "none" : "block"); + } + } }); diff --git a/resources/views/Checkout/AmazonPayLogin.twig b/resources/views/Checkout/AmazonPayLogin.twig index 78dbd5ed..b153be9c 100644 --- a/resources/views/Checkout/AmazonPayLogin.twig +++ b/resources/views/Checkout/AmazonPayLogin.twig @@ -1,4 +1,18 @@ - {% endif %} From 55a8dcc7530d0f68f8cce349364a9d88794dc253 Mon Sep 17 00:00:00 2001 From: jawendel Date: Tue, 22 Sep 2020 10:59:34 +0200 Subject: [PATCH 205/353] Update: info about Amazon Pay in user guide - added information about Amazon Pay to the user guides (English and German) --- meta/documents/user_guide_de.md | 5 ++++- meta/documents/user_guide_en.md | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/meta/documents/user_guide_de.md b/meta/documents/user_guide_de.md index 747d8989..833db24a 100644 --- a/meta/documents/user_guide_de.md +++ b/meta/documents/user_guide_de.md @@ -17,7 +17,7 @@ Aktuell beinhaltet das Plugin die folgenden Zahlungsarten: * Sofortüberweisung - Online-Überweisung international * Überweisung - Vorkasse & Rechnung & Nachnahme * PayPal - Anbindung Ihres PayPal-Accounts -* Amazon Pay - Anbindung Ihres Amazon Pay-Accounts (In Kürze verfügbar!) +* Amazon Pay - Anbindung Ihres Amazon Pay-Accounts ## Erste Schritte @@ -257,6 +257,9 @@ Im Folgenden legst du fest, welche PAYONE-Zahlungsarten deinen Kunden im Webshop **Hinweis**: Für die Zahlungsart **Gesicherter Rechnungskauf** sind eine eigene **Portal-ID** sowie ein eigener **Schlüssel** notwendig. Diese Portal-ID und dieser Schlüssel müssen im Plugin unter **Gesicherte Rechnung** bei der Konfiguration separat hinterlegt werden. Die Portal-ID und den Schlüssel erhältst du über das PAYONE Merchant Interface über das Menü **Konfiguration » Zahlungsportale**. +**Hinweis**: Um die Zahlungsart **Amazon Pay** nutzen zu können, musst du dein Amazon-Konto mit Payone verknüpfen. Wende dich dafür an den Payone Support. +Bei der Einrichtung der Zahlungsart **Amazon Pay** kannst du zusätzlich zu den in Tabelle 2 beschriebenen Einstellungen noch die Einstellung **Testumgebung** aktivieren. Diese ermöglicht es dir die Zahlungsart zunächst auszutesten und Testkäufe zu tätigen. Mit diesen lassen sich keine Aufträge und kein Umsatz generieren. Deaktiviere die Einstellung **Testumgebung**, um Amazon Pay aktiv zu schalten. + ## Ceres-Checkout anpassen Als Nächstes ist eine Anpassung im Ceres Checkout notwendig, damit deine Kunden bei Bezahlvorgängen mit PAYONE ihr Geburtsdatum (nur für den gesicherten Rechnungskauf) korrekt eingeben können. diff --git a/meta/documents/user_guide_en.md b/meta/documents/user_guide_en.md index 4deb08f8..4655a980 100644 --- a/meta/documents/user_guide_en.md +++ b/meta/documents/user_guide_en.md @@ -17,7 +17,7 @@ The plugin currently offers the following payment methods: * Sofortüberweisung - Online bank transfer international * Transfer - Cash in advance & Invoice & Cash on Delivery * PayPal - Integration of your PayPal account -* Amazon Pay - Integration of your Amazon Pay accounts (Available soon!) +* Amazon Pay - Integration of your Amazon Pay account ## First steps @@ -256,6 +256,9 @@ In the following, you select the PAYONE payment methods that should be available **Note**: You need a separate **Portal ID** and **Key** for the payment method **Secure Invoice**. This Portal-ID and this key have to be deposited in the plugin while configuring it. You get the Portal ID and the Key via the PAYONE Merchant Interface in the **Configuration » Payment portals** menu. +**Note**: In order to use the payment method **Amazon Pay** you have to link your Amazon account with Payone. To do so, contact the Payone support. +When setting up the payment method **Amazon Pay**, you can activate the setting **Test-Environment** additionally to the settings described in table 2. This setting enables you to test the payment method first with test purchases. You cannot generate orders or turnover with these, they are solely for testing the payment method. Deactivate the setting **Test-Environment** to activate Amazon Pay. + ## Adjusting the Ceres checkout In the next step, an adjustment to your Ceres checkout settings is necessary. These adjustments need to be made so that customers using PAYONE for payment processes can enter their date of birth (for secure invoice only) correctly. From 4caa0b1c48382873181848ba3510b35808dd96f2 Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Tue, 22 Sep 2020 11:17:00 +0200 Subject: [PATCH 206/353] added currency fix --- resources/views/Checkout/AmazonPayCheckout.twig | 3 --- resources/views/Checkout/AmazonPayWidgets.twig | 2 +- src/Controllers/AmazonPayController.php | 9 ++++++++- src/Providers/DataProviders/AmazonPayIntegration.php | 5 ----- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/resources/views/Checkout/AmazonPayCheckout.twig b/resources/views/Checkout/AmazonPayCheckout.twig index 61c3e52d..7f07a31c 100644 --- a/resources/views/Checkout/AmazonPayCheckout.twig +++ b/resources/views/Checkout/AmazonPayCheckout.twig @@ -4,8 +4,6 @@ diff --git a/resources/views/Checkout/AmazonPayWidgets.twig b/resources/views/Checkout/AmazonPayWidgets.twig index b9921968..01e29f97 100644 --- a/resources/views/Checkout/AmazonPayWidgets.twig +++ b/resources/views/Checkout/AmazonPayWidgets.twig @@ -86,7 +86,7 @@ // See "Handling Errors" for more information. } }); - walletWidget.setPresentmentCurrency("EUR"); // ISO-4217 currency code, merchant is expected to enter a valid currency supported by Amazon Pay. + walletWidget.setPresentmentCurrency('{{ content.currency }}'); // ISO-4217 currency code, merchant is expected to enter a valid currency supported by Amazon Pay. walletWidget.bind("walletWidgetDiv"); /*if (document.getElementById("invoice-addresses-select") !== undefined && document.getElementById("shipping-addresses-select") !== undefined) diff --git a/src/Controllers/AmazonPayController.php b/src/Controllers/AmazonPayController.php index e0b733f4..3d334e3c 100644 --- a/src/Controllers/AmazonPayController.php +++ b/src/Controllers/AmazonPayController.php @@ -107,8 +107,14 @@ public function getAmazonPayLoginWidget(Twig $twig, } - public function renderWidgets(Twig $twig, PaymentHelper $paymentHelper, Request $request, SessionStorage $sessionStorage) + public function renderWidgets(Twig $twig, + PaymentHelper $paymentHelper, + BasketRepositoryContract $basketRepository, + Request $request, + SessionStorage $sessionStorage) { + $basket = $basketRepository->load(); + // AccessToken in Request $accessToken = $request->get('accessToken'); $workdOrderId = $request->get('workOrderId'); @@ -122,6 +128,7 @@ public function renderWidgets(Twig $twig, PaymentHelper $paymentHelper, Request 'sellerId' => "A13SNST9X74Q8L", 'addressBookScope' => "profile payments:widget payments:shipping_address payments:billing_address", 'walletScope' => "profile payments:widget payments:shipping_address payments:billing_address", + 'currency' => $basket->currency ]; $amazonPayMopId = $paymentHelper->getMopId(PayoneAmazonPayPaymentMethod::PAYMENT_CODE); diff --git a/src/Providers/DataProviders/AmazonPayIntegration.php b/src/Providers/DataProviders/AmazonPayIntegration.php index 5d39858b..13664bdc 100644 --- a/src/Providers/DataProviders/AmazonPayIntegration.php +++ b/src/Providers/DataProviders/AmazonPayIntegration.php @@ -14,7 +14,6 @@ class AmazonPayIntegration { /** * @param Twig $twig - * @param BasketRepositoryContract $basketRepository * @param PaymentHelper $paymentHelper * @return string * @throws \Twig_Error_Loader @@ -23,17 +22,13 @@ class AmazonPayIntegration */ public function call( Twig $twig, - BasketRepositoryContract $basketRepository, PaymentHelper $paymentHelper) { - $basket = $basketRepository->load(); - $selectedPaymentId = $basket->methodOfPaymentId; $amazonPayMopId = $paymentHelper->getMopId(PayoneAmazonPayPaymentMethod::PAYMENT_CODE); return $twig->render( PluginConstants::NAME . '::Checkout.AmazonPayCheckout', [ - 'currentPaymentId' => $selectedPaymentId, 'amazonPayMopId' => $amazonPayMopId ]); } From ff487b582c38e02ab713f6a69004cac98c6cdb14 Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Tue, 22 Sep 2020 11:26:31 +0200 Subject: [PATCH 207/353] added bill-adres --- src/Controllers/AmazonPayController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Controllers/AmazonPayController.php b/src/Controllers/AmazonPayController.php index 3d334e3c..5b5594bf 100644 --- a/src/Controllers/AmazonPayController.php +++ b/src/Controllers/AmazonPayController.php @@ -181,11 +181,11 @@ public function getOrderReference(Request $request, Response $response, Checkout /** @var AmazonPayService $amazonPayService */ $amazonPayService = pluginApp(AmazonPayService::class); $shippingAddress = $amazonPayService->registerCustomerFromAmazonPay($orderReferenceResponse); - //$billingAddress = $amazonPayService->registerCustomerFromAmazonPay($orderReferenceResponse, true); + $billingAddress = $amazonPayService->registerCustomerFromAmazonPay($orderReferenceResponse, true); $checkout->setCustomerInvoiceAddressId($shippingAddress->id); - $checkout->setCustomerShippingAddressId($shippingAddress->id); + $checkout->setCustomerShippingAddressId($billingAddress->id); /** @var BasketService $basketService */ $basketService = pluginApp(BasketService::class); From 539a3508c3913f4e6f2ff23b7db7e3d0fd749e35 Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Tue, 22 Sep 2020 13:34:55 +0200 Subject: [PATCH 208/353] fix for addresses --- src/Controllers/AmazonPayController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Controllers/AmazonPayController.php b/src/Controllers/AmazonPayController.php index 5b5594bf..92064428 100644 --- a/src/Controllers/AmazonPayController.php +++ b/src/Controllers/AmazonPayController.php @@ -195,8 +195,8 @@ public function getOrderReference(Request $request, Response $response, Checkout /** @var CheckoutService $checkoutService */ $checkoutService = pluginApp(CheckoutService::class); - $checkoutService->setBillingAddressId($shippingAddress->id); - $checkoutService->setDeliveryAddressId($shippingAddress->id); + /* $checkoutService->setBillingAddressId($shippingAddress->id); + $checkoutService->setDeliveryAddressId($shippingAddress->id);*/ $responseData['events']['AfterBasketChanged']['basket'] = $basketService->getBasketForTemplate(); $responseData['events']['AfterBasketChanged']['showNetPrices'] = $contactRepository->showNetPrices(); From 9150e8dfdf5596d81c846cdb24c8dcb19c12ce6d Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Tue, 22 Sep 2020 13:47:40 +0200 Subject: [PATCH 209/353] added pre-auth --- resources/lib/doPreAuth.php | 1 + src/Providers/Api/Request/PreAuthDataProvider.php | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/resources/lib/doPreAuth.php b/resources/lib/doPreAuth.php index 6fb37ae7..ce93d2cb 100644 --- a/resources/lib/doPreAuth.php +++ b/resources/lib/doPreAuth.php @@ -27,6 +27,7 @@ $data['pseudocardpan'] = $sdkRestApi::getParam('pseudocardpan'); $data['sepaMandate'] = $sdkRestApi::getParam('sepaMandate'); $data['bankAccount'] = $sdkRestApi::getParam('bankAccount'); + $data['amazonPayAuth'] = $sdkRestApi::getParam('amazonPayAuth'); $paymentMethod = $sdkRestApi::getParam('paymentMethod'); diff --git a/src/Providers/Api/Request/PreAuthDataProvider.php b/src/Providers/Api/Request/PreAuthDataProvider.php index 630a309f..bb9b5aba 100644 --- a/src/Providers/Api/Request/PreAuthDataProvider.php +++ b/src/Providers/Api/Request/PreAuthDataProvider.php @@ -2,6 +2,7 @@ namespace Payone\Providers\Api\Request; +use Payone\Methods\PayoneAmazonPayPaymentMethod; use Payone\Methods\PayoneCCPaymentMethod; use Payone\Methods\PayoneDirectDebitPaymentMethod; use Payone\Methods\PayoneSofortPaymentMethod; @@ -49,6 +50,9 @@ public function getDataFromBasket(string $paymentCode, Basket $basket, string $r if ($paymentCode == PayoneDirectDebitPaymentMethod::PAYMENT_CODE) { $requestParams['sepaMandate'] = $this->getSepaMandateData(); } + if ($paymentCode == PayoneAmazonPayPaymentMethod::PAYMENT_CODE) { + $requestParams['amazonPayAuth'] = $this->getAmazonPayData($basket->id, $basket->basketAmount, $basket->currency); + } $requestParams['referenceId'] = $requestReference; $requestParams['shippingProvider'] = $this->getShippingProvider($basket->shippingProfileId); From 7540c844571ae6d1739df5d6bcc7d8bc4602a740 Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Tue, 22 Sep 2020 14:08:55 +0200 Subject: [PATCH 210/353] added fix for address-selector --- .../views/Checkout/AmazonPayCheckout.twig | 8 ++-- .../views/Checkout/AmazonPayWidgets.twig | 43 +++++++++++++------ src/Controllers/AmazonPayController.php | 10 ++--- 3 files changed, 40 insertions(+), 21 deletions(-) diff --git a/resources/views/Checkout/AmazonPayCheckout.twig b/resources/views/Checkout/AmazonPayCheckout.twig index 7f07a31c..2d0b8b86 100644 --- a/resources/views/Checkout/AmazonPayCheckout.twig +++ b/resources/views/Checkout/AmazonPayCheckout.twig @@ -4,16 +4,18 @@ diff --git a/src/Controllers/AmazonPayController.php b/src/Controllers/AmazonPayController.php index 92064428..89a8baae 100644 --- a/src/Controllers/AmazonPayController.php +++ b/src/Controllers/AmazonPayController.php @@ -183,7 +183,6 @@ public function getOrderReference(Request $request, Response $response, Checkout $shippingAddress = $amazonPayService->registerCustomerFromAmazonPay($orderReferenceResponse); $billingAddress = $amazonPayService->registerCustomerFromAmazonPay($orderReferenceResponse, true); - $checkout->setCustomerInvoiceAddressId($shippingAddress->id); $checkout->setCustomerShippingAddressId($billingAddress->id); @@ -206,20 +205,21 @@ public function getOrderReference(Request $request, Response $response, Checkout ); $responseData['events']['CheckoutChanged']['checkout'] = $checkoutService->getCheckout(); + $responseData['events']['CheckoutChanged']['AmazonPayAddress']['changed'] = true; + $responseData['events']['CheckoutChanged']['AmazonPayAddress']['shippingAddress'] = $shippingAddress; + $responseData['events']['CheckoutChanged']['AmazonPayAddress']['billingAddress'] = $billingAddress; + $this->logger ->setIdentifier(__METHOD__) ->debug('AmazonPay.getOrderReference', [ "shippingAddress" => (array) $shippingAddress, + "billingAddress" => (array) $billingAddress, "checkout" => (array) $checkout, "checkoutViaService" => (array)$checkoutService->getCheckout() ]); return $response->make(json_encode($responseData), 200); - //return $response->json(['success' => true, 'message' => "Address changed", 'data' => $responseData]); - - - //$checkout->setCustomerShippingAddressId($billingAddress->id); } catch (\Exception $exception) { $this->logger ->setIdentifier(__METHOD__) From a6f0ab49bde740d5610fa44c29979708c376c7b0 Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Tue, 22 Sep 2020 14:17:30 +0200 Subject: [PATCH 211/353] removed debugging --- resources/views/Checkout/AmazonPayCheckout.twig | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/resources/views/Checkout/AmazonPayCheckout.twig b/resources/views/Checkout/AmazonPayCheckout.twig index 2d0b8b86..ca8213b6 100644 --- a/resources/views/Checkout/AmazonPayCheckout.twig +++ b/resources/views/Checkout/AmazonPayCheckout.twig @@ -9,13 +9,10 @@ // $("li.method-list-item[data-id={{ amazonPayMopId }}]").after(""); document.getElementById("addressBookWidgetDiv").style.display = "none"; - - - - - /*$.get("/payment/payone/checkout/amazonPay/loginButton", function (data) { + + $.get("/payment/payone/checkout/amazonPay/loginButton", function (data) { $("body").append(data); - });*/ + }); document.getElementById('LogoutWithAmazon').onclick = function () { amazon.Login.logout(); From d2c70fba6fffa01ffbca06fc8ffcb7f27f74f9c2 Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Tue, 22 Sep 2020 14:31:01 +0200 Subject: [PATCH 212/353] added logging --- resources/views/Checkout/AmazonPayCheckout.twig | 2 +- resources/views/Checkout/AmazonPayWidgets.twig | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/resources/views/Checkout/AmazonPayCheckout.twig b/resources/views/Checkout/AmazonPayCheckout.twig index ca8213b6..68db33d9 100644 --- a/resources/views/Checkout/AmazonPayCheckout.twig +++ b/resources/views/Checkout/AmazonPayCheckout.twig @@ -9,7 +9,7 @@ // $("li.method-list-item[data-id={{ amazonPayMopId }}]").after(""); document.getElementById("addressBookWidgetDiv").style.display = "none"; - + $.get("/payment/payone/checkout/amazonPay/loginButton", function (data) { $("body").append(data); }); diff --git a/resources/views/Checkout/AmazonPayWidgets.twig b/resources/views/Checkout/AmazonPayWidgets.twig index 9314f73d..3792598b 100644 --- a/resources/views/Checkout/AmazonPayWidgets.twig +++ b/resources/views/Checkout/AmazonPayWidgets.twig @@ -33,6 +33,7 @@ if (response.hasOwnProperty('events')) { if (response.events.hasOwnProperty('CheckoutChanged')) { if (response.events.CheckoutChanged.hasOwnProperty('AmazonPayAddress')) { + console.log(response.events.CheckoutChanged.AmazonPayAddress); if (response.events.CheckoutChanged.AmazonPayAddress.hasOwnProperty('changed')) { if (response.events.CheckoutChanged.AmazonPayAddress.changed) { if (response.events.CheckoutChanged.AmazonPayAddress.changed.hasOwnProperty('billingAddress')) { @@ -63,7 +64,9 @@ function (data) { //$('#LoginWithAmazon').append(data); console.log(data); - //$("body").append(data); + console.log(data.events.CheckoutChanged.AmazonPayAddress.changed); + console.log(data.events.CheckoutChanged.AmazonPayAddress.shippingAddress); + console.log(data.events.CheckoutChanged.AmazonPayAddress.billingAddress); }); // If rendering the AddressBook and Wallet widgets From 8e35e0bd83942efeda6e0ad86261f20317ab8e4c Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Tue, 22 Sep 2020 14:44:15 +0200 Subject: [PATCH 213/353] added email --- .../GenericPaymentResponseFactory.php | 1 + .../GetOrderReferenceDetailsResponse.php | 14 +++++++++- src/Services/AmazonPayService.php | 28 +++++++++++-------- 3 files changed, 30 insertions(+), 13 deletions(-) diff --git a/src/Models/Api/GenericPayment/GenericPaymentResponseFactory.php b/src/Models/Api/GenericPayment/GenericPaymentResponseFactory.php index 1e89797e..0cfd1673 100644 --- a/src/Models/Api/GenericPayment/GenericPaymentResponseFactory.php +++ b/src/Models/Api/GenericPayment/GenericPaymentResponseFactory.php @@ -64,6 +64,7 @@ private static function makeGetOrderReferenceDetailsResponse(array $responseData return $response->init( $responseData['success'] ?? false, $responseData['errormessage'] ?? '', + $responseData['responseData']['add_paydata[email]'] ?? '', $responseData['responseData']['add_paydata[shipping_zip]'] ?? '', $responseData['responseData']['add_paydata[shipping_street]'] ?? '', $responseData['responseData']['add_paydata[shipping_company]'] ?? '', diff --git a/src/Models/Api/GenericPayment/GetOrderReferenceDetailsResponse.php b/src/Models/Api/GenericPayment/GetOrderReferenceDetailsResponse.php index d5f6d0a2..c72c44e8 100644 --- a/src/Models/Api/GenericPayment/GetOrderReferenceDetailsResponse.php +++ b/src/Models/Api/GenericPayment/GetOrderReferenceDetailsResponse.php @@ -9,6 +9,7 @@ */ class GetOrderReferenceDetailsResponse extends ResponseAbstract implements \JsonSerializable { + private $email; private $shippingZip; private $shippingStreet; private $shippingCompany; @@ -37,6 +38,7 @@ class GetOrderReferenceDetailsResponse extends ResponseAbstract implements \Json /** * @param $success * @param $errorMessage + * @param $email * @param $shippingZip * @param $shippingStreet * @param $shippingCompany @@ -63,7 +65,7 @@ class GetOrderReferenceDetailsResponse extends ResponseAbstract implements \Json * @param $workOrderId * @return $this */ - public function init($success, $errorMessage, $shippingZip, $shippingStreet, $shippingCompany, $shippingCity, + public function init($success, $errorMessage, $email, $shippingZip, $shippingStreet, $shippingCompany, $shippingCity, $shippingType, $shippingCountry, $shippingDistrict, $shippingTelephonenumber, $shippingState, $shippingFirstname, $shippingLastname, $billingZip, $billingStreet, $billingCompany, $billingCity, $billingType, $billingCountry, $billingFirstname, $billingLastname, $billingDistrict, $billingTelephonenumber, @@ -71,6 +73,7 @@ public function init($success, $errorMessage, $shippingZip, $shippingStreet, $sh { $this->success = $success; $this->errorMessage = $errorMessage; + $this->email = $email; $this->shippingZip = $shippingZip; $this->shippingStreet = $shippingStreet; $this->shippingCompany = $shippingCompany; @@ -103,6 +106,7 @@ public function jsonSerialize(): array { return parent::jsonSerialize() + [ + 'email' => $this->email, 'shippingZip' => $this->shippingZip, 'shippingStreet' => $this->shippingStreet, 'shippingCompany' => $this->shippingCompany, @@ -130,6 +134,14 @@ public function jsonSerialize(): array ]; } + /** + * @return mixed + */ + public function getEmail() + { + return $this->email; + } + /** * @return mixed */ diff --git a/src/Services/AmazonPayService.php b/src/Services/AmazonPayService.php index 781ab884..75fe5047 100644 --- a/src/Services/AmazonPayService.php +++ b/src/Services/AmazonPayService.php @@ -2,11 +2,6 @@ namespace Payone\Services; - -use Address; -use IO\Builder\Order\AddressType; -use IO\Services\CustomerService; -use function Matrix\add; use Payone\Adapter\Logger; use Payone\Adapter\SessionStorage; use Payone\Methods\PayoneAmazonPayPaymentMethod; @@ -16,14 +11,12 @@ use Payone\Providers\Api\Request\GenericPaymentDataProvider; use Payone\Providers\Api\Request\Models\GenericPayment; use Plenty\Modules\Account\Address\Contracts\AddressRepositoryContract; +use Plenty\Modules\Account\Address\Models\Address; use Plenty\Modules\Account\Address\Models\AddressOption; -use Plenty\Modules\Account\Contact\Contracts\ContactAddressRepositoryContract; use Plenty\Modules\Basket\Models\Basket; -use Plenty\Modules\Frontend\Services\AccountService; use Plenty\Modules\Order\Shipping\Countries\Contracts\CountryRepositoryContract; use Plenty\Modules\Order\Shipping\Countries\Models\Country; use Plenty\Modules\Order\Shipping\Countries\Models\CountryState; -use Plenty\Plugin\Log\Loggable; class AmazonPayService { @@ -58,6 +51,8 @@ public function registerCustomerFromAmazonPay(GetOrderReferenceDetailsResponse $ ->debug('AmazonPay.registerCustomer', (array)$orderRefDetails); $addressData = []; + $addressData['email'] = $orderRefDetails->getEmail() ?? ""; + if ($billingAddress) { $addressData['company'] = $orderRefDetails->getBillingCompany() ?? ""; @@ -99,12 +94,12 @@ public function registerCustomerFromAmazonPay(GetOrderReferenceDetailsResponse $ private function mapAmazonAddressToAddress(array $amazonAddress) { /** @var Address $address */ - $address = pluginApp(\Plenty\Modules\Account\Address\Models\Address::class); + $address = pluginApp(Address::class); if (strlen($amazonAddress['company'])) { $address->name1 = $amazonAddress['company']; /** @var AddressOption $addressOption */ - $addressOption = pluginApp(\Plenty\Modules\Account\Address\Models\AddressOption::class); + $addressOption = pluginApp(AddressOption::class); $addressOption->typeId = AddressOption::TYPE_CONTACT_PERSON; $addressOption->value = $amazonAddress['firstName']." ".$amazonAddress['lastName']; @@ -116,7 +111,7 @@ private function mapAmazonAddressToAddress(array $amazonAddress) $address->name3 = $amazonAddress['lastName']; /** @var CountryRepositoryContract $countryContract */ - $countryContract = pluginApp(\Plenty\Modules\Order\Shipping\Countries\Contracts\CountryRepositoryContract::class); + $countryContract = pluginApp(CountryRepositoryContract::class); /** @var Country $country */ $country = $countryContract->getCountryByIso($amazonAddress['countryId'], 'isoCode2'); @@ -141,13 +136,22 @@ private function mapAmazonAddressToAddress(array $amazonAddress) if (strlen($amazonAddress['telNo'])) { /** @var AddressOption $addressOption */ - $addressOption = pluginApp(\Plenty\Modules\Account\Address\Models\AddressOption::class); + $addressOption = pluginApp(AddressOption::class); $addressOption->typeId = AddressOption::TYPE_TELEPHONE; $addressOption->value = $amazonAddress['telNo']; $address->options->push($addressOption->toArray()); } + if (strlen($amazonAddress['email'])) { + /** @var AddressOption $addressOption */ + $addressOption = pluginApp(AddressOption::class); + + $addressOption->typeId = AddressOption::TYPE_EMAIL; + $addressOption->value = $amazonAddress['email']; + + $address->options->push($addressOption->toArray()); + } return $address; } From 698f5d8c5cb6fe4525b89a95abba97cbcda2f2ae Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Tue, 22 Sep 2020 14:54:19 +0200 Subject: [PATCH 214/353] disabed js --- .../views/Checkout/AmazonPayWidgets.twig | 64 +++++++++---------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/resources/views/Checkout/AmazonPayWidgets.twig b/resources/views/Checkout/AmazonPayWidgets.twig index 3792598b..4b28a6a2 100644 --- a/resources/views/Checkout/AmazonPayWidgets.twig +++ b/resources/views/Checkout/AmazonPayWidgets.twig @@ -22,38 +22,38 @@ console.log("After Event: workOrderId= {{ workOrderId }}"); console.log("After Event: orderReferenceId= " + $orderReferenceId); - $(document).ajaxComplete(function (ajaxEvent, xhr) { - let response; - - try { - response = JSON.parse(xhr.responseText); - } catch (exception) { - } - - if (response.hasOwnProperty('events')) { - if (response.events.hasOwnProperty('CheckoutChanged')) { - if (response.events.CheckoutChanged.hasOwnProperty('AmazonPayAddress')) { - console.log(response.events.CheckoutChanged.AmazonPayAddress); - if (response.events.CheckoutChanged.AmazonPayAddress.hasOwnProperty('changed')) { - if (response.events.CheckoutChanged.AmazonPayAddress.changed) { - if (response.events.CheckoutChanged.AmazonPayAddress.changed.hasOwnProperty('billingAddress')) { - window.ceresStore.dispatch("createAddress", { - address: response.events.CheckoutChanged.AmazonPayAddress.billingAddress, - addressType: "1" - }); - } - if (response.events.CheckoutChanged.AmazonPayAddress.changed.hasOwnProperty('shippingAddress')) { - window.ceresStore.dispatch("createAddress", { - address: response.events.CheckoutChanged.AmazonPayAddress.shippingAddress, - addressType: "2" - }); - } - } - } - } - } - } - }); + // $(document).ajaxComplete(function (ajaxEvent, xhr) { + // let response; + // + // try { + // response = JSON.parse(xhr.responseText); + // } catch (exception) { + // } + // + // if (response.hasOwnProperty('events')) { + // if (response.events.hasOwnProperty('CheckoutChanged')) { + // if (response.events.CheckoutChanged.hasOwnProperty('AmazonPayAddress')) { + // console.log(response.events.CheckoutChanged.AmazonPayAddress); + // if (response.events.CheckoutChanged.AmazonPayAddress.hasOwnProperty('changed')) { + // if (response.events.CheckoutChanged.AmazonPayAddress.changed) { + // if (response.events.CheckoutChanged.AmazonPayAddress.changed.hasOwnProperty('billingAddress')) { + // window.ceresStore.dispatch("createAddress", { + // address: response.events.CheckoutChanged.AmazonPayAddress.billingAddress, + // addressType: "1" + // }); + // } + // if (response.events.CheckoutChanged.AmazonPayAddress.changed.hasOwnProperty('shippingAddress')) { + // window.ceresStore.dispatch("createAddress", { + // address: response.events.CheckoutChanged.AmazonPayAddress.shippingAddress, + // addressType: "2" + // }); + // } + // } + // } + // } + // } + // } + // }); $.post("/payment/payone/checkout/amazonPay/getOrderReference", { From caef367400306f1b4ab1ccb954585eee41a3d6bd Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Tue, 22 Sep 2020 15:58:59 +0200 Subject: [PATCH 215/353] added auto-set container-links --- .../AmazonPayAddressBookWidget.php | 21 ----------- .../DataProviders/AmazonPayIntegration.php | 35 ------------------- src/Providers/PayoneServiceProvider.php | 33 +++++++++++++---- 3 files changed, 27 insertions(+), 62 deletions(-) delete mode 100644 src/Providers/DataProviders/AmazonPayAddressBookWidget.php delete mode 100644 src/Providers/DataProviders/AmazonPayIntegration.php diff --git a/src/Providers/DataProviders/AmazonPayAddressBookWidget.php b/src/Providers/DataProviders/AmazonPayAddressBookWidget.php deleted file mode 100644 index 159d4c29..00000000 --- a/src/Providers/DataProviders/AmazonPayAddressBookWidget.php +++ /dev/null @@ -1,21 +0,0 @@ -render(PluginConstants::NAME . '::Checkout.AmazonPayAddressBookWidget'); - } -} diff --git a/src/Providers/DataProviders/AmazonPayIntegration.php b/src/Providers/DataProviders/AmazonPayIntegration.php deleted file mode 100644 index 13664bdc..00000000 --- a/src/Providers/DataProviders/AmazonPayIntegration.php +++ /dev/null @@ -1,35 +0,0 @@ -getMopId(PayoneAmazonPayPaymentMethod::PAYMENT_CODE); - - return $twig->render( - PluginConstants::NAME . '::Checkout.AmazonPayCheckout', - [ - 'amazonPayMopId' => $amazonPayMopId - ]); - } -} diff --git a/src/Providers/PayoneServiceProvider.php b/src/Providers/PayoneServiceProvider.php index 9bc84672..db4d0801 100755 --- a/src/Providers/PayoneServiceProvider.php +++ b/src/Providers/PayoneServiceProvider.php @@ -2,6 +2,7 @@ namespace Payone\Providers; +use Ceres\Helper\LayoutContainer; use Payone\Adapter\Logger; use Payone\Adapter\SessionStorage; use Payone\Helpers\AddressHelper; @@ -28,14 +29,11 @@ use Payone\Models\PaymentMethodContent; use Payone\PluginConstants; use Payone\Services\AmazonPayService; -use Payone\Services\Capture; use Payone\Services\OrderPdf; use Payone\Services\PaymentCreation; use Payone\Services\PaymentService; use Payone\Views\ErrorMessageRenderer; use Payone\Views\PaymentRenderer; -use Plenty\Log\Exceptions\ReferenceTypeException; -use Plenty\Log\Services\ReferenceContainer; use Plenty\Modules\Basket\Contracts\BasketRepositoryContract; use Plenty\Modules\Basket\Events\Basket\AfterBasketChanged; use Plenty\Modules\Basket\Events\Basket\AfterBasketCreate; @@ -45,8 +43,6 @@ use Plenty\Modules\EventProcedures\Services\Entries\ProcedureEntry; use Plenty\Modules\EventProcedures\Services\EventProceduresService; use Plenty\Modules\Order\Contracts\OrderRepositoryContract; -use Plenty\Modules\Order\Events\OrderCreated; -use Plenty\Modules\Order\Models\OrderType; use Plenty\Modules\Payment\Contracts\PaymentRepositoryContract; use Plenty\Modules\Payment\Events\Checkout\ExecutePayment; use Plenty\Modules\Payment\Events\Checkout\GetPaymentMethodContent; @@ -72,12 +68,16 @@ public function register() * @param BasketRepositoryContract $basket * @param PaymentMethodContainer $payContainer * @param EventProceduresService $eventProceduresService + * @param Twig $twig + * @param PaymentHelper $paymentHelper */ public function boot( Dispatcher $eventDispatcher, BasketRepositoryContract $basket, PaymentMethodContainer $payContainer, - EventProceduresService $eventProceduresService + EventProceduresService $eventProceduresService, + Twig $twig, + PaymentHelper $paymentHelper ) { $this->registerPaymentMethods($payContainer); @@ -113,6 +113,27 @@ public function boot( ); $this->registerInvoicePdfGeneration($eventDispatcher); + + $amazonPayMopId = $paymentHelper->getMopId(PayoneAmazonPayPaymentMethod::PAYMENT_CODE); + + $eventDispatcher->listen( + 'IO.Resources.Import', function ($resourceContainer) use ($amazonPayMopId) { + /** @noinspection PhpUndefinedMethodInspection */ + $resourceContainer->addScriptTemplate( + PluginConstants::NAME . '::Checkout.AmazonPayCheckout', + [ + 'amazonPayMopId' => $amazonPayMopId + ]); + }); + + $eventDispatcher->listen( + "Ceres.LayoutContainer.Checkout.BeforeBillingAddress", + function (LayoutContainer $container) use ($twig) { + + $container->addContent($twig->render(PluginConstants::NAME . '::Checkout.AmazonPayAddressBookWidget')); + + } + ); } /** From d479d2c6474e1d9052d650a7848009cf4133bcd8 Mon Sep 17 00:00:00 2001 From: jawendel Date: Tue, 22 Sep 2020 16:12:22 +0200 Subject: [PATCH 216/353] add note paypal wall --- meta/documents/user_guide_de.md | 7 ++++--- meta/documents/user_guide_en.md | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/meta/documents/user_guide_de.md b/meta/documents/user_guide_de.md index 833db24a..a26e845b 100644 --- a/meta/documents/user_guide_de.md +++ b/meta/documents/user_guide_de.md @@ -199,7 +199,7 @@ Im Folgenden legst du fest, welche PAYONE-Zahlungsarten deinen Kunden im Webshop
Tab. 4: Linking template containers
-**Hinweis**: Die Zahlungsart **Kreditkarte** stellt einen Sonderfall dar. Für diese Zahlungsart sind zusätzliche Einstellungen notwendig. Diese Einstellungen werden in Tabelle 3 beschrieben. +**Hinweise zur Kreditkarte**: Die Zahlungsart **Kreditkarte** stellt einen Sonderfall dar. Für diese Zahlungsart sind zusätzliche Einstellungen notwendig. Diese Einstellungen werden in Tabelle 3 beschrieben. @@ -255,10 +255,11 @@ Im Folgenden legst du fest, welche PAYONE-Zahlungsarten deinen Kunden im Webshop
Tab. 3: Zahlungsart Kreditkarte einrichten
-**Hinweis**: Für die Zahlungsart **Gesicherter Rechnungskauf** sind eine eigene **Portal-ID** sowie ein eigener **Schlüssel** notwendig. Diese Portal-ID und dieser Schlüssel müssen im Plugin unter **Gesicherte Rechnung** bei der Konfiguration separat hinterlegt werden. Die Portal-ID und den Schlüssel erhältst du über das PAYONE Merchant Interface über das Menü **Konfiguration » Zahlungsportale**. +**Hinweise zum gesicherten Rechnungskauf**: Für die Zahlungsart **Gesicherter Rechnungskauf** sind eine eigene **Portal-ID** sowie ein eigener **Schlüssel** notwendig. Diese Portal-ID und dieser Schlüssel müssen im Plugin unter **Gesicherte Rechnung** bei der Konfiguration separat hinterlegt werden. Die Portal-ID und den Schlüssel erhältst du über das PAYONE Merchant Interface über das Menü **Konfiguration » Zahlungsportale**. -**Hinweis**: Um die Zahlungsart **Amazon Pay** nutzen zu können, musst du dein Amazon-Konto mit Payone verknüpfen. Wende dich dafür an den Payone Support. +**Hinweise zu Amazon Pay**: Um die Zahlungsart **Amazon Pay** nutzen zu können, musst du dein Amazon-Konto mit Payone verknüpfen. Wende dich dafür an den Payone Support. Bei der Einrichtung der Zahlungsart **Amazon Pay** kannst du zusätzlich zu den in Tabelle 2 beschriebenen Einstellungen noch die Einstellung **Testumgebung** aktivieren. Diese ermöglicht es dir die Zahlungsart zunächst auszutesten und Testkäufe zu tätigen. Mit diesen lassen sich keine Aufträge und kein Umsatz generieren. Deaktiviere die Einstellung **Testumgebung**, um Amazon Pay aktiv zu schalten. +Beachte, dass Amazon Pay nicht genutzt werden kann, wenn du bereits **PayPal** in Mode 1 integriert hast. In diesem Mode überschreibt PayPal den gesamten Checkout mit der PayPal-Wall, daher stehen die für Amazon Pay benötigten Widgets nicht zur Verfügung. ## Ceres-Checkout anpassen diff --git a/meta/documents/user_guide_en.md b/meta/documents/user_guide_en.md index 4655a980..d865e4bf 100644 --- a/meta/documents/user_guide_en.md +++ b/meta/documents/user_guide_en.md @@ -198,7 +198,7 @@ In the following, you select the PAYONE payment methods that should be available
-**Note:** The payment method **Credit card** requires particular attention. Additional settings are necessary for this payment method. The settings are described in table 3. +**Notes about credit card:** The payment method **Credit card** requires particular attention. Additional settings are necessary for this payment method. The settings are described in table 3. @@ -254,10 +254,11 @@ In the following, you select the PAYONE payment methods that should be available
Tab. 3: Setting up the payment method Credit card
-**Note**: You need a separate **Portal ID** and **Key** for the payment method **Secure Invoice**. This Portal-ID and this key have to be deposited in the plugin while configuring it. You get the Portal ID and the Key via the PAYONE Merchant Interface in the **Configuration » Payment portals** menu. +**Notes about Secure Invoice**: You need a separate **Portal ID** and **Key** for the payment method **Secure Invoice**. This Portal-ID and this key have to be deposited in the plugin while configuring it. You get the Portal ID and the Key via the PAYONE Merchant Interface in the **Configuration » Payment portals** menu. -**Note**: In order to use the payment method **Amazon Pay** you have to link your Amazon account with Payone. To do so, contact the Payone support. +**Notes about Amazon Pay**: In order to use the payment method **Amazon Pay** you have to link your Amazon account with Payone. To do so, contact the Payone support. When setting up the payment method **Amazon Pay**, you can activate the setting **Test-Environment** additionally to the settings described in table 2. This setting enables you to test the payment method first with test purchases. You cannot generate orders or turnover with these, they are solely for testing the payment method. Deactivate the setting **Test-Environment** to activate Amazon Pay. +Note that you cannot use Amazon Pay if you have already integrated **PayPal** in Mode 1. In this mode, PayPal overwrites the entire checkout with the PayPal-Wall so that the widgtes Amazon Pay needs are not available. ## Adjusting the Ceres checkout From 12a6a6ad890fe9ad8399df976c98dba80eb514bb Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Tue, 22 Sep 2020 16:19:14 +0200 Subject: [PATCH 217/353] removed container from plugin.json --- plugin.json | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/plugin.json b/plugin.json index 0dc033da..a6fa07f2 100644 --- a/plugin.json +++ b/plugin.json @@ -53,16 +53,6 @@ "key": "Payone\\Providers\\DataProviders\\Javascript", "name": "Payone Checkout JS", "description": "Block to integrate the payone payments into checkout" - }, - { - "key": "Payone\\Providers\\DataProviders\\AmazonPayIntegration", - "name": "Payone Checkout Amazon Pay Integration", - "description": "Block to integrate the Amazon Login, as well as the Widgets for Amazon Pay" - }, - { - "key": "Payone\\Providers\\DataProviders\\AmazonPayAddressBookWidget", - "name": "Payone Checkout Amazon Pay AddressBook-Widget", - "description": "Block to integrate the Amazon Pay address book widget in the checkout." } ] } From 51cf73a744414d45753ab35a914a551d6034eb5a Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Tue, 22 Sep 2020 16:52:42 +0200 Subject: [PATCH 218/353] fixed html --- resources/views/Checkout/AmazonPayCheckout.twig | 4 ++-- src/Providers/PayoneServiceProvider.php | 4 ---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/resources/views/Checkout/AmazonPayCheckout.twig b/resources/views/Checkout/AmazonPayCheckout.twig index 68db33d9..67df4038 100644 --- a/resources/views/Checkout/AmazonPayCheckout.twig +++ b/resources/views/Checkout/AmazonPayCheckout.twig @@ -4,8 +4,8 @@ diff --git a/resources/views/Checkout/AmazonPayLogin.twig b/resources/views/Checkout/AmazonPayLogin.twig index b153be9c..67e26f37 100644 --- a/resources/views/Checkout/AmazonPayLogin.twig +++ b/resources/views/Checkout/AmazonPayLogin.twig @@ -59,6 +59,8 @@ document.getElementsByClassName("invoice-addresses-select")[0].style.display = 'none'; document.getElementsByClassName("shipping-addresses-select")[0].style.display = 'none'; } + $('.shipping-addresses-select').prev('header').style.display = 'none'; + $('.invoice-addresses-select').prev().prev().prev().prev('header').style.display = 'none'; document.getElementById("LoginWithAmazon").style.display = "none"; document.getElementById("LogoutWithAmazon").style.display = "block"; From 73daf4db3f762e3957719dd05df59b668e443d74 Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Tue, 22 Sep 2020 17:26:55 +0200 Subject: [PATCH 220/353] fixed response --- src/Controllers/AmazonPayController.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Controllers/AmazonPayController.php b/src/Controllers/AmazonPayController.php index 89a8baae..7d4f2ab6 100644 --- a/src/Controllers/AmazonPayController.php +++ b/src/Controllers/AmazonPayController.php @@ -218,8 +218,7 @@ public function getOrderReference(Request $request, Response $response, Checkout "checkoutViaService" => (array)$checkoutService->getCheckout() ]); - return $response->make(json_encode($responseData), 200); - + return $response->json($responseData, 200); } catch (\Exception $exception) { $this->logger ->setIdentifier(__METHOD__) From 3d66ed1408728e5b16dcf8d527690f7de34acf4f Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Tue, 22 Sep 2020 17:37:16 +0200 Subject: [PATCH 221/353] fixed frontend-address bug --- .../views/Checkout/AmazonPayCheckout.twig | 4 +-- resources/views/Checkout/AmazonPayLogin.twig | 4 +-- .../views/Checkout/AmazonPayWidgets.twig | 30 +++++++++++++++---- 3 files changed, 28 insertions(+), 10 deletions(-) diff --git a/resources/views/Checkout/AmazonPayCheckout.twig b/resources/views/Checkout/AmazonPayCheckout.twig index 6187990e..0de8efce 100644 --- a/resources/views/Checkout/AmazonPayCheckout.twig +++ b/resources/views/Checkout/AmazonPayCheckout.twig @@ -25,8 +25,8 @@ document.getElementsByClassName("invoice-addresses-select")[0].style.display = 'block'; document.getElementsByClassName("shipping-addresses-select")[0].style.display = 'block'; } - $('.shipping-addresses-select').prev('header').style.display = 'block'; - $('.invoice-addresses-select').prev().prev().prev().prev('header').style.display = 'block'; + $('.shipping-addresses-select').prev('header').css("display",'block'); + $('.invoice-addresses-select').prev().prev().prev().prev('header').css("display",'block'); }; }); diff --git a/resources/views/Checkout/AmazonPayLogin.twig b/resources/views/Checkout/AmazonPayLogin.twig index 67e26f37..218dcb17 100644 --- a/resources/views/Checkout/AmazonPayLogin.twig +++ b/resources/views/Checkout/AmazonPayLogin.twig @@ -59,8 +59,8 @@ document.getElementsByClassName("invoice-addresses-select")[0].style.display = 'none'; document.getElementsByClassName("shipping-addresses-select")[0].style.display = 'none'; } - $('.shipping-addresses-select').prev('header').style.display = 'none'; - $('.invoice-addresses-select').prev().prev().prev().prev('header').style.display = 'none'; + $('.shipping-addresses-select').prev('header').css("display",'none'); + $('.invoice-addresses-select').prev().prev().prev().prev('header').css("display",'none'); document.getElementById("LoginWithAmazon").style.display = "none"; document.getElementById("LogoutWithAmazon").style.display = "block"; diff --git a/resources/views/Checkout/AmazonPayWidgets.twig b/resources/views/Checkout/AmazonPayWidgets.twig index 4b28a6a2..23d3607c 100644 --- a/resources/views/Checkout/AmazonPayWidgets.twig +++ b/resources/views/Checkout/AmazonPayWidgets.twig @@ -61,12 +61,30 @@ "workOrderId": "{{ workOrderId }}", "amazonReferenceId": $orderReferenceId }, - function (data) { - //$('#LoginWithAmazon').append(data); - console.log(data); - console.log(data.events.CheckoutChanged.AmazonPayAddress.changed); - console.log(data.events.CheckoutChanged.AmazonPayAddress.shippingAddress); - console.log(data.events.CheckoutChanged.AmazonPayAddress.billingAddress); + function (response) { + if (response.hasOwnProperty('events')) { + if (response.events.hasOwnProperty('CheckoutChanged')) { + if (response.events.CheckoutChanged.hasOwnProperty('AmazonPayAddress')) { + console.log(response.events.CheckoutChanged.AmazonPayAddress); + if (response.events.CheckoutChanged.AmazonPayAddress.hasOwnProperty('changed')) { + if (response.events.CheckoutChanged.AmazonPayAddress.changed) { + if (response.events.CheckoutChanged.AmazonPayAddress.changed.hasOwnProperty('billingAddress')) { + window.ceresStore.dispatch("createAddress", { + address: response.events.CheckoutChanged.AmazonPayAddress.billingAddress, + addressType: "1" + }); + } + if (response.events.CheckoutChanged.AmazonPayAddress.changed.hasOwnProperty('shippingAddress')) { + window.ceresStore.dispatch("createAddress", { + address: response.events.CheckoutChanged.AmazonPayAddress.shippingAddress, + addressType: "2" + }); + } + } + } + } + } + } }); // If rendering the AddressBook and Wallet widgets From b8daf4a08b6e0099e108203de0f2a3a625633a8d Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Tue, 22 Sep 2020 17:51:05 +0200 Subject: [PATCH 222/353] fixed js --- resources/views/Checkout/AmazonPayLogin.twig | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/resources/views/Checkout/AmazonPayLogin.twig b/resources/views/Checkout/AmazonPayLogin.twig index 218dcb17..aacc54f0 100644 --- a/resources/views/Checkout/AmazonPayLogin.twig +++ b/resources/views/Checkout/AmazonPayLogin.twig @@ -9,7 +9,17 @@ if (e.detail == {{ amazonPayMopId }}) { document.getElementById("LoginWithAmazon").style.display = "block"; } else { - document.getElementById("LoginWithAmazon").style.display = "none"; + if (document.getElementById("walletWidgetDiv") !== undefined && + document.getElementById("addressBookWidgetDiv") !== undefined) { + document.getElementById("walletWidgetDiv").style.display = "none"; + document.getElementById("addressBookWidgetDiv").style.display = "none"; + } + if (document.getElementsByClassName("invoice-addresses-select")[0] !== undefined && document.getElementsByClassName("shipping-addresses-select")[0] !== undefined) { + document.getElementsByClassName("invoice-addresses-select")[0].style.display = 'block'; + document.getElementsByClassName("shipping-addresses-select")[0].style.display = 'block'; + } + $('.shipping-addresses-select').prev('header').css("display",'block'); + $('.invoice-addresses-select').prev().prev().prev().prev('header').css("display",'block'); } }); }); From 4d2f92b895d380c9bfbecc6f4eb01109f7ef77d4 Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Tue, 22 Sep 2020 17:59:45 +0200 Subject: [PATCH 223/353] fixed address-bug --- resources/views/Checkout/AmazonPayLogin.twig | 4 +++- src/Controllers/AmazonPayController.php | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/resources/views/Checkout/AmazonPayLogin.twig b/resources/views/Checkout/AmazonPayLogin.twig index aacc54f0..feeebaa9 100644 --- a/resources/views/Checkout/AmazonPayLogin.twig +++ b/resources/views/Checkout/AmazonPayLogin.twig @@ -7,7 +7,9 @@ document.addEventListener("afterPaymentMethodChanged", function (e) { if (e.detail == {{ amazonPayMopId }}) { - document.getElementById("LoginWithAmazon").style.display = "block"; + if (document.getElementById("LoginWithAmazon") !== undefined) { + document.getElementById("LoginWithAmazon").style.display = "block"; + } } else { if (document.getElementById("walletWidgetDiv") !== undefined && document.getElementById("addressBookWidgetDiv") !== undefined) { diff --git a/src/Controllers/AmazonPayController.php b/src/Controllers/AmazonPayController.php index 7d4f2ab6..85649e00 100644 --- a/src/Controllers/AmazonPayController.php +++ b/src/Controllers/AmazonPayController.php @@ -183,8 +183,8 @@ public function getOrderReference(Request $request, Response $response, Checkout $shippingAddress = $amazonPayService->registerCustomerFromAmazonPay($orderReferenceResponse); $billingAddress = $amazonPayService->registerCustomerFromAmazonPay($orderReferenceResponse, true); - $checkout->setCustomerInvoiceAddressId($shippingAddress->id); - $checkout->setCustomerShippingAddressId($billingAddress->id); + $checkout->setCustomerShippingAddressId($shippingAddress->id); + $checkout->setCustomerInvoiceAddressId($billingAddress->id); /** @var BasketService $basketService */ $basketService = pluginApp(BasketService::class); From a4dbfc4cb610fe326c9d28c1e0905f621796c458 Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Tue, 22 Sep 2020 18:05:37 +0200 Subject: [PATCH 224/353] changed undefined to null --- resources/views/Checkout/AmazonPayCheckout.twig | 3 ++- resources/views/Checkout/AmazonPayLogin.twig | 16 +++++++++------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/resources/views/Checkout/AmazonPayCheckout.twig b/resources/views/Checkout/AmazonPayCheckout.twig index 0de8efce..62f954e4 100644 --- a/resources/views/Checkout/AmazonPayCheckout.twig +++ b/resources/views/Checkout/AmazonPayCheckout.twig @@ -21,7 +21,8 @@ document.getElementById("addressBookWidgetDiv").style.display = "none"; document.getElementById("walletWidgetDiv").style.display = "none"; - if (document.getElementsByClassName("invoice-addresses-select")[0] !== undefined && document.getElementsByClassName("shipping-addresses-select")[0] !== undefined) { + if (document.getElementsByClassName("invoice-addresses-select")[0] !== null && + document.getElementsByClassName("shipping-addresses-select")[0] !== null) { document.getElementsByClassName("invoice-addresses-select")[0].style.display = 'block'; document.getElementsByClassName("shipping-addresses-select")[0].style.display = 'block'; } diff --git a/resources/views/Checkout/AmazonPayLogin.twig b/resources/views/Checkout/AmazonPayLogin.twig index feeebaa9..2d73e8ce 100644 --- a/resources/views/Checkout/AmazonPayLogin.twig +++ b/resources/views/Checkout/AmazonPayLogin.twig @@ -7,16 +7,17 @@ document.addEventListener("afterPaymentMethodChanged", function (e) { if (e.detail == {{ amazonPayMopId }}) { - if (document.getElementById("LoginWithAmazon") !== undefined) { + if (document.getElementById("LoginWithAmazon") !== null) { document.getElementById("LoginWithAmazon").style.display = "block"; } } else { - if (document.getElementById("walletWidgetDiv") !== undefined && - document.getElementById("addressBookWidgetDiv") !== undefined) { + if (document.getElementById("walletWidgetDiv") !== null && + document.getElementById("addressBookWidgetDiv") !== null) { document.getElementById("walletWidgetDiv").style.display = "none"; document.getElementById("addressBookWidgetDiv").style.display = "none"; } - if (document.getElementsByClassName("invoice-addresses-select")[0] !== undefined && document.getElementsByClassName("shipping-addresses-select")[0] !== undefined) { + if (document.getElementsByClassName("invoice-addresses-select")[0] !== null && + document.getElementsByClassName("shipping-addresses-select")[0] !== null) { document.getElementsByClassName("invoice-addresses-select")[0].style.display = 'block'; document.getElementsByClassName("shipping-addresses-select")[0].style.display = 'block'; } @@ -62,12 +63,13 @@ }); - if (document.getElementById("walletWidgetDiv") !== undefined && - document.getElementById("addressBookWidgetDiv") !== undefined) { + if (document.getElementById("walletWidgetDiv") !== null && + document.getElementById("addressBookWidgetDiv") !== null) { document.getElementById("walletWidgetDiv").style.display = "block"; document.getElementById("addressBookWidgetDiv").style.display = "block"; } - if (document.getElementsByClassName("invoice-addresses-select")[0] !== undefined && document.getElementsByClassName("shipping-addresses-select")[0] !== undefined) { + if (document.getElementsByClassName("invoice-addresses-select")[0] !== null && + document.getElementsByClassName("shipping-addresses-select")[0] !== null) { document.getElementsByClassName("invoice-addresses-select")[0].style.display = 'none'; document.getElementsByClassName("shipping-addresses-select")[0].style.display = 'none'; } From b7f72be9894275de4cc92eb9b8e7f16bd7ac351b Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Tue, 22 Sep 2020 18:23:58 +0200 Subject: [PATCH 225/353] changed js --- .../views/Checkout/AmazonPayCheckout.twig | 25 +++++++++++++++++ resources/views/Checkout/AmazonPayLogin.twig | 27 ------------------- 2 files changed, 25 insertions(+), 27 deletions(-) diff --git a/resources/views/Checkout/AmazonPayCheckout.twig b/resources/views/Checkout/AmazonPayCheckout.twig index 62f954e4..2bffad39 100644 --- a/resources/views/Checkout/AmazonPayCheckout.twig +++ b/resources/views/Checkout/AmazonPayCheckout.twig @@ -9,6 +9,31 @@ $("li.method-list-item[data-id={{ amazonPayMopId }}]").after(""); document.getElementById("addressBookWidgetDiv").style.display = "none"; + + if ({{ selectedPaymentId }} == {{ amazonPayMopId }}) { + document.getElementById("LoginWithAmazon").style.display = "block"; + } + + document.addEventListener("afterPaymentMethodChanged", function (e) { + if (e.detail == {{ amazonPayMopId }}) { + if (document.getElementById("LoginWithAmazon") !== null) { + document.getElementById("LoginWithAmazon").style.display = "block"; + } + } else { + if (document.getElementById("walletWidgetDiv") !== null && + document.getElementById("addressBookWidgetDiv") !== null) { + document.getElementById("walletWidgetDiv").style.display = "none"; + document.getElementById("addressBookWidgetDiv").style.display = "none"; + } + if (document.getElementsByClassName("invoice-addresses-select")[0] !== null && + document.getElementsByClassName("shipping-addresses-select")[0] !== null) { + document.getElementsByClassName("invoice-addresses-select")[0].style.display = 'block'; + document.getElementsByClassName("shipping-addresses-select")[0].style.display = 'block'; + } + $('.shipping-addresses-select').prev('header').css("display",'block'); + $('.invoice-addresses-select').prev().prev().prev().prev('header').css("display",'block'); + } + }); $.get("/payment/payone/checkout/amazonPay/loginButton", function (data) { $("body").append(data); diff --git a/resources/views/Checkout/AmazonPayLogin.twig b/resources/views/Checkout/AmazonPayLogin.twig index 2d73e8ce..5e361db4 100644 --- a/resources/views/Checkout/AmazonPayLogin.twig +++ b/resources/views/Checkout/AmazonPayLogin.twig @@ -1,31 +1,4 @@ diff --git a/resources/views/Checkout/AmazonPayLogin.twig b/resources/views/Checkout/AmazonPayLogin.twig index 5e361db4..7ea279fb 100644 --- a/resources/views/Checkout/AmazonPayLogin.twig +++ b/resources/views/Checkout/AmazonPayLogin.twig @@ -46,8 +46,8 @@ document.getElementsByClassName("invoice-addresses-select")[0].style.display = 'none'; document.getElementsByClassName("shipping-addresses-select")[0].style.display = 'none'; } - $('.shipping-addresses-select').prev('header').css("display",'none'); - $('.invoice-addresses-select').prev().prev().prev().prev('header').css("display",'none'); + $('.shipping-addresses-select').prev('header').css("display", 'none'); + $('.invoice-addresses-select').prev().prev().prev().prev('header').css("display", 'none'); document.getElementById("LoginWithAmazon").style.display = "none"; document.getElementById("LogoutWithAmazon").style.display = "block"; diff --git a/resources/views/Checkout/AmazonPayWidgets.twig b/resources/views/Checkout/AmazonPayWidgets.twig index 23d3607c..d6251b92 100644 --- a/resources/views/Checkout/AmazonPayWidgets.twig +++ b/resources/views/Checkout/AmazonPayWidgets.twig @@ -1,5 +1,5 @@ + {% if config('Payone.PAYONE_PAYONE_AMAZON_PAY.sandbox') == "true" %} + + {% else %} + + {% endif %} + + + -{% if config('Payone.PAYONE_PAYONE_AMAZON_PAY.sandbox') == "true" %} - -{% else %} - -{% endif %} From e127305b2a56d754e1a83931568b394cc5fd8f7d Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Tue, 22 Sep 2020 19:37:05 +0200 Subject: [PATCH 232/353] added currency fix --- src/Controllers/AmazonPayController.php | 17 ++++++++++++++--- .../Api/Request/GenericPaymentDataProvider.php | 17 ++++++++++------- src/Services/AmazonPayService.php | 1 + 3 files changed, 25 insertions(+), 10 deletions(-) diff --git a/src/Controllers/AmazonPayController.php b/src/Controllers/AmazonPayController.php index 53c1614f..948fa4bd 100644 --- a/src/Controllers/AmazonPayController.php +++ b/src/Controllers/AmazonPayController.php @@ -71,7 +71,10 @@ public function getAmazonPayLoginWidget(Twig $twig, $selectedPaymentId = $basket->methodOfPaymentId; $amazonPayMopId = $paymentHelper->getMopId(PayoneAmazonPayPaymentMethod::PAYMENT_CODE); - $requestParams = $this->dataProvider->getGetConfigRequestData(PayoneAmazonPayPaymentMethod::PAYMENT_CODE); + $requestParams = $this->dataProvider->getGetConfigRequestData( + PayoneAmazonPayPaymentMethod::PAYMENT_CODE, + $basket->currency + ); /** @var GetConfigurationResponse $configResponse */ $configResponse = $this->api->doGenericPayment(GenericPayment::ACTIONTYPE_GETCONFIGURATION, $requestParams); @@ -165,11 +168,16 @@ public function renderWidgets(Twig $twig, /** * @param Request $request * @param Response $response + * @param BasketRepositoryContract $basketRepositoryContract * @param Checkout $checkout * @param SessionStorage $sessionStorage * @return \Symfony\Component\HttpFoundation\Response */ - public function getOrderReference(Request $request, Response $response, Checkout $checkout, SessionStorage $sessionStorage) + public function getOrderReference(Request $request, + Response $response, + BasketRepositoryContract $basketRepositoryContract, + Checkout $checkout, + SessionStorage $sessionStorage) { try { $amazonReferenceId = $request->get('amazonReferenceId'); @@ -178,13 +186,16 @@ public function getOrderReference(Request $request, Response $response, Checkout $workOrderId = $sessionStorage->getSessionValue('workOrderId'); $accessToken = $sessionStorage->getSessionValue('accessToken'); + $basket = $basketRepositoryContract->load(); + /** @var GenericPaymentDataProvider $genericPaymentDataProvider */ $genericPaymentDataProvider = pluginApp(GenericPaymentDataProvider::class); $requestParams = $genericPaymentDataProvider->getGetOrderReferenceDetailsRequestData( PayoneAmazonPayPaymentMethod::PAYMENT_CODE, $workOrderId, $accessToken, - $amazonReferenceId + $amazonReferenceId, + $basket->currency ); /** @var GetOrderReferenceDetailsResponse $orderReferenceResponse */ diff --git a/src/Providers/Api/Request/GenericPaymentDataProvider.php b/src/Providers/Api/Request/GenericPaymentDataProvider.php index 02a9e056..39c66411 100644 --- a/src/Providers/Api/Request/GenericPaymentDataProvider.php +++ b/src/Providers/Api/Request/GenericPaymentDataProvider.php @@ -21,15 +21,16 @@ private function getDefaultPaymentRequestData(string $paymentCode) return $requestParams; } + /** * {@inheritdoc} */ - public function getGetConfigRequestData(string $paymentCode): array + public function getGetConfigRequestData(string $paymentCode, string $currency): array { $requestParams = $this->getDefaultPaymentRequestData($paymentCode); // Currency not mentioned in API-Doc of Payone - $requestParams['currency'] = "EUR"; + $requestParams['currency'] = $currency; $requestParams['add_paydata']['action'] = GenericPayment::ACTIONTYPE_GETCONFIGURATION; @@ -43,12 +44,13 @@ public function getGetConfigRequestData(string $paymentCode): array public function getGetOrderReferenceDetailsRequestData(string $paymentCode, string $workOrderId, string $amazonAddressToken, - string $amazonReferenceId): array + string $amazonReferenceId, + string $currency): array { $requestParams = $this->getDefaultPaymentRequestData($paymentCode); // Currency not mentioned in API-Doc of Payone - $requestParams['currency'] = "EUR"; + $requestParams['currency'] = $currency; $requestParams['add_paydata']['action'] = GenericPayment::ACTIONTYPE_GETORDERREFERENCEDETAILS; @@ -93,12 +95,13 @@ public function getConfirmOrderReferenceRequestData(string $paymentCode, string $reference, string $amazonReferenceId, string $amount, + string $currency, string $basketId) { $requestParams = $this->getDefaultPaymentRequestData($paymentCode); // Currency not mentioned in API-Doc of Payone - $requestParams['currency'] = "EUR"; + $requestParams['currency'] = $currency; // amount in smallest unit $requestParams['amount'] = $amount * 100; @@ -111,8 +114,8 @@ public function getConfirmOrderReferenceRequestData(string $paymentCode, $shopHelper = pluginApp(ShopHelper::class); $successParam = ''; - if(strlen($basketId)){ - $successParam = '?transactionBasketId='.$basketId; + if (strlen($basketId)) { + $successParam = '?transactionBasketId=' . $basketId; } $requestParams['successurl'] = $shopHelper->getPlentyDomain() . '/payment/payone/checkoutSuccess' . $successParam; diff --git a/src/Services/AmazonPayService.php b/src/Services/AmazonPayService.php index 4c4f40ab..a481f294 100644 --- a/src/Services/AmazonPayService.php +++ b/src/Services/AmazonPayService.php @@ -212,6 +212,7 @@ public function confirmOrderReference(Basket $basket) $basket->id, $amazonReferenceId, $basket->basketAmount, + $basket->currency, $basket->id ); From adf32c4ab52eee9128db847f4b596388e5594e6b Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Wed, 23 Sep 2020 08:51:15 +0200 Subject: [PATCH 233/353] added translation for logging --- resources/lang/de/AmazonPay.properties | 20 ++++++++++---------- resources/views/Checkout/AmazonPayLogin.twig | 4 ++-- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/resources/lang/de/AmazonPay.properties b/resources/lang/de/AmazonPay.properties index 69933c78..8ae449b3 100644 --- a/resources/lang/de/AmazonPay.properties +++ b/resources/lang/de/AmazonPay.properties @@ -1,10 +1,10 @@ -apiCall=Calling the API -configLoginButton=Config for login button -renderLoginWidget=Render login widget -renderWidgets=Render widgets -getOrderReference=Get order reference -registerCustomer=Customer addresses from Amazon -setOrderReference=Set order reference -confirmOrderReference=Confirm order reference on Amazon -paymentMethodContent=Within the paymentMethodContent-Event -paymentExecute=Within the paymentExecute-Event +apiCall=Aufruf der API +configLoginButton=Login-Button für die Anmeldung konfigurieren +renderLoginWidget=Rendern des Login-Buttons +renderWidgets=Rendern des Adressbuch- und Zahlungsarten-Widgets +getOrderReference=Laden der Auftragsreferenz +registerCustomer=Kundenadresse von Amazon laden +setOrderReference=Setzen der Auftragsreferenz +confirmOrderReference=Bestätigen der Auftragsreferenz +paymentMethodContent=Innerhalb des PaymentMethodContent-Events +paymentExecute=Innerhalb des PaymentExecute-Events diff --git a/resources/views/Checkout/AmazonPayLogin.twig b/resources/views/Checkout/AmazonPayLogin.twig index 4a1a094d..4f1c4fbc 100644 --- a/resources/views/Checkout/AmazonPayLogin.twig +++ b/resources/views/Checkout/AmazonPayLogin.twig @@ -8,9 +8,9 @@ {% if config('Payone.PAYONE_PAYONE_AMAZON_PAY.sandbox') == "true" %} - + {% else %} - + {% endif %} From 868b71d6d40b0e569a69fd9fe6d758566c68d5b0 Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Wed, 23 Sep 2020 11:36:09 +0200 Subject: [PATCH 234/353] added requested changes --- plugin.json | 11 +- .../Request/Authorization/AmazonPay.php | 3 +- .../AmazonPayConfigurationRequest.php | 17 +- .../AmazonPayConfirmOrderReferenceRequest.php | 14 +- .../AmazonPayGetOrderReferenceRequest.php | 13 +- .../AmazonPaySetOrderReferenceRequest.php | 3 +- .../GenericPaymentRequestFactory.php | 3 +- .../lib/PayoneApi/Request/WalletTypes.php | 14 ++ .../Checkout/AmazonPayAddressBookWidget.twig | 2 - .../views/Checkout/AmazonPayCheckout.twig | 3 +- resources/views/Checkout/AmazonPayLogin.twig | 5 +- .../views/Checkout/AmazonPayWidgets.twig | 6 +- resources/views/Checkout/Confirmation.twig | 6 - src/Controllers/AmazonPayController.php | 24 ++- src/Controllers/CheckoutController.php | 5 - .../ConfirmOrderReferenceResponse.php | 26 +++ .../GetConfigurationResponse.php | 42 ++++- .../GetOrderReferenceDetailsResponse.php | 3 + .../SetOrderReferenceDetailsResponse.php | 76 ++++++++ .../Api/Request/DataProviderAbstract.php | 3 +- .../Request/GenericPaymentDataProvider.php | 39 +++- src/Providers/PayoneRouteServiceProvider.php | 2 - src/Providers/PayoneServiceProvider.php | 178 +++++++++--------- 23 files changed, 340 insertions(+), 158 deletions(-) create mode 100644 resources/lib/PayoneApi/Request/WalletTypes.php diff --git a/plugin.json b/plugin.json index a6fa07f2..9588f228 100644 --- a/plugin.json +++ b/plugin.json @@ -1,5 +1,5 @@ { - "version": "1.1.14", + "version": "1.1.15", "license": "MIT", "pluginIcon": "icon_plugin_xs.png", "price": 0.0, @@ -23,15 +23,16 @@ "payment" ], "categories": [ - 3519 + 4083 ], "type": "payment", "namespace": "Payone", "javaScriptFiles": [], "containers": [], - "require": [ - "IO" - ], + "require": { + "IO": "~5.0.10", + "Ceres":">=5.0.12" + }, "dependencies": { "guzzlehttp/guzzle": "6.*", "symfony/serializer": "3.2.7", diff --git a/resources/lib/PayoneApi/Request/Authorization/AmazonPay.php b/resources/lib/PayoneApi/Request/Authorization/AmazonPay.php index d76440ce..b632c215 100644 --- a/resources/lib/PayoneApi/Request/Authorization/AmazonPay.php +++ b/resources/lib/PayoneApi/Request/Authorization/AmazonPay.php @@ -6,6 +6,7 @@ use PayoneApi\Request\ClearingTypes; use PayoneApi\Request\GenericAuthorizationRequest; use PayoneApi\Request\Parts\RedirectUrls; +use PayoneApi\Request\WalletTypes; /** * Class AmazonPay @@ -13,7 +14,7 @@ class AmazonPay extends AuthorizationRequestAbstract { /** @var string */ - const WALLET_TYPE = 'AMZ'; + const WALLET_TYPE = WalletTypes::AMAZON_PAYMENTS; /** @var string */ protected $clearingtype = ClearingTypes::WALLET; diff --git a/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayConfigurationRequest.php b/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayConfigurationRequest.php index 31b2ebf4..623d1dde 100644 --- a/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayConfigurationRequest.php +++ b/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayConfigurationRequest.php @@ -6,26 +6,29 @@ use PayoneApi\Request\Parts\Config; use PayoneApi\Request\Parts\SystemInfo; use PayoneApi\Request\Types; +use PayoneApi\Request\WalletTypes; class AmazonPayConfigurationRequest { + /** @var string */ private $request = Types::GENERICPAYMENT; + /** @var string */ private $clearingtype = ClearingTypes::WALLET; - private $wallettype = "AMZ"; + /** @var string */ + private $wallettype = WalletTypes::AMAZON_PAYMENTS; + /** @var array */ private $add_paydata = ['action' => 'getconfiguration']; + /** @var string */ private $currency; - /** - * @var Config - */ + /** @var Config */ private $config; - /** - * @var SystemInfo - */ + + /** @var SystemInfo */ private $info; /** diff --git a/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayConfirmOrderReferenceRequest.php b/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayConfirmOrderReferenceRequest.php index 1f09f349..20a93406 100644 --- a/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayConfirmOrderReferenceRequest.php +++ b/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayConfirmOrderReferenceRequest.php @@ -6,26 +6,35 @@ use PayoneApi\Request\Parts\Config; use PayoneApi\Request\Parts\SystemInfo; use PayoneApi\Request\Types; +use PayoneApi\Request\WalletTypes; class AmazonPayConfirmOrderReferenceRequest { - + /** @var string */ private $request = Types::GENERICPAYMENT; + /** @var string */ private $clearingtype = ClearingTypes::WALLET; - private $wallettype = "AMZ"; + /** @var string */ + private $wallettype = WalletTypes::AMAZON_PAYMENTS; + /** @var string */ private $amount; + /** @var string */ private $currency; + /** @var string */ private $workorderid; + /** @var string */ private $successurl; + /** @var string */ private $errorurl; + /** @var array */ private $add_paydata = [ 'action' => 'confirmorderreference', 'reference' => '', @@ -38,7 +47,6 @@ class AmazonPayConfirmOrderReferenceRequest /** @var SystemInfo */ private $info; - /** * AmazonPayGetOrderReferenceRequest constructor. * diff --git a/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayGetOrderReferenceRequest.php b/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayGetOrderReferenceRequest.php index 6bd44820..c77d073e 100644 --- a/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayGetOrderReferenceRequest.php +++ b/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayGetOrderReferenceRequest.php @@ -6,22 +6,26 @@ use PayoneApi\Request\Parts\Config; use PayoneApi\Request\Parts\SystemInfo; use PayoneApi\Request\Types; +use PayoneApi\Request\WalletTypes; class AmazonPayGetOrderReferenceRequest { - + /** @var string */ private $request = Types::GENERICPAYMENT; + /** @var string */ private $clearingtype = ClearingTypes::WALLET; - private $wallettype = "AMZ"; - - private $amount; + /** @var string */ + private $wallettype = WalletTypes::AMAZON_PAYMENTS; + /** @var string */ private $currency; + /** @var string */ private $workorderid; + /** @var array */ private $add_paydata = [ 'action' => 'getorderreferencedetails', 'amazon_reference_id' => '', @@ -40,6 +44,7 @@ class AmazonPayGetOrderReferenceRequest * @param Config $config * @param SystemInfo $info * @param string $amazonReferenceId + * @param string $amazonAddressToken * @param string $workOrderId * @param string $currency */ diff --git a/resources/lib/PayoneApi/Request/GenericPayment/AmazonPaySetOrderReferenceRequest.php b/resources/lib/PayoneApi/Request/GenericPayment/AmazonPaySetOrderReferenceRequest.php index 109750b4..15ce9015 100644 --- a/resources/lib/PayoneApi/Request/GenericPayment/AmazonPaySetOrderReferenceRequest.php +++ b/resources/lib/PayoneApi/Request/GenericPayment/AmazonPaySetOrderReferenceRequest.php @@ -6,6 +6,7 @@ use PayoneApi\Request\Parts\Config; use PayoneApi\Request\Parts\SystemInfo; use PayoneApi\Request\Types; +use PayoneApi\Request\WalletTypes; class AmazonPaySetOrderReferenceRequest { @@ -14,7 +15,7 @@ class AmazonPaySetOrderReferenceRequest private $clearingtype = ClearingTypes::WALLET; - private $wallettype = "AMZ"; + private $wallettype = WalletTypes::AMAZON_PAYMENTS; private $amount; diff --git a/resources/lib/PayoneApi/Request/GenericPayment/GenericPaymentRequestFactory.php b/resources/lib/PayoneApi/Request/GenericPayment/GenericPaymentRequestFactory.php index 6fbcab46..db36a12a 100644 --- a/resources/lib/PayoneApi/Request/GenericPayment/GenericPaymentRequestFactory.php +++ b/resources/lib/PayoneApi/Request/GenericPayment/GenericPaymentRequestFactory.php @@ -14,8 +14,7 @@ class GenericPaymentRequestFactory implements RequestFactoryContract /** * @param string $paymentMethod * @param array $data - * @param string|bool $referenceId Reference to previous request - * + * @param null $referenceId * @return mixed */ public static function create($paymentMethod, $data, $referenceId = null) diff --git a/resources/lib/PayoneApi/Request/WalletTypes.php b/resources/lib/PayoneApi/Request/WalletTypes.php new file mode 100644 index 00000000..da04b81c --- /dev/null +++ b/resources/lib/PayoneApi/Request/WalletTypes.php @@ -0,0 +1,14 @@ + -
diff --git a/resources/views/Checkout/AmazonPayCheckout.twig b/resources/views/Checkout/AmazonPayCheckout.twig index 5b32e47c..31676f58 100644 --- a/resources/views/Checkout/AmazonPayCheckout.twig +++ b/resources/views/Checkout/AmazonPayCheckout.twig @@ -5,11 +5,12 @@ $(document).ready(function () { $("li.method-list-item[data-id={{ amazonPayMopId }}] > label").append(""); - $("li.method-list-item[data-id={{ amazonPayMopId }}] > label").append(""); + $("li.method-list-item[data-id={{ amazonPayMopId }}] > label").append(""); $("li.method-list-item[data-id={{ amazonPayMopId }}]").after(""); document.getElementById("addressBookWidgetDiv").style.display = "none"; + console.log({{ selectedPaymentId }} + " selectedMop & amazonPayMop " + {{ amazonPayMopId }}); if ({{ selectedPaymentId }} === {{ amazonPayMopId }}) { document.getElementById("LoginWithAmazon").style.display = "block"; diff --git a/resources/views/Checkout/AmazonPayLogin.twig b/resources/views/Checkout/AmazonPayLogin.twig index 4f1c4fbc..9b002f4a 100644 --- a/resources/views/Checkout/AmazonPayLogin.twig +++ b/resources/views/Checkout/AmazonPayLogin.twig @@ -67,10 +67,7 @@ }); }, onError: function (error) { - // your error handling code. - console.log("The following error occurred: " - + error.getErrorCode() - + ' - ' + error.getErrorMessage()); + console.log(error.getErrorCode() + ': ' + error.getErrorMessage()); } }); } diff --git a/resources/views/Checkout/AmazonPayWidgets.twig b/resources/views/Checkout/AmazonPayWidgets.twig index d6251b92..5d4273b9 100644 --- a/resources/views/Checkout/AmazonPayWidgets.twig +++ b/resources/views/Checkout/AmazonPayWidgets.twig @@ -69,8 +69,7 @@ // when the AddressBook widget has been rendered. }, onError: function (error) { - document.getElementById("errorCode").innerHTML = error.getErrorCode(); - document.getElementById("errorMessage").innerHTML = error.getErrorMessage(); + console.log(error.getErrorCode() + ': ' + error.getErrorMessage()); } }); addressBookWidget.bind("addressBookWidgetDiv"); @@ -93,8 +92,7 @@ // Your error handling code. // During development you can use the following // code to view error messages: - // console.log(error.getErrorCode() + ': ' + error.getErrorMessage()); - // See "Handling Errors" for more information. + console.log(error.getErrorCode() + ': ' + error.getErrorMessage()); } }); walletWidget.setPresentmentCurrency('{{ content.currency }}'); // ISO-4217 currency code, merchant is expected to enter a valid currency supported by Amazon Pay. diff --git a/resources/views/Checkout/Confirmation.twig b/resources/views/Checkout/Confirmation.twig index 22149387..8d56f2e7 100644 --- a/resources/views/Checkout/Confirmation.twig +++ b/resources/views/Checkout/Confirmation.twig @@ -9,9 +9,3 @@ }); {% endif %} -{% if config('Payone.PAYONE_PAYONE_AMAZON_PAY.sandbox') == "true" %} - -{% else %} - -{% endif %} - diff --git a/src/Controllers/AmazonPayController.php b/src/Controllers/AmazonPayController.php index 948fa4bd..c7cbce84 100644 --- a/src/Controllers/AmazonPayController.php +++ b/src/Controllers/AmazonPayController.php @@ -53,6 +53,8 @@ public function __construct(Api $api, } /** + * Renders login button for the frontend. + * * @param Twig $twig * @param SessionStorage $sessionStorage * @param BasketRepositoryContract $basketRepository @@ -65,7 +67,7 @@ public function __construct(Api $api, public function getAmazonPayLoginWidget(Twig $twig, SessionStorage $sessionStorage, BasketRepositoryContract $basketRepository, - PaymentHelper $paymentHelper) + PaymentHelper $paymentHelper): string { $basket = $basketRepository->load(); $selectedPaymentId = $basket->methodOfPaymentId; @@ -116,6 +118,8 @@ public function getAmazonPayLoginWidget(Twig $twig, } /** + * Renders the address book and wallet widget for the frontend. + * * @param Twig $twig * @param PaymentHelper $paymentHelper * @param BasketRepositoryContract $basketRepository @@ -130,7 +134,7 @@ public function renderWidgets(Twig $twig, PaymentHelper $paymentHelper, BasketRepositoryContract $basketRepository, Request $request, - SessionStorage $sessionStorage) + SessionStorage $sessionStorage): string { $basket = $basketRepository->load(); @@ -138,13 +142,16 @@ public function renderWidgets(Twig $twig, $accessToken = $request->get('accessToken'); $workdOrderId = $request->get('workOrderId'); + $clientId = $sessionStorage->getSessionValue('clientId'); + $sellerId = $sessionStorage->getSessionValue('sellerId'); + $sessionStorage->setSessionValue('accessToken', $accessToken); $sessionStorage->setSessionValue('workOrderId', $workdOrderId); // SWAP containers here $content = [ - 'clientId' => "amzn1.application-oa2-client.2c027e55b128457bb16edc2f0fc6bd71", - 'sellerId' => "A13SNST9X74Q8L", + 'clientId' => $clientId, + 'sellerId' => $sellerId, 'addressBookScope' => "profile payments:widget payments:shipping_address payments:billing_address", 'walletScope' => "profile payments:widget payments:shipping_address payments:billing_address", 'currency' => $basket->currency @@ -166,18 +173,21 @@ public function renderWidgets(Twig $twig, } /** + * Loads the contact data via the selected address in the widget, + * maps it to our address structure and sets it in the checkout. + * * @param Request $request * @param Response $response * @param BasketRepositoryContract $basketRepositoryContract * @param Checkout $checkout * @param SessionStorage $sessionStorage - * @return \Symfony\Component\HttpFoundation\Response + * @return Response */ public function getOrderReference(Request $request, Response $response, BasketRepositoryContract $basketRepositoryContract, Checkout $checkout, - SessionStorage $sessionStorage) + SessionStorage $sessionStorage): Response { try { $amazonReferenceId = $request->get('amazonReferenceId'); @@ -259,6 +269,8 @@ public function getOrderReference(Request $request, } /** + * Maps our language key into the specified language key from Amazon + * * @param string $lang * @return string */ diff --git a/src/Controllers/CheckoutController.php b/src/Controllers/CheckoutController.php index dfd33907..494f483b 100644 --- a/src/Controllers/CheckoutController.php +++ b/src/Controllers/CheckoutController.php @@ -14,16 +14,11 @@ use Payone\Models\PaymentCache; use Payone\Models\SepaMandateCache; use Payone\PluginConstants; -use Payone\Providers\Api\Request\GenericPaymentDataProvider; -use Payone\Providers\Api\Request\Models\GenericPayment; -use Payone\Services\Api; use Payone\Services\PaymentService; use Payone\Services\SepaMandate; use Payone\Validator\CardExpireDate; use Payone\Views\ErrorMessageRenderer; -use PayoneApi\Request\PaymentTypes; use Plenty\Modules\Basket\Contracts\BasketRepositoryContract; -use Plenty\Modules\Webshop\Contracts\LocalizationRepositoryContract; use Plenty\Plugin\Controller; use Plenty\Plugin\Http\Request; use Plenty\Plugin\Http\Response; diff --git a/src/Models/Api/GenericPayment/ConfirmOrderReferenceResponse.php b/src/Models/Api/GenericPayment/ConfirmOrderReferenceResponse.php index feeb3a5c..89f5e1b1 100644 --- a/src/Models/Api/GenericPayment/ConfirmOrderReferenceResponse.php +++ b/src/Models/Api/GenericPayment/ConfirmOrderReferenceResponse.php @@ -23,6 +23,9 @@ public function init($success, $errorMessage, $workorderId) return $this; } + /** + * @return array + */ public function jsonSerialize(): array { return parent::jsonSerialize() + @@ -39,4 +42,27 @@ public function getWorkOrderId() return $this->workOrderId; } + /** + * @return bool + */ + public function isSuccess(): bool + { + return $this->success; + } + + /** + * @return string + */ + public function getErrorMessage(): string + { + return $this->errorMessage; + } + + /** + * @return string + */ + public function getTransactionID(): string + { + return $this->transactionID; + } } diff --git a/src/Models/Api/GenericPayment/GetConfigurationResponse.php b/src/Models/Api/GenericPayment/GetConfigurationResponse.php index 0efdb350..45b68ffb 100644 --- a/src/Models/Api/GenericPayment/GetConfigurationResponse.php +++ b/src/Models/Api/GenericPayment/GetConfigurationResponse.php @@ -36,6 +36,9 @@ public function init($success, $errorMessage, $clientId, $sellerId, $currency, $ return $this; } + /** + * @return array + */ public function jsonSerialize(): array { return parent::jsonSerialize() + @@ -48,35 +51,58 @@ public function jsonSerialize(): array } /** - * @return string + * @return mixed */ - public function getClientId(): string + public function getClientId() { return $this->clientId; } /** - * @return string + * @return mixed */ - public function getSellerId(): string + public function getSellerId() { return $this->sellerId; } /** - * @return string + * @return mixed */ - public function getCurrency(): string + public function getCurrency() { return $this->currency; } /** - * @return string + * @return mixed */ - public function getWorkOrderId(): string + public function getWorkOrderId() { return $this->workOrderId; } + /** + * @return bool + */ + public function isSuccess(): bool + { + return $this->success; + } + + /** + * @return string + */ + public function getErrorMessage(): string + { + return $this->errorMessage; + } + + /** + * @return string + */ + public function getTransactionID(): string + { + return $this->transactionID; + } } diff --git a/src/Models/Api/GenericPayment/GetOrderReferenceDetailsResponse.php b/src/Models/Api/GenericPayment/GetOrderReferenceDetailsResponse.php index c72c44e8..8edcdf5e 100644 --- a/src/Models/Api/GenericPayment/GetOrderReferenceDetailsResponse.php +++ b/src/Models/Api/GenericPayment/GetOrderReferenceDetailsResponse.php @@ -102,6 +102,9 @@ public function init($success, $errorMessage, $email, $shippingZip, $shippingStr return $this; } + /** + * @return array + */ public function jsonSerialize(): array { return parent::jsonSerialize() + diff --git a/src/Models/Api/GenericPayment/SetOrderReferenceDetailsResponse.php b/src/Models/Api/GenericPayment/SetOrderReferenceDetailsResponse.php index a09336bd..01fd8298 100644 --- a/src/Models/Api/GenericPayment/SetOrderReferenceDetailsResponse.php +++ b/src/Models/Api/GenericPayment/SetOrderReferenceDetailsResponse.php @@ -42,6 +42,9 @@ public function init($success, $errorMessage, $amazonAddressToken, $amazonRefere return $this; } + /** + * @return array + */ public function jsonSerialize(): array { return parent::jsonSerialize() + @@ -55,4 +58,77 @@ public function jsonSerialize(): array ]; } + /** + * @return bool + */ + public function isSuccess(): bool + { + return $this->success; + } + + /** + * @return string + */ + public function getErrorMessage(): string + { + return $this->errorMessage; + } + + /** + * @return string + */ + public function getTransactionID(): string + { + return $this->transactionID; + } + + /** + * @return mixed + */ + public function getAmazonAddressToken() + { + return $this->amazonAddressToken; + } + + /** + * @return mixed + */ + public function getAmazonReferenceId() + { + return $this->amazonReferenceId; + } + + /** + * @return mixed + */ + public function getStorename() + { + return $this->storename; + } + + /** + * @return mixed + */ + public function getAmount() + { + return $this->amount; + } + + /** + * @return mixed + */ + public function getCurrency() + { + return $this->currency; + } + + /** + * @return mixed + */ + public function getWorkOrderId() + { + return $this->workOrderId; + } + + } diff --git a/src/Providers/Api/Request/DataProviderAbstract.php b/src/Providers/Api/Request/DataProviderAbstract.php index dda37a88..445bf50a 100644 --- a/src/Providers/Api/Request/DataProviderAbstract.php +++ b/src/Providers/Api/Request/DataProviderAbstract.php @@ -532,7 +532,7 @@ protected function getBankAccount() * @param string $currency * @return array */ - protected function getAmazonPayData(string $basketId, $basketAmount, string $currency) + protected function getAmazonPayData(string $basketId, $basketAmount, string $currency): array { /** @var SessionStorage $sessionStorage */ $sessionStorage = pluginApp(SessionStorage::class); @@ -542,6 +542,7 @@ protected function getAmazonPayData(string $basketId, $basketAmount, string $cur $amazonAuthConfig['reference'] = $basketId; $amazonAuthConfig['currency'] = $currency; + // amount in smallest unit $amazonAuthConfig['amount'] = $basketAmount * 100; return $amazonAuthConfig; diff --git a/src/Providers/Api/Request/GenericPaymentDataProvider.php b/src/Providers/Api/Request/GenericPaymentDataProvider.php index 39c66411..858306e8 100644 --- a/src/Providers/Api/Request/GenericPaymentDataProvider.php +++ b/src/Providers/Api/Request/GenericPaymentDataProvider.php @@ -9,7 +9,11 @@ class GenericPaymentDataProvider extends DataProviderAbstract { - private function getDefaultPaymentRequestData(string $paymentCode) + /** + * @param string $paymentCode + * @return array + */ + private function getDefaultPaymentRequestData(string $paymentCode): array { $requestParams = $this->getDefaultRequestData($paymentCode); $requestParams['request'] = GenericPayment::REQUEST_TYPE; @@ -23,7 +27,10 @@ private function getDefaultPaymentRequestData(string $paymentCode) } /** - * {@inheritdoc} + * @param string $paymentCode + * @param string $currency + * @return array + * @throws \Exception */ public function getGetConfigRequestData(string $paymentCode, string $currency): array { @@ -39,7 +46,13 @@ public function getGetConfigRequestData(string $paymentCode, string $currency): } /** - * {@inheritdoc} + * @param string $paymentCode + * @param string $workOrderId + * @param string $amazonAddressToken + * @param string $amazonReferenceId + * @param string $currency + * @return array + * @throws \Exception */ public function getGetOrderReferenceDetailsRequestData(string $paymentCode, string $workOrderId, @@ -63,7 +76,13 @@ public function getGetOrderReferenceDetailsRequestData(string $paymentCode, } /** - * {@inheritdoc} + * @param string $paymentCode + * @param string $workOrderId + * @param string $amazonReferenceId + * @param string $currency + * @param string $amount + * @return array + * @throws \Exception */ public function getSetOrderReferenceDetailsRequestData(string $paymentCode, string $workOrderId, @@ -88,7 +107,15 @@ public function getSetOrderReferenceDetailsRequestData(string $paymentCode, } /** - * {@inheritdoc} + * @param string $paymentCode + * @param string $workOrderId + * @param string $reference + * @param string $amazonReferenceId + * @param string $amount + * @param string $currency + * @param string $basketId + * @return array + * @throws \Exception */ public function getConfirmOrderReferenceRequestData(string $paymentCode, string $workOrderId, @@ -96,7 +123,7 @@ public function getConfirmOrderReferenceRequestData(string $paymentCode, string $amazonReferenceId, string $amount, string $currency, - string $basketId) + string $basketId): array { $requestParams = $this->getDefaultPaymentRequestData($paymentCode); diff --git a/src/Providers/PayoneRouteServiceProvider.php b/src/Providers/PayoneRouteServiceProvider.php index 85cbd1d3..e1edb16b 100644 --- a/src/Providers/PayoneRouteServiceProvider.php +++ b/src/Providers/PayoneRouteServiceProvider.php @@ -27,8 +27,6 @@ public function map(Router $router) $router->post('payment/payone/checkout/amazonPay/renderWidgets', 'Payone\Controllers\AmazonPayController@renderWidgets'); $router->post('payment/payone/checkout/amazonPay/getOrderReference', 'Payone\Controllers\AmazonPayController@getOrderReference'); $router->get('payment/payone/checkout/amazonPay/placeOrder', 'Payone\Controllers\AmazonPayController@placeOrder'); - $router->post('payment/payone/checkout/amazonPay/debugTest', 'Payone\Controllers\AmazonPayController@debugTest'); - $router->get('payment/payone/error', 'Payone\Controllers\CheckoutController@redirectWithNotice'); $router->get('payment/payone/checkoutSuccess', 'Payone\Controllers\CheckoutController@checkoutSuccess'); diff --git a/src/Providers/PayoneServiceProvider.php b/src/Providers/PayoneServiceProvider.php index 4bb5862f..cb209d6b 100755 --- a/src/Providers/PayoneServiceProvider.php +++ b/src/Providers/PayoneServiceProvider.php @@ -48,6 +48,7 @@ use Plenty\Modules\Payment\Events\Checkout\GetPaymentMethodContent; use Plenty\Modules\Payment\Method\Contracts\PaymentMethodContainer; use Plenty\Modules\Payment\Models\Payment; +use Plenty\Plugin\ConfigRepository; use Plenty\Plugin\Events\Dispatcher; use Plenty\Plugin\ServiceProvider; use Plenty\Modules\Order\Pdf\Events\OrderPdfGenerationEvent; @@ -68,24 +69,21 @@ public function register() * @param BasketRepositoryContract $basket * @param PaymentMethodContainer $payContainer * @param EventProceduresService $eventProceduresService - * @param Twig $twig - * @param PaymentHelper $paymentHelper + * @param ConfigRepository $configRepository */ public function boot( Dispatcher $eventDispatcher, BasketRepositoryContract $basket, PaymentMethodContainer $payContainer, EventProceduresService $eventProceduresService, - Twig $twig, - PaymentHelper $paymentHelper + ConfigRepository $configRepository ) { $this->registerPaymentMethods($payContainer); - $this->registerAmazonPayIntegration($eventDispatcher, $basket); - $this->registerPaymentRendering( $eventDispatcher, - $basket + $basket, + $configRepository ); $this->registerPaymentExecute($eventDispatcher, $basket); @@ -114,26 +112,34 @@ public function boot( $this->registerInvoicePdfGeneration($eventDispatcher); + $amazonPayActive = $configRepository->get(PluginConstants::NAME . '.' . PayoneAmazonPayPaymentMethod::PAYMENT_CODE . '.active'); + if (isset($amazonPayActive) && $amazonPayActive == 1) { + /** @var Twig $twig */ + $twig = pluginApp(Twig::class); + /** @var PaymentHelper $twig */ + $paymentHelper = pluginApp(PaymentHelper::class); - $amazonPayMopId = $paymentHelper->getMopId(PayoneAmazonPayPaymentMethod::PAYMENT_CODE); - - $eventDispatcher->listen( - 'IO.Resources.Import', function ($resourceContainer) use ($basket, $amazonPayMopId) { - $basketData = $basket->load(); - /** @noinspection PhpUndefinedMethodInspection */ - $resourceContainer->addScriptTemplate( - PluginConstants::NAME . '::Checkout.AmazonPayCheckout', [ - 'selectedPaymentId' => $basketData->methodOfPaymentId, - 'amazonPayMopId' => $amazonPayMopId - ]); - }); + $amazonPayMopId = $paymentHelper->getMopId(PayoneAmazonPayPaymentMethod::PAYMENT_CODE); + + $eventDispatcher->listen( + 'IO.Resources.Import', function ($resourceContainer) use ($basket, $amazonPayMopId) { + $basketData = $basket->load(); + /** @noinspection PhpUndefinedMethodInspection */ + $resourceContainer->addScriptTemplate( + PluginConstants::NAME . '::Checkout.AmazonPayCheckout', [ + 'selectedPaymentId' => $basketData->methodOfPaymentId, + 'amazonPayMopId' => $amazonPayMopId + ]); + }); + + $eventDispatcher->listen( + "Ceres.LayoutContainer.Checkout.BeforeBillingAddress", + function (LayoutContainer $container) use ($twig) { + $container->addContent($twig->render(PluginConstants::NAME . '::Checkout.AmazonPayAddressBookWidget')); + } + ); + } - $eventDispatcher->listen( - "Ceres.LayoutContainer.Checkout.BeforeBillingAddress", - function (LayoutContainer $container) use ($twig) { - $container->addContent($twig->render(PluginConstants::NAME . '::Checkout.AmazonPayAddressBookWidget')); - } - ); } /** @@ -209,19 +215,17 @@ protected function registerPaymentMethods(PaymentMethodContainer $payContainer) /** * @param Dispatcher $eventDispatcher - * @param PaymentHelper $paymentHelper - * @param PaymentService $paymentService - * @param PaymentRenderer $paymentRenderer - * @param PaymentMethodContent $content - * @param Logger $logger + * @param BasketRepositoryContract $basketRepository + * @param ConfigRepository $configRepository */ protected function registerPaymentRendering( Dispatcher $eventDispatcher, - BasketRepositoryContract $basketRepository + BasketRepositoryContract $basketRepository, + ConfigRepository $configRepository ) { $eventDispatcher->listen( GetPaymentMethodContent::class, - function (GetPaymentMethodContent $event) use ($basketRepository) { + function (GetPaymentMethodContent $event) use ($basketRepository, $configRepository) { /** @var PaymentService $paymentService */ $paymentService = pluginApp(PaymentService::class); /** @var Logger $logger */ @@ -229,19 +233,23 @@ function (GetPaymentMethodContent $event) use ($basketRepository) { /** @var PaymentHelper $paymentHelper */ $paymentHelper = pluginApp(PaymentHelper::class); + $basket = $basketRepository->load(); + $logger->setIdentifier(__METHOD__)->info('Event.getPaymentMethodContent'); $selectedPaymentMopId = $event->getMop(); if (!$selectedPaymentMopId || !$paymentHelper->isPayonePayment($selectedPaymentMopId)) { return; - } elseif ($event->getMop() == $paymentHelper->getMopId(PayoneAmazonPayPaymentMethod::PAYMENT_CODE)){ - // Because AmazonPay has its own event-handler + } elseif ($event->getMop() == $paymentHelper->getMopId(PayoneAmazonPayPaymentMethod::PAYMENT_CODE)) { + $amazonPayActive = $configRepository->get(PluginConstants::NAME . '.' . PayoneAmazonPayPaymentMethod::PAYMENT_CODE . '.active'); + if (isset($amazonPayActive) && $amazonPayActive == 1) { + return $this->registerAmazonPayIntegration($event, $basket); + } return; } $paymentCode = $paymentHelper->getPaymentCodeByMop($selectedPaymentMopId); /** @var PaymentAbstract $payment */ $payment = PaymentMethodServiceFactory::create($paymentCode); - $basket = $basketRepository->load(); /** @var AddressHelper $addressHelper */ $addressHelper = pluginApp(AddressHelper::class); $billingAddress = $addressHelper->getBasketBillingAddress($basket); @@ -412,62 +420,52 @@ function (OrderPdfGenerationEvent $event) { } /** - * @param Dispatcher $eventDispatcher - * @param BasketRepositoryContract $basketRepository + * @param GetPaymentMethodContent $event + * @param Basket $basket */ - public function registerAmazonPayIntegration(Dispatcher $eventDispatcher, BasketRepositoryContract $basketRepository) + public function registerAmazonPayIntegration(GetPaymentMethodContent $event, Basket $basket) { - $eventDispatcher->listen(GetPaymentMethodContent::class, function (GetPaymentMethodContent $event) use ($basketRepository) { - - /** @var AmazonPayService $amazonPayService */ - $amazonPayService = pluginApp(AmazonPayService::class); - /** @var Logger $logger */ - $logger = pluginApp(Logger::class); - /** @var PaymentHelper $paymentHelper */ - $paymentHelper = pluginApp(PaymentHelper::class); - /** @var Twig $twig */ - $twig = pluginApp(Twig::class); - /** @var SessionStorage $sessionStorage */ - $sessionStorage = pluginApp(SessionStorage::class); - /** @var PaymentCache $paymentCache */ - $paymentCache = pluginApp(PaymentCache::class); - - try { - if ($event->getMop() == $paymentHelper->getMopId(PayoneAmazonPayPaymentMethod::PAYMENT_CODE)) { - - /** @var Basket $basket */ - $basket = $basketRepository->load(); - - $paymentCache->setActiveBasketId($basket->id); - - /** @var SetOrderReferenceDetailsResponse $setOrderRefResponse */ - $setOrderRefResponse = $amazonPayService->setOrderReference($basket); - /** @var ConfirmOrderReferenceResponse $confirmOrderRefResponse */ - $confirmOrderRefResponse = $amazonPayService->confirmOrderReference($basket); - - $event->setValue($twig->render( - PluginConstants::NAME . '::Checkout.Confirmation', - [ - 'success' => $confirmOrderRefResponse->getSuccess(), - 'sellerId' => $sessionStorage->getSessionValue('sellerId'), - 'amazonReferenceId' => $sessionStorage->getSessionValue('amazonReferenceId'), - ] - )); - $event->setType(GetPaymentMethodContent::RETURN_TYPE_HTML); - - $logger - ->setIdentifier(__METHOD__) - ->debug('AmazonPay.paymentMethodContent', [ - "event" => (array)$event, - "setOrderRefResponse" => (array)$setOrderRefResponse, - "confirmOrderRefResponse" => (array)$confirmOrderRefResponse - ]); - } - } catch (\Exception $exception) { - $logger - ->setIdentifier(__METHOD__) - ->error('AmazonPay.paymentMethodContent', $exception); - } - }); + /** @var AmazonPayService $amazonPayService */ + $amazonPayService = pluginApp(AmazonPayService::class); + /** @var Logger $logger */ + $logger = pluginApp(Logger::class); + /** @var Twig $twig */ + $twig = pluginApp(Twig::class); + /** @var SessionStorage $sessionStorage */ + $sessionStorage = pluginApp(SessionStorage::class); + /** @var PaymentCache $paymentCache */ + $paymentCache = pluginApp(PaymentCache::class); + + try { + $paymentCache->setActiveBasketId($basket->id); + + /** @var SetOrderReferenceDetailsResponse $setOrderRefResponse */ + $setOrderRefResponse = $amazonPayService->setOrderReference($basket); + /** @var ConfirmOrderReferenceResponse $confirmOrderRefResponse */ + $confirmOrderRefResponse = $amazonPayService->confirmOrderReference($basket); + + $event->setValue($twig->render( + PluginConstants::NAME . '::Checkout.Confirmation', + [ + 'success' => $confirmOrderRefResponse->getSuccess(), + 'sellerId' => $sessionStorage->getSessionValue('sellerId'), + 'amazonReferenceId' => $sessionStorage->getSessionValue('amazonReferenceId'), + ] + )); + $event->setType(GetPaymentMethodContent::RETURN_TYPE_HTML); + + $logger + ->setIdentifier(__METHOD__) + ->debug('AmazonPay.paymentMethodContent', [ + "event" => (array)$event, + "setOrderRefResponse" => (array)$setOrderRefResponse, + "confirmOrderRefResponse" => (array)$confirmOrderRefResponse + ]); + + } catch (\Exception $exception) { + $logger + ->setIdentifier(__METHOD__) + ->error('AmazonPay.paymentMethodContent', $exception); + } } } From 45ae56e62a68ad4f9cc81dada5140b770a091642 Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Wed, 23 Sep 2020 11:41:37 +0200 Subject: [PATCH 235/353] changed ceres version --- plugin.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.json b/plugin.json index 9588f228..ce1e8e01 100644 --- a/plugin.json +++ b/plugin.json @@ -31,7 +31,7 @@ "containers": [], "require": { "IO": "~5.0.10", - "Ceres":">=5.0.12" + "Ceres":">=5.0.11" }, "dependencies": { "guzzlehttp/guzzle": "6.*", From d0e3ca6b317099685ee766171c7445da5b72f210 Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Wed, 23 Sep 2020 11:49:11 +0200 Subject: [PATCH 236/353] changed response class --- src/Controllers/AmazonPayController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Controllers/AmazonPayController.php b/src/Controllers/AmazonPayController.php index c7cbce84..3e49bfa6 100644 --- a/src/Controllers/AmazonPayController.php +++ b/src/Controllers/AmazonPayController.php @@ -181,13 +181,13 @@ public function renderWidgets(Twig $twig, * @param BasketRepositoryContract $basketRepositoryContract * @param Checkout $checkout * @param SessionStorage $sessionStorage - * @return Response + * @return \Symfony\Component\HttpFoundation\Response */ public function getOrderReference(Request $request, Response $response, BasketRepositoryContract $basketRepositoryContract, Checkout $checkout, - SessionStorage $sessionStorage): Response + SessionStorage $sessionStorage): \Symfony\Component\HttpFoundation\Response { try { $amazonReferenceId = $request->get('amazonReferenceId'); From 7c40ce8f4d6a51c6708e34f0ab515106a373f1bd Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Wed, 23 Sep 2020 12:05:39 +0200 Subject: [PATCH 237/353] re-added amount caused by incomplete doc --- .../GenericPayment/AmazonPayGetOrderReferenceRequest.php | 6 ++++++ src/Controllers/AmazonPayController.php | 3 ++- src/Providers/Api/Request/GenericPaymentDataProvider.php | 6 +++++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayGetOrderReferenceRequest.php b/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayGetOrderReferenceRequest.php index c77d073e..e23c931d 100644 --- a/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayGetOrderReferenceRequest.php +++ b/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayGetOrderReferenceRequest.php @@ -22,6 +22,9 @@ class AmazonPayGetOrderReferenceRequest /** @var string */ private $currency; + /** @var string */ + private $amount; + /** @var string */ private $workorderid; @@ -46,6 +49,7 @@ class AmazonPayGetOrderReferenceRequest * @param string $amazonReferenceId * @param string $amazonAddressToken * @param string $workOrderId + * @param string $amount * @param string $currency */ public function __construct( @@ -54,6 +58,7 @@ public function __construct( string $amazonReferenceId, string $amazonAddressToken, string $workOrderId, + string $amount, string $currency ) { @@ -62,6 +67,7 @@ public function __construct( $this->add_paydata['amazon_reference_id'] = $amazonReferenceId; $this->add_paydata['amazon_address_token'] = $amazonAddressToken; $this->workorderid = $workOrderId; + $this->amount = $amount; $this->currency = $currency; } diff --git a/src/Controllers/AmazonPayController.php b/src/Controllers/AmazonPayController.php index 3e49bfa6..d0305dd0 100644 --- a/src/Controllers/AmazonPayController.php +++ b/src/Controllers/AmazonPayController.php @@ -205,7 +205,8 @@ public function getOrderReference(Request $request, $workOrderId, $accessToken, $amazonReferenceId, - $basket->currency + $basket->currency, + $basket->basketAmount ); /** @var GetOrderReferenceDetailsResponse $orderReferenceResponse */ diff --git a/src/Providers/Api/Request/GenericPaymentDataProvider.php b/src/Providers/Api/Request/GenericPaymentDataProvider.php index 858306e8..20b5db72 100644 --- a/src/Providers/Api/Request/GenericPaymentDataProvider.php +++ b/src/Providers/Api/Request/GenericPaymentDataProvider.php @@ -51,6 +51,7 @@ public function getGetConfigRequestData(string $paymentCode, string $currency): * @param string $amazonAddressToken * @param string $amazonReferenceId * @param string $currency + * @param string $amount * @return array * @throws \Exception */ @@ -58,12 +59,15 @@ public function getGetOrderReferenceDetailsRequestData(string $paymentCode, string $workOrderId, string $amazonAddressToken, string $amazonReferenceId, - string $currency): array + string $currency, + string $amount): array { $requestParams = $this->getDefaultPaymentRequestData($paymentCode); // Currency not mentioned in API-Doc of Payone $requestParams['currency'] = $currency; + // amount in smallest unit + $requestParams['amount'] = $amount * 100; $requestParams['add_paydata']['action'] = GenericPayment::ACTIONTYPE_GETORDERREFERENCEDETAILS; From 480f28f8380f83b5e27492308bc7e8f6e460d0ce Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Wed, 23 Sep 2020 12:20:32 +0200 Subject: [PATCH 238/353] added changelog --- meta/documents/changelog_de.md | 5 +++++ meta/documents/changelog_en.md | 5 +++++ .../Request/GenericPayment/GenericPaymentRequestFactory.php | 1 + 3 files changed, 11 insertions(+) diff --git a/meta/documents/changelog_de.md b/meta/documents/changelog_de.md index 5b96077f..77355deb 100644 --- a/meta/documents/changelog_de.md +++ b/meta/documents/changelog_de.md @@ -1,5 +1,10 @@ # Release Notes für PAYONE +## 1.1.15 (2020-09-23) + +### Hinzugefügt +- Zahlungsart "Amazon Pay" hinzugefügt + ## 1.1.14 (2020-07-08) ### Hinzugefügt diff --git a/meta/documents/changelog_en.md b/meta/documents/changelog_en.md index 017faac6..f7f9aef0 100644 --- a/meta/documents/changelog_en.md +++ b/meta/documents/changelog_en.md @@ -1,5 +1,10 @@ # Release Notes for PAYONE +## 1.1.15 (2020-09-23) + +### Added +- Payment method "Amazon Pay" added + ## 1.1.14 (2020-07-08) ### Added diff --git a/resources/lib/PayoneApi/Request/GenericPayment/GenericPaymentRequestFactory.php b/resources/lib/PayoneApi/Request/GenericPayment/GenericPaymentRequestFactory.php index db36a12a..26bda49d 100644 --- a/resources/lib/PayoneApi/Request/GenericPayment/GenericPaymentRequestFactory.php +++ b/resources/lib/PayoneApi/Request/GenericPayment/GenericPaymentRequestFactory.php @@ -48,6 +48,7 @@ public static function create($paymentMethod, $data, $referenceId = null) $data['add_paydata']['amazon_reference_id'], $data['add_paydata']['amazon_address_token'], $data['workorderid'], + $data['amount'], $data['currency']); break; case 'setorderreferencedetails': From 4f3b7820cdf28fc6cd00699960bc69ac4f2e6166 Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Wed, 23 Sep 2020 13:34:02 +0200 Subject: [PATCH 239/353] changed js method --- resources/views/Checkout/AmazonPayCheckout.twig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/views/Checkout/AmazonPayCheckout.twig b/resources/views/Checkout/AmazonPayCheckout.twig index 31676f58..07bff26c 100644 --- a/resources/views/Checkout/AmazonPayCheckout.twig +++ b/resources/views/Checkout/AmazonPayCheckout.twig @@ -4,8 +4,8 @@ {% endif %} diff --git a/resources/views/Checkout/AmazonPayWidgets.twig b/resources/views/Checkout/AmazonPayWidgets.twig index 5d4273b9..700c59d5 100644 --- a/resources/views/Checkout/AmazonPayWidgets.twig +++ b/resources/views/Checkout/AmazonPayWidgets.twig @@ -47,6 +47,8 @@ addressType: "2" }); } + // window.function("amazonPay()"); + amazonPay() } } } From 9d3f9842311064fa55004db894a16edcfecda0c5 Mon Sep 17 00:00:00 2001 From: Ilyes Tascou Date: Wed, 23 Sep 2020 14:13:18 +0200 Subject: [PATCH 241/353] added fix --- resources/views/Checkout/AmazonPayCheckout.twig | 2 +- resources/views/Checkout/AmazonPayWidgets.twig | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/views/Checkout/AmazonPayCheckout.twig b/resources/views/Checkout/AmazonPayCheckout.twig index b3ee17e5..34ae761a 100644 --- a/resources/views/Checkout/AmazonPayCheckout.twig +++ b/resources/views/Checkout/AmazonPayCheckout.twig @@ -4,7 +4,7 @@ From 9d6037b5d8b20db418608b36e98e07d523d8be51 Mon Sep 17 00:00:00 2001 From: Jens Konopka Date: Thu, 24 Sep 2020 05:35:38 +0200 Subject: [PATCH 253/353] update version and default shipping countries --- config.json | 2 +- meta/documents/changelog_de.md | 2 +- meta/documents/changelog_en.md | 2 +- plugin.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config.json b/config.json index abd6dc21..3c65454e 100644 --- a/config.json +++ b/config.json @@ -885,7 +885,7 @@ "required": false, "label": "Config.PAYONEPAYONEAMAZONPAYAllowedCountriesLabel", "options": { - "defaultValue": "DE,AT,CH" + "defaultValue": "DE,FR,IT,ES,LU,NL,SE,PT,HU,DK" } }, "PAYONE_PAYONE_AMAZON_PAY.sandbox": { diff --git a/meta/documents/changelog_de.md b/meta/documents/changelog_de.md index 77355deb..d4ad485c 100644 --- a/meta/documents/changelog_de.md +++ b/meta/documents/changelog_de.md @@ -1,6 +1,6 @@ # Release Notes für PAYONE -## 1.1.15 (2020-09-23) +## 1.2.00 (2020-09-30) ### Hinzugefügt - Zahlungsart "Amazon Pay" hinzugefügt diff --git a/meta/documents/changelog_en.md b/meta/documents/changelog_en.md index f7f9aef0..1811f9f4 100644 --- a/meta/documents/changelog_en.md +++ b/meta/documents/changelog_en.md @@ -1,6 +1,6 @@ # Release Notes for PAYONE -## 1.1.15 (2020-09-23) +## 1.2.0 (2020-09-30) ### Added - Payment method "Amazon Pay" added diff --git a/plugin.json b/plugin.json index ce1e8e01..5230160c 100644 --- a/plugin.json +++ b/plugin.json @@ -1,5 +1,5 @@ { - "version": "1.1.15", + "version": "1.2.0", "license": "MIT", "pluginIcon": "icon_plugin_xs.png", "price": 0.0, From f484e2d98d3a55a57d0890c7c106c94432dde25e Mon Sep 17 00:00:00 2001 From: Jens Konopka Date: Thu, 24 Sep 2020 06:49:40 +0200 Subject: [PATCH 254/353] update checkout script use session values to avoid to many request --- .../views/Checkout/AmazonPayCheckout.twig | 130 +++++++----------- src/Controllers/AmazonPayController.php | 26 +++- 2 files changed, 68 insertions(+), 88 deletions(-) diff --git a/resources/views/Checkout/AmazonPayCheckout.twig b/resources/views/Checkout/AmazonPayCheckout.twig index 90e21559..65c919d1 100644 --- a/resources/views/Checkout/AmazonPayCheckout.twig +++ b/resources/views/Checkout/AmazonPayCheckout.twig @@ -4,86 +4,34 @@ {% endif %} diff --git a/src/Controllers/AmazonPayController.php b/src/Controllers/AmazonPayController.php index d0305dd0..bffdfdbf 100644 --- a/src/Controllers/AmazonPayController.php +++ b/src/Controllers/AmazonPayController.php @@ -78,11 +78,23 @@ public function getAmazonPayLoginWidget(Twig $twig, $basket->currency ); - /** @var GetConfigurationResponse $configResponse */ - $configResponse = $this->api->doGenericPayment(GenericPayment::ACTIONTYPE_GETCONFIGURATION, $requestParams); + $clientId = $sessionStorage->getSessionValue('clientId'); + $sellerId = $sessionStorage->getSessionValue('sellerId'); + $workOrderId = $sessionStorage->getSessionValue('workOrderId'); - $sessionStorage->setSessionValue('clientId', $configResponse->getClientId()); - $sessionStorage->setSessionValue('sellerId', $configResponse->getSellerId()); + if(strlen($clientId) <= 0 || strlen($sellerId) <= 0 || strlen($workOrderId) <= 0) { + /** Only load the configuration data if not already stored within the session */ + /** @var GetConfigurationResponse $configResponse */ + $configResponse = $this->api->doGenericPayment(GenericPayment::ACTIONTYPE_GETCONFIGURATION, $requestParams); + + $clientId = $configResponse->getClientId(); + $sellerId = $configResponse->getSellerId(); + $workOrderId = $configResponse->getWorkOrderId(); + + $sessionStorage->setSessionValue('clientId', $clientId); + $sessionStorage->setSessionValue('sellerId', $sellerId); + $sessionStorage->setSessionValue('workOrderId', $workOrderId); + } $this->logger ->setIdentifier(__METHOD__) @@ -93,15 +105,15 @@ public function getAmazonPayLoginWidget(Twig $twig, $lang = $this->getLanguageCode($localizationRepositoryContract->getLanguage()); $content = [ - 'clientId' => $configResponse->getClientId(), - 'sellerId' => $configResponse->getSellerId(), + 'clientId' => $clientId, + 'sellerId' => $sellerId, 'type' => "LwA", 'color' => "Gold", 'size' => "medium", 'language' => $lang, 'scopes' => "profile payments:widget payments:shipping_address payments:billing_address", 'popup' => "true", - 'workOrderId' => $configResponse->getWorkorderId() + 'workOrderId' => $workOrderId ]; $this->logger From 209d8717fa9f89a9af3817de388077e3a8ef3f4b Mon Sep 17 00:00:00 2001 From: Jens Konopka Date: Thu, 24 Sep 2020 08:11:22 +0200 Subject: [PATCH 255/353] fix js --- .../Checkout/AmazonPayAddressBookWidget.twig | 2 +- .../views/Checkout/AmazonPayCheckout.twig | 104 ++++++++++++------ resources/views/Checkout/AmazonPayLogin.twig | 24 +--- .../views/Checkout/AmazonPayWidgets.twig | 6 +- 4 files changed, 77 insertions(+), 59 deletions(-) diff --git a/resources/views/Checkout/AmazonPayAddressBookWidget.twig b/resources/views/Checkout/AmazonPayAddressBookWidget.twig index 6a6735df..e7bdacbb 100644 --- a/resources/views/Checkout/AmazonPayAddressBookWidget.twig +++ b/resources/views/Checkout/AmazonPayAddressBookWidget.twig @@ -1 +1 @@ -
+ diff --git a/resources/views/Checkout/AmazonPayCheckout.twig b/resources/views/Checkout/AmazonPayCheckout.twig index 65c919d1..4852745d 100644 --- a/resources/views/Checkout/AmazonPayCheckout.twig +++ b/resources/views/Checkout/AmazonPayCheckout.twig @@ -1,54 +1,39 @@ {% if services.template.isCurrentTemplate('tpl.checkout') %} + {% if config('Payone.PAYONE_PAYONE_AMAZON_PAY.sandbox') == "true" %} + + {% else %} + + {% endif %} + {% endif %} diff --git a/resources/views/Checkout/AmazonPayLogin.twig b/resources/views/Checkout/AmazonPayLogin.twig index 9b002f4a..f73a5768 100644 --- a/resources/views/Checkout/AmazonPayLogin.twig +++ b/resources/views/Checkout/AmazonPayLogin.twig @@ -1,23 +1,9 @@ - - - {% if config('Payone.PAYONE_PAYONE_AMAZON_PAY.sandbox') == "true" %} - - {% else %} - - {% endif %} - - - diff --git a/resources/views/Checkout/AmazonPayWidgets.twig b/resources/views/Checkout/AmazonPayWidgets.twig index dccbc0fc..8bc01315 100644 --- a/resources/views/Checkout/AmazonPayWidgets.twig +++ b/resources/views/Checkout/AmazonPayWidgets.twig @@ -1,8 +1,6 @@ {% endif %} diff --git a/resources/views/Checkout/AmazonPayLogin.twig b/resources/views/Checkout/AmazonPayLogin.twig index f73a5768..1e58ecdd 100644 --- a/resources/views/Checkout/AmazonPayLogin.twig +++ b/resources/views/Checkout/AmazonPayLogin.twig @@ -1,13 +1,6 @@ {% endif %} diff --git a/resources/views/Checkout/AmazonPayWidgets.twig b/resources/views/Checkout/AmazonPayWidgets.twig index bf8fa8cb..263644a0 100644 --- a/resources/views/Checkout/AmazonPayWidgets.twig +++ b/resources/views/Checkout/AmazonPayWidgets.twig @@ -27,13 +27,13 @@ if (response.events.CheckoutChanged.hasOwnProperty('AmazonPayAddress')) { if (response.events.CheckoutChanged.AmazonPayAddress.hasOwnProperty('changed')) { if (response.events.CheckoutChanged.AmazonPayAddress.changed) { - if (response.events.CheckoutChanged.AmazonPayAddress.changed.hasOwnProperty('billingAddress')) { + if (response.events.CheckoutChanged.AmazonPayAddress.hasOwnProperty('billingAddress')) { window.ceresStore.dispatch("createAddress", { address: response.events.CheckoutChanged.AmazonPayAddress.billingAddress, addressType: "1" }); } - if (response.events.CheckoutChanged.AmazonPayAddress.changed.hasOwnProperty('shippingAddress')) { + if (response.events.CheckoutChanged.AmazonPayAddress.hasOwnProperty('shippingAddress')) { window.ceresStore.dispatch("createAddress", { address: response.events.CheckoutChanged.AmazonPayAddress.shippingAddress, addressType: "2" From 000d28367910e2b1557b81a51e03ed6343586299 Mon Sep 17 00:00:00 2001 From: Jens Konopka Date: Fri, 25 Sep 2020 06:55:54 +0200 Subject: [PATCH 276/353] PR refactore --- .../Request/Authorization/AmazonPay.php | 57 ++++++++++--------- .../Request/Authorization/Creditcard.php | 1 + .../Request/Authorization/DirectDebit.php | 1 + .../Request/Authorization/InvoiceSecure.php | 11 +++- .../Authorization/OnlineBankTransfer.php | 12 +++- .../Request/Authorization/PayPal.php | 11 ++-- .../Request/Authorization/Paydirekt.php | 14 +++-- .../Request/Authorization/PrePayment.php | 3 + .../Request/Authorization/Sofort.php | 16 ++++-- .../lib/PayoneApi/Request/Capture/Capture.php | 40 +++++++++---- .../Request/Capture/CaptureModes.php | 1 + .../Request/Capture/RequestFactory.php | 4 +- .../lib/PayoneApi/Request/Debit/Debit.php | 21 ++++--- .../Request/Debit/RequestFactory.php | 4 +- .../AmazonPayGetOrderReferenceRequest.php | 4 +- .../GenericPaymentRequestFactory.php | 5 +- .../GenericPayment/GenericeRequestBase.php | 7 +++ .../Request/GetInvoice/GetInvoice.php | 18 ++++-- .../Request/GetInvoice/RequestFactory.php | 4 +- .../Request/Managemandate/ManageMandate.php | 47 +++++++++++---- .../ManageMandateRequestFactory.php | 4 +- .../PayoneApi/Request/Parts/BankAccount.php | 27 +++++---- .../lib/PayoneApi/Request/Parts/Cart.php | 8 ++- .../lib/PayoneApi/Request/Refund/Refund.php | 10 +++- .../Request/Refund/RequestFactory.php | 4 +- resources/lib/PayoneApi/Response/Clearing.php | 25 +++++--- .../Response/ClientErrorResponse.php | 2 + .../PayoneApi/Response/GenericResponse.php | 4 +- .../Response/ResponseWithClearing.php | 2 +- resources/views/Checkout/AmazonPayLogin.twig | 1 - 30 files changed, 241 insertions(+), 127 deletions(-) diff --git a/resources/lib/PayoneApi/Request/Authorization/AmazonPay.php b/resources/lib/PayoneApi/Request/Authorization/AmazonPay.php index b632c215..2b5c0465 100644 --- a/resources/lib/PayoneApi/Request/Authorization/AmazonPay.php +++ b/resources/lib/PayoneApi/Request/Authorization/AmazonPay.php @@ -13,41 +13,54 @@ */ class AmazonPay extends AuthorizationRequestAbstract { - /** @var string */ - const WALLET_TYPE = WalletTypes::AMAZON_PAYMENTS; - - /** @var string */ + /** + * @var string + */ protected $clearingtype = ClearingTypes::WALLET; - /** @var string */ - private $wallettype = self::WALLET_TYPE; + /** + * @var string + */ + protected $wallettype = WalletTypes::AMAZON_PAYMENTS; - /** @var string */ - private $workorderid; + /** + * @var string + */ + protected $workorderid; - /** @var string */ - private $reference; + /** + * @var string + */ + protected $reference; - /** @var string */ - private $currency; + /** + * @var string + */ + protected $currency; - private $amount; + /** + * @var string + */ + protected $amount; - private $add_paydata = [ + /** + * @var string[] + */ + protected $add_paydata = [ 'amazon_reference_id' => '', ]; /** * @var RedirectUrls */ - private $urls; + protected $urls; /** * PayPal constructor. * * @param GenericAuthorizationRequest $authorizationRequest * @param RedirectUrls $urls - * @param $amount + * @param string $amount * @param string $workOrderId * @param string $reference * @param string $currency @@ -56,7 +69,7 @@ class AmazonPay extends AuthorizationRequestAbstract public function __construct( GenericAuthorizationRequest $authorizationRequest, RedirectUrls $urls, - $amount, + string $amount, string $workOrderId, string $reference, string $currency, @@ -73,14 +86,6 @@ public function __construct( $this->add_paydata['amazon_reference_id'] = $amazonReferenceId; } - /** - * @return string - */ - public function getClearingtype(): string - { - return $this->clearingtype; - } - /** * @return string */ @@ -114,7 +119,7 @@ public function getCurrency(): string } /** - * @return mixed + * @return string */ public function getAmount() { diff --git a/resources/lib/PayoneApi/Request/Authorization/Creditcard.php b/resources/lib/PayoneApi/Request/Authorization/Creditcard.php index b173ca40..4cebebba 100644 --- a/resources/lib/PayoneApi/Request/Authorization/Creditcard.php +++ b/resources/lib/PayoneApi/Request/Authorization/Creditcard.php @@ -21,6 +21,7 @@ class Creditcard extends AuthorizationRequestAbstract * @var string */ private $pseudocardpan; + /** * @var RedirectUrls */ diff --git a/resources/lib/PayoneApi/Request/Authorization/DirectDebit.php b/resources/lib/PayoneApi/Request/Authorization/DirectDebit.php index e690f845..ab0ebd33 100644 --- a/resources/lib/PayoneApi/Request/Authorization/DirectDebit.php +++ b/resources/lib/PayoneApi/Request/Authorization/DirectDebit.php @@ -16,6 +16,7 @@ class DirectDebit extends AuthorizationRequestAbstract * @var string */ protected $clearingtype = ClearingTypes::DEBIT_PAYMENT; + /** * @var SepaMandate */ diff --git a/resources/lib/PayoneApi/Request/Authorization/InvoiceSecure.php b/resources/lib/PayoneApi/Request/Authorization/InvoiceSecure.php index 4235085d..0f999237 100644 --- a/resources/lib/PayoneApi/Request/Authorization/InvoiceSecure.php +++ b/resources/lib/PayoneApi/Request/Authorization/InvoiceSecure.php @@ -12,11 +12,16 @@ */ class InvoiceSecure extends AuthorizationRequestAbstract { - const PAYONE_INVOICE_CLEARING_TYPE = 'POV'; - + /** + * @var string + */ protected $clearingtype = ClearingTypes::REC; - protected $clearingsubtype = self::PAYONE_INVOICE_CLEARING_TYPE; + /** + * @var string + */ + protected $clearingsubtype = 'POV'; + /** * @var Cart */ diff --git a/resources/lib/PayoneApi/Request/Authorization/OnlineBankTransfer.php b/resources/lib/PayoneApi/Request/Authorization/OnlineBankTransfer.php index b2652dfd..77152943 100644 --- a/resources/lib/PayoneApi/Request/Authorization/OnlineBankTransfer.php +++ b/resources/lib/PayoneApi/Request/Authorization/OnlineBankTransfer.php @@ -13,15 +13,21 @@ */ class OnlineBankTransfer extends AuthorizationRequestAbstract { - const ONLINE_TRANSFER = 'EPS'; - - protected $onlinebanktransfertype = self::ONLINE_TRANSFER; + /** + * @var string + */ protected $clearingtype = ClearingTypes::ONLINE_BANK_TRANSFER; + /** + * @var string + */ + protected $onlinebanktransfertype = 'EPS'; + /** * @var RedirectUrls */ private $urls; + /** * @var BankAccount */ diff --git a/resources/lib/PayoneApi/Request/Authorization/PayPal.php b/resources/lib/PayoneApi/Request/Authorization/PayPal.php index 6f9c5bde..5afb2eba 100644 --- a/resources/lib/PayoneApi/Request/Authorization/PayPal.php +++ b/resources/lib/PayoneApi/Request/Authorization/PayPal.php @@ -6,24 +6,27 @@ use PayoneApi\Request\ClearingTypes; use PayoneApi\Request\GenericAuthorizationRequest; use PayoneApi\Request\Parts\RedirectUrls; +use PayoneApi\Request\WalletTypes; /** * Class PayPal */ class PayPal extends AuthorizationRequestAbstract { - const WALLET_TYPE = 'PPE'; - + /** + * @var string + */ protected $clearingtype = ClearingTypes::WALLET; + /** * @var string */ - private $wallettype = self::WALLET_TYPE; + protected $wallettype = WalletTypes::PAYPAL; /** * @var RedirectUrls */ - private $urls; + protected $urls; /** * PayPal constructor. diff --git a/resources/lib/PayoneApi/Request/Authorization/Paydirekt.php b/resources/lib/PayoneApi/Request/Authorization/Paydirekt.php index ee5a7bca..d34b4e06 100644 --- a/resources/lib/PayoneApi/Request/Authorization/Paydirekt.php +++ b/resources/lib/PayoneApi/Request/Authorization/Paydirekt.php @@ -7,28 +7,32 @@ use PayoneApi\Request\GenericAuthorizationRequest; use PayoneApi\Request\Parts\RedirectUrls; use PayoneApi\Request\Parts\ShippingAddress; +use PayoneApi\Request\WalletTypes; /** * Class Paydirekt */ class Paydirekt extends AuthorizationRequestAbstract { - const WALLET_TYPE = 'PDT'; - + /** + * @var string + */ protected $clearingtype = ClearingTypes::WALLET; + /** * @var string */ - private $wallettype = self::WALLET_TYPE; + protected $wallettype = WalletTypes::PAYDIREKT; + /** * @var RedirectUrls */ - private $urls; + protected $urls; /** * @var ShippingAddress */ - private $shippingAddress; + protected $shippingAddress; /** * Paydirekt constructor. diff --git a/resources/lib/PayoneApi/Request/Authorization/PrePayment.php b/resources/lib/PayoneApi/Request/Authorization/PrePayment.php index 719db833..f22dd7b5 100644 --- a/resources/lib/PayoneApi/Request/Authorization/PrePayment.php +++ b/resources/lib/PayoneApi/Request/Authorization/PrePayment.php @@ -11,6 +11,9 @@ */ class PrePayment extends AuthorizationRequestAbstract { + /** + * @var string + */ protected $clearingtype = ClearingTypes::VOR; /** diff --git a/resources/lib/PayoneApi/Request/Authorization/Sofort.php b/resources/lib/PayoneApi/Request/Authorization/Sofort.php index a3f7c1ea..9ef2c9f6 100644 --- a/resources/lib/PayoneApi/Request/Authorization/Sofort.php +++ b/resources/lib/PayoneApi/Request/Authorization/Sofort.php @@ -13,19 +13,25 @@ */ class Sofort extends AuthorizationRequestAbstract { - const SOFORT_BANK_TRANSFER_TYPE = 'PNT'; - - protected $onlinebanktransfertype = self::SOFORT_BANK_TRANSFER_TYPE; + /** + * @var string + */ protected $clearingtype = ClearingTypes::ONLINE_BANK_TRANSFER; + /** + * @var string + */ + protected $onlinebanktransfertype = 'PNT'; + /** * @var RedirectUrls */ - private $urls; + protected $urls; + /** * @var BankAccount */ - private $bankAccount; + protected $bankAccount; /** * PayPal constructor. diff --git a/resources/lib/PayoneApi/Request/Capture/Capture.php b/resources/lib/PayoneApi/Request/Capture/Capture.php index e1252656..b566e8b5 100644 --- a/resources/lib/PayoneApi/Request/Capture/Capture.php +++ b/resources/lib/PayoneApi/Request/Capture/Capture.php @@ -7,29 +7,45 @@ class Capture { - private $txid; - private $capturemode; - private $cart; + /** + * @var string + */ + protected $txid; + + /** + * @var string + */ + protected $capturemode; + + /** + * @var Cart|null + */ + protected $cart; + /** * @var GenericRequest */ - private $request; - private $settleaccount; + protected $request; + + /** + * @var string + */ + protected $settleaccount; /** * Capture constructor. * * @param GenericRequest $request - * @param $txid - * @param $capturemode - * @param $settleaccount + * @param string $txid + * @param string $capturemode + * @param string $settleaccount * @param Cart $cart */ public function __construct( GenericRequest $request, - $txid, - $capturemode, - $settleaccount, + string $txid, + string $capturemode, + string $settleaccount, Cart $cart = null ) { $this->request = $request; @@ -80,7 +96,7 @@ public function getRequest() /** * Getter for Settleaccount - * @return mixed + * @return string */ public function getSettleaccount() { diff --git a/resources/lib/PayoneApi/Request/Capture/CaptureModes.php b/resources/lib/PayoneApi/Request/Capture/CaptureModes.php index c148f3e5..8650aeed 100644 --- a/resources/lib/PayoneApi/Request/Capture/CaptureModes.php +++ b/resources/lib/PayoneApi/Request/Capture/CaptureModes.php @@ -7,6 +7,7 @@ class CaptureModes //Mandatory for payment type BSV, KLV, KLS /** Set with last capture; i.e.: Delivery completed.*/ const COMPLETED = 'completed'; + /** Set with partial deliveries (last delivery with "completed") */ const NOTCOMPLETED = 'notcompleted'; } diff --git a/resources/lib/PayoneApi/Request/Capture/RequestFactory.php b/resources/lib/PayoneApi/Request/Capture/RequestFactory.php index 219fab6e..e9e1f216 100644 --- a/resources/lib/PayoneApi/Request/Capture/RequestFactory.php +++ b/resources/lib/PayoneApi/Request/Capture/RequestFactory.php @@ -14,11 +14,11 @@ class RequestFactory implements RequestFactoryContract /** * @param string $paymentMethod * @param array $data - * @param string|null $referenceId + * @param string $referenceId * * @return Capture|RequestDataContract */ - public static function create(string $paymentMethod, array $data, $referenceId = null) + public static function create(string $paymentMethod, array $data, string $referenceId = null) { $genericRequest = GenericRequestFactory::create(Types::CAPTURE, $data); $context = $data['context']; diff --git a/resources/lib/PayoneApi/Request/Debit/Debit.php b/resources/lib/PayoneApi/Request/Debit/Debit.php index 3e58e164..a636ce37 100644 --- a/resources/lib/PayoneApi/Request/Debit/Debit.php +++ b/resources/lib/PayoneApi/Request/Debit/Debit.php @@ -7,22 +7,29 @@ class Debit { - private $txid; + /** + * @var string + */ + protected $txid; + /** * @var GenericRequest */ - private $request; - /** @var Cart */ - private $cart; + protected $request; + + /** + * @var Cart + */ + protected $cart; /** * Debit constructor. * * @param GenericRequest $request - * @param $txid - * @param Cart $cart + * @param string $txid + * @param Cart|null $cart */ - public function __construct(GenericRequest $request, $txid, Cart $cart = null) + public function __construct(GenericRequest $request, string $txid, Cart $cart = null) { $this->txid = $txid; $this->request = $request; diff --git a/resources/lib/PayoneApi/Request/Debit/RequestFactory.php b/resources/lib/PayoneApi/Request/Debit/RequestFactory.php index af554501..75a9ac93 100644 --- a/resources/lib/PayoneApi/Request/Debit/RequestFactory.php +++ b/resources/lib/PayoneApi/Request/Debit/RequestFactory.php @@ -13,11 +13,11 @@ class RequestFactory implements RequestFactoryContract /** * @param string $paymentMethod * @param array $data - * @param null $referenceId + * @param string $referenceId * * @return Debit|\PayoneApi\Request\RequestDataContract */ - public static function create(string $paymentMethod, array $data, $referenceId = null) + public static function create(string $paymentMethod, array $data, string $referenceId = null) { $data['basket']['basketAmount'] *= -1; $genericRequest = GenericRequestFactory::create(Types::DEBIT, $data); diff --git a/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayGetOrderReferenceRequest.php b/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayGetOrderReferenceRequest.php index a356175d..ccd0c02a 100644 --- a/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayGetOrderReferenceRequest.php +++ b/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayGetOrderReferenceRequest.php @@ -10,12 +10,12 @@ class AmazonPayGetOrderReferenceRequest extends GenericeRequestBase /** * @var string */ - private $amount; + protected $amount; /** * @var string */ - private $workorderid; + protected $workorderid; /** * AmazonPayGetOrderReferenceRequest constructor. diff --git a/resources/lib/PayoneApi/Request/GenericPayment/GenericPaymentRequestFactory.php b/resources/lib/PayoneApi/Request/GenericPayment/GenericPaymentRequestFactory.php index b0e4880c..82c64988 100644 --- a/resources/lib/PayoneApi/Request/GenericPayment/GenericPaymentRequestFactory.php +++ b/resources/lib/PayoneApi/Request/GenericPayment/GenericPaymentRequestFactory.php @@ -9,14 +9,13 @@ class GenericPaymentRequestFactory { - /** * @param string $paymentMethod * @param array $data - * @param null $referenceId + * @param string $referenceId * @return mixed */ - public static function create(string $paymentMethod, array $data, $referenceId = null) + public static function create(string $paymentMethod, array $data, string $referenceId = null) { if($data['context']) { $context = $data['context']; diff --git a/resources/lib/PayoneApi/Request/GenericPayment/GenericeRequestBase.php b/resources/lib/PayoneApi/Request/GenericPayment/GenericeRequestBase.php index b03ad0d5..380b2c52 100644 --- a/resources/lib/PayoneApi/Request/GenericPayment/GenericeRequestBase.php +++ b/resources/lib/PayoneApi/Request/GenericPayment/GenericeRequestBase.php @@ -47,6 +47,13 @@ class GenericeRequestBase */ protected $info; + /** + * GenericeRequestBase constructor. + * @param array $payData + * @param Config $config + * @param SystemInfo $info + * @param string $currency + */ public function __construct( array $payData, Config $config, diff --git a/resources/lib/PayoneApi/Request/GetInvoice/GetInvoice.php b/resources/lib/PayoneApi/Request/GetInvoice/GetInvoice.php index 7f63f868..a0baf10d 100644 --- a/resources/lib/PayoneApi/Request/GetInvoice/GetInvoice.php +++ b/resources/lib/PayoneApi/Request/GetInvoice/GetInvoice.php @@ -8,17 +8,25 @@ class GetInvoice { - private $invoiceTitle; + /** + * @var string + */ + protected $invoiceTitle; + + /** + * @var string + */ + protected $request = Types::INVOICE; - private $request = Types::INVOICE; /** * @var Config */ - private $config; + protected $config; + /** * @var SystemInfo */ - private $info; + protected $info; /** * ManageMandate constructor. @@ -29,7 +37,7 @@ class GetInvoice */ public function __construct( Config $config, - $invoiceTitle, + string $invoiceTitle, SystemInfo $info ) { $this->config = $config; diff --git a/resources/lib/PayoneApi/Request/GetInvoice/RequestFactory.php b/resources/lib/PayoneApi/Request/GetInvoice/RequestFactory.php index e9f51362..a293e4ef 100644 --- a/resources/lib/PayoneApi/Request/GetInvoice/RequestFactory.php +++ b/resources/lib/PayoneApi/Request/GetInvoice/RequestFactory.php @@ -13,11 +13,11 @@ class RequestFactory implements RequestFactoryContract /** * @param string $paymentMethod * @param array $data - * @param int|null $referenceId + * @param string $referenceId * * @return GetInvoice */ - public static function create(string $paymentMethod, array $data, $referenceId = null) + public static function create(string $paymentMethod, array $data, string $referenceId = null) { if ($paymentMethod != PaymentTypes::PAYONE_INVOICE_SECURE) { throw new \Exception('Get invoice only for secure invoice'); diff --git a/resources/lib/PayoneApi/Request/Managemandate/ManageMandate.php b/resources/lib/PayoneApi/Request/Managemandate/ManageMandate.php index 37cd4d80..6e69267c 100644 --- a/resources/lib/PayoneApi/Request/Managemandate/ManageMandate.php +++ b/resources/lib/PayoneApi/Request/Managemandate/ManageMandate.php @@ -12,23 +12,45 @@ class ManageMandate implements RequestDataContract { - private $clearingtype = ClearingTypes::DEBIT_PAYMENT; - private $mandateIdentification; - private $currency; - private $bankAccount; + /** + * @var string + */ + protected $clearingtype = ClearingTypes::DEBIT_PAYMENT; + + /** + * @var string + */ + protected $mandateIdentification; + + /** + * @var string + */ + protected $currency; + + /** + * @var BankAccount + */ + protected $bankAccount; + /** * @var Customer */ - private $customer; - private $request = Types::MANAGEMANDATE; + protected $customer; + + /** + * @var string + */ + protected $request = Types::MANAGEMANDATE; + /** * @var Config */ - private $config; + protected $config; + /** * @var SystemInfo */ - private $info; + protected $info; /** * ManageMandate constructor. @@ -42,11 +64,11 @@ class ManageMandate implements RequestDataContract */ public function __construct( Config $config, - $currency, + string $currency, Customer $customer, SystemInfo $info, BankAccount $bankAccount, - $mandateIdentification = '' + string $mandateIdentification = '' ) { $this->config = $config; $this->currency = $currency; @@ -69,7 +91,7 @@ public function getClearingtype() /** * Getter for MandateIdentification * - * @return mixed + * @return string */ public function getMandateIdentification() { @@ -79,7 +101,7 @@ public function getMandateIdentification() /** * Getter for Currency * - * @return mixed + * @return string */ public function getCurrency() { @@ -138,6 +160,7 @@ public function getInfo() /** * Getter for Sequencenumber + * @return null */ public function getSequencenumber() { diff --git a/resources/lib/PayoneApi/Request/Managemandate/ManageMandateRequestFactory.php b/resources/lib/PayoneApi/Request/Managemandate/ManageMandateRequestFactory.php index d162db52..dea2968c 100644 --- a/resources/lib/PayoneApi/Request/Managemandate/ManageMandateRequestFactory.php +++ b/resources/lib/PayoneApi/Request/Managemandate/ManageMandateRequestFactory.php @@ -15,11 +15,11 @@ class ManageMandateRequestFactory implements RequestFactoryContract /** * @param string $paymentMethod * @param array $data - * @param null $referenceId + * @param string $referenceId * * @return ManageMandate */ - public static function create(string $paymentMethod, array $data, $referenceId = null) + public static function create(string $paymentMethod, array $data, string $referenceId = null) { $context = $data['context']; $config = new Config( diff --git a/resources/lib/PayoneApi/Request/Parts/BankAccount.php b/resources/lib/PayoneApi/Request/Parts/BankAccount.php index f836e780..6827ad10 100644 --- a/resources/lib/PayoneApi/Request/Parts/BankAccount.php +++ b/resources/lib/PayoneApi/Request/Parts/BankAccount.php @@ -7,32 +7,37 @@ class BankAccount /** * @var string */ - private $bankcountry; + protected $bankcountry; + /** * @var string */ - private $iban; + protected $iban; + /** * @var string */ - private $bic; + protected $bic; + /** * @var string */ - private $firstname; + protected $firstname; + /** * @var string */ - private $lastname; + protected $lastname; /** * BankAccount constructor. * * @param string $bankcountry + * @param string $holder * @param string $iban * @param string $bic */ - public function __construct($bankcountry, $holder, $iban, $bic) + public function __construct(string $bankcountry, string $holder, string $iban, string $bic) { $this->bankcountry = $bankcountry; $this->iban = $iban; @@ -45,7 +50,7 @@ public function __construct($bankcountry, $holder, $iban, $bic) /** * Getter for Bankcountry * - * @return mixed + * @return string */ public function getBankcountry() { @@ -55,7 +60,7 @@ public function getBankcountry() /** * Getter for Iban * - * @return mixed + * @return string */ public function getIban() { @@ -65,7 +70,7 @@ public function getIban() /** * Getter for Bic * - * @return mixed + * @return string */ public function getBic() { @@ -75,7 +80,7 @@ public function getBic() /** * Getter for Firstname * - * @return mixed + * @return string */ public function getFirstname() { @@ -85,7 +90,7 @@ public function getFirstname() /** * Getter for Lastname * - * @return mixed + * @return string */ public function getLastname() { diff --git a/resources/lib/PayoneApi/Request/Parts/Cart.php b/resources/lib/PayoneApi/Request/Parts/Cart.php index ef0f36f2..26bbe969 100644 --- a/resources/lib/PayoneApi/Request/Parts/Cart.php +++ b/resources/lib/PayoneApi/Request/Parts/Cart.php @@ -6,8 +6,10 @@ class Cart implements \JsonSerializable { - /** @var CartItem[] */ - private $cartItems = []; + /** + * @var CartItem[] + */ + protected $cartItems = []; /** * Getter for CartItems @@ -43,4 +45,4 @@ public function add(CartItem $cartItem) { $this->cartItems[] = $cartItem; } -} \ No newline at end of file +} diff --git a/resources/lib/PayoneApi/Request/Refund/Refund.php b/resources/lib/PayoneApi/Request/Refund/Refund.php index 6ad82bfc..4b6142bc 100644 --- a/resources/lib/PayoneApi/Request/Refund/Refund.php +++ b/resources/lib/PayoneApi/Request/Refund/Refund.php @@ -6,11 +6,15 @@ class Refund { - private $txid; + /** + * @var string + */ + protected $txid; + /** * @var GenericRequest */ - private $request; + protected $request; /** * Refund constructor. @@ -18,7 +22,7 @@ class Refund * @param GenericRequest $request * @param string $txid */ - public function __construct(GenericRequest $request, $txid) + public function __construct(GenericRequest $request, string $txid) { $this->txid = $txid; $this->request = $request; diff --git a/resources/lib/PayoneApi/Request/Refund/RequestFactory.php b/resources/lib/PayoneApi/Request/Refund/RequestFactory.php index 59441d7b..bc897b3d 100644 --- a/resources/lib/PayoneApi/Request/Refund/RequestFactory.php +++ b/resources/lib/PayoneApi/Request/Refund/RequestFactory.php @@ -11,11 +11,11 @@ class RequestFactory implements RequestFactoryContract /** * @param string $paymentMethod * @param array $data - * @param null $referenceId + * @param string $referenceId * * @return Refund|\PayoneApi\Request\RequestDataContract */ - public static function create(string $paymentMethod, array $data, $referenceId = null) + public static function create(string $paymentMethod, array $data, string $referenceId = null) { $genericRequest = GenericRequestFactory::create(Types::REFUND, $data); diff --git a/resources/lib/PayoneApi/Response/Clearing.php b/resources/lib/PayoneApi/Response/Clearing.php index 82132e89..08cf2bff 100644 --- a/resources/lib/PayoneApi/Response/Clearing.php +++ b/resources/lib/PayoneApi/Response/Clearing.php @@ -10,42 +10,49 @@ class Clearing extends ResponseDataAbstract /** * @var string */ - private $bankaccount; + protected $bankaccount; + /** * @var string */ - private $bankcode; + protected $bankcode; + /** * @var string */ - private $bankcountry; + protected $bankcountry; + /** * @var string */ - private $bankname; + protected $bankname; + /** * @var string */ - private $bankaccountholder; + protected $bankaccountholder; + /** * @var string */ - private $bankcity; + protected $bankcity; + /** * @var string */ - private $bankiban; + protected $bankiban; + /** * @var string */ - private $bankbic; + protected $bankbic; /** * Clearing constructor. * * @param array $responseData */ - public function __construct($responseData) + public function __construct(array $responseData) { $this->bankaccount = $responseData['clearing_bankaccount'] ?? ''; $this->bankcode = $responseData['clearing_bankcode'] ?? ''; diff --git a/resources/lib/PayoneApi/Response/ClientErrorResponse.php b/resources/lib/PayoneApi/Response/ClientErrorResponse.php index afbd5bfb..37253456 100644 --- a/resources/lib/PayoneApi/Response/ClientErrorResponse.php +++ b/resources/lib/PayoneApi/Response/ClientErrorResponse.php @@ -26,6 +26,8 @@ class ClientErrorResponse extends ResponseDataAbstract implements ResponseContra * ClientErrorResponse constructor. * * @param string $errorMessage + * @param mixed $requestData + * @param mixed $responseData */ public function __construct($errorMessage, $requestData = null, $responseData = null) { diff --git a/resources/lib/PayoneApi/Response/GenericResponse.php b/resources/lib/PayoneApi/Response/GenericResponse.php index ccf6ae88..54a0a8cf 100644 --- a/resources/lib/PayoneApi/Response/GenericResponse.php +++ b/resources/lib/PayoneApi/Response/GenericResponse.php @@ -12,14 +12,14 @@ class GenericResponse extends ResponseDataAbstract implements ResponseContract /** * @var array */ - private $responseData = []; + protected $responseData = []; /** * XmlApiResponse constructor. * * @param array $responseData */ - public function __construct($responseData) + public function __construct(array $responseData) { $this->responseData = $responseData; } diff --git a/resources/lib/PayoneApi/Response/ResponseWithClearing.php b/resources/lib/PayoneApi/Response/ResponseWithClearing.php index 34090247..3fa5978f 100644 --- a/resources/lib/PayoneApi/Response/ResponseWithClearing.php +++ b/resources/lib/PayoneApi/Response/ResponseWithClearing.php @@ -7,7 +7,7 @@ class ResponseWithClearing extends GenericResponse implements ResponseContract /** * @var Clearing */ - private $clearing; + protected $clearing; /** * @param Clearing $clearing diff --git a/resources/views/Checkout/AmazonPayLogin.twig b/resources/views/Checkout/AmazonPayLogin.twig index 1e58ecdd..541e05fd 100644 --- a/resources/views/Checkout/AmazonPayLogin.twig +++ b/resources/views/Checkout/AmazonPayLogin.twig @@ -18,7 +18,6 @@ "workOrderId": "{{ content.workOrderId }}" }, function (data) { - //$('#LoginWithAmazon').append(data); $("body").append(data); }); From 6730b9c0df4dfb1ee3b0ba31567e5f60dd61cc82 Mon Sep 17 00:00:00 2001 From: Jens Konopka Date: Fri, 25 Sep 2020 07:23:05 +0200 Subject: [PATCH 277/353] add annotation types --- .../lib/PayoneApi/Request/Authorization/RequestFactory.php | 4 ++-- resources/lib/PayoneApi/Request/Capture/Capture.php | 2 +- resources/lib/PayoneApi/Request/Capture/RequestFactory.php | 2 +- resources/lib/PayoneApi/Request/Debit/RequestFactory.php | 2 +- .../Request/GenericPayment/GenericPaymentRequestFactory.php | 2 +- resources/lib/PayoneApi/Request/GetInvoice/RequestFactory.php | 2 +- .../Request/Managemandate/ManageMandateRequestFactory.php | 2 +- resources/lib/PayoneApi/Request/Parts/CartFactory.php | 1 + resources/lib/PayoneApi/Request/Refund/RequestFactory.php | 2 +- 9 files changed, 10 insertions(+), 9 deletions(-) diff --git a/resources/lib/PayoneApi/Request/Authorization/RequestFactory.php b/resources/lib/PayoneApi/Request/Authorization/RequestFactory.php index fc06b410..ff9f51e8 100644 --- a/resources/lib/PayoneApi/Request/Authorization/RequestFactory.php +++ b/resources/lib/PayoneApi/Request/Authorization/RequestFactory.php @@ -21,13 +21,13 @@ class RequestFactory implements RequestFactoryContract /** * @param string $paymentMethod * @param array $data - * @param bool $referenceId + * @param string|null $referenceId * * @throws \Exception * * @return AuthorizationRequestAbstract */ - public static function create(string $paymentMethod, array $data, $referenceId = null) + public static function create(string $paymentMethod, array $data, string $referenceId = null) { $genericAuthRequest = GenericAuthRequestFactory::create(static::$requestType, $data); switch ($paymentMethod) { diff --git a/resources/lib/PayoneApi/Request/Capture/Capture.php b/resources/lib/PayoneApi/Request/Capture/Capture.php index b566e8b5..8cdc3018 100644 --- a/resources/lib/PayoneApi/Request/Capture/Capture.php +++ b/resources/lib/PayoneApi/Request/Capture/Capture.php @@ -39,7 +39,7 @@ class Capture * @param string $txid * @param string $capturemode * @param string $settleaccount - * @param Cart $cart + * @param Cart|null $cart */ public function __construct( GenericRequest $request, diff --git a/resources/lib/PayoneApi/Request/Capture/RequestFactory.php b/resources/lib/PayoneApi/Request/Capture/RequestFactory.php index e9e1f216..c74790a3 100644 --- a/resources/lib/PayoneApi/Request/Capture/RequestFactory.php +++ b/resources/lib/PayoneApi/Request/Capture/RequestFactory.php @@ -14,7 +14,7 @@ class RequestFactory implements RequestFactoryContract /** * @param string $paymentMethod * @param array $data - * @param string $referenceId + * @param string|null $referenceId * * @return Capture|RequestDataContract */ diff --git a/resources/lib/PayoneApi/Request/Debit/RequestFactory.php b/resources/lib/PayoneApi/Request/Debit/RequestFactory.php index 75a9ac93..846b4ba6 100644 --- a/resources/lib/PayoneApi/Request/Debit/RequestFactory.php +++ b/resources/lib/PayoneApi/Request/Debit/RequestFactory.php @@ -13,7 +13,7 @@ class RequestFactory implements RequestFactoryContract /** * @param string $paymentMethod * @param array $data - * @param string $referenceId + * @param string|null $referenceId * * @return Debit|\PayoneApi\Request\RequestDataContract */ diff --git a/resources/lib/PayoneApi/Request/GenericPayment/GenericPaymentRequestFactory.php b/resources/lib/PayoneApi/Request/GenericPayment/GenericPaymentRequestFactory.php index 82c64988..db02d304 100644 --- a/resources/lib/PayoneApi/Request/GenericPayment/GenericPaymentRequestFactory.php +++ b/resources/lib/PayoneApi/Request/GenericPayment/GenericPaymentRequestFactory.php @@ -12,7 +12,7 @@ class GenericPaymentRequestFactory /** * @param string $paymentMethod * @param array $data - * @param string $referenceId + * @param string|null $referenceId * @return mixed */ public static function create(string $paymentMethod, array $data, string $referenceId = null) diff --git a/resources/lib/PayoneApi/Request/GetInvoice/RequestFactory.php b/resources/lib/PayoneApi/Request/GetInvoice/RequestFactory.php index a293e4ef..def91c76 100644 --- a/resources/lib/PayoneApi/Request/GetInvoice/RequestFactory.php +++ b/resources/lib/PayoneApi/Request/GetInvoice/RequestFactory.php @@ -13,7 +13,7 @@ class RequestFactory implements RequestFactoryContract /** * @param string $paymentMethod * @param array $data - * @param string $referenceId + * @param string|null $referenceId * * @return GetInvoice */ diff --git a/resources/lib/PayoneApi/Request/Managemandate/ManageMandateRequestFactory.php b/resources/lib/PayoneApi/Request/Managemandate/ManageMandateRequestFactory.php index dea2968c..680da890 100644 --- a/resources/lib/PayoneApi/Request/Managemandate/ManageMandateRequestFactory.php +++ b/resources/lib/PayoneApi/Request/Managemandate/ManageMandateRequestFactory.php @@ -15,7 +15,7 @@ class ManageMandateRequestFactory implements RequestFactoryContract /** * @param string $paymentMethod * @param array $data - * @param string $referenceId + * @param string|null $referenceId * * @return ManageMandate */ diff --git a/resources/lib/PayoneApi/Request/Parts/CartFactory.php b/resources/lib/PayoneApi/Request/Parts/CartFactory.php index b423f7ee..ff847041 100644 --- a/resources/lib/PayoneApi/Request/Parts/CartFactory.php +++ b/resources/lib/PayoneApi/Request/Parts/CartFactory.php @@ -7,6 +7,7 @@ class CartFactory { /** + * @param array $requestData * @return Cart */ static public function create(array $requestData) diff --git a/resources/lib/PayoneApi/Request/Refund/RequestFactory.php b/resources/lib/PayoneApi/Request/Refund/RequestFactory.php index bc897b3d..3e9ff04f 100644 --- a/resources/lib/PayoneApi/Request/Refund/RequestFactory.php +++ b/resources/lib/PayoneApi/Request/Refund/RequestFactory.php @@ -11,7 +11,7 @@ class RequestFactory implements RequestFactoryContract /** * @param string $paymentMethod * @param array $data - * @param string $referenceId + * @param string|null $referenceId * * @return Refund|\PayoneApi\Request\RequestDataContract */ From fe7e279ae2e348b1a0f272ef09834293754f46bd Mon Sep 17 00:00:00 2001 From: Jens Konopka Date: Fri, 25 Sep 2020 07:57:49 +0200 Subject: [PATCH 278/353] rename genericAmazonPayBaseRequest change doc add return type --- .../AmazonPayConfigurationRequest.php | 2 +- .../AmazonPayConfirmOrderReferenceRequest.php | 2 +- .../AmazonPayGetOrderReferenceRequest.php | 2 +- .../AmazonPaySetOrderReferenceRequest.php | 2 +- ...se.php => GenericAmazonPayRequestBase.php} | 2 +- .../Request/Managemandate/ManageMandate.php | 2 +- .../ConfirmOrderReferenceResponse.php | 2 +- .../GetConfigurationResponse.php | 8 +-- .../GetOrderReferenceDetailsResponse.php | 50 +++++++++---------- .../SetOrderReferenceDetailsResponse.php | 24 ++++----- 10 files changed, 48 insertions(+), 48 deletions(-) rename resources/lib/PayoneApi/Request/GenericPayment/{GenericeRequestBase.php => GenericAmazonPayRequestBase.php} (98%) diff --git a/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayConfigurationRequest.php b/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayConfigurationRequest.php index 2007f5af..38a3b282 100644 --- a/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayConfigurationRequest.php +++ b/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayConfigurationRequest.php @@ -5,7 +5,7 @@ use PayoneApi\Request\Parts\Config; use PayoneApi\Request\Parts\SystemInfo; -class AmazonPayConfigurationRequest extends GenericeRequestBase +class AmazonPayConfigurationRequest extends GenericAmazonPayRequestBase { /** * AmazonPayConfigurationRequest constructor. diff --git a/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayConfirmOrderReferenceRequest.php b/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayConfirmOrderReferenceRequest.php index 6385fc6c..f46a9c6c 100644 --- a/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayConfirmOrderReferenceRequest.php +++ b/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayConfirmOrderReferenceRequest.php @@ -5,7 +5,7 @@ use PayoneApi\Request\Parts\Config; use PayoneApi\Request\Parts\SystemInfo; -class AmazonPayConfirmOrderReferenceRequest extends GenericeRequestBase +class AmazonPayConfirmOrderReferenceRequest extends GenericAmazonPayRequestBase { /** * @var string diff --git a/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayGetOrderReferenceRequest.php b/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayGetOrderReferenceRequest.php index ccd0c02a..421837af 100644 --- a/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayGetOrderReferenceRequest.php +++ b/resources/lib/PayoneApi/Request/GenericPayment/AmazonPayGetOrderReferenceRequest.php @@ -5,7 +5,7 @@ use PayoneApi\Request\Parts\Config; use PayoneApi\Request\Parts\SystemInfo; -class AmazonPayGetOrderReferenceRequest extends GenericeRequestBase +class AmazonPayGetOrderReferenceRequest extends GenericAmazonPayRequestBase { /** * @var string diff --git a/resources/lib/PayoneApi/Request/GenericPayment/AmazonPaySetOrderReferenceRequest.php b/resources/lib/PayoneApi/Request/GenericPayment/AmazonPaySetOrderReferenceRequest.php index 6aa3efdb..a49c99ca 100644 --- a/resources/lib/PayoneApi/Request/GenericPayment/AmazonPaySetOrderReferenceRequest.php +++ b/resources/lib/PayoneApi/Request/GenericPayment/AmazonPaySetOrderReferenceRequest.php @@ -5,7 +5,7 @@ use PayoneApi\Request\Parts\Config; use PayoneApi\Request\Parts\SystemInfo; -class AmazonPaySetOrderReferenceRequest extends GenericeRequestBase +class AmazonPaySetOrderReferenceRequest extends GenericAmazonPayRequestBase { /** * @var string diff --git a/resources/lib/PayoneApi/Request/GenericPayment/GenericeRequestBase.php b/resources/lib/PayoneApi/Request/GenericPayment/GenericAmazonPayRequestBase.php similarity index 98% rename from resources/lib/PayoneApi/Request/GenericPayment/GenericeRequestBase.php rename to resources/lib/PayoneApi/Request/GenericPayment/GenericAmazonPayRequestBase.php index 380b2c52..731182fa 100644 --- a/resources/lib/PayoneApi/Request/GenericPayment/GenericeRequestBase.php +++ b/resources/lib/PayoneApi/Request/GenericPayment/GenericAmazonPayRequestBase.php @@ -10,7 +10,7 @@ use PayoneApi\Request\Types; use PayoneApi\Request\WalletTypes; -class GenericeRequestBase +class GenericAmazonPayRequestBase { /** * @var string diff --git a/resources/lib/PayoneApi/Request/Managemandate/ManageMandate.php b/resources/lib/PayoneApi/Request/Managemandate/ManageMandate.php index 6e69267c..5c4cd654 100644 --- a/resources/lib/PayoneApi/Request/Managemandate/ManageMandate.php +++ b/resources/lib/PayoneApi/Request/Managemandate/ManageMandate.php @@ -170,7 +170,7 @@ public function getSequencenumber() /** * Getter for Amount * - * @return int + * @return null */ public function getAmount() { diff --git a/src/Models/Api/GenericPayment/ConfirmOrderReferenceResponse.php b/src/Models/Api/GenericPayment/ConfirmOrderReferenceResponse.php index 136ed0bd..5f1ed71f 100644 --- a/src/Models/Api/GenericPayment/ConfirmOrderReferenceResponse.php +++ b/src/Models/Api/GenericPayment/ConfirmOrderReferenceResponse.php @@ -41,7 +41,7 @@ public function jsonSerialize(): array /** * @return string */ - public function getWorkOrderId() + public function getWorkOrderId(): string { return $this->workOrderId; } diff --git a/src/Models/Api/GenericPayment/GetConfigurationResponse.php b/src/Models/Api/GenericPayment/GetConfigurationResponse.php index 6498634e..c9d2b8b5 100644 --- a/src/Models/Api/GenericPayment/GetConfigurationResponse.php +++ b/src/Models/Api/GenericPayment/GetConfigurationResponse.php @@ -74,7 +74,7 @@ public function jsonSerialize(): array /** * @return string */ - public function getClientId() + public function getClientId(): string { return $this->clientId; } @@ -82,7 +82,7 @@ public function getClientId() /** * @return string */ - public function getSellerId() + public function getSellerId(): string { return $this->sellerId; } @@ -90,7 +90,7 @@ public function getSellerId() /** * @return string */ - public function getCurrency() + public function getCurrency(): string { return $this->currency; } @@ -98,7 +98,7 @@ public function getCurrency() /** * @return string */ - public function getWorkOrderId() + public function getWorkOrderId(): string { return $this->workOrderId; } diff --git a/src/Models/Api/GenericPayment/GetOrderReferenceDetailsResponse.php b/src/Models/Api/GenericPayment/GetOrderReferenceDetailsResponse.php index d64f75bd..cbcff416 100644 --- a/src/Models/Api/GenericPayment/GetOrderReferenceDetailsResponse.php +++ b/src/Models/Api/GenericPayment/GetOrderReferenceDetailsResponse.php @@ -165,7 +165,7 @@ public function jsonSerialize(): array /** * @return string */ - public function getEmail() + public function getEmail(): string { return $this->email; } @@ -173,7 +173,7 @@ public function getEmail() /** * @return string */ - public function getShippingZip() + public function getShippingZip(): string { return $this->shippingZip; } @@ -181,7 +181,7 @@ public function getShippingZip() /** * @return string */ - public function getShippingStreet() + public function getShippingStreet(): string { return $this->shippingStreet; } @@ -189,7 +189,7 @@ public function getShippingStreet() /** * @return string */ - public function getShippingCompany() + public function getShippingCompany(): string { return $this->shippingCompany; } @@ -197,7 +197,7 @@ public function getShippingCompany() /** * @return string */ - public function getShippingCity() + public function getShippingCity(): string { return $this->shippingCity; } @@ -205,7 +205,7 @@ public function getShippingCity() /** * @return string */ - public function getShippingType() + public function getShippingType(): string { return $this->shippingType; } @@ -213,7 +213,7 @@ public function getShippingType() /** * @return string */ - public function getShippingCountry() + public function getShippingCountry(): string { return $this->shippingCountry; } @@ -221,7 +221,7 @@ public function getShippingCountry() /** * @return string */ - public function getShippingDistrict() + public function getShippingDistrict(): string { return $this->shippingDistrict; } @@ -229,7 +229,7 @@ public function getShippingDistrict() /** * @return string */ - public function getShippingTelephonenumber() + public function getShippingTelephonenumber(): string { return $this->shippingTelephonenumber; } @@ -237,7 +237,7 @@ public function getShippingTelephonenumber() /** * @return string */ - public function getShippingState() + public function getShippingState(): string { return $this->shippingState; } @@ -245,7 +245,7 @@ public function getShippingState() /** * @return string */ - public function getShippingFirstname() + public function getShippingFirstname(): string { return $this->shippingFirstname; } @@ -253,7 +253,7 @@ public function getShippingFirstname() /** * @return string */ - public function getShippingLastname() + public function getShippingLastname(): string { return $this->shippingLastname; } @@ -261,7 +261,7 @@ public function getShippingLastname() /** * @return string */ - public function getBillingZip() + public function getBillingZip(): string { return $this->billingZip; } @@ -269,7 +269,7 @@ public function getBillingZip() /** * @return string */ - public function getBillingStreet() + public function getBillingStreet(): string { return $this->billingStreet; } @@ -277,7 +277,7 @@ public function getBillingStreet() /** * @return string */ - public function getBillingCompany() + public function getBillingCompany(): string { return $this->billingCompany; } @@ -285,7 +285,7 @@ public function getBillingCompany() /** * @return string */ - public function getBillingCity() + public function getBillingCity(): string { return $this->billingCity; } @@ -293,7 +293,7 @@ public function getBillingCity() /** * @return string */ - public function getBillingType() + public function getBillingType(): string { return $this->billingType; } @@ -301,7 +301,7 @@ public function getBillingType() /** * @return string */ - public function getBillingCountry() + public function getBillingCountry(): string { return $this->billingCountry; } @@ -309,7 +309,7 @@ public function getBillingCountry() /** * @return string */ - public function getBillingFirstname() + public function getBillingFirstname(): string { return $this->billingFirstname; } @@ -317,7 +317,7 @@ public function getBillingFirstname() /** * @return string */ - public function getBillingLastname() + public function getBillingLastname(): string { return $this->billingLastname; } @@ -325,7 +325,7 @@ public function getBillingLastname() /** * @return string */ - public function getBillingDistrict() + public function getBillingDistrict(): string { return $this->billingDistrict; } @@ -333,7 +333,7 @@ public function getBillingDistrict() /** * @return string */ - public function getBillingTelephonenumber() + public function getBillingTelephonenumber(): string { return $this->billingTelephonenumber; } @@ -341,7 +341,7 @@ public function getBillingTelephonenumber() /** * @return string */ - public function getBillingState() + public function getBillingState(): string { return $this->billingState; } @@ -349,7 +349,7 @@ public function getBillingState() /** * @return string */ - public function getStorename() + public function getStorename(): string { return $this->storename; } @@ -357,7 +357,7 @@ public function getStorename() /** * @return string */ - public function getWorkOrderId() + public function getWorkOrderId(): string { return $this->workOrderId; } diff --git a/src/Models/Api/GenericPayment/SetOrderReferenceDetailsResponse.php b/src/Models/Api/GenericPayment/SetOrderReferenceDetailsResponse.php index 6222880a..77debe8e 100644 --- a/src/Models/Api/GenericPayment/SetOrderReferenceDetailsResponse.php +++ b/src/Models/Api/GenericPayment/SetOrderReferenceDetailsResponse.php @@ -91,49 +91,49 @@ public function getTransactionID(): string } /** - * @return mixed + * @return string */ - public function getAmazonAddressToken() + public function getAmazonAddressToken(): string { return $this->amazonAddressToken; } /** - * @return mixed + * @return string */ - public function getAmazonReferenceId() + public function getAmazonReferenceId(): string { return $this->amazonReferenceId; } /** - * @return mixed + * @return string */ - public function getStorename() + public function getStorename(): string { return $this->storename; } /** - * @return mixed + * @return string */ - public function getAmount() + public function getAmount(): string { return $this->amount; } /** - * @return mixed + * @return string */ - public function getCurrency() + public function getCurrency(): string { return $this->currency; } /** - * @return mixed + * @return string */ - public function getWorkOrderId() + public function getWorkOrderId(): string { return $this->workOrderId; } From 143e4335829bd08a00f398778f88d9146afc640b Mon Sep 17 00:00:00 2001 From: Jens Konopka Date: Fri, 25 Sep 2020 11:08:07 +0200 Subject: [PATCH 279/353] avoid double buttons --- resources/views/Checkout/AmazonPayCheckout.twig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/resources/views/Checkout/AmazonPayCheckout.twig b/resources/views/Checkout/AmazonPayCheckout.twig index 254b7e5c..6ca7fcd4 100644 --- a/resources/views/Checkout/AmazonPayCheckout.twig +++ b/resources/views/Checkout/AmazonPayCheckout.twig @@ -10,7 +10,7 @@ {% else %} diff --git a/src/Providers/PayoneServiceProvider.php b/src/Providers/PayoneServiceProvider.php index 7a195db3..97647ef6 100755 --- a/src/Providers/PayoneServiceProvider.php +++ b/src/Providers/PayoneServiceProvider.php @@ -485,8 +485,9 @@ protected function registerAmazonPayListener(Dispatcher $eventDispatcher, Basket $basketData = $basket->load(); $resourceContainer->addScriptTemplate( PluginConstants::NAME . '::Checkout.AmazonPayCheckout', [ - 'selectedPaymentId' => $basketData->methodOfPaymentId, - 'amazonPayMopId' => $amazonPayMopId + 'selectedPaymentId' => $basketData->methodOfPaymentId, + 'amazonPayMopId' => $amazonPayMopId, + 'sandbox' => (bool)$settingsService->getPaymentSettingsValue('Sandbox', PayoneAmazonPayPaymentMethod::PAYMENT_CODE) ]); } }); From e006bbd14f42148f83fdbb54ce4ad7dad52952b8 Mon Sep 17 00:00:00 2001 From: jawendel Date: Thu, 25 Feb 2021 11:02:10 +0100 Subject: [PATCH 319/353] Textanpassungen --- meta/documents/changelog_de.md | 6 +++--- meta/documents/changelog_en.md | 10 +++++----- resources/lang/de/Template.properties | 12 +++++------ .../lang/en/MultilingualismConfig.properties | 2 +- resources/lang/en/PaymentMethods.properties | 20 +++++++++---------- resources/lang/en/Template.properties | 20 +++++++++---------- 6 files changed, 35 insertions(+), 35 deletions(-) diff --git a/meta/documents/changelog_de.md b/meta/documents/changelog_de.md index a2a9762a..16bdf7ef 100644 --- a/meta/documents/changelog_de.md +++ b/meta/documents/changelog_de.md @@ -3,10 +3,10 @@ ## 2.0.0 ### TODO -- Es muss der Assistent in jedem verknüpften Set durchlaufen werden um das Plugin zu konfigurieren. +- Der Assistent muss in jedem verknüpften Plugin-Set durchlaufen werden, um das Plugin zu konfigurieren. ### Hinzugefügt -- Die Einstellungen für das Payone-Plugin wurden in einen Assistenten überführt. Es ist nun Möglich das Plugin pro Set und pro Mandanten zu konfigurieren. +- Die Einstellungen für das Payone-Plugin wurden in einen Assistenten überführt. Es ist nun möglich das Plugin pro Plugin-Set und pro Mandant zu konfigurieren. ## 1.3.0 @@ -107,7 +107,7 @@ ## 1.1.2 ### Geändert -- Die Eingabe des Geburtsdatums ist nun im Bestellprozess ein Pflichtfeld. Dieses Feld muss in den Einstellungen von Ceres für den Bestellprozess aktiviert werden. +- Die Eingabe des Geburtsdatums ist nun im Bestellprozess ein Pflichtfeld. Dieses Feld muss in den Einstellungen von Ceres für den Bestellprozess aktiviert werden. ### Hinzugefügt - Netto Bestellungen können nun durchgeführt werden. diff --git a/meta/documents/changelog_en.md b/meta/documents/changelog_en.md index 99c8b0d5..d9b2cbca 100644 --- a/meta/documents/changelog_en.md +++ b/meta/documents/changelog_en.md @@ -3,10 +3,10 @@ ## 2.0.0 ### TODO -- It is necessary to go through the assistant in each linked set to configure the plugin. +- To configure the plugin, it is necessary to complete the assistant in each linked plugin set. ### Hinzugefügt -- The settings for the Payone plugin have been transferred to an assistant. It is now possible to configure the plugin per set and per client. +- The settings for the Payone plugin have been transferred to an assistant. It is now possible to configure the plugin per plugin set and per client. ## 1.3.0 @@ -61,7 +61,7 @@ ## 1.1.9 ### Fixed -- Partial refunds can now be executed more than once. Under certain constellations an error came up. +- Partial refunds can now be executed more than once. Under certain constellations an error came up. ## 1.1.8 @@ -85,7 +85,7 @@ ## 1.1.5 ### Fixed -- External orders will be created correct without skipping by the plugin. +- External orders will be created correct without skipping by the plugin. ## 1.1.4 @@ -118,7 +118,7 @@ - An error causing the creation of duplicate orders during payment processing has been fixed - An error with the credit card type selection was fixed -## 1.1.0 +## 1.1.0 ### Changed - Support is now within the responsibility of plentysystems diff --git a/resources/lang/de/Template.properties b/resources/lang/de/Template.properties index cff23813..7d208996 100755 --- a/resources/lang/de/Template.properties +++ b/resources/lang/de/Template.properties @@ -1,5 +1,5 @@ -orderErrorTitle = "Bestellung nicht möglich" -orderErrorMessage = "Diese Zahlung konnte nicht durchgeführt werden. Dies kann unterschiedliche Gründe haben, wie etwa fehlerhafte Eingabedaten, eine unbekannte Adresse, oder ein vorübergehendes technisches Problem. Bitte überprüfen Sie die angegebenen Daten, oder wählen Sie ein anderes Zahlungsmittel." +orderErrorTitle = "Bestellung ist nicht möglich." +orderErrorMessage = "Diese Zahlung konnte nicht durchgeführt werden. Dies kann unterschiedliche Gründe haben, wie etwa fehlerhafte Eingabedaten, eine unbekannte Adresse oder ein vorübergehendes technisches Problem. Bitte überprüfen Sie die angegebenen Daten, oder wählen Sie ein anderes Zahlungsmittel." orderPlace= "Bestellung abschließen" orderCancel= "Abbrechen" continue= "Weiter" @@ -9,10 +9,10 @@ ccValidTo = "Gültig bis" firstName = "Vorname" lastName = "Nachname" -sepaMandateConsent = "Hiermit erteile ich ein elektronisches Sepamandat." +sepaMandateConsent = "Hiermit erteile ich ein elektronisches SEPA-Lastschriftmandat." yourBankAccount = "Ihre Bankverbindung" -accountHolder = "Konto Inhaber" +accountHolder = "Kontoinhaber" -mandateTitle = "Um eine SEPA-Basislastschrift durchzuführen, benötigen wir ein SEPA Mandat vom Kontoinhaber." +mandateTitle = "Um eine SEPA-Basislastschrift durchzuführen, benötigen wir ein SEPA-Lastschriftmandat vom Kontoinhaber." -missingDateOfBirth = "Bitte geben Sie ein Geburtsdatum an." \ No newline at end of file +missingDateOfBirth = "Bitte geben Sie ein Geburtsdatum an." diff --git a/resources/lang/en/MultilingualismConfig.properties b/resources/lang/en/MultilingualismConfig.properties index 3dccea4c..471210eb 100644 --- a/resources/lang/en/MultilingualismConfig.properties +++ b/resources/lang/en/MultilingualismConfig.properties @@ -1,3 +1,3 @@ ; sections -paymentMethod = "Zahlungsart" +paymentMethod = "Payment method" template = "Mitteilungen" diff --git a/resources/lang/en/PaymentMethods.properties b/resources/lang/en/PaymentMethods.properties index ac84c7ba..a4b14e15 100644 --- a/resources/lang/en/PaymentMethods.properties +++ b/resources/lang/en/PaymentMethods.properties @@ -1,24 +1,24 @@ -PAYONE_PAYONE_INVOICE=Rechnung +PAYONE_PAYONE_INVOICE=Invoice PAYONE_PAYONE_INVOICE_DESCRIPTION= PAYONE_PAYONE_PAYDIREKT=Paydirekt PAYONE_PAYONE_PAYDIREKT_DESCRIPTION= -PAYONE_PAYONE_PAYOLUTION_INSTALLMENT=Payolution Ratenzahlung +PAYONE_PAYONE_PAYOLUTION_INSTALLMENT=Payolution Installments PAYONE_PAYONE_PAYOLUTION_INSTALLMENT_DESCRIPTION= PAYONE_PAYONE_PAY_PAL=PayPal PAYONE_PAYONE_PAY_PAL_DESCRIPTION= -PAYONE_PAYONE_RATEPAY_INSTALLMENT=Ratepay Ratenzahlung +PAYONE_PAYONE_RATEPAY_INSTALLMENT=RatePay Installments PAYONE_PAYONE_RATEPAY_INSTALLMENT_DESCRIPTION= -PAYONE_PAYONE_SOFORT=Sofortüberweisung +PAYONE_PAYONE_SOFORT=Online bank transfer PAYONE_PAYONE_SOFORT_DESCRIPTION= -PAYONE_PAYONE_CASH_ON_DELIVERY=Nachnahme +PAYONE_PAYONE_CASH_ON_DELIVERY=Cash on delivery PAYONE_PAYONE_CASH_ON_DELIVERY_DESCRIPTION= -PAYONE_PAYONE_PRE_PAYMENT=Vorkasse +PAYONE_PAYONE_PRE_PAYMENT=Cash in advance PAYONE_PAYONE_PRE_PAYMENT_DESCRIPTION= -PAYONE_PAYONE_CREDIT_CARD=Kreditkarte +PAYONE_PAYONE_CREDIT_CARD=Credit card PAYONE_PAYONE_CREDIT_CARD_DESCRIPTION= -PAYONE_PAYONE_DIRECT_DEBIT=Lastschrift +PAYONE_PAYONE_DIRECT_DEBIT=Debit PAYONE_PAYONE_DIRECT_DEBIT_DESCRIPTION= -PAYONE_PAYONE_INVOICE_SECURE=Gesicherte Rechnung +PAYONE_PAYONE_INVOICE_SECURE=Payone Secure Invoice PAYONE_PAYONE_INVOICE_SECURE_DESCRIPTION= PAYONE_PAYONE_AMAZON_PAY=Amazon Pay -PAYONE_PAYONE_AMAZON_PAY_DESCRIPTION= \ No newline at end of file +PAYONE_PAYONE_AMAZON_PAY_DESCRIPTION= diff --git a/resources/lang/en/Template.properties b/resources/lang/en/Template.properties index 52817a04..69de6550 100755 --- a/resources/lang/en/Template.properties +++ b/resources/lang/en/Template.properties @@ -1,19 +1,19 @@ -orderErrorTitle = "Order failed" -orderErrorMessage = "The payment has not been possible. This can be for a variety of reasons, such as incorrect input data, an unknown address, or a temporary technical problem. Please check your input data or choose a different payment method." -orderPlace= "Place Order" +orderErrorTitle = "Order has failed." +orderErrorMessage = "This payment could not be made. This can be for a variety of reasons, such as incorrect input data, an unknown address or a temporary technical problem. Please check your input data or choose a different payment method." +orderPlace= "Place order" orderCancel= "Cancel" continue= "Continue" -ccType = "Card Type" +ccType = "Card type" ccNumber = "Number" -ccValidTo = "Valid To" -firstName = "Firstname" -lastName = "Lastname" +ccValidTo = "Valid until" +firstName = "First name" +lastName = "Last name" -sepaMandateConsent = "I wish to grant the mandate through electronic submission" +sepaMandateConsent = "I wish to grant the electronic SEPA direct direct mandate." yourBankAccount = "Your bank account" accountHolder = "Account holder -mandateTitle = "In order to perform a SEPA Core Direct Debit, we need a mandate from the account holder." +mandateTitle = "In order to perform a SEPA core direct debit, we need a SEPA direct direct mandate from the account holder." -missingDateOfBirth = "Please enter a date of birth." \ No newline at end of file +missingDateOfBirth = "Please enter a date of birth." From 831a0b35dcd42f3031102fd1c5f580a2498dc79c Mon Sep 17 00:00:00 2001 From: jawendel Date: Thu, 25 Feb 2021 11:03:29 +0100 Subject: [PATCH 320/353] Missing translation --- resources/lang/en/MultilingualismConfig.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/lang/en/MultilingualismConfig.properties b/resources/lang/en/MultilingualismConfig.properties index 471210eb..86121c29 100644 --- a/resources/lang/en/MultilingualismConfig.properties +++ b/resources/lang/en/MultilingualismConfig.properties @@ -1,3 +1,3 @@ ; sections paymentMethod = "Payment method" -template = "Mitteilungen" +template = "Notes" From 2cd72be076dc5b7b38df50ff43b70c122d2c8220 Mon Sep 17 00:00:00 2001 From: Jens Konopka Date: Thu, 25 Feb 2021 14:29:21 +0100 Subject: [PATCH 321/353] fix sandbox param --- resources/views/Checkout/AmazonPayCheckout.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/Checkout/AmazonPayCheckout.twig b/resources/views/Checkout/AmazonPayCheckout.twig index a00204c7..90b78279 100644 --- a/resources/views/Checkout/AmazonPayCheckout.twig +++ b/resources/views/Checkout/AmazonPayCheckout.twig @@ -1,7 +1,7 @@ {% if services.template.isCurrentTemplate('tpl.checkout') %} - {% if {{ sandbox }} %} + {% if sandbox %} {% else %} From 6e23c7643728b50d60f4efb6bec9ccb8ce3834b7 Mon Sep 17 00:00:00 2001 From: Jens Konopka Date: Thu, 25 Feb 2021 15:47:16 +0100 Subject: [PATCH 322/353] fix assistant settings --- .../DataSources/AssistantDataSource.php | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/Assistants/DataSources/AssistantDataSource.php b/src/Assistants/DataSources/AssistantDataSource.php index a8013f47..d39ea6bc 100644 --- a/src/Assistants/DataSources/AssistantDataSource.php +++ b/src/Assistants/DataSources/AssistantDataSource.php @@ -128,37 +128,37 @@ public function getByOptionId(string $optionId = 'default'): array $accountSettings = $settingsService->getSettings((int)$optionId, (int)$this->pluginSetRepositoryContract->getCurrentPluginSetId()); $assistant['clientId'] = $optionId; if(!is_null($accountSettings)) { - $assistant['mid'] = $accountSettings->value['mid'] ?? ""; - $assistant['portalId'] = $accountSettings->value['portalId'] ?? ""; - $assistant['aid'] = $accountSettings->value['aid'] ?? ""; - $assistant['key'] = $accountSettings->value['key'] ?? ""; - $assistant['mode'] = $accountSettings->value['mode'] ?? 1; - $assistant['authType'] = $accountSettings->value['authType'] ?? 1; - $assistant['userId'] = $accountSettings->value['userId'] ?? 0; + $assistant['mid'] = $accountSettings->value['mid'] ?: ""; + $assistant['portalId'] = $accountSettings->value['portalId'] ?: ""; + $assistant['aid'] = $accountSettings->value['aid'] ?: ""; + $assistant['key'] = $accountSettings->value['key'] ?: ""; + $assistant['mode'] = $accountSettings->value['mode'] ?: 1; + $assistant['authType'] = $accountSettings->value['authType'] ?: 1; + $assistant['userId'] = $accountSettings->value['userId'] ?: 0; //Payone Payment Methods if($accountSettings->value['payoneMethods']) { foreach ($accountSettings->value['payoneMethods'] as $paymentCode => $value) { $assistant[$paymentCode . 'Toggle'] = (bool)$value['active']; - $assistant[$paymentCode . 'MinimumAmount'] = $value['MinimumAmount'] ?? 0; - $assistant[$paymentCode . 'MaximumAmount'] = $value['MaximumAmount'] ?? 2000; + $assistant[$paymentCode . 'MinimumAmount'] = $value['MinimumAmount'] ?: 0; + $assistant[$paymentCode . 'MaximumAmount'] = $value['MaximumAmount'] ?: 2000; $assistant[$paymentCode . 'AllowedDeliveryCountries'] = is_array($value['AllowedDeliveryCountries']) ? $value['AllowedDeliveryCountries'] : []; - $assistant[$paymentCode . 'AuthType'] = $value['AuthType'] ?? -1; + $assistant[$paymentCode . 'AuthType'] = $value['AuthType'] ?: -1; switch ($paymentCode) { case 'PAYONE_PAYONE_INVOICE_SECURE': - $assistant[$paymentCode]['portalId'] = $value['portalId'] ?? ''; - $assistant[$paymentCode]['key'] = $value['key'] ?? ''; + $assistant[$paymentCode.'portalId'] = $value['portalId'] ?: ''; + $assistant[$paymentCode.'key'] = $value['key'] ?: ''; break; case 'PAYONE_PAYONE_CREDIT_CARD': - $assistant[$paymentCode]['minExpireTime'] = (int)$value['minExpireTime'] ?? 30; - $assistant[$paymentCode]['defaultStyle'] = $value['defaultStyle'] ?? 'font-family: Helvetica; padding: 10.5px 21px; color: #7a7f7f; font-size: 17.5px; height:100%'; - $assistant[$paymentCode]['defaultHeightInPx'] = (int)$value['defaultHeightInPx'] ?? 44; - $assistant[$paymentCode]['defaultWidthInPx'] = (int)$value['defaultWidthInPx'] ?? 644; - $assistant[$paymentCode]['AllowedCardTypes'] = is_array($value['AllowedCardTypes']) ? $value['AllowedCardTypes'] : []; + $assistant[$paymentCode.'minExpireTime'] = (int)$value['minExpireTime'] ?: 30; + $assistant[$paymentCode.'defaultStyle'] = $value['defaultStyle'] ?: 'font-family: Helvetica; padding: 10.5px 21px; color: #7a7f7f; font-size: 17.5px; height:100%'; + $assistant[$paymentCode.'defaultHeightInPx'] = (int)$value['defaultHeightInPx'] ?: 44; + $assistant[$paymentCode.'defaultWidthInPx'] = (int)$value['defaultWidthInPx'] ?: 644; + $assistant[$paymentCode.'AllowedCardTypes'] = is_array($value['AllowedCardTypes']) ? $value['AllowedCardTypes'] : []; break; case 'PAYONE_PAYONE_AMAZON_PAY': - $assistant[$paymentCode]['Sandbox'] = (int)$value['Sandbox'] ?? 1; + $assistant[$paymentCode.'Sandbox'] = (int)$value['Sandbox'] ?: 1; break; } } From 297cc7d98c58d40b1c8701c9c5cd8c6df67ce83a Mon Sep 17 00:00:00 2001 From: Jens Konopka Date: Thu, 25 Feb 2021 20:04:32 +0100 Subject: [PATCH 323/353] update delivery countries fix assistant options --- .../DataSources/AssistantDataSource.php | 36 +++++++++---------- src/Assistants/PayoneAssistant.php | 26 ++++++++++---- .../AssistantSettingsHandler.php | 14 ++++---- 3 files changed, 44 insertions(+), 32 deletions(-) diff --git a/src/Assistants/DataSources/AssistantDataSource.php b/src/Assistants/DataSources/AssistantDataSource.php index d39ea6bc..26fc9168 100644 --- a/src/Assistants/DataSources/AssistantDataSource.php +++ b/src/Assistants/DataSources/AssistantDataSource.php @@ -128,37 +128,37 @@ public function getByOptionId(string $optionId = 'default'): array $accountSettings = $settingsService->getSettings((int)$optionId, (int)$this->pluginSetRepositoryContract->getCurrentPluginSetId()); $assistant['clientId'] = $optionId; if(!is_null($accountSettings)) { - $assistant['mid'] = $accountSettings->value['mid'] ?: ""; - $assistant['portalId'] = $accountSettings->value['portalId'] ?: ""; - $assistant['aid'] = $accountSettings->value['aid'] ?: ""; - $assistant['key'] = $accountSettings->value['key'] ?: ""; - $assistant['mode'] = $accountSettings->value['mode'] ?: 1; - $assistant['authType'] = $accountSettings->value['authType'] ?: 1; - $assistant['userId'] = $accountSettings->value['userId'] ?: 0; + $assistant['mid'] = $accountSettings->value['mid'] ?? ""; + $assistant['portalId'] = $accountSettings->value['portalId'] ?? ""; + $assistant['aid'] = $accountSettings->value['aid'] ?? ""; + $assistant['key'] = $accountSettings->value['key'] ?? ""; + $assistant['mode'] = $accountSettings->value['mode'] ?? 1; + $assistant['authType'] = $accountSettings->value['authType'] ?? 1; + $assistant['userId'] = $accountSettings->value['userId'] ?? 0; //Payone Payment Methods if($accountSettings->value['payoneMethods']) { foreach ($accountSettings->value['payoneMethods'] as $paymentCode => $value) { - $assistant[$paymentCode . 'Toggle'] = (bool)$value['active']; - $assistant[$paymentCode . 'MinimumAmount'] = $value['MinimumAmount'] ?: 0; - $assistant[$paymentCode . 'MaximumAmount'] = $value['MaximumAmount'] ?: 2000; + $assistant[$paymentCode . 'Toggle'] = (bool)($value['active'] ?? false); + $assistant[$paymentCode . 'MinimumAmount'] = $value['MinimumAmount'] ?? 0; + $assistant[$paymentCode . 'MaximumAmount'] = $value['MaximumAmount'] ?? 2000; $assistant[$paymentCode . 'AllowedDeliveryCountries'] = is_array($value['AllowedDeliveryCountries']) ? $value['AllowedDeliveryCountries'] : []; - $assistant[$paymentCode . 'AuthType'] = $value['AuthType'] ?: -1; + $assistant[$paymentCode . 'AuthType'] = $value['AuthType'] ?? -1; switch ($paymentCode) { case 'PAYONE_PAYONE_INVOICE_SECURE': - $assistant[$paymentCode.'portalId'] = $value['portalId'] ?: ''; - $assistant[$paymentCode.'key'] = $value['key'] ?: ''; + $assistant[$paymentCode.'portalId'] = $value['portalId'] ?? ''; + $assistant[$paymentCode.'key'] = $value['key'] ?? ''; break; case 'PAYONE_PAYONE_CREDIT_CARD': - $assistant[$paymentCode.'minExpireTime'] = (int)$value['minExpireTime'] ?: 30; - $assistant[$paymentCode.'defaultStyle'] = $value['defaultStyle'] ?: 'font-family: Helvetica; padding: 10.5px 21px; color: #7a7f7f; font-size: 17.5px; height:100%'; - $assistant[$paymentCode.'defaultHeightInPx'] = (int)$value['defaultHeightInPx'] ?: 44; - $assistant[$paymentCode.'defaultWidthInPx'] = (int)$value['defaultWidthInPx'] ?: 644; + $assistant[$paymentCode.'minExpireTime'] = (int)($value['minExpireTime'] ?? 30); + $assistant[$paymentCode.'defaultStyle'] = $value['defaultStyle'] ?? 'font-family: Helvetica; padding: 10.5px 21px; color: #7a7f7f; font-size: 17.5px; height:100%'; + $assistant[$paymentCode.'defaultHeightInPx'] = (int)($value['defaultHeightInPx'] ?? 44); + $assistant[$paymentCode.'defaultWidthInPx'] = (int)($value['defaultWidthInPx'] ?? 644); $assistant[$paymentCode.'AllowedCardTypes'] = is_array($value['AllowedCardTypes']) ? $value['AllowedCardTypes'] : []; break; case 'PAYONE_PAYONE_AMAZON_PAY': - $assistant[$paymentCode.'Sandbox'] = (int)$value['Sandbox'] ?: 1; + $assistant[$paymentCode.'Sandbox'] = (int)($value['Sandbox'] ?? 1); break; } } diff --git a/src/Assistants/PayoneAssistant.php b/src/Assistants/PayoneAssistant.php index 04f9645f..71fce484 100644 --- a/src/Assistants/PayoneAssistant.php +++ b/src/Assistants/PayoneAssistant.php @@ -27,6 +27,11 @@ class PayoneAssistant extends WizardProvider */ protected $activeCountries; + /** + * @var array + */ + protected $activeCountries4AmazonPay; + /** * PayoneAssistant constructor. * @param PaymentHelper $paymentHelper @@ -374,7 +379,7 @@ protected function createAmazonPayStep(array $config, string $paymentCode): arra + [ $paymentCode.'AllowedDeliveryCountries' => [ 'type' => 'checkboxGroup', - 'defaultValue' => $this->getActiveCountriesValues(), + 'defaultValue' => $this->activeCountries4AmazonPay, 'options' => [ 'name' => 'Assistant.allowedDeliveryCountries', 'required' => true, @@ -447,7 +452,7 @@ protected function getDeliveryCountriesConfig(string $paymentCode): array return [ $paymentCode.'AllowedDeliveryCountries' => [ 'type' => 'checkboxGroup', - 'defaultValue' => $this->getActiveCountriesValues(), + 'defaultValue' => $this->activeCountries, 'options' => [ 'name' => 'Assistant.allowedDeliveryCountries', 'required' => true, @@ -587,20 +592,27 @@ protected function getDeliveryCountries4AmazonPay(): array } /** - * @return array + * Load the active country values */ - protected function getActiveCountriesValues(): array + protected function loadActiveCountriesValues() { - if ($this->activeCountries === null) { + if ($this->activeCountries === null || $this->activeCountries4AmazonPay) { /** @var CountryRepositoryContract $countryRepository */ $countryRepository = pluginApp(CountryRepositoryContract::class); $activeCountries = $countryRepository->getActiveCountriesList(); /** @var Country $country */ foreach($activeCountries as $country){ - $this->activeCountries[] = $country->isoCode2; + // All Payone payment methods + if(in_array($country->isoCode2, ['DE', 'AT', 'CH'])) { + $this->activeCountries[] = $country->isoCode2; + } + + // Amazon Pay over Payone + if(in_array($country->isoCode2, ['DE', 'FR', 'IT', 'ES', 'LU', 'NL', 'SE', 'PT', 'HU', 'DK'])) { + $this->activeCountries4AmazonPay[] = $country->isoCode2; + } } } - return $this->activeCountries; } /** diff --git a/src/Assistants/SettingsHandlers/AssistantSettingsHandler.php b/src/Assistants/SettingsHandlers/AssistantSettingsHandler.php index f3df01ac..3be461fb 100644 --- a/src/Assistants/SettingsHandlers/AssistantSettingsHandler.php +++ b/src/Assistants/SettingsHandlers/AssistantSettingsHandler.php @@ -51,21 +51,21 @@ public function handle(array $parameter): bool $payoneMethods[$paymentCode]['key'] = $data[$paymentCode.'key'] ?? ''; break; case 'PAYONE_PAYONE_CREDIT_CARD': - $payoneMethods[$paymentCode]['minExpireTime'] = (int)$data[$paymentCode.'minExpireTime'] ?? 30; + $payoneMethods[$paymentCode]['minExpireTime'] = (int)($data[$paymentCode.'minExpireTime'] ?? 30); $payoneMethods[$paymentCode]['defaultStyle'] = $data[$paymentCode.'defaultStyle'] ?? 'font-family: Helvetica; padding: 10.5px 21px; color: #7a7f7f; font-size: 17.5px; height:100%'; - $payoneMethods[$paymentCode]['defaultHeightInPx'] = (int)$data[$paymentCode.'defaultHeightInPx'] ?? 44; - $payoneMethods[$paymentCode]['defaultWidthInPx'] = (int)$data[$paymentCode.'defaultWidthInPx'] ?? 644; + $payoneMethods[$paymentCode]['defaultHeightInPx'] = (int)($data[$paymentCode.'defaultHeightInPx'] ?? 44); + $payoneMethods[$paymentCode]['defaultWidthInPx'] = (int)($data[$paymentCode.'defaultWidthInPx'] ?? 644); $payoneMethods[$paymentCode]['AllowedCardTypes'] = is_array($data[$paymentCode.'AllowedCardTypes']) ? $data[$paymentCode.'AllowedCardTypes'] : []; break; case 'PAYONE_PAYONE_AMAZON_PAY': - $payoneMethods[$paymentCode]['Sandbox'] = (int)$data[$paymentCode.'Sandbox'] ?? 0; + $payoneMethods[$paymentCode]['Sandbox'] = (int)($data[$paymentCode.'Sandbox'] ?? 0); break; } - $payoneMethods[$paymentCode]['MinimumAmount'] = (int)$data[$paymentCode.'MinimumAmount'] ?? 0; - $payoneMethods[$paymentCode]['MaximumAmount'] = (int)$data[$paymentCode.'MaximumAmount'] ?? 0; + $payoneMethods[$paymentCode]['MinimumAmount'] = (int)($data[$paymentCode.'MinimumAmount'] ?? 0); + $payoneMethods[$paymentCode]['MaximumAmount'] = (int)($data[$paymentCode.'MaximumAmount'] ?? 0); $payoneMethods[$paymentCode]['AllowedDeliveryCountries'] = is_array($data[$paymentCode.'AllowedDeliveryCountries']) ? $data[$paymentCode.'AllowedDeliveryCountries'] : []; - $payoneMethods[$paymentCode]['AuthType'] = (int)$data[$paymentCode.'AuthType'] ?? -1; + $payoneMethods[$paymentCode]['AuthType'] = (int)($data[$paymentCode.'AuthType'] ?? -1); } } From b9ec4f68451d448ed5570173896fbd90de5b0bc5 Mon Sep 17 00:00:00 2001 From: Jens Konopka Date: Mon, 1 Mar 2021 07:33:35 +0100 Subject: [PATCH 324/353] amazon pay fix missing currency --- src/Providers/Api/Request/GenericPaymentDataProvider.php | 9 +++++---- src/Services/AmazonPayService.php | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/Providers/Api/Request/GenericPaymentDataProvider.php b/src/Providers/Api/Request/GenericPaymentDataProvider.php index 5b54a73a..1051d005 100644 --- a/src/Providers/Api/Request/GenericPaymentDataProvider.php +++ b/src/Providers/Api/Request/GenericPaymentDataProvider.php @@ -103,19 +103,20 @@ public function getSetOrderReferenceDetailsRequestData( string $paymentCode, string $workOrderId, string $amazonReferenceId, - string $currency, string $amount, + string $currency = null, int $clientId = null, int $pluginSetId = null ): array { $requestParams = $this->getDefaultPaymentRequestData($paymentCode, $clientId, $pluginSetId); - // Currency not mentioned in API-Doc of Payone - $requestParams['currency'] = $currency; + if(!is_null($currency)) { + // Currency not mentioned in API-Doc of Payone + $requestParams['currency'] = $currency; + } // amount in smallest unit $requestParams['amount'] = $amount * 100; - $requestParams['add_paydata']['action'] = GenericPayment::ACTIONTYPE_SETORDERREFERENCEDETAILS; $requestParams['add_paydata']['amazon_reference_id'] = $amazonReferenceId; $requestParams['workorderid'] = $workOrderId; diff --git a/src/Services/AmazonPayService.php b/src/Services/AmazonPayService.php index e9925c0c..768ae910 100644 --- a/src/Services/AmazonPayService.php +++ b/src/Services/AmazonPayService.php @@ -180,8 +180,8 @@ public function setOrderReference(Basket $basket) PayoneAmazonPayPaymentMethod::PAYMENT_CODE, $workOrderId, $amazonReferenceId, - $basket->currency, - $basket->basketAmount + $basket->basketAmount, + $basket->currency ); /** @var SetOrderReferenceDetailsResponse $orderReferenceResponse */ From 7faae3faa6ea7b55cca30b5181f992194b49eef4 Mon Sep 17 00:00:00 2001 From: Jens Konopka Date: Mon, 1 Mar 2021 07:38:49 +0100 Subject: [PATCH 325/353] fix sofort auth types --- src/Assistants/PayoneAssistant.php | 41 ++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 14 deletions(-) diff --git a/src/Assistants/PayoneAssistant.php b/src/Assistants/PayoneAssistant.php index 71fce484..d343f6df 100644 --- a/src/Assistants/PayoneAssistant.php +++ b/src/Assistants/PayoneAssistant.php @@ -5,6 +5,7 @@ use Payone\Assistants\DataSources\AssistantDataSource; use Payone\Assistants\SettingsHandlers\AssistantSettingsHandler; use Payone\Helpers\PaymentHelper; +use Payone\Methods\PayoneSofortPaymentMethod; use Payone\Models\CreditcardTypes; use Plenty\Modules\Order\Shipping\Countries\Contracts\CountryRepositoryContract; use Plenty\Modules\Order\Shipping\Countries\Models\Country; @@ -468,26 +469,38 @@ protected function getDeliveryCountriesConfig(string $paymentCode): array */ protected function getAuthorizationConfig(string $paymentCode): array { + $listBoxValues = [ + [ + "caption" => 'Assistant.authTypeDefault', + "value" => -1 + ], + [ + "caption" => 'Assistant.authTypeAuthorization', + "value" => 1 + ], + [ + "caption" => 'Assistant.authTypePreAuthorization', + "value" => 0 + ] + ]; + + if($paymentCode == PayoneSofortPaymentMethod::PAYMENT_CODE) { + // Only this auth method available for SOFORT + $listBoxValues = [ + [ + "caption" => 'Assistant.authTypeAuthorization', + "value" => 1 + ] + ]; + } + return [ $paymentCode.'AuthType' => [ 'type' => 'select', "defaultValue" => -1, 'options' => [ 'name' => 'Assistant.authType', - 'listBoxValues' => [ - [ - "caption" => 'Assistant.authTypeDefault', - "value" => -1 - ], - [ - "caption" => 'Assistant.authTypeAuthorization', - "value" => 1 - ], - [ - "caption" => 'Assistant.authTypePreAuthorization', - "value" => 0 - ] - ] + 'listBoxValues' => $listBoxValues ] ] ]; From 1d247f7a9c2efd5e157596442cee0ae15ae1cb8a Mon Sep 17 00:00:00 2001 From: Jens Konopka Date: Mon, 1 Mar 2021 07:40:52 +0100 Subject: [PATCH 326/353] use consts --- src/Assistants/PayoneAssistant.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/Assistants/PayoneAssistant.php b/src/Assistants/PayoneAssistant.php index d343f6df..a748f39f 100644 --- a/src/Assistants/PayoneAssistant.php +++ b/src/Assistants/PayoneAssistant.php @@ -5,6 +5,9 @@ use Payone\Assistants\DataSources\AssistantDataSource; use Payone\Assistants\SettingsHandlers\AssistantSettingsHandler; use Payone\Helpers\PaymentHelper; +use Payone\Methods\PayoneAmazonPayPaymentMethod; +use Payone\Methods\PayoneCCPaymentMethod; +use Payone\Methods\PayoneInvoiceSecurePaymentMethod; use Payone\Methods\PayoneSofortPaymentMethod; use Payone\Models\CreditcardTypes; use Plenty\Modules\Order\Shipping\Countries\Contracts\CountryRepositoryContract; @@ -204,16 +207,16 @@ protected function createProductsPageAndSteps(array $config): array ] ]; - if(in_array($paymentCode, ['PAYONE_PAYONE_INVOICE_SECURE', 'PAYONE_PAYONE_CREDIT_CARD', 'PAYONE_PAYONE_AMAZON_PAY'])) { + if(in_array($paymentCode, [PayoneInvoiceSecurePaymentMethod::PAYMENT_CODE, PayoneCCPaymentMethod::PAYMENT_CODE, PayoneAmazonPayPaymentMethod::PAYMENT_CODE])) { // We need some special configurations for this methods. switch ($paymentCode) { - case 'PAYONE_PAYONE_INVOICE_SECURE': + case PayoneInvoiceSecurePaymentMethod::PAYMENT_CODE: $config = $this->createSecureInvoiceStep($config, $paymentCode); break; - case 'PAYONE_PAYONE_CREDIT_CARD': + case PayoneCCPaymentMethod::PAYMENT_CODE: $config = $this->createCreditCardStep($config, $paymentCode); break; - case 'PAYONE_PAYONE_AMAZON_PAY': + case PayoneAmazonPayPaymentMethod::PAYMENT_CODE: $config = $this->createAmazonPayStep($config, $paymentCode); break; } From 02f19306ecc3140c2a3b6294cbefcb8e61e13517 Mon Sep 17 00:00:00 2001 From: Jens Konopka Date: Mon, 1 Mar 2021 08:36:30 +0100 Subject: [PATCH 327/353] fix amazon pay sandbox --- src/Assistants/DataSources/AssistantDataSource.php | 2 +- src/Assistants/PayoneAssistant.php | 6 +++--- src/Controllers/AmazonPayController.php | 4 +++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/Assistants/DataSources/AssistantDataSource.php b/src/Assistants/DataSources/AssistantDataSource.php index 26fc9168..c7080bf9 100644 --- a/src/Assistants/DataSources/AssistantDataSource.php +++ b/src/Assistants/DataSources/AssistantDataSource.php @@ -158,7 +158,7 @@ public function getByOptionId(string $optionId = 'default'): array $assistant[$paymentCode.'AllowedCardTypes'] = is_array($value['AllowedCardTypes']) ? $value['AllowedCardTypes'] : []; break; case 'PAYONE_PAYONE_AMAZON_PAY': - $assistant[$paymentCode.'Sandbox'] = (int)($value['Sandbox'] ?? 1); + $assistant[$paymentCode.'Sandbox'] = (int)($value['Sandbox'] ?? 0); break; } } diff --git a/src/Assistants/PayoneAssistant.php b/src/Assistants/PayoneAssistant.php index a748f39f..88c3b9ec 100644 --- a/src/Assistants/PayoneAssistant.php +++ b/src/Assistants/PayoneAssistant.php @@ -395,17 +395,17 @@ protected function createAmazonPayStep(array $config, string $paymentCode): arra [ $paymentCode.'Sandbox' => [ 'type' => 'select', - "defaultValue" => 1, + "defaultValue" => 0, 'options' => [ 'name' => 'Assistant.Sandbox', 'listBoxValues' => [ [ "caption" => 'Assistant.sandboxProductiveOption', - "value" => 1 + "value" => 0 ], [ "caption" => 'Assistant.sandboxTestingOption', - "value" => 0 + "value" => 1 ] ] ] diff --git a/src/Controllers/AmazonPayController.php b/src/Controllers/AmazonPayController.php index 95ff421b..0f935f99 100644 --- a/src/Controllers/AmazonPayController.php +++ b/src/Controllers/AmazonPayController.php @@ -107,7 +107,9 @@ public function getAmazonPayLoginWidget(Twig $twig, $this->logger ->setIdentifier(__METHOD__) - ->debug('AmazonPay.configLoginButton', (array)$configResponse); + ->debug('AmazonPay.configLoginButton', [ + 'configResponse' => $configResponse + ]); /** @var LocalizationRepositoryContract $localizationRepositoryContract */ $localizationRepositoryContract = pluginApp(LocalizationRepositoryContract::class); From 3fa8abd91c0fd61d88140c066bfca24a332776ef Mon Sep 17 00:00:00 2001 From: Jens Konopka Date: Mon, 1 Mar 2021 10:02:20 +0100 Subject: [PATCH 328/353] Update src/Assistants/PayoneAssistant.php Co-authored-by: Marvin Kanitz <42937565+MKanitz@users.noreply.github.com> --- src/Assistants/PayoneAssistant.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Assistants/PayoneAssistant.php b/src/Assistants/PayoneAssistant.php index 88c3b9ec..49c1996c 100644 --- a/src/Assistants/PayoneAssistant.php +++ b/src/Assistants/PayoneAssistant.php @@ -612,7 +612,7 @@ protected function getDeliveryCountries4AmazonPay(): array */ protected function loadActiveCountriesValues() { - if ($this->activeCountries === null || $this->activeCountries4AmazonPay) { + if ($this->activeCountries === null || $this->activeCountries4AmazonPay === null) { /** @var CountryRepositoryContract $countryRepository */ $countryRepository = pluginApp(CountryRepositoryContract::class); $activeCountries = $countryRepository->getActiveCountriesList(); @@ -650,4 +650,4 @@ protected function getAllowedCreditCardTypes(): array return $allowedCreditCards; } -} \ No newline at end of file +} From a78b09428962b0fab101ca2bf4880562bb52c70e Mon Sep 17 00:00:00 2001 From: Jens Konopka Date: Mon, 1 Mar 2021 10:21:20 +0100 Subject: [PATCH 329/353] adjust php doc --- src/Providers/Api/Request/GenericPaymentDataProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Providers/Api/Request/GenericPaymentDataProvider.php b/src/Providers/Api/Request/GenericPaymentDataProvider.php index 1051d005..34e14351 100644 --- a/src/Providers/Api/Request/GenericPaymentDataProvider.php +++ b/src/Providers/Api/Request/GenericPaymentDataProvider.php @@ -92,8 +92,8 @@ public function getGetOrderReferenceDetailsRequestData( * @param string $paymentCode * @param string $workOrderId * @param string $amazonReferenceId - * @param string $currency * @param string $amount + * @param string|null $currency * @param int|null $clientId * @param int|null $pluginSetId * @return array From a095f7be9b5d3ee3cd4cfd350c4ef356db4fbab1 Mon Sep 17 00:00:00 2001 From: Jens Konopka Date: Mon, 1 Mar 2021 11:15:39 +0100 Subject: [PATCH 330/353] update order note --- src/Services/Refund.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Services/Refund.php b/src/Services/Refund.php index bd2554ba..06850906 100644 --- a/src/Services/Refund.php +++ b/src/Services/Refund.php @@ -191,8 +191,7 @@ public function executeRefund(Order $refund) 'errorMessage' => $refundPaymentResult->getErrorMessage(), ] ); - $text = 'Refund von event procedure fehlgeschlagen. Meldung: ' . $refundPaymentResult->getErrorMessage(); - $orderNote = $text . ' Meldung: ' . $refundPaymentResult->getErrorMessage() . ' Order-ID: ' . $refund->id .' Payment-ID: '.$payment->id; + $orderNote = 'Refund fehlgeschlagen. Fehler im Log'; continue; } From d7e70edd83f475dd2348a76b5144419b763487c8 Mon Sep 17 00:00:00 2001 From: Jens Konopka Date: Tue, 11 May 2021 09:06:09 +0200 Subject: [PATCH 331/353] add order item properties logic --- .gitignore | 1 + meta/documents/changelog_de.md | 5 + meta/documents/changelog_en.md | 5 + plugin.json | 2 +- src/PluginConstants.php | 2 +- .../Api/Request/DataProviderAbstract.php | 97 +++++++++++++++++-- 6 files changed, 101 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index 3b4c1b9b..21aa514f 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ composer.lock phpunit.ini /build/ /.phan/ +.legacySyncTrace diff --git a/meta/documents/changelog_de.md b/meta/documents/changelog_de.md index 16bdf7ef..fc4b74fb 100644 --- a/meta/documents/changelog_de.md +++ b/meta/documents/changelog_de.md @@ -1,5 +1,10 @@ # Release Notes für PAYONE +## 2.1.0 + +### Hinzugefügt +- Bestellmerkmale können nun korrekt verarbeitet werden. + ## 2.0.0 ### TODO diff --git a/meta/documents/changelog_en.md b/meta/documents/changelog_en.md index d9b2cbca..33e876b6 100644 --- a/meta/documents/changelog_en.md +++ b/meta/documents/changelog_en.md @@ -1,5 +1,10 @@ # Release Notes for PAYONE +## 2.1.0 + +### Added +- Order item properties can now be processed correctly. + ## 2.0.0 ### TODO diff --git a/plugin.json b/plugin.json index 62197162..d8833220 100644 --- a/plugin.json +++ b/plugin.json @@ -1,5 +1,5 @@ { - "version": "2.0.0", + "version": "2.1.0", "license": "MIT", "pluginIcon": "icon_plugin_xs.png", "price": 0.0, diff --git a/src/PluginConstants.php b/src/PluginConstants.php index fcfa3e1b..c5d7a146 100644 --- a/src/PluginConstants.php +++ b/src/PluginConstants.php @@ -5,5 +5,5 @@ class PluginConstants { const NAME = 'Payone'; - const VERSION = '2.0.0'; + const VERSION = '2.1.0'; } diff --git a/src/Providers/Api/Request/DataProviderAbstract.php b/src/Providers/Api/Request/DataProviderAbstract.php index d9ac4c98..ea42af9a 100644 --- a/src/Providers/Api/Request/DataProviderAbstract.php +++ b/src/Providers/Api/Request/DataProviderAbstract.php @@ -25,6 +25,8 @@ use Plenty\Modules\Item\Item\Contracts\ItemRepositoryContract; use Plenty\Modules\Item\Item\Models\Item; use Plenty\Modules\Item\Item\Models\ItemText; +use Plenty\Modules\Item\Variation\Contracts\VariationRepositoryContract; +use Plenty\Modules\Item\Variation\Models\Variation; use Plenty\Modules\Order\Models\Order; use Plenty\Modules\Order\Models\OrderItem; use Plenty\Modules\Order\Models\OrderItemType; @@ -33,6 +35,9 @@ use Plenty\Modules\Payment\Contracts\PaymentRepositoryContract; use Plenty\Modules\Payment\Models\Payment; use Plenty\Modules\Payment\Models\PaymentProperty; +use Plenty\Modules\Webshop\Contracts\LocalizationRepositoryContract; +use Plenty\Modules\Webshop\Contracts\WebstoreConfigurationRepositoryContract; +use Plenty\Modules\Item\Property\Models\Property; /** * Class DataProviderAbstract @@ -167,19 +172,93 @@ protected function getCartItemData(Basket $basket) if (!$basket->basketItems) { return $items; } + + /** @var VariationRepositoryContract $variationContract */ + $variationContract = pluginApp(VariationRepositoryContract::class); + /** @var WebstoreConfigurationRepositoryContract $webstoreConfigurationRepository */ + $webstoreConfigurationRepository = pluginApp(WebstoreConfigurationRepositoryContract::class); + $webstoreConfiguration = $webstoreConfigurationRepository->getWebstoreConfiguration(); + + /** @var LocalizationRepositoryContract $localizationRepository */ + $localizationRepository = pluginApp(LocalizationRepositoryContract::class); + $language = $localizationRepository->getLanguage(); + /** @var BasketItem $basketItem */ foreach ($basket->basketItems as $basketItem) { - /** @var Item $item */ - $item = $this->itemRepo->show($basketItem->itemId); - /** @var ItemText $itemText */ - $itemText = $item->texts; - $basketItemArr = $basketItem->toArray(); - $basketItemArr['name'] = $itemText->first()->name1; - $basketItemArr['price'] = (int)round($basketItem->price * 100); - $basketItemArr['vat'] = (int)$basketItem->vat; + if($basketItem->itemType != BasketItem::BASKET_ITEM_TYPE_VARIATION_ORDER_PROPERTY) { + /** @var Item $item */ + $item = $this->itemRepo->show($basketItem->itemId); + /** @var ItemText $itemText */ + $itemText = $item->texts; - $items[] = $basketItemArr; + $basketItemArr = $basketItem->toArray(); + $basketItemArr['name'] = $itemText->first()->name1; + $basketItemArr['price'] = (int)round($basketItem->price * 100); + $basketItemArr['vat'] = (int)$basketItem->vat; + + $items[] = $basketItemArr; + } + + if($webstoreConfiguration->useVariationOrderProperties) { + foreach ($basketItem->basketItemVariationProperties as $basketItemVariationProperty) { + if($basketItemVariationProperty instanceof BasketItem) { + $basketItemArr = []; + $reference = $basketItem->variationId; + $name = $itemText->first()->name1; + foreach ($basketItemVariationProperty->basketItemOrderParams as $basketItemOrderParam) { + $reference .= '_'.$basketItemOrderParam->basketItemId; + $name .= ' '.$basketItemOrderParam->value; + } + + $basketItemArr['name'] = $name; + $basketItemArr['price'] = (int)round($basketItemVariationProperty->price * 100); + $basketItemArr['vat'] = (int)$basketItemVariationProperty->vat; + $items[] = $basketItemArr; + } + } + } else { + /** + * Item property handling for surcharges + * For example "Pfand" + */ + /** @var Variation $variation */ + $variation = $variationContract->findById($basketItem->variationId); + + $itemProperties = $variation->item->itemProperties; + if ($itemProperties && count($itemProperties) > 0) { + foreach ($itemProperties as $itemProperty) { + $basketItemArr = []; + $basketItemArr['name'] = $basketItem->variationId . '_' . $itemProperty->id; + $basketItemArr['price'] = (int)round($basketItemVariationProperty->price * 100); + $basketItemArr['vat'] = (int)$basketItemVariationProperty->vat; + + $price = $itemProperty->surcharge; + $property = $itemProperty->property; + if ($property instanceof Property) { + if(!$property->isOderProperty && $property->isShownAsAdditionalCosts) { + $name = $property->names->first()->name; + foreach ($property->names as $propertyName) { + if ($propertyName->lang == $language) { + $name = $propertyName->name; + } + } + $basketItemArr['name'] = $name; + + $markup = $property->surcharge; + if($property->propertyGroupId > 0 && $property->group->first()->isSurchargePercental) { + $markup = $price / 100 * $property->surcharge; + } + $price += $markup; + + $basketItemArr['price'] = (int)round($price * 100); + $basketItemArr['vat'] = (int)$basketItem->vat; + } + } + $items[] = $basketItemArr; + } + } + } } return $items; From 6a2af0b99411f826ded9544edb9bbef3e6fcc377 Mon Sep 17 00:00:00 2001 From: Jens Konopka Date: Tue, 11 May 2021 11:50:12 +0200 Subject: [PATCH 332/353] Update meta/documents/changelog_en.md Co-authored-by: Emmanouil Stafilarakis --- meta/documents/changelog_en.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/documents/changelog_en.md b/meta/documents/changelog_en.md index 33e876b6..43d2ea5b 100644 --- a/meta/documents/changelog_en.md +++ b/meta/documents/changelog_en.md @@ -3,7 +3,7 @@ ## 2.1.0 ### Added -- Order item properties can now be processed correctly. +- Order item order properties can now be processed correctly. ## 2.0.0 From 232e7254b59987c0b9c8df4fb2da9cf1223f8248 Mon Sep 17 00:00:00 2001 From: Jens Konopka Date: Tue, 11 May 2021 11:50:16 +0200 Subject: [PATCH 333/353] Update meta/documents/changelog_de.md Co-authored-by: Emmanouil Stafilarakis --- meta/documents/changelog_de.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/documents/changelog_de.md b/meta/documents/changelog_de.md index fc4b74fb..9a4ed70a 100644 --- a/meta/documents/changelog_de.md +++ b/meta/documents/changelog_de.md @@ -3,7 +3,7 @@ ## 2.1.0 ### Hinzugefügt -- Bestellmerkmale können nun korrekt verarbeitet werden. +- Bestelleigenschaften können nun korrekt verarbeitet werden. ## 2.0.0 From def0f35ae7e587bbb3ff6d6c95e6ecd57ebe9d79 Mon Sep 17 00:00:00 2001 From: Jens Konopka Date: Thu, 20 May 2021 08:04:03 +0200 Subject: [PATCH 334/353] fix wrong price and vat --- src/Providers/Api/Request/DataProviderAbstract.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/Providers/Api/Request/DataProviderAbstract.php b/src/Providers/Api/Request/DataProviderAbstract.php index ea42af9a..4aebfb23 100644 --- a/src/Providers/Api/Request/DataProviderAbstract.php +++ b/src/Providers/Api/Request/DataProviderAbstract.php @@ -230,8 +230,6 @@ protected function getCartItemData(Basket $basket) foreach ($itemProperties as $itemProperty) { $basketItemArr = []; $basketItemArr['name'] = $basketItem->variationId . '_' . $itemProperty->id; - $basketItemArr['price'] = (int)round($basketItemVariationProperty->price * 100); - $basketItemArr['vat'] = (int)$basketItemVariationProperty->vat; $price = $itemProperty->surcharge; $property = $itemProperty->property; From bda4ee4c44e4f1db15c2414c646a4a57206cdff0 Mon Sep 17 00:00:00 2001 From: Jens Konopka Date: Wed, 30 Jun 2021 14:05:18 +0200 Subject: [PATCH 335/353] fix credit card types if not set --- meta/documents/changelog_de.md | 5 +++++ meta/documents/changelog_en.md | 5 +++++ plugin.json | 2 +- src/Models/CreditcardTypes.php | 5 ++++- 4 files changed, 15 insertions(+), 2 deletions(-) diff --git a/meta/documents/changelog_de.md b/meta/documents/changelog_de.md index 9a4ed70a..3e2ee413 100644 --- a/meta/documents/changelog_de.md +++ b/meta/documents/changelog_de.md @@ -1,5 +1,10 @@ # Release Notes für PAYONE +## 2.2.1 + +### Behoben +- Durch eine fehlerhafte Konfiguration des Plugins konnte es Fehler im Webshop geben, dies wurde behoben. + ## 2.1.0 ### Hinzugefügt diff --git a/meta/documents/changelog_en.md b/meta/documents/changelog_en.md index 43d2ea5b..4bc6c3aa 100644 --- a/meta/documents/changelog_en.md +++ b/meta/documents/changelog_en.md @@ -1,5 +1,10 @@ # Release Notes for PAYONE +## 2.2.1 + +### Fixed +- Due to a faulty configuration of the plugin there could be errors in the webshop, this has been fixed. + ## 2.1.0 ### Added diff --git a/plugin.json b/plugin.json index d8833220..84009a97 100644 --- a/plugin.json +++ b/plugin.json @@ -1,5 +1,5 @@ { - "version": "2.1.0", + "version": "2.1.1", "license": "MIT", "pluginIcon": "icon_plugin_xs.png", "price": 0.0, diff --git a/src/Models/CreditcardTypes.php b/src/Models/CreditcardTypes.php index 3ea72d27..0821eb2c 100644 --- a/src/Models/CreditcardTypes.php +++ b/src/Models/CreditcardTypes.php @@ -39,7 +39,10 @@ public function __construct(SettingsService $settingsService) public function getAllowedTypes(): array { $allowedTypesFromConfig = $this->settingsService->getPaymentSettingsValue('AllowedCardTypes',PayoneCCPaymentMethod::PAYMENT_CODE); - return $allowedTypesFromConfig; + if(!is_array($allowedTypesFromConfig)) { + return $allowedTypesFromConfig; + } + return []; } /** From 3dcf285793de4ec48f6079d2061700f38a17a46b Mon Sep 17 00:00:00 2001 From: Jens Konopka Date: Fri, 9 Jul 2021 13:03:55 +0200 Subject: [PATCH 336/353] update userguide with requested changes from payone/psg --- meta/documents/user_guide_de.md | 22 ++++++++++++---------- meta/documents/user_guide_en.md | 25 ++++++++++++++++--------- 2 files changed, 28 insertions(+), 19 deletions(-) diff --git a/meta/documents/user_guide_de.md b/meta/documents/user_guide_de.md index 6d063510..f8d3e811 100644 --- a/meta/documents/user_guide_de.md +++ b/meta/documents/user_guide_de.md @@ -7,10 +7,10 @@ ## Payone -Das plentymarkets Payone-Plugin bietet Zugang zu internationalen und lokalen Zahlungsarten. Gleichzeitig hast du Zugriff auf ein integriertes Risikomanagement, automatisierte Gutschriften und schnelle Retourenabwicklung. +Das plentymarkets PAYONE-Plugin bietet Zugang zu internationalen und lokalen Zahlungsarten. Gleichzeitig hast du Zugriff auf ein integriertes Risikomanagement, automatisierte Gutschriften und schnelle Retourenabwicklung. Aktuell beinhaltet das Plugin die folgenden Zahlungsarten: @@ -21,22 +21,24 @@ Aktuell beinhaltet das Plugin die folgenden Zahlungsarten: * giropay - Online-Überweisung Deutschland * Sofortüberweisung - Online-Überweisung international * Überweisung - Vorkasse & Rechnung & Nachnahme +* Paydirekt * PayPal - Anbindung Ihres PayPal-Accounts * Amazon Pay - Anbindung Ihres Amazon Pay-Accounts -### PAYONE Account - -Für die Nutzung benötigst du einen Payone-Account und die Payone-Zugangsdaten. Wenn du noch kein Payone-Kunde bist und demnach keinen Payone-Account besitzt, wende dich bitte an: +### Wie bekomme ich einen PAYONE Account? +Für die Nutzung benötigst du einen PAYONE-Account und die PAYONE-Zugangsdaten. Wenn du noch kein PAYONE-Kunde bist und demnach keinen PAYONE-Account besitzt, muss dieser mit einer Servicevereinbarung erst beantragt werden. Die PSG Projektmanagement GmbH ist hier Dein Ansprechpartner: PSG Projektmanagement GmbH
Meergässle 4
89180 Berghülen
Telefon: 07344-9592588
E-Mail: plenty@psg-projektmanagement.de
-Internet: http://www.psg-projektmanagement.de
-Oder nutze folgendes Anmeldeformular
+Internet: http://www.psg-projektmanagement.de + +Nutze für deine Kontaktaufnahme gerne unser Kontaktformular, oder vereinbare im Kalender direkt einen Termin für nähere Informationen. + +Kontaktformular:
https://www.psg-projektmanagement.de/payone-plentymarkets/ - +Termin vereinbaren: +hier klicken diff --git a/meta/documents/user_guide_en.md b/meta/documents/user_guide_en.md index ad109928..2c0eeac5 100644 --- a/meta/documents/user_guide_en.md +++ b/meta/documents/user_guide_en.md @@ -21,22 +21,29 @@ The plugin currently offers the following payment methods: * giropay - online bank transfer Germany * Sofortüberweisung - Online bank transfer international * Transfer - Cash in advance & Invoice & Cash on Delivery +* Paydirekt * PayPal - Integration of your PayPal account * Amazon Pay - Integration of your Amazon Pay account -### PAYONE Account +### How to get a PAYONE Account? -The use requires a Payone account as well as Payone access data. If you are not a Payone customer yet and thus do not have a Payone account, please contact: +The use requires a Payone account as well as Payone access data. If you are not a Payone customer yet and thus do not have a Payone account, you have to applied a service agreement first. PSG Projektmanagement GmbH is your contact person: PSG Projektmanagement GmbH
Meergässle 4
89180 Berghülen
-Phone: 07344-9592588
-E-mail: plenty@psg-projektmanagement.de
-Website: http://www.psg-projektmanagement.de
-Or use the following registration form:
+Telefon: 07344-9592588
+E-Mail: plenty@psg-projektmanagement.de
+Internet: http://www.psg-projektmanagement.de + +Please use our Registration form to get in contact, or make an appointment directly in the calendar for more information. + +Registration form:
https://www.psg-projektmanagement.de/payone-plentymarkets/ - +Make an appointment: +click here + +PSG Projektmanagement GmbH is a long-term partner of PAYONE, as well as a long-term partner of plentymarkets and is therefore your central contact who is optimally networked with all partners. Please do not contact PAYONE directly in order not to endanger the smooth process.
+Here is the official link to the partnership with PAYONE: +https://payone.com/DE-de/plentymarkets-payone-plugin \ No newline at end of file From a17287f80fd566eabdcde466af79b4484b306fc6 Mon Sep 17 00:00:00 2001 From: Jens Konopka Date: Tue, 13 Jul 2021 08:50:27 +0200 Subject: [PATCH 337/353] add checks for switching payment method in myaccount --- meta/documents/changelog_de.md | 7 +- meta/documents/changelog_en.md | 7 +- meta/documents/user_guide_de.md | 4 + plugin.json | 2 +- src/Methods/PaymentAbstract.php | 42 +++++++--- src/Methods/PaymentOrderValidator.php | 110 ++++++++++++++++++++++++++ 6 files changed, 157 insertions(+), 15 deletions(-) create mode 100644 src/Methods/PaymentOrderValidator.php diff --git a/meta/documents/changelog_de.md b/meta/documents/changelog_de.md index 3e2ee413..03b89944 100644 --- a/meta/documents/changelog_de.md +++ b/meta/documents/changelog_de.md @@ -1,6 +1,11 @@ # Release Notes für PAYONE -## 2.2.1 +## 2.1.2 + +### Behoben +- Bei der Prüfung, ob eine Zahlungsart für die nachträgliche Bezahlung zur Verfügung steht, werden die entsprechenden Regeln angewendet, die auch für den Checkout gelten. + +## 2.1.1 ### Behoben - Durch eine fehlerhafte Konfiguration des Plugins konnte es Fehler im Webshop geben, dies wurde behoben. diff --git a/meta/documents/changelog_en.md b/meta/documents/changelog_en.md index 4bc6c3aa..159837e6 100644 --- a/meta/documents/changelog_en.md +++ b/meta/documents/changelog_en.md @@ -1,6 +1,11 @@ # Release Notes for PAYONE -## 2.2.1 +## 2.1.2 + +### Fixed +- When checking whether a payment method is available for subsequent payment, the same rules that are applied to the checkout als apply here. + +## 2.1.1 ### Fixed - Due to a faulty configuration of the plugin there could be errors in the webshop, this has been fixed. diff --git a/meta/documents/user_guide_de.md b/meta/documents/user_guide_de.md index f8d3e811..c77aa9cc 100644 --- a/meta/documents/user_guide_de.md +++ b/meta/documents/user_guide_de.md @@ -42,3 +42,7 @@ https://www.psg-projektmanagement.de/payone-plentymarkets/ Termin vereinbaren: hier klicken + +Die PSG Projektmanagement GmbH ist ein langjähriger Partner der PAYONE, sowie ein langjähriger Partner von plentymarkets und ist somit Dein zentraler Ansprechpartner der optimal mit allen Partnern vernetzt ist. Bitte wende dich nicht direkt an PAYONE, um den reibungslosen Ablauf nicht zu gefährden. + +Hier der offizielle Link zur Partnerschaft mit PAYONE: [https://payone.com/DE-de/plentymarkets-payone-plugin](https://payone.com/DE-de/plentymarkets-payone-plugin) diff --git a/plugin.json b/plugin.json index 84009a97..9d23b2a5 100644 --- a/plugin.json +++ b/plugin.json @@ -1,5 +1,5 @@ { - "version": "2.1.1", + "version": "2.1.2", "license": "MIT", "pluginIcon": "icon_plugin_xs.png", "price": 0.0, diff --git a/src/Methods/PaymentAbstract.php b/src/Methods/PaymentAbstract.php index 1d309816..2243c813 100644 --- a/src/Methods/PaymentAbstract.php +++ b/src/Methods/PaymentAbstract.php @@ -38,7 +38,8 @@ public function __construct( Application $application, PaymentValidator $paymentValidator, SettingsService $settingsService - ) { + ) + { $this->paymentValidator = $paymentValidator; $this->app = $app = $application; $this->settingsService = $settingsService; @@ -63,7 +64,7 @@ public function getName(string $lang = 'de'): string { /** @var Translator $translator */ $translator = pluginApp(Translator::class); - return $translator->trans('Payone::PaymentMethods.'.$this::PAYMENT_CODE, [], $lang); + return $translator->trans('Payone::PaymentMethods.' . $this::PAYMENT_CODE, [], $lang); } /** @@ -93,7 +94,7 @@ public function getDescription(string $lang = 'de'): string { /** @var Translator $translator */ $translator = pluginApp(Translator::class); - return $translator->trans('Payone::PaymentMethods.'.$this::PAYMENT_CODE.'_DESCRIPTION', [], $lang); + return $translator->trans('Payone::PaymentMethods.' . $this::PAYMENT_CODE . '_DESCRIPTION', [], $lang); } /** @@ -109,9 +110,9 @@ public function getCode(): string */ public function getMaxCartAmount(): float { - $amount = $this->settingsService->getPaymentSettingsValue('MaximumAmount',$this::PAYMENT_CODE); + $amount = $this->settingsService->getPaymentSettingsValue('MaximumAmount', $this::PAYMENT_CODE); - return $amount ? (float) $amount : 0.; + return $amount ? (float)$amount : 0.; } /** @@ -119,9 +120,9 @@ public function getMaxCartAmount(): float */ public function getMinCartAmount(): float { - $amount = $this->settingsService->getPaymentSettingsValue('MinimumAmount',$this::PAYMENT_CODE); + $amount = $this->settingsService->getPaymentSettingsValue('MinimumAmount', $this::PAYMENT_CODE); - return $amount ? (float) $amount : 0.; + return $amount ? (float)$amount : 0.; } /** @@ -155,7 +156,7 @@ public function isBackendActive(): bool /** * Get name for the backend * - * @param string $lang + * @param string $lang * @return string */ public function getBackendName(string $lang = 'de'): string @@ -181,13 +182,13 @@ public function canHandleSubscriptions(): bool public function getBackendIcon(): string { $app = pluginApp(Application::class); - $icon = $app->getUrlPath(PluginConstants::NAME).'/images/logos/'.strtolower($this::PAYMENT_CODE).'_backend_icon.svg'; + $icon = $app->getUrlPath(PluginConstants::NAME) . '/images/logos/' . strtolower($this::PAYMENT_CODE) . '_backend_icon.svg'; return $icon; } /** * Can the delivery address be different from the invoice address? - * + * * @return bool */ public function canHandleDifferingDeliveryAddress(): bool @@ -197,7 +198,7 @@ public function canHandleDifferingDeliveryAddress(): bool /** * Check if all settings for the payment method are set. - * + * * @param SettingsService $settingsService * @return bool */ @@ -208,7 +209,7 @@ public function validateSettings(SettingsService $settingsService): bool /** * Is the payment method active for the given currency? - * + * * @param $currency * @return bool */ @@ -216,4 +217,21 @@ public function isActiveForCurrency($currency): bool { return true; } + + /** + * @param int|null $orderId + * @return bool + */ + public function isSwitchableTo($orderId = null): bool + { + if($orderId > 0) { + /** @var PaymentOrderValidator $paymentOrderValidator */ + $paymentOrderValidator = pluginApp(PaymentOrderValidator::class); + + return (bool)$this->settingsService->getPaymentSettingsValue('active', $this::PAYMENT_CODE) + && $paymentOrderValidator->validate($this, $this->settingsService, $orderId); + } + + return false; + } } diff --git a/src/Methods/PaymentOrderValidator.php b/src/Methods/PaymentOrderValidator.php new file mode 100644 index 00000000..c13f495c --- /dev/null +++ b/src/Methods/PaymentOrderValidator.php @@ -0,0 +1,110 @@ +addressHelper = $addressHelper; + $this->logger = $logger; + } + + /** + * @param PaymentAbstract $payment + * + * @return bool + */ + public function validate(PaymentAbstract $payment, SettingsService $settingsService, int $orderId) + { + /** @var OrderRepositoryContract $orderRepositoryContract */ + $orderRepositoryContract = pluginApp(OrderRepositoryContract::class); + /** @var AuthHelper $authHelper */ + $authHelper = pluginApp(AuthHelper::class); + /** @var Order $order */ + $order = $authHelper->processUnguarded( + function () use ($orderRepositoryContract, $orderId) { + return $orderRepositoryContract->findOrderById($orderId); + } + ); + + $orderAmount = $order->amount->invoiceTotal; + if ($payment->getMinCartAmount() && $orderAmount < $payment->getMinCartAmount()) { + $this->log($payment->getName(), 'Payment.minCartAmount', $orderAmount); + return false; + } + + if ($payment->getMaxCartAmount() && $orderAmount > $payment->getMaxCartAmount()) { + $this->log($payment->getName(), 'Payment.maxCartAmount', $orderAmount); + return false; + } + + $billingAddress = $order->billingAddress; + $deliveryAddress = $order->deliveryAddress; + if (!$billingAddress) { + // TODO: shouldn't this be 'return false'? + return true; + } + + if (!in_array($billingAddress->countryId, $payment->getAllowedCountries())) { + $this->log($payment->getName(), 'Payment.countryNotAllowed', $billingAddress->countryId); + return false; + } + + if (!$payment->canHandleDifferingDeliveryAddress() && $deliveryAddress && $billingAddress->id != $deliveryAddress->id) { + return false; + } + + if (!$payment->validateSettings($settingsService)) { + return false; + } + + if (!$payment->isActiveForCurrency($order->amount->currency)) { + return false; + } + + return true; + } + + /** + * @param string $payment + * @param string $code + * @param string $value + */ + protected function log($payment, $code, $value) + { + $logger = $this->logger->setIdentifier(__METHOD__); + $logger->debug( + $code, + [ + 'basketID' => $this->basket->id, + 'customer' => $this->basket->customerId, + 'payment' => $payment, + 'value' => $value, + ] + ); + } +} From 255bc03c84f8a3cc2417697b526043e28256bbcb Mon Sep 17 00:00:00 2001 From: Jens Konopka Date: Wed, 14 Jul 2021 07:31:32 +0200 Subject: [PATCH 338/353] Update src/Methods/PaymentOrderValidator.php Co-authored-by: Emmanouil Stafilarakis --- src/Methods/PaymentOrderValidator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Methods/PaymentOrderValidator.php b/src/Methods/PaymentOrderValidator.php index c13f495c..87324d9b 100644 --- a/src/Methods/PaymentOrderValidator.php +++ b/src/Methods/PaymentOrderValidator.php @@ -47,7 +47,7 @@ public function validate(PaymentAbstract $payment, SettingsService $settingsServ /** @var Order $order */ $order = $authHelper->processUnguarded( function () use ($orderRepositoryContract, $orderId) { - return $orderRepositoryContract->findOrderById($orderId); + return $orderRepositoryContract->findById($orderId, ['amounts', 'addresses']); } ); From e661e568a3d5834a9756ec6b1bbdc495c481dc04 Mon Sep 17 00:00:00 2001 From: Jens Konopka Date: Tue, 27 Jul 2021 15:55:43 +0200 Subject: [PATCH 339/353] fix displaying credit card types --- meta/documents/changelog_de.md | 7 ++++++- meta/documents/changelog_en.md | 7 ++++++- plugin.json | 2 +- src/Models/CreditcardTypes.php | 2 +- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/meta/documents/changelog_de.md b/meta/documents/changelog_de.md index 3e2ee413..b00bef5d 100644 --- a/meta/documents/changelog_de.md +++ b/meta/documents/changelog_de.md @@ -1,6 +1,11 @@ # Release Notes für PAYONE -## 2.2.1 +## 2.1.2 + +### Behoben +- Die erlaubten Arten von Kreditkarten wurden nicht korrekt dargestellt. Dies wurde nun behoben. + +## 2.1.1 ### Behoben - Durch eine fehlerhafte Konfiguration des Plugins konnte es Fehler im Webshop geben, dies wurde behoben. diff --git a/meta/documents/changelog_en.md b/meta/documents/changelog_en.md index 4bc6c3aa..ae828da7 100644 --- a/meta/documents/changelog_en.md +++ b/meta/documents/changelog_en.md @@ -1,6 +1,11 @@ # Release Notes for PAYONE -## 2.2.1 +## 2.1.2 + +### Fixed +- The allowed types of credit cards were not displayed correctly. This has now been fixed. + +## 2.1.1 ### Fixed - Due to a faulty configuration of the plugin there could be errors in the webshop, this has been fixed. diff --git a/plugin.json b/plugin.json index 84009a97..9d23b2a5 100644 --- a/plugin.json +++ b/plugin.json @@ -1,5 +1,5 @@ { - "version": "2.1.1", + "version": "2.1.2", "license": "MIT", "pluginIcon": "icon_plugin_xs.png", "price": 0.0, diff --git a/src/Models/CreditcardTypes.php b/src/Models/CreditcardTypes.php index 0821eb2c..69da7937 100644 --- a/src/Models/CreditcardTypes.php +++ b/src/Models/CreditcardTypes.php @@ -39,7 +39,7 @@ public function __construct(SettingsService $settingsService) public function getAllowedTypes(): array { $allowedTypesFromConfig = $this->settingsService->getPaymentSettingsValue('AllowedCardTypes',PayoneCCPaymentMethod::PAYMENT_CODE); - if(!is_array($allowedTypesFromConfig)) { + if(is_array($allowedTypesFromConfig)) { return $allowedTypesFromConfig; } return []; From 160e09cb17317c912ef3674a47c4da881fd05377 Mon Sep 17 00:00:00 2001 From: Jens Konopka Date: Thu, 29 Jul 2021 08:11:01 +0200 Subject: [PATCH 340/353] fix routing --- src/Providers/PayoneRouteServiceProvider.php | 21 ++++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/Providers/PayoneRouteServiceProvider.php b/src/Providers/PayoneRouteServiceProvider.php index e1edb16b..b0a5a999 100644 --- a/src/Providers/PayoneRouteServiceProvider.php +++ b/src/Providers/PayoneRouteServiceProvider.php @@ -16,20 +16,19 @@ class PayoneRouteServiceProvider extends RouteServiceProvider */ public function map(Router $router) { - $router->post('payment/payone/status/', 'Payone\Controllers\StatusController@index'); - $router->post('payment/payone/checkout/doAuth', 'Payone\Controllers\CheckoutController@doAuth'); - $router->post('payment/payone/checkout/storeCCCheckResponse', 'Payone\Controllers\CheckoutController@storeCCCheckResponse'); - $router->post('payment/payone/checkout/storeAccountData', 'Payone\Controllers\CheckoutController@storeAccountData'); + $router->post('payment/payone/checkout/doAuth/', 'Payone\Controllers\CheckoutController@doAuth'); + $router->post('payment/payone/checkout/storeCCCheckResponse/', 'Payone\Controllers\CheckoutController@storeCCCheckResponse'); + $router->post('payment/payone/checkout/storeAccountData/', 'Payone\Controllers\CheckoutController@storeAccountData'); - $router->get('payment/payone/checkout/amazonPay/loginButton', 'Payone\Controllers\AmazonPayController@getAmazonPayLoginWidget'); - $router->post('payment/payone/checkout/amazonPay/renderWidgets', 'Payone\Controllers\AmazonPayController@renderWidgets'); - $router->post('payment/payone/checkout/amazonPay/getOrderReference', 'Payone\Controllers\AmazonPayController@getOrderReference'); - $router->get('payment/payone/checkout/amazonPay/placeOrder', 'Payone\Controllers\AmazonPayController@placeOrder'); + $router->get('payment/payone/checkout/amazonPay/loginButton/', 'Payone\Controllers\AmazonPayController@getAmazonPayLoginWidget'); + $router->post('payment/payone/checkout/amazonPay/renderWidgets/', 'Payone\Controllers\AmazonPayController@renderWidgets'); + $router->post('payment/payone/checkout/amazonPay/getOrderReference/', 'Payone\Controllers\AmazonPayController@getOrderReference'); + $router->get('payment/payone/checkout/amazonPay/placeOrder/', 'Payone\Controllers\AmazonPayController@placeOrder'); - $router->get('payment/payone/error', 'Payone\Controllers\CheckoutController@redirectWithNotice'); - $router->get('payment/payone/checkoutSuccess', 'Payone\Controllers\CheckoutController@checkoutSuccess'); - $router->get('payment/payone/checkout/getSepaMandateStep', 'Payone\Controllers\CheckoutController@getSepaMandateStep'); + $router->get('payment/payone/error/', 'Payone\Controllers\CheckoutController@redirectWithNotice'); + $router->get('payment/payone/checkoutSuccess/', 'Payone\Controllers\CheckoutController@checkoutSuccess'); + $router->get('payment/payone/checkout/getSepaMandateStep/', 'Payone\Controllers\CheckoutController@getSepaMandateStep'); } } From 82bfd6df28610b094695c8d66fa07829463fc9f7 Mon Sep 17 00:00:00 2001 From: Jens Konopka Date: Thu, 29 Jul 2021 12:57:36 +0200 Subject: [PATCH 341/353] Changelog / version --- meta/documents/changelog_de.md | 3 ++- meta/documents/changelog_en.md | 3 ++- plugin.json | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/meta/documents/changelog_de.md b/meta/documents/changelog_de.md index c11d96eb..c7eaee9d 100644 --- a/meta/documents/changelog_de.md +++ b/meta/documents/changelog_de.md @@ -1,9 +1,10 @@ # Release Notes für PAYONE -## 2.1.X +## 2.1.3 ### Behoben - Bei der Prüfung, ob eine Zahlungsart für die nachträgliche Bezahlung zur Verfügung steht, werden die entsprechenden Regeln angewendet, die auch für den Checkout gelten. +- Trailing Slash Einstellung aus dem Backend wird nun korrekt verarbeitet. ## 2.1.2 diff --git a/meta/documents/changelog_en.md b/meta/documents/changelog_en.md index 673ff120..b2ea7d32 100644 --- a/meta/documents/changelog_en.md +++ b/meta/documents/changelog_en.md @@ -1,9 +1,10 @@ # Release Notes for PAYONE -## 2.1.X +## 2.1.3 ### Fixed - When checking whether a payment method is available for subsequent payment, the same rules that are applied to the checkout als apply here. +- Trailing slash setting from the backend is now processed correctly. ## 2.1.2 diff --git a/plugin.json b/plugin.json index 9d23b2a5..d5320f25 100644 --- a/plugin.json +++ b/plugin.json @@ -1,5 +1,5 @@ { - "version": "2.1.2", + "version": "2.1.3", "license": "MIT", "pluginIcon": "icon_plugin_xs.png", "price": 0.0, From 7da53ded5c6e767d22223d64bd34fb81c1e01f44 Mon Sep 17 00:00:00 2001 From: Jens Konopka Date: Thu, 29 Jul 2021 14:13:07 +0200 Subject: [PATCH 342/353] remove unused --- src/Methods/PaymentOrderValidator.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/Methods/PaymentOrderValidator.php b/src/Methods/PaymentOrderValidator.php index 87324d9b..21c04b8c 100644 --- a/src/Methods/PaymentOrderValidator.php +++ b/src/Methods/PaymentOrderValidator.php @@ -100,8 +100,6 @@ protected function log($payment, $code, $value) $logger->debug( $code, [ - 'basketID' => $this->basket->id, - 'customer' => $this->basket->customerId, 'payment' => $payment, 'value' => $value, ] From 7115431a598edc0398646cacd98aa0c4e8f2ed47 Mon Sep 17 00:00:00 2001 From: Jens Konopka Date: Tue, 31 Aug 2021 13:15:38 +0200 Subject: [PATCH 343/353] add copy plugin event --- meta/documents/changelog_de.md | 5 +++++ meta/documents/changelog_en.md | 5 +++++ plugin.json | 2 +- src/Hooks/CopyPluginSetHook.php | 29 +++++++++++++++++++++++++ src/Models/Settings.php | 10 ++++----- src/Providers/PayoneServiceProvider.php | 4 +++- src/Services/SettingsService.php | 9 ++++++++ 7 files changed, 57 insertions(+), 7 deletions(-) create mode 100644 src/Hooks/CopyPluginSetHook.php diff --git a/meta/documents/changelog_de.md b/meta/documents/changelog_de.md index c7eaee9d..e1562ceb 100644 --- a/meta/documents/changelog_de.md +++ b/meta/documents/changelog_de.md @@ -1,5 +1,10 @@ # Release Notes für PAYONE +## 2.2.0 + +### Hinzugefügt +- Beim Kopieren eines Plugin Sets werden nun auch die Einstellungen des Assistenten mit kopiert. + ## 2.1.3 ### Behoben diff --git a/meta/documents/changelog_en.md b/meta/documents/changelog_en.md index b2ea7d32..3ab8698c 100644 --- a/meta/documents/changelog_en.md +++ b/meta/documents/changelog_en.md @@ -1,5 +1,10 @@ # Release Notes for PAYONE +## 2.2.0 + +### Added +- When copying a plugin set, the settings of the assistant are now also copied. + ## 2.1.3 ### Fixed diff --git a/plugin.json b/plugin.json index d5320f25..ac400e0c 100644 --- a/plugin.json +++ b/plugin.json @@ -1,5 +1,5 @@ { - "version": "2.1.3", + "version": "2.2.0", "license": "MIT", "pluginIcon": "icon_plugin_xs.png", "price": 0.0, diff --git a/src/Hooks/CopyPluginSetHook.php b/src/Hooks/CopyPluginSetHook.php new file mode 100644 index 00000000..225536b6 --- /dev/null +++ b/src/Hooks/CopyPluginSetHook.php @@ -0,0 +1,29 @@ +getAllSettingsForPluginSetId($copyPluginSet->getSourcePluginSetId()); + + if(is_array($availableSettings)) { + foreach ($availableSettings as $setting) { + if($setting instanceof Settings) { + $setting->id = null; + $setting->pluginSetId = $copyPluginSet->getTargetPluginSetId(); + $setting->save(); + } + } + } + } +} \ No newline at end of file diff --git a/src/Models/Settings.php b/src/Models/Settings.php index 263b693c..6f244253 100644 --- a/src/Models/Settings.php +++ b/src/Models/Settings.php @@ -69,7 +69,7 @@ public function create(array $data): Model 'PAYONE_PAYONE_AMAZON_PAY' => $data['PAYONE_PAYONE_AMAZON_PAY'] ]; - return $this->save($this); + return $this->save(); } /** @@ -152,20 +152,20 @@ public function updateValues(array $data): Model $this->value['payoneMethods'] = $data['payoneMethods']; } - return $this->save($this); + return $this->save(); } /** * @param Settings $newModel * @return Model */ - private function save(Settings $newModel): Model + public function save(): Model { /** @var DataBase $database */ $database = pluginApp(DataBase::class); - $newModel->updatedAt = (string)Carbon::now(); + $this->updatedAt = (string)Carbon::now(); - return $database->save($newModel); + return $database->save($this); } /** diff --git a/src/Providers/PayoneServiceProvider.php b/src/Providers/PayoneServiceProvider.php index 97647ef6..ad40aa52 100755 --- a/src/Providers/PayoneServiceProvider.php +++ b/src/Providers/PayoneServiceProvider.php @@ -6,6 +6,7 @@ use Payone\Adapter\Logger; use Payone\Adapter\SessionStorage; use Payone\Assistants\PayoneAssistant; +use Payone\Events\CopyPluginSetHook; use Payone\Helpers\AddressHelper; use Payone\Helpers\OrderHelper; use Payone\Helpers\PaymentHelper; @@ -52,6 +53,7 @@ use Plenty\Modules\Payment\Events\Checkout\GetPaymentMethodContent; use Plenty\Modules\Payment\Method\Contracts\PaymentMethodContainer; use Plenty\Modules\Payment\Models\Payment; +use Plenty\Modules\Plugin\Events\CopyPluginSet; use Plenty\Modules\Wizard\Contracts\WizardContainerContract; use Plenty\Plugin\Events\Dispatcher; use Plenty\Plugin\ServiceProvider; @@ -113,7 +115,7 @@ public function boot( $this->registerAmazonPayListener($eventDispatcher, $basket); - + $eventDispatcher->listen(CopyPluginSet::class, CopyPluginSetHook::class); pluginApp(WizardContainerContract::class)->register('payment-payone-assistant', PayoneAssistant::class); } diff --git a/src/Services/SettingsService.php b/src/Services/SettingsService.php index ce2abb23..dc905a8d 100644 --- a/src/Services/SettingsService.php +++ b/src/Services/SettingsService.php @@ -162,4 +162,13 @@ public function deleteSettings(int $clientId, int $pluginSetId): bool return false; } + + /** + * @param int $pluginSetId + * @return Settings[]|array|\Plenty\Modules\Plugin\DataBase\Contracts\Model[] + */ + public function getAllSettingsForPluginSetId(int $pluginSetId) + { + return $this->database->query(Settings::class)->where('pluginSetId', $pluginSetId)->get(); + } } \ No newline at end of file From bf82800db3e4041f94abf94bf7cfa54bcd284c99 Mon Sep 17 00:00:00 2001 From: Jens Konopka Date: Tue, 31 Aug 2021 14:42:06 +0200 Subject: [PATCH 344/353] fix namespace --- src/Hooks/CopyPluginSetHook.php | 2 +- src/Providers/PayoneServiceProvider.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Hooks/CopyPluginSetHook.php b/src/Hooks/CopyPluginSetHook.php index 225536b6..bccb1168 100644 --- a/src/Hooks/CopyPluginSetHook.php +++ b/src/Hooks/CopyPluginSetHook.php @@ -1,7 +1,7 @@ Date: Tue, 31 Aug 2021 16:19:26 +0200 Subject: [PATCH 345/353] Apply suggestions from code review --- src/Hooks/CopyPluginSetHook.php | 2 +- src/Services/SettingsService.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Hooks/CopyPluginSetHook.php b/src/Hooks/CopyPluginSetHook.php index bccb1168..e56ce8e7 100644 --- a/src/Hooks/CopyPluginSetHook.php +++ b/src/Hooks/CopyPluginSetHook.php @@ -26,4 +26,4 @@ public function handle(CopyPluginSet $copyPluginSet) } } } -} \ No newline at end of file +} diff --git a/src/Services/SettingsService.php b/src/Services/SettingsService.php index dc905a8d..9e98b011 100644 --- a/src/Services/SettingsService.php +++ b/src/Services/SettingsService.php @@ -171,4 +171,4 @@ public function getAllSettingsForPluginSetId(int $pluginSetId) { return $this->database->query(Settings::class)->where('pluginSetId', $pluginSetId)->get(); } -} \ No newline at end of file +} From d7175728fe904a02741c5dcbc9ab7e4555047a98 Mon Sep 17 00:00:00 2001 From: Jens Konopka Date: Thu, 4 Nov 2021 14:43:57 +0100 Subject: [PATCH 346/353] update delivery countries selection --- meta/documents/changelog_de.md | 5 ++ meta/documents/changelog_en.md | 5 ++ plugin.json | 2 +- src/Assistants/PayoneAssistant.php | 119 ++++++++++++++++++++--------- 4 files changed, 93 insertions(+), 38 deletions(-) diff --git a/meta/documents/changelog_de.md b/meta/documents/changelog_de.md index e1562ceb..503f3358 100644 --- a/meta/documents/changelog_de.md +++ b/meta/documents/changelog_de.md @@ -1,5 +1,10 @@ # Release Notes für PAYONE +## 2.3.0 + +### Hinzugefügt +- Die Auswahl der verfügbaren Lieferländer wurde erweitert. + ## 2.2.0 ### Hinzugefügt diff --git a/meta/documents/changelog_en.md b/meta/documents/changelog_en.md index 3ab8698c..4f4b31a8 100644 --- a/meta/documents/changelog_en.md +++ b/meta/documents/changelog_en.md @@ -1,5 +1,10 @@ # Release Notes for PAYONE +## 2.3.0 + +### Added +- The selection of available delivery countries has been extended. + ## 2.2.0 ### Added diff --git a/plugin.json b/plugin.json index ac400e0c..4c7e0ad6 100644 --- a/plugin.json +++ b/plugin.json @@ -1,5 +1,5 @@ { - "version": "2.2.0", + "version": "2.3.0", "license": "MIT", "pluginIcon": "icon_plugin_xs.png", "price": 0.0, diff --git a/src/Assistants/PayoneAssistant.php b/src/Assistants/PayoneAssistant.php index 49c1996c..089c3f1c 100644 --- a/src/Assistants/PayoneAssistant.php +++ b/src/Assistants/PayoneAssistant.php @@ -7,11 +7,20 @@ use Payone\Helpers\PaymentHelper; use Payone\Methods\PayoneAmazonPayPaymentMethod; use Payone\Methods\PayoneCCPaymentMethod; +use Payone\Methods\PayoneCODPaymentMethod; +use Payone\Methods\PayoneDirectDebitPaymentMethod; +use Payone\Methods\PayoneInvoicePaymentMethod; use Payone\Methods\PayoneInvoiceSecurePaymentMethod; +use Payone\Methods\PayonePaydirektPaymentMethod; +use Payone\Methods\PayonePayolutionInstallmentPaymentMethod; +use Payone\Methods\PayonePayPalPaymentMethod; +use Payone\Methods\PayonePrePaymentPaymentMethod; +use Payone\Methods\PayoneRatePayInstallmentPaymentMethod; use Payone\Methods\PayoneSofortPaymentMethod; use Payone\Models\CreditcardTypes; use Plenty\Modules\Order\Shipping\Countries\Contracts\CountryRepositoryContract; use Plenty\Modules\Order\Shipping\Countries\Models\Country; +use Plenty\Modules\System\Contracts\SystemInformationRepositoryContract; use Plenty\Modules\System\Contracts\WebstoreRepositoryContract; use Plenty\Modules\System\Models\Webstore; use Plenty\Modules\User\Contracts\UserRepositoryContract; @@ -252,6 +261,7 @@ protected function createProductsPageAndSteps(array $config): array */ protected function createSecureInvoiceStep(array $config, string $paymentCode): array { + $deliveryCountries = $this->getSpecificDeliveryCountries($paymentCode); $config['steps']['payone'.$paymentCode.'Step'] = [ 'title' => 'Assistant.titlePayoneProductsStep'.$paymentCode, 'description' => 'Assistant.descriptionPayoneProductsStep'.$paymentCode, @@ -264,7 +274,17 @@ protected function createSecureInvoiceStep(array $config, string $paymentCode): 'form' => $this->getMinMaxAmountConfig($paymentCode) + - $this->getDeliveryCountriesConfig($paymentCode) + [ + $paymentCode.'AllowedDeliveryCountries' => [ + 'type' => 'checkboxGroup', + 'defaultValue' => $this->getDefaultCountries($deliveryCountries), + 'options' => [ + 'name' => 'Assistant.allowedDeliveryCountries', + 'required' => true, + 'checkboxValues' => $deliveryCountries + ] + ] + ] + $this->getAuthorizationConfig($paymentCode) + [ @@ -369,6 +389,7 @@ protected function createCreditCardStep(array $config, string $paymentCode): arr */ protected function createAmazonPayStep(array $config, string $paymentCode): array { + $deliveryCountries = $this->getSpecificDeliveryCountries($paymentCode); $config['steps']['payone'.$paymentCode.'Step'] = [ 'title' => 'Assistant.titlePayoneProductsStep'.$paymentCode, 'description' => 'Assistant.descriptionPayoneProductsStep'.$paymentCode, @@ -383,11 +404,11 @@ protected function createAmazonPayStep(array $config, string $paymentCode): arra + [ $paymentCode.'AllowedDeliveryCountries' => [ 'type' => 'checkboxGroup', - 'defaultValue' => $this->activeCountries4AmazonPay, + 'defaultValue' => $this->getDefaultCountries($deliveryCountries), 'options' => [ 'name' => 'Assistant.allowedDeliveryCountries', 'required' => true, - 'checkboxValues' => $this->getDeliveryCountries4AmazonPay() + 'checkboxValues' => $deliveryCountries ] ], ] @@ -453,14 +474,15 @@ protected function getMinMaxAmountConfig(string $paymentCode): array */ protected function getDeliveryCountriesConfig(string $paymentCode): array { + $deliveryCountries = $this->getSpecificDeliveryCountries($paymentCode); return [ $paymentCode.'AllowedDeliveryCountries' => [ 'type' => 'checkboxGroup', - 'defaultValue' => $this->activeCountries, + 'defaultValue' => $this->getDefaultCountries($deliveryCountries), 'options' => [ 'name' => 'Assistant.allowedDeliveryCountries', 'required' => true, - 'checkboxValues' => $this->getDeliveryCountries() + 'checkboxValues' => $deliveryCountries ] ] ]; @@ -576,32 +598,46 @@ protected function getBackendUsers(): array /** * @return array */ - protected function getDeliveryCountries(): array + protected function getSpecificDeliveryCountries($paymentMethod): array { $deliveryCountries = []; - $countries = ['DE', 'AT', 'CH']; - foreach($countries as $country) { - $deliveryCountries[] = [ - 'caption' => 'Assistant.deliveryCountry'.$country, - 'value' => $country - ]; + switch ($paymentMethod) { + case PayoneInvoiceSecurePaymentMethod::PAYMENT_CODE: + case PayoneSofortPaymentMethod::PAYMENT_CODE: + $allowedCountries = ['DE', 'AT', 'CH']; + break; + case PayoneDirectDebitPaymentMethod::PAYMENT_CODE: + $allowedCountries = ['FI','AD','AT','PT','BE','ES','CY','EE','FR','DE','GI','GR','IE','IT','LV','LT','LU','MT','MC','NL','SM','SK','SI']; + break; + case PayonePaydirektPaymentMethod::PAYMENT_CODE: + $allowedCountries = ['DE']; + break; + case PayoneCCPaymentMethod::PAYMENT_CODE: + case PayoneCODPaymentMethod::PAYMENT_CODE: + case PayoneInvoicePaymentMethod::PAYMENT_CODE: + case PayonePayolutionInstallmentPaymentMethod::PAYMENT_CODE: + case PayonePayPalPaymentMethod::PAYMENT_CODE: + case PayonePrePaymentPaymentMethod::PAYMENT_CODE: + case PayoneRatePayInstallmentPaymentMethod::PAYMENT_CODE: + case PayoneAmazonPayPaymentMethod::PAYMENT_CODE: + default: + $allowedCountries = []; + break; } - return $deliveryCountries; - } - - /** - * @return array - */ - protected function getDeliveryCountries4AmazonPay(): array - { - $deliveryCountries = []; - $countries = ['DE', 'FR', 'IT', 'ES', 'LU', 'NL', 'SE', 'PT', 'HU', 'DK']; + /** @var CountryRepositoryContract $countryRepository */ + $countryRepository = pluginApp(CountryRepositoryContract::class); + $systemLanguage = $this->getLanguage(); + $countries = $countryRepository->getCountriesList(null, ['names']); + /** @var Country $country */ foreach($countries as $country) { - $deliveryCountries[] = [ - 'caption' => 'Assistant.deliveryCountry'.$country, - 'value' => $country - ]; + if(count($allowedCountries) <= 0 || array_search($country->isoCode2, $allowedCountries)) { + $name = $country->names->where('lang', $systemLanguage)->first()->name; + $deliveryCountries[$country->isoCode2] = [ + 'caption' => $name ?? $country->name, + 'value' => $country->id + ]; + } } return $deliveryCountries; @@ -610,25 +646,19 @@ protected function getDeliveryCountries4AmazonPay(): array /** * Load the active country values */ - protected function loadActiveCountriesValues() + protected function getDefaultCountries($availableCountries = array()) { - if ($this->activeCountries === null || $this->activeCountries4AmazonPay === null) { + if ($this->activeCountries === null) { /** @var CountryRepositoryContract $countryRepository */ $countryRepository = pluginApp(CountryRepositoryContract::class); $activeCountries = $countryRepository->getActiveCountriesList(); /** @var Country $country */ foreach($activeCountries as $country){ - // All Payone payment methods - if(in_array($country->isoCode2, ['DE', 'AT', 'CH'])) { - $this->activeCountries[] = $country->isoCode2; - } - - // Amazon Pay over Payone - if(in_array($country->isoCode2, ['DE', 'FR', 'IT', 'ES', 'LU', 'NL', 'SE', 'PT', 'HU', 'DK'])) { - $this->activeCountries4AmazonPay[] = $country->isoCode2; - } + $this->activeCountries[$country->isoCode2] = $country->isoCode2; } } + + return array_intersect_key($availableCountries, $this->activeCountries); } /** @@ -650,4 +680,19 @@ protected function getAllowedCreditCardTypes(): array return $allowedCreditCards; } + + /** + * @return string + */ + protected function getLanguage() + { + if ($this->language === null) { + /** @var SystemInformationRepositoryContract $systemInformationRepository */ + $systemInformationRepository = pluginApp(SystemInformationRepositoryContract::class); + // TODO: this seems not be the log-in language. Where to get it? + $this->language = $systemInformationRepository->loadValue('systemLang'); + } + + return $this->language; + } } From 95f0f68bc26e695b91f2c564eeb90225bc1336c4 Mon Sep 17 00:00:00 2001 From: Jens Konopka Date: Thu, 4 Nov 2021 15:00:59 +0100 Subject: [PATCH 347/353] add missing variable --- src/Assistants/PayoneAssistant.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Assistants/PayoneAssistant.php b/src/Assistants/PayoneAssistant.php index 089c3f1c..9bc25676 100644 --- a/src/Assistants/PayoneAssistant.php +++ b/src/Assistants/PayoneAssistant.php @@ -41,9 +41,9 @@ class PayoneAssistant extends WizardProvider protected $activeCountries; /** - * @var array + * @var string */ - protected $activeCountries4AmazonPay; + protected $language; /** * PayoneAssistant constructor. From fbdcfbeb6b068ef77f45ebcf3600a31caf447052 Mon Sep 17 00:00:00 2001 From: Jens Konopka Date: Fri, 5 Nov 2021 09:52:11 +0100 Subject: [PATCH 348/353] refactor migrations --- plugin.json | 3 +- .../CreateAmazonPayPaymentMethod.php | 68 ------------------- ...tMethods.php => CreatePaymentMethods2.php} | 41 ++++------- 3 files changed, 14 insertions(+), 98 deletions(-) delete mode 100644 src/Migrations/CreateAmazonPayPaymentMethod.php rename src/Migrations/{CreatePaymentMethods.php => CreatePaymentMethods2.php} (50%) diff --git a/plugin.json b/plugin.json index 4c7e0ad6..46e3d18f 100644 --- a/plugin.json +++ b/plugin.json @@ -42,8 +42,7 @@ }, "serviceProvider": "Payone\\Providers\\PayoneServiceProvider", "runOnBuild": [ - "Payone\\Migrations\\CreatePaymentMethods", - "Payone\\Migrations\\CreateAmazonPayPaymentMethod", + "Payone\\Migrations\\CreatePaymentMethods2", "Payone\\Migrations\\CreateSettingsTable" ], "dataProviders": [ diff --git a/src/Migrations/CreateAmazonPayPaymentMethod.php b/src/Migrations/CreateAmazonPayPaymentMethod.php deleted file mode 100644 index cd35d3e6..00000000 --- a/src/Migrations/CreateAmazonPayPaymentMethod.php +++ /dev/null @@ -1,68 +0,0 @@ -paymentMethodRepo = $paymentMethodRepo; - $this->paymentHelper = $paymentHelper; - $this->logger = $logger; - } - - /** - * Run on plugin build - * - * Create Payone payment methods - */ - public function run() - { - $paymentCode = PayoneAmazonPayPaymentMethod::PAYMENT_CODE; - if ($this->paymentHelper->getMopId($paymentCode) != 'no_paymentmethod_found') { - $this->logger->debug(' Skipping payment method creation of ' . $paymentCode); - return true; - } - $this->logger->debug(' Creating payment method ' . $paymentCode); - $this->paymentMethodRepo->createPaymentMethod([ - 'pluginKey' => PluginConstants::NAME, - 'paymentKey' => $paymentCode, - 'name' => $paymentCode, - ]); - } -} diff --git a/src/Migrations/CreatePaymentMethods.php b/src/Migrations/CreatePaymentMethods2.php similarity index 50% rename from src/Migrations/CreatePaymentMethods.php rename to src/Migrations/CreatePaymentMethods2.php index 64a16d07..933b9e57 100644 --- a/src/Migrations/CreatePaymentMethods.php +++ b/src/Migrations/CreatePaymentMethods2.php @@ -2,7 +2,6 @@ namespace Payone\Migrations; -use Payone\Adapter\Logger; use Payone\Helpers\PaymentHelper; use Payone\PluginConstants; use Plenty\Modules\Payment\Method\Contracts\PaymentMethodRepositoryContract; @@ -10,61 +9,47 @@ /** * Migration to create payment mehtods * - * Class CreatePaymentMethod + * Class CreatePaymentMethod2 */ -class CreatePaymentMethods +class CreatePaymentMethods2 { /** * @var PaymentMethodRepositoryContract */ - private $paymentMethodRepo; + protected $paymentMethodRepo; /** * @var PaymentHelper */ - private $paymentHelper; - /** - * @var Logger - */ - private $logger; + protected $paymentHelper; /** * CreatePaymentMethod constructor. * * @param PaymentMethodRepositoryContract $paymentMethodRepo * @param PaymentHelper $paymentHelper - * @param Logger $logger */ public function __construct( PaymentMethodRepositoryContract $paymentMethodRepo, PaymentHelper $paymentHelper, - Logger $logger ) { $this->paymentMethodRepo = $paymentMethodRepo; $this->paymentHelper = $paymentHelper; - $this->logger = $logger; } - /** - * Run on plugin build - * - * Create Payone payment methods - */ public function run() { foreach ($this->paymentHelper->getPaymentCodes() as $paymentCode) { - if ($this->paymentHelper->getMopId($paymentCode) != 'no_paymentmethod_found') { - $this->logger->debug(' Skipping payment method creation of ' . $paymentCode); - continue; + // Check whether the ID of the PayPal payment method has been created + if ($this->paymentHelper->getMopId($paymentCode) == 'no_paymentmethod_found') { + $this->paymentMethodRepo->createPaymentMethod( + [ + 'pluginKey' => PluginConstants::NAME, + 'paymentKey' => $paymentCode, + 'name' => $paymentCode, + ] + ); } - $this->logger->debug(' Creating payment method ' . $paymentCode); - $this->paymentMethodRepo->createPaymentMethod( - [ - 'pluginKey' => PluginConstants::NAME, - 'paymentKey' => $paymentCode, - 'name' => $paymentCode, - ] - ); } } } From 0fe954b6f0682a7388915a1dd6a107da0156934f Mon Sep 17 00:00:00 2001 From: Jens Konopka Date: Thu, 25 Nov 2021 15:01:55 +0100 Subject: [PATCH 349/353] fix secure invoice add delivery countries --- meta/documents/changelog_de.md | 3 + meta/documents/changelog_en.md | 3 + .../PayoneApi/Request/Parts/CartFactory.php | 24 +++--- .../lib/PayoneApi/Request/Parts/CartItem.php | 2 +- src/Assistants/PayoneAssistant.php | 83 +++++++++++-------- src/Controllers/StatusController.php | 12 +-- src/Methods/PaymentValidator.php | 5 +- src/Migrations/CreatePaymentMethods2.php | 2 +- src/PluginConstants.php | 2 +- .../Api/Request/DataProviderAbstract.php | 5 +- 10 files changed, 78 insertions(+), 63 deletions(-) diff --git a/meta/documents/changelog_de.md b/meta/documents/changelog_de.md index 503f3358..50254796 100644 --- a/meta/documents/changelog_de.md +++ b/meta/documents/changelog_de.md @@ -5,6 +5,9 @@ ### Hinzugefügt - Die Auswahl der verfügbaren Lieferländer wurde erweitert. +### Behoben +- Beim gesicherten Rechnungskauf werden die Artikeldaten nun korrekt übergeben. + ## 2.2.0 ### Hinzugefügt diff --git a/meta/documents/changelog_en.md b/meta/documents/changelog_en.md index 4f4b31a8..800b97aa 100644 --- a/meta/documents/changelog_en.md +++ b/meta/documents/changelog_en.md @@ -5,6 +5,9 @@ ### Added - The selection of available delivery countries has been extended. +### Fixed +- The item data is now transferred correctly when using the secure invoice method. + ## 2.2.0 ### Added diff --git a/resources/lib/PayoneApi/Request/Parts/CartFactory.php b/resources/lib/PayoneApi/Request/Parts/CartFactory.php index ff847041..b637f365 100644 --- a/resources/lib/PayoneApi/Request/Parts/CartFactory.php +++ b/resources/lib/PayoneApi/Request/Parts/CartFactory.php @@ -14,16 +14,18 @@ static public function create(array $requestData) { $cart = new Cart(); foreach ($requestData['basketItems'] as $i => $cartItemData) { - $cartItem = new CartItem( - ($i+1), - $cartItemData['itemId'], - CartItem::TYPE_GOODS, - $cartItemData['quantity'] ?? '', - $cartItemData['price'], - $cartItemData['vat'], - $cartItemData['name'] ?? '' - ); - $cart->add($cartItem); + if(isset($cartItemData['itemId'])) { + $cartItem = new CartItem( + ($i+1), + $cartItemData['itemId'], + CartItem::TYPE_GOODS, + $cartItemData['quantity'] ?? '', + $cartItemData['price'], + $cartItemData['vat'], + $cartItemData['name'] ?? '' + ); + $cart->add($cartItem); + } } $cart->add(self::calculateShipping($requestData, $cart)); return $cart; @@ -44,7 +46,7 @@ private static function calculateShipping(array $requestData, Cart $cart) $shippingCost = new CartItem( (count($cart->getCartItems())+1), '-', - CartItem::TYPE_SHIPMENt, + CartItem::TYPE_SHIPMENT, 1, $basket['shippingAmount'], $taxRate, diff --git a/resources/lib/PayoneApi/Request/Parts/CartItem.php b/resources/lib/PayoneApi/Request/Parts/CartItem.php index 64075430..eed2837e 100644 --- a/resources/lib/PayoneApi/Request/Parts/CartItem.php +++ b/resources/lib/PayoneApi/Request/Parts/CartItem.php @@ -5,7 +5,7 @@ class CartItem implements \JsonSerializable { const TYPE_GOODS = 'goods'; - const TYPE_SHIPMENt = 'shipment'; + const TYPE_SHIPMENT = 'shipment'; const TYPE_HANDLING = 'handling'; /** * 0..n diff --git a/src/Assistants/PayoneAssistant.php b/src/Assistants/PayoneAssistant.php index 9bc25676..5f918952 100644 --- a/src/Assistants/PayoneAssistant.php +++ b/src/Assistants/PayoneAssistant.php @@ -216,7 +216,11 @@ protected function createProductsPageAndSteps(array $config): array ] ]; - if(in_array($paymentCode, [PayoneInvoiceSecurePaymentMethod::PAYMENT_CODE, PayoneCCPaymentMethod::PAYMENT_CODE, PayoneAmazonPayPaymentMethod::PAYMENT_CODE])) { + if(in_array($paymentCode, [ + PayoneInvoiceSecurePaymentMethod::PAYMENT_CODE, + PayoneCCPaymentMethod::PAYMENT_CODE, + PayoneAmazonPayPaymentMethod::PAYMENT_CODE + ])) { // We need some special configurations for this methods. switch ($paymentCode) { case PayoneInvoiceSecurePaymentMethod::PAYMENT_CODE: @@ -261,7 +265,6 @@ protected function createProductsPageAndSteps(array $config): array */ protected function createSecureInvoiceStep(array $config, string $paymentCode): array { - $deliveryCountries = $this->getSpecificDeliveryCountries($paymentCode); $config['steps']['payone'.$paymentCode.'Step'] = [ 'title' => 'Assistant.titlePayoneProductsStep'.$paymentCode, 'description' => 'Assistant.descriptionPayoneProductsStep'.$paymentCode, @@ -274,17 +277,7 @@ protected function createSecureInvoiceStep(array $config, string $paymentCode): 'form' => $this->getMinMaxAmountConfig($paymentCode) + - [ - $paymentCode.'AllowedDeliveryCountries' => [ - 'type' => 'checkboxGroup', - 'defaultValue' => $this->getDefaultCountries($deliveryCountries), - 'options' => [ - 'name' => 'Assistant.allowedDeliveryCountries', - 'required' => true, - 'checkboxValues' => $deliveryCountries - ] - ] - ] + $this->getDeliveryCountriesConfig($paymentCode) + $this->getAuthorizationConfig($paymentCode) + [ @@ -389,7 +382,6 @@ protected function createCreditCardStep(array $config, string $paymentCode): arr */ protected function createAmazonPayStep(array $config, string $paymentCode): array { - $deliveryCountries = $this->getSpecificDeliveryCountries($paymentCode); $config['steps']['payone'.$paymentCode.'Step'] = [ 'title' => 'Assistant.titlePayoneProductsStep'.$paymentCode, 'description' => 'Assistant.descriptionPayoneProductsStep'.$paymentCode, @@ -401,18 +393,11 @@ protected function createAmazonPayStep(array $config, string $paymentCode): arra 'description' => 'Assistant.descriptionPayonePaymentSectionAmazonPay', 'form' => $this->getMinMaxAmountConfig($paymentCode) - + [ - $paymentCode.'AllowedDeliveryCountries' => [ - 'type' => 'checkboxGroup', - 'defaultValue' => $this->getDefaultCountries($deliveryCountries), - 'options' => [ - 'name' => 'Assistant.allowedDeliveryCountries', - 'required' => true, - 'checkboxValues' => $deliveryCountries - ] - ], - ] - + $this->getAuthorizationConfig($paymentCode) + + + + $this->getDeliveryCountriesConfig($paymentCode) + + + $this->getAuthorizationConfig($paymentCode) + + [ $paymentCode.'Sandbox' => [ 'type' => 'select', @@ -482,7 +467,7 @@ protected function getDeliveryCountriesConfig(string $paymentCode): array 'options' => [ 'name' => 'Assistant.allowedDeliveryCountries', 'required' => true, - 'checkboxValues' => $deliveryCountries + 'checkboxValues' => array_values($deliveryCountries) ] ] ]; @@ -604,13 +589,43 @@ protected function getSpecificDeliveryCountries($paymentMethod): array switch ($paymentMethod) { case PayoneInvoiceSecurePaymentMethod::PAYMENT_CODE: case PayoneSofortPaymentMethod::PAYMENT_CODE: - $allowedCountries = ['DE', 'AT', 'CH']; + $allowedCountries = [ + 1, // DE + 2, // AT + 4 // CH + ]; break; case PayoneDirectDebitPaymentMethod::PAYMENT_CODE: - $allowedCountries = ['FI','AD','AT','PT','BE','ES','CY','EE','FR','DE','GI','GR','IE','IT','LV','LT','LU','MT','MC','NL','SM','SK','SI']; + $allowedCountries = [ + 1, //'DE', + 2, //'AT', + 3, // 'BE', + 5, //'CY', + 8, //'ES', + 9, //'EE', + 10, //'FR', + 11, //'FI', + 13, //'GR', + 15, //'IT', + 16, //'IE', + 17, //'LU', + 18, //'LV', + 19, //'MT', + 21, //'NL', + 22, //'PT', + 26, //'SK', + 27, //'SI' + 33, //'LT', + 35, //'MC', + 71, //'AD', + 131, //'GI', + 212, //'SM', + ]; break; case PayonePaydirektPaymentMethod::PAYMENT_CODE: - $allowedCountries = ['DE']; + $allowedCountries = [ + 1, //DE + ]; break; case PayoneCCPaymentMethod::PAYMENT_CODE: case PayoneCODPaymentMethod::PAYMENT_CODE: @@ -631,9 +646,9 @@ protected function getSpecificDeliveryCountries($paymentMethod): array $countries = $countryRepository->getCountriesList(null, ['names']); /** @var Country $country */ foreach($countries as $country) { - if(count($allowedCountries) <= 0 || array_search($country->isoCode2, $allowedCountries)) { + if(count($allowedCountries) <= 0 || array_search($country->id, $allowedCountries) !== false ) { $name = $country->names->where('lang', $systemLanguage)->first()->name; - $deliveryCountries[$country->isoCode2] = [ + $deliveryCountries[$country->id] = [ 'caption' => $name ?? $country->name, 'value' => $country->id ]; @@ -654,11 +669,11 @@ protected function getDefaultCountries($availableCountries = array()) $activeCountries = $countryRepository->getActiveCountriesList(); /** @var Country $country */ foreach($activeCountries as $country){ - $this->activeCountries[$country->isoCode2] = $country->isoCode2; + $this->activeCountries[$country->id] = $country->isoCode2; } } - return array_intersect_key($availableCountries, $this->activeCountries); + return array_column(array_intersect_key($availableCountries, $this->activeCountries), 'value'); } /** diff --git a/src/Controllers/StatusController.php b/src/Controllers/StatusController.php index 9187c38c..9011aaf7 100644 --- a/src/Controllers/StatusController.php +++ b/src/Controllers/StatusController.php @@ -4,7 +4,6 @@ use Payone\Adapter\Logger; use Payone\Methods\PayoneInvoiceSecurePaymentMethod; -use Payone\Migrations\CreatePaymentMethods; use Payone\Services\PaymentCreation; use Payone\Services\PaymentDocuments; use Payone\Services\SettingsService; @@ -31,11 +30,6 @@ class StatusController extends Controller */ protected $paymentCreation; - /** - * @var CreatePaymentMethods - */ - protected $paymentMigration; - /** * @var PaymentDocuments */ @@ -53,7 +47,6 @@ class StatusController extends Controller * @param SettingsService $settingsService * @param PaymentCreation $paymentCreation * @param PaymentDocuments $paymentDocument - * @param CreatePaymentMethods $paymentMigration * @param Logger $logger */ public function __construct( @@ -61,15 +54,12 @@ public function __construct( SettingsService $settingsService, PaymentCreation $paymentCreation, PaymentDocuments $paymentDocument, - CreatePaymentMethods $paymentMigration, Logger $logger - ) - { + ) { $this->request = $request; $this->settingsService = $settingsService; $this->paymentCreation = $paymentCreation; $this->paymentDocument = $paymentDocument; - $this->paymentMigration = $paymentMigration; $this->logger = $logger; } diff --git a/src/Methods/PaymentValidator.php b/src/Methods/PaymentValidator.php index 81b8a060..127fd1e6 100644 --- a/src/Methods/PaymentValidator.php +++ b/src/Methods/PaymentValidator.php @@ -65,9 +65,8 @@ public function validate(PaymentAbstract $payment, SettingsService $settingsServ return true; } - $country = $billingAddress->country->isoCode2; - if (!in_array($country, $payment->getAllowedCountries())) { - $this->log($payment->getName(), 'Payment.countryNotAllowed', $country); + if (!in_array($billingAddress->countryId, $payment->getAllowedCountries())) { + $this->log($payment->getName(), 'Payment.countryNotAllowed', $billingAddress->countryId); return false; } diff --git a/src/Migrations/CreatePaymentMethods2.php b/src/Migrations/CreatePaymentMethods2.php index 933b9e57..e782db2e 100644 --- a/src/Migrations/CreatePaymentMethods2.php +++ b/src/Migrations/CreatePaymentMethods2.php @@ -31,7 +31,7 @@ class CreatePaymentMethods2 */ public function __construct( PaymentMethodRepositoryContract $paymentMethodRepo, - PaymentHelper $paymentHelper, + PaymentHelper $paymentHelper ) { $this->paymentMethodRepo = $paymentMethodRepo; $this->paymentHelper = $paymentHelper; diff --git a/src/PluginConstants.php b/src/PluginConstants.php index c5d7a146..467a385c 100644 --- a/src/PluginConstants.php +++ b/src/PluginConstants.php @@ -5,5 +5,5 @@ class PluginConstants { const NAME = 'Payone'; - const VERSION = '2.1.0'; + const VERSION = '2.3.0'; } diff --git a/src/Providers/Api/Request/DataProviderAbstract.php b/src/Providers/Api/Request/DataProviderAbstract.php index 4aebfb23..90d3a055 100644 --- a/src/Providers/Api/Request/DataProviderAbstract.php +++ b/src/Providers/Api/Request/DataProviderAbstract.php @@ -185,7 +185,6 @@ protected function getCartItemData(Basket $basket) /** @var BasketItem $basketItem */ foreach ($basket->basketItems as $basketItem) { - if($basketItem->itemType != BasketItem::BASKET_ITEM_TYPE_VARIATION_ORDER_PROPERTY) { /** @var Item $item */ $item = $this->itemRepo->show($basketItem->itemId); @@ -211,6 +210,8 @@ protected function getCartItemData(Basket $basket) $name .= ' '.$basketItemOrderParam->value; } + $basketItemArr['itemId'] = $basketItem->variationId .'_'. $basketItemVariationProperty->id; + $basketItemArr['quantity'] = 1; $basketItemArr['name'] = $name; $basketItemArr['price'] = (int)round($basketItemVariationProperty->price * 100); $basketItemArr['vat'] = (int)$basketItemVariationProperty->vat; @@ -229,6 +230,8 @@ protected function getCartItemData(Basket $basket) if ($itemProperties && count($itemProperties) > 0) { foreach ($itemProperties as $itemProperty) { $basketItemArr = []; + $basketItemArr['itemId'] = $basketItem->variationId . '_' . $itemProperty->id; + $basketItemArr['quantity'] = 1; $basketItemArr['name'] = $basketItem->variationId . '_' . $itemProperty->id; $price = $itemProperty->surcharge; From 3d12748b0e6df648f6ebfcd48b3f566ef129b744 Mon Sep 17 00:00:00 2001 From: Cosmin Manciu Date: Fri, 17 Dec 2021 12:48:49 +0200 Subject: [PATCH 350/353] New Klarna Methods Payone --- resources/lang/de/Assistant.properties | 14 ++++++++++ resources/lang/de/PaymentMethods.properties | 10 ++++++- resources/lang/en/Assistant.properties | 8 ++++++ resources/lang/en/PaymentMethods.properties | 8 ++++++ src/Helpers/PaymentHelper.php | 10 ++++++- src/Methods/PaymentMethodServiceFactory.php | 8 ++++++ ...eKlarnaDirectBankTransferPaymentMethod.php | 9 +++++++ .../PayoneKlarnaDirectDebitPaymentMethod.php | 9 +++++++ .../PayoneKlarnaInstallmentsPaymentMethod.php | 9 +++++++ .../PayoneKlarnaInvoicePaymentMethod.php | 9 +++++++ src/Models/PaymentMethodContent.php | 1 + src/Models/Settings.php | 17 +++++++++++- src/Providers/PayoneServiceProvider.php | 27 +++++++++++++++++++ 13 files changed, 136 insertions(+), 3 deletions(-) create mode 100644 src/Methods/PayoneKlarnaDirectBankTransferPaymentMethod.php create mode 100644 src/Methods/PayoneKlarnaDirectDebitPaymentMethod.php create mode 100644 src/Methods/PayoneKlarnaInstallmentsPaymentMethod.php create mode 100644 src/Methods/PayoneKlarnaInvoicePaymentMethod.php diff --git a/resources/lang/de/Assistant.properties b/resources/lang/de/Assistant.properties index 0fe22af5..392210c8 100644 --- a/resources/lang/de/Assistant.properties +++ b/resources/lang/de/Assistant.properties @@ -48,6 +48,15 @@ titlePayoneProductsStepPAYONE_PAYONE_INVOICE_SECURE=Payone Gesicherte Rechnung descriptionPayoneProductsStepPAYONE_PAYONE_INVOICE_SECURE= titlePayoneProductsStepPAYONE_PAYONE_AMAZON_PAY=Amazon Pay descriptionPayoneProductsStepPAYONE_PAYONE_AMAZON_PAY= + +titlePayoneProductsStepPAYONE_PAYONE_KLARNA_DIRECT_BANK=Klarna Direct Bank Transfer +descriptionPayoneProductsStepPAYONE_PAYONE_KLARNA_DIRECT_BANK= +titlePayoneProductsStepPAYONE_PAYONE_KLARNA_DIRECT_DEBIT=Klarna Direct Debit +descriptionPayoneProductsStepPAYONE_PAYONE_KLARNA_DIRECT_DEBIT= +titlePayoneProductsStepPAYONE_PAYONE_PAYONE_KLARNA_INSTALLMENTS=Klarna Installments +descriptionPayoneProductsStepPAYONE_PAYONE_KLARNA_INSTALLMENTS= +titlePayoneProductsStepPAYONE_PAYONE_KLARNA_INVOICE=Klarna Invoice Pay +descriptionPayoneProductsStepPAYONE_PAYONE_KLARNA_INVOICE= titlePayonePaymentSection=Konfiguration descriptionPayonePaymentSection=Nimm die benötigten Konfigurationen für die Zahlungsart vor. Es sind Standardeinstellungen gesetzt, die sich jedoch anpassen lassen. Als Lieferländer sind deine aktuell im System aktivierten Lieferländer vorausgewählt. @@ -65,6 +74,11 @@ titlePAYONE_PAYONE_DIRECT_DEBIT_Toggle=Lastschrift aktivieren. titlePAYONE_PAYONE_INVOICE_SECURE_Toggle=Gesicherte Rechnung aktivieren. titlePAYONE_PAYONE_AMAZON_PAY_Toggle=Amazon Pay aktivieren. +titlePAYONE_PAYONE_KLARNA_DIRECT_BANK_Toggle=Klarna Direct Bank aktivieren. +titlePAYONE_PAYONE_KLARNA_DIRECT_DEBIT_Toggle=Klarna Direct Debit aktivieren. +titlePAYONE_PAYONE_PAYONE_KLARNA_Toggle=Klarna Installments aktivieren. +titlePAYONE_PAYONE_KLARNA_INVOICE_Toggle=Klarna Invoice aktivieren. + ## Additional Secure Invoice configuration description descriptionPayonePaymentSectionSecureInvoice=Nimm die benötigten Konfigurationen für die Zahlungsart vor. Es sind Standardeinstellungen gesetzt, die sich jedoch anpassen lassen. Als Lieferländer sind deine aktuell im System aktivierten Lieferländer vorausgewählt. Zudem sind eine eigene Portal-ID sowie ein eigener Schlüssel für die Zahlungsart Gesicherter Rechnungskauf notwendig. Diese müssen bei der Konfiguration separat hinterlegt werden. Die Portal-ID und den Schlüssel erhältst du im Menü Konfiguration » Zahlungsportale im Payone Merchant Interface. diff --git a/resources/lang/de/PaymentMethods.properties b/resources/lang/de/PaymentMethods.properties index ac84c7ba..e8b5275e 100644 --- a/resources/lang/de/PaymentMethods.properties +++ b/resources/lang/de/PaymentMethods.properties @@ -21,4 +21,12 @@ PAYONE_PAYONE_DIRECT_DEBIT_DESCRIPTION= PAYONE_PAYONE_INVOICE_SECURE=Gesicherte Rechnung PAYONE_PAYONE_INVOICE_SECURE_DESCRIPTION= PAYONE_PAYONE_AMAZON_PAY=Amazon Pay -PAYONE_PAYONE_AMAZON_PAY_DESCRIPTION= \ No newline at end of file +PAYONE_PAYONE_AMAZON_PAY_DESCRIPTION= +PAYONE_PAYONE_KLARNA_DIRECT_BANK=Direct Bank Transfer +PAYONE_PAYONE_KLARNA_DIRECT_BANK_DESCRIPTION= +PAYONE_PAYONE_KLARNA_DIRECT_DEBIT=Direct Debit Pay +PAYONE_PAYONE_KLARNA_DIRECT_DEBIT_DESCRIPTION= +PAYONE_PAYONE_KLARNA_INSTALLMENTS=Klarna Installments +PAYONE_PAYONE_KLARNA_INSTALLMENTS_DESCRIPTION= +PAYONE_PAYONE_KLARNA_INVOICE=Klarna Invoice +PAYONE_PAYONE_KLARNA_INVOICE_DESCRIPTION= diff --git a/resources/lang/en/Assistant.properties b/resources/lang/en/Assistant.properties index f79cb857..bb2bb63c 100644 --- a/resources/lang/en/Assistant.properties +++ b/resources/lang/en/Assistant.properties @@ -47,6 +47,14 @@ titlePayoneProductsStepPAYONE_PAYONE_INVOICE_SECURE=Payone Secure Invoice descriptionPayoneProductsStepPAYONE_PAYONE_INVOICE_SECURE= titlePayoneProductsStepPAYONE_PAYONE_AMAZON_PAY=Amazon Pay descriptionPayoneProductsStepPAYONE_PAYONE_AMAZON_PAY= +titlePayoneProductsStepPAYONE_PAYONE_KLARNA_DIRECT_BANK=Klarna Direct Bank Transfer +descriptionPayoneProductsStepPAYONE_PAYONE_KLARNA_DIRECT_BANK= +titlePayoneProductsStepPAYONE_PAYONE_KLARNA_DIRECT_DEBIT=Klarna Direct Debit +descriptionPayoneProductsStepPAYONE_PAYONE_KLARNA_DIRECT_DEBIT= +titlePayoneProductsStepPAYONE_PAYONE_PAYONE_KLARNA_INSTALLMENTS=Klarna Installments +descriptionPayoneProductsStepPAYONE_PAYONE_KLARNA_INSTALLMENTS= +titlePayoneProductsStepPAYONE_PAYONE_KLARNA_INVOICE=Klarna Invoice Pay +descriptionPayoneProductsStepPAYONE_PAYONE_KLARNA_INVOICE= titlePayonePaymentSection=Configuration descriptionPayonePaymentSection=Carry out the settings needed for this payment method. Default settings are preset, but they are adaptable. The preselected delivery countries are those currently activated in your system. diff --git a/resources/lang/en/PaymentMethods.properties b/resources/lang/en/PaymentMethods.properties index a4b14e15..a9013371 100644 --- a/resources/lang/en/PaymentMethods.properties +++ b/resources/lang/en/PaymentMethods.properties @@ -22,3 +22,11 @@ PAYONE_PAYONE_INVOICE_SECURE=Payone Secure Invoice PAYONE_PAYONE_INVOICE_SECURE_DESCRIPTION= PAYONE_PAYONE_AMAZON_PAY=Amazon Pay PAYONE_PAYONE_AMAZON_PAY_DESCRIPTION= +PAYONE_PAYONE_KLARNA_DIRECT_BANK=Direct Bank Transfer +PAYONE_PAYONE_KLARNA_DIRECT_BANK_DESCRIPTION= +PAYONE_PAYONE_KLARNA_DIRECT_DEBIT=Direct Debit Pay +PAYONE_PAYONE_KLARNA_DIRECT_DEBIT_DESCRIPTION= +PAYONE_PAYONE_KLARNA_INSTALLMENTS=Klarna Installments +PAYONE_PAYONE_KLARNA_INSTALLMENTS_DESCRIPTION= +PAYONE_PAYONE_KLARNA_INVOICE=Klarna Invoice +PAYONE_PAYONE_KLARNA_INVOICE_DESCRIPTION= diff --git a/src/Helpers/PaymentHelper.php b/src/Helpers/PaymentHelper.php index 3a5dbb64..f2a5dced 100644 --- a/src/Helpers/PaymentHelper.php +++ b/src/Helpers/PaymentHelper.php @@ -22,6 +22,10 @@ use Plenty\Modules\Payment\Method\Models\PaymentMethod; use Plenty\Modules\Payment\Models\Payment; use Plenty\Modules\Payment\Models\PaymentProperty; +use Payone\Methods\PayoneKlarnaInvoicePaymentMethod; +use Payone\Methods\PayoneKlarnaInstallmentsPaymentMethod; +use Payone\Methods\PayoneKlarnaDirectDebitPaymentMethod; +use Payone\Methods\PayoneKlarnaDirectBankTransferPaymentMethod; /** * Class PaymentHelper @@ -131,7 +135,11 @@ public function getPaymentCodes() PayonePaydirektPaymentMethod::PAYMENT_CODE, PayoneRatePayInstallmentPaymentMethod::PAYMENT_CODE, PayonePayolutionInstallmentPaymentMethod::PAYMENT_CODE, - PayoneCODPaymentMethod::PAYMENT_CODE + PayoneCODPaymentMethod::PAYMENT_CODE, + PayoneKlarnaDirectBankTransferPaymentMethod::PAYMENT_CODE, + PayoneKlarnaDirectDebitPaymentMethod::PAYMENT_CODE, + PayoneKlarnaInstallmentsPaymentMethod::PAYMENT_CODE, + PayoneKlarnaInvoicePaymentMethod::PAYMENT_CODE ]; } diff --git a/src/Methods/PaymentMethodServiceFactory.php b/src/Methods/PaymentMethodServiceFactory.php index 086c145c..583b3c9e 100644 --- a/src/Methods/PaymentMethodServiceFactory.php +++ b/src/Methods/PaymentMethodServiceFactory.php @@ -39,6 +39,14 @@ public static function create($paymentCode) return pluginApp(PayoneInvoiceSecurePaymentMethod::class); case PayoneAmazonPayPaymentMethod::PAYMENT_CODE; return pluginApp(PayoneAmazonPayPaymentMethod::class); + case PayoneKlarnaDirectBankTransferPaymentMethod::PAYMENT_CODE; + return pluginApp(PayoneKlarnaDirectBankTransferPaymentMethod::class); + case PayoneKlarnaDirectDebitPaymentMethod::PAYMENT_CODE; + return pluginApp(PayoneKlarnaDirectDebitPaymentMethod::class); + case PayoneKlarnaInvoicePaymentMethod::PAYMENT_CODE; + return pluginApp(PayoneKlarnaInvoicePaymentMethod::class); + case PayoneKlarnaInstallmentsPaymentMethod::PAYMENT_CODE; + return pluginApp(PayoneKlarnaInstallmentsPaymentMethod::class); } throw new \InvalidArgumentException('Unknown payment method ' . $paymentCode); } diff --git a/src/Methods/PayoneKlarnaDirectBankTransferPaymentMethod.php b/src/Methods/PayoneKlarnaDirectBankTransferPaymentMethod.php new file mode 100644 index 00000000..02c49bfe --- /dev/null +++ b/src/Methods/PayoneKlarnaDirectBankTransferPaymentMethod.php @@ -0,0 +1,9 @@ + $data['PAYONE_PAYONE_CREDIT_CARD'], 'PAYONE_PAYONE_DIRECT_DEBIT' => $data['PAYONE_PAYONE_DIRECT_DEBIT'], 'PAYONE_PAYONE_INVOICE_SECURE' => $data['PAYONE_PAYONE_INVOICE_SECURE'], - 'PAYONE_PAYONE_AMAZON_PAY' => $data['PAYONE_PAYONE_AMAZON_PAY'] + 'PAYONE_PAYONE_KLARNA_DIRECT_BANK' => $data['PAYONE_PAYONE_KLARNA_DIRECT_BANK'], + 'PAYONE_PAYONE_KLARNA_DIRECT_DEBIT' => $data['PAYONE_PAYONE_KLARNA_DIRECT_DEBIT'], + 'PAYONE_PAYONE_KLARNA_INSTALLMENTS' => $data['PAYONE_PAYONE_KLARNA_INSTALLMENTS'], + 'PAYONE_PAYONE_KLARNA_INVOICE' => $data['PAYONE_PAYONE_KLARNA_INVOICE'] ]; return $this->save(); @@ -148,6 +151,18 @@ public function updateValues(array $data): Model if (isset($data['PAYONE_PAYONE_AMAZON_PAY'])) { $this->value['PAYONE_PAYONE_AMAZON_PAY'] = $data['PAYONE_PAYONE_AMAZON_PAY']; } + if (isset($data['PAYONE_PAYONE_AMAZON_PAY'])) { + $this->value['PAYONE_PAYONE_KLARNA_DIRECT_BANK'] = $data['PAYONE_PAYONE_KLARNA_DIRECT_BANK']; + } + if (isset($data['PAYONE_PAYONE_KLARNA_DIRECT_DEBIT'])) { + $this->value['PAYONE_PAYONE_KLARNA_DIRECT_DEBIT'] = $data['PAYONE_PAYONE_KLARNA_DIRECT_DEBIT']; + } + if (isset($data['PAYONE_PAYONE_KLARNA_INSTALLMENTS'])) { + $this->value['PAYONE_PAYONE_KLARNA_INSTALLMENTS'] = $data['PAYONE_PAYONE_KLARNA_INSTALLMENTS']; + } + if (isset($data['PAYONE_PAYONE_AMAZON_PAY'])) { + $this->value['PAYONE_PAYONE_KLARNA_INVOICE'] = $data['PAYONE_PAYONE_KLARNA_INVOICE']; + } if (isset($data['payoneMethods'])) { $this->value['payoneMethods'] = $data['payoneMethods']; } diff --git a/src/Providers/PayoneServiceProvider.php b/src/Providers/PayoneServiceProvider.php index 9594a340..a1d95fdf 100755 --- a/src/Providers/PayoneServiceProvider.php +++ b/src/Providers/PayoneServiceProvider.php @@ -60,6 +60,10 @@ use Plenty\Modules\Order\Pdf\Events\OrderPdfGenerationEvent; use Plenty\Plugin\Templates\Twig; use Plenty\Plugin\Translation\Translator; +use Payone\Methods\PayoneKlarnaDirectBankTransferPaymentMethod; +use Payone\Methods\PayoneKlarnaDirectDebitPaymentMethod; +use Payone\Methods\PayoneKlarnaInstallmentsPaymentMethod; +use Payone\Methods\PayoneKlarnaInvoicePaymentMethod; class PayoneServiceProvider extends ServiceProvider { @@ -189,6 +193,29 @@ protected function registerPaymentMethods(PaymentMethodContainer $payContainer) PayoneAmazonPayPaymentMethod::class, $events ); + $payContainer->register( + 'Payone::' . PayoneKlarnaDirectBankTransferPaymentMethod::PAYMENT_CODE, + PayoneKlarnaDirectBankTransferPaymentMethod::class, + $events + ); + + $payContainer->register( + 'Payone::' . PayoneKlarnaDirectDebitPaymentMethod::PAYMENT_CODE, + PayoneKlarnaDirectDebitPaymentMethod::class, + $events + ); + + $payContainer->register( + 'Payone::' . PayoneKlarnaInstallmentsPaymentMethod::PAYMENT_CODE, + PayoneKlarnaInstallmentsPaymentMethod::class, + $events + ); + + $payContainer->register( + 'Payone::' . PayoneKlarnaInvoicePaymentMethod::PAYMENT_CODE, + PayoneKlarnaInvoicePaymentMethod::class, + $events + ); } /** From 463adfb21f79d1c73d3be7f7d7d97f7413a0351e Mon Sep 17 00:00:00 2001 From: Cosmin Manciu Date: Mon, 20 Dec 2021 13:04:13 +0200 Subject: [PATCH 351/353] Fix translation --- resources/lang/de/Assistant.properties | 4 ++-- resources/lang/en/Assistant.properties | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/resources/lang/de/Assistant.properties b/resources/lang/de/Assistant.properties index 392210c8..1f31f740 100644 --- a/resources/lang/de/Assistant.properties +++ b/resources/lang/de/Assistant.properties @@ -53,7 +53,7 @@ titlePayoneProductsStepPAYONE_PAYONE_KLARNA_DIRECT_BANK=Klarna Direct Bank Trans descriptionPayoneProductsStepPAYONE_PAYONE_KLARNA_DIRECT_BANK= titlePayoneProductsStepPAYONE_PAYONE_KLARNA_DIRECT_DEBIT=Klarna Direct Debit descriptionPayoneProductsStepPAYONE_PAYONE_KLARNA_DIRECT_DEBIT= -titlePayoneProductsStepPAYONE_PAYONE_PAYONE_KLARNA_INSTALLMENTS=Klarna Installments +titlePayoneProductsStepPAYONE_PAYONE_KLARNA_INSTALLMENTS=Klarna Installments descriptionPayoneProductsStepPAYONE_PAYONE_KLARNA_INSTALLMENTS= titlePayoneProductsStepPAYONE_PAYONE_KLARNA_INVOICE=Klarna Invoice Pay descriptionPayoneProductsStepPAYONE_PAYONE_KLARNA_INVOICE= @@ -76,7 +76,7 @@ titlePAYONE_PAYONE_AMAZON_PAY_Toggle=Amazon Pay aktivieren. titlePAYONE_PAYONE_KLARNA_DIRECT_BANK_Toggle=Klarna Direct Bank aktivieren. titlePAYONE_PAYONE_KLARNA_DIRECT_DEBIT_Toggle=Klarna Direct Debit aktivieren. -titlePAYONE_PAYONE_PAYONE_KLARNA_Toggle=Klarna Installments aktivieren. +titlePAYONE_PAYONE_KLARNA_Toggle=Klarna Installments aktivieren. titlePAYONE_PAYONE_KLARNA_INVOICE_Toggle=Klarna Invoice aktivieren. ## Additional Secure Invoice configuration description diff --git a/resources/lang/en/Assistant.properties b/resources/lang/en/Assistant.properties index bb2bb63c..eb164747 100644 --- a/resources/lang/en/Assistant.properties +++ b/resources/lang/en/Assistant.properties @@ -51,7 +51,7 @@ titlePayoneProductsStepPAYONE_PAYONE_KLARNA_DIRECT_BANK=Klarna Direct Bank Trans descriptionPayoneProductsStepPAYONE_PAYONE_KLARNA_DIRECT_BANK= titlePayoneProductsStepPAYONE_PAYONE_KLARNA_DIRECT_DEBIT=Klarna Direct Debit descriptionPayoneProductsStepPAYONE_PAYONE_KLARNA_DIRECT_DEBIT= -titlePayoneProductsStepPAYONE_PAYONE_PAYONE_KLARNA_INSTALLMENTS=Klarna Installments +titlePayoneProductsStepPAYONE_PAYONE_KLARNA_INSTALLMENTS=Klarna Installments descriptionPayoneProductsStepPAYONE_PAYONE_KLARNA_INSTALLMENTS= titlePayoneProductsStepPAYONE_PAYONE_KLARNA_INVOICE=Klarna Invoice Pay descriptionPayoneProductsStepPAYONE_PAYONE_KLARNA_INVOICE= @@ -72,6 +72,11 @@ titlePAYONE_PAYONE_DIRECT_DEBIT_Toggle=Activate Debit. titlePAYONE_PAYONE_INVOICE_SECURE_Toggle=Activate Secure Invoice. titlePAYONE_PAYONE_AMAZON_PAY_Toggle=Activate Amazon Pay. +titlePAYONE_PAYONE_KLARNA_DIRECT_BANK_Toggle=Activate Klarna Direct Bank. +titlePAYONE_PAYONE_KLARNA_DIRECT_DEBIT_Toggle=Activate Klarna Direct Debit. +titlePAYONE_PAYONE_KLARNA_INSTALLMENTS_Toggle=Activate Klarna Installments. +titlePAYONE_PAYONE_KLARNA_INVOICE_Toggle=Activate Klarna Invoice. + ## Additional Secure Invoice configuration description descriptionPayonePaymentSectionSecureInvoice=Carry out the settings needed for this payment method. Default settings are preset, but they are adaptable. The preselected delivery countries are those currently activated in your system. Moreover, you need a separate Portal ID and Key for the payment method Secure Invoice. These have to be entered separately in this configuration. You get the Portal ID and the Key in the Configuration » Payment portals menu in the Payone Merchant Interface. From 25b5071f7d3738dd18bd266ca9835707670b6fce Mon Sep 17 00:00:00 2001 From: Cosmin Manciu Date: Mon, 20 Dec 2021 14:54:57 +0200 Subject: [PATCH 352/353] Fix CR --- src/Models/Settings.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Models/Settings.php b/src/Models/Settings.php index d9f82202..47519be7 100644 --- a/src/Models/Settings.php +++ b/src/Models/Settings.php @@ -151,7 +151,7 @@ public function updateValues(array $data): Model if (isset($data['PAYONE_PAYONE_AMAZON_PAY'])) { $this->value['PAYONE_PAYONE_AMAZON_PAY'] = $data['PAYONE_PAYONE_AMAZON_PAY']; } - if (isset($data['PAYONE_PAYONE_AMAZON_PAY'])) { + if (isset($data['PAYONE_PAYONE_KLARNA_DIRECT_BANK'])) { $this->value['PAYONE_PAYONE_KLARNA_DIRECT_BANK'] = $data['PAYONE_PAYONE_KLARNA_DIRECT_BANK']; } if (isset($data['PAYONE_PAYONE_KLARNA_DIRECT_DEBIT'])) { @@ -160,7 +160,7 @@ public function updateValues(array $data): Model if (isset($data['PAYONE_PAYONE_KLARNA_INSTALLMENTS'])) { $this->value['PAYONE_PAYONE_KLARNA_INSTALLMENTS'] = $data['PAYONE_PAYONE_KLARNA_INSTALLMENTS']; } - if (isset($data['PAYONE_PAYONE_AMAZON_PAY'])) { + if (isset($data['PAYONE_PAYONE_KLARNA_INVOICE'])) { $this->value['PAYONE_PAYONE_KLARNA_INVOICE'] = $data['PAYONE_PAYONE_KLARNA_INVOICE']; } if (isset($data['payoneMethods'])) { From 7944d42e8a1473393900c05967c71728a4859271 Mon Sep 17 00:00:00 2001 From: Cosmin Manciu Date: Mon, 20 Dec 2021 15:09:53 +0200 Subject: [PATCH 353/353] Fix CR - New Migration --- plugin.json | 2 +- .../{CreatePaymentMethods2.php => CreatePaymentMethods3.php} | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) rename src/Migrations/{CreatePaymentMethods2.php => CreatePaymentMethods3.php} (96%) diff --git a/plugin.json b/plugin.json index 46e3d18f..215d0508 100644 --- a/plugin.json +++ b/plugin.json @@ -42,7 +42,7 @@ }, "serviceProvider": "Payone\\Providers\\PayoneServiceProvider", "runOnBuild": [ - "Payone\\Migrations\\CreatePaymentMethods2", + "Payone\\Migrations\\CreatePaymentMethods3", "Payone\\Migrations\\CreateSettingsTable" ], "dataProviders": [ diff --git a/src/Migrations/CreatePaymentMethods2.php b/src/Migrations/CreatePaymentMethods3.php similarity index 96% rename from src/Migrations/CreatePaymentMethods2.php rename to src/Migrations/CreatePaymentMethods3.php index e782db2e..26ab75c2 100644 --- a/src/Migrations/CreatePaymentMethods2.php +++ b/src/Migrations/CreatePaymentMethods3.php @@ -9,9 +9,9 @@ /** * Migration to create payment mehtods * - * Class CreatePaymentMethod2 + * Class CreatePaymentMethod3 */ -class CreatePaymentMethods2 +class CreatePaymentMethods3 { /** * @var PaymentMethodRepositoryContract