Neu Plugin für den WooCommerce JTL-Connector (Zahlungsart überschreiben mit setPaymentModuleCode())

  • Ersteller des Themas Ersteller des Themas NilsZ
  • Erstellungsdatum Erstellungsdatum

NilsZ

Aktives Mitglied
13. Juni 2019
11
0
Liebe Community,

wir möchten in unserem Shop eine Kennzeichnung der Bestellungen, die per Paypal Rechnung bezahlt wurden.
Im Einsatz sind WordPress 5.4.2 / WooCommerce 4.2.2 / German Market 3.10.3.2 / JTL Connector 1.9.5.2 in Verbindung mit JTL Wawi 1.5.25.0 - also alles recht aktuelle Versionen.

Ich habe auf dieses Plugin aufgebaut:
https://forum.jtl-software.de/threa...skauf-kontodaten-ins-wawi-uebertragen.113043/

Die Zahlungsinformationen werden korrekt übernommen.
Nur leider wird die Zahlungsart nicht überschrieben.
Konrekt scheitert es an diesem Code:
PHP:
$order->setPaymentModuleCode('Paypal Rechnung');

Die Zahlungsart "Paypal Rechnung" habe ich in JTL angelegt.
Was muss ich noch berücksichtigen? Wo liegt mein Fehler?


Viele Grüße und herzlichen Dank vorab

Nils
 

Patryk Gorol

Gut bekanntes Mitglied
11. November 2019
89
30
Hallo NilsZ,

der Code des Plugins sieht soweit in Ordnung aus, denke ich. Die Zahlungsinformationen stammen möglicherweise aus dem GermanMarket Plugin, die Bedingung im Plugin wird aber nie erfüllt.

Bitte schicke uns einen Log Auszug, in dem Daten von einem Customer Pull enthalten sind, damit wir sehen können was tatsächlich übertragen wird (https://guide.jtl-software.de/jtl-c...erce-backend/#registerkarte-entwickler-stehen).

Unabhängig davon arbeiten wir gerade daran die zusätzlichen Informationen für Paypal Plus Zahlungen mit in JTL-Wawi zu importieren.

MfG
Patryk
 

NilsZ

Aktives Mitglied
13. Juni 2019
11
0
Dear Patryk,

I hope you are fine!

I could not solve the problem yet and would like to accept your offer to help.

Enclosed I send you the connector_logs.zip and the plugin. In the plugin I have added the small logging function slom_logging(), the output (logging.txt) I have also attached.
In the log file you can see that the condition is fulfilled and the data is logged correctly.
But they are not passed to JTL with $order->setPaymentInfo($paymentInfo); and also the payment method is not set with $order->setPaymentModuleCode('Paypal invoice'); unfortunately.

We used JTL Connector 1.9.5.2 until today - I updated it now to 1.11.1.
WordPress: 5.4.2
WooCommerce: 4.2.2
German Market: 3.10.3.2

Do you need anything else?
It would be so great if you could help me.


Thank you in advance and many greetings

Nils
 

Anhänge

Patryk Gorol

Gut bekanntes Mitglied
11. November 2019
89
30
Hey Nils,

I'm happy to help you 🙂

I checked you plugin and I think you need something else for transferring PUI info. You should transfer it in pui property in CustomerOrder model not in CustomerOrderPaymentInfo.
Second problem is paymentModuleCode, you can check supported payment module codes in PaymentTypes model, each supported payment type has their own constant inside this class and you should use it.

You can also look at current implementation of PUI for WooCommerce Connector here. Connector will add this info automatically when payment type is pm_paypal_plus.

If you have any further question please feel free to ask.

Best,
Patryk
 

Ähnliche Themen