Neu Fehler in JTL Paypal Plugin 2.1.0 unter JTL Shop 5.1.2

XS-Laden

Aktives Mitglied
17. Mai 2016
13
0
Bei der Zurückleitung von Paypal auf den JTL Shop kommt es zum Fehler:

Fatal error: Uncaught TypeError: Argument 3 passed to Plugin\jtl_paypal\paymentmethod\PendingPayment::__construct() must be of the type string, null given, called in
/shop/plugins/jtl_paypal/paymentmethod/PendingPayment.php on line 139 and defined in /shop/plugins/jtl_paypal/paymentmethod/PendingPayment.php:53 Stack trace: #0
/shop/plugins/jtl_paypal/paymentmethod/PendingPayment.php(139): Plugin\jtl_paypal\paymentmethod\PendingPayment->__construct(Object(JTL\DB\NiceDB), NULL, NULL) #1
/shop/plugins/jtl_paypal/Handler.php(202): Plugin\jtl_paypal\paymentmethod\PendingPayment::recycle(Object(JTL\DB\NiceDB), NULL, 'kPlugin_5_paypa...') #2
/shop/plugins/jtl_paypal/Handler.php(154): Plugin\jtl_paypal\Handler->smartyOrderPage(Object(JTL\Smarty\JTLSmarty)) #3 /shop/includes/src/Events/Dispatcher.php(70): Plugin\jtl_paypal\Handler->smarty(Array) #4 /kund in /shop/plugins/jtl_paypal/paymentmethod/PendingPayment.php on line 53

So wie ich das verstehe, wird die moduleID "kPlugin_5_paypal" im PendingPayment.php constructor nicht übergeben
private function __construct(DbInterface $db, ?string $pendingID, string $moduleID)
{
$this->db = $db;
$this->setPendingID($pendingID ?? self::createID());
$this->setModuleID($moduleID);
}

In der recycle Methode steht Sie aber komischerweise mit drin: PendingPayment::recycle(Object(JTL\DB\NiceDB), NULL, 'kPlugin_5_paypa...') #2

Kennt jemand das Problem?
 

Verkäuferlein

Sehr aktives Mitglied
29. April 2012
2.618
1.074
Hast Du mal ein Ticket bei JTL im Support aufgemacht?

Die Fehlermeldung sagt ja:
...Argument 3 passed to Plugin\jtl_paypal\paymentmethod\PendingPayment::__construct() must be of the type string, null given,...
Und dann:
.../shop/plugins/jtl_paypal/paymentmethod/PendingPayment.php(139): Plugin\jtl_paypal\paymentmethod\PendingPayment->__construct(Object(JTL\DB\NiceDB), NULL, NULL) #1...

Also hast Du meines Erachtens recht, dass da die paymentmethod nicht korrekt übergeben wird oder möglicherweise an falscher Stelle. Das muss dann JTL mal näher untersuchen.
 

XS-Laden

Aktives Mitglied
17. Mai 2016
13
0
Ich glaube ich habe den Fehler gefunden.
Der Migration Code aus "Migration20200709121700.php" wurde scheinbar bei der Plugin Installation nicht ausgeführt und somit hat in der DB die Tabelle "xplugin_jtl_paypal_pending_payment" gefehlt.
Ich habe in der Datenbank die Tabelle händisch mit dem SQL Code aus der "up()"-Metode von "Migration20200709121700.php" angelegt und nun scheint das PayPal Plugin zu funktionieren.
 

Ähnliche Themen