Expected behavior
If we set the Prestashop "Sent" state on a klarna paylater order, it should mark all products as sent and mollie should set the state to "completed".
Actual behavior
This actually happens only in very rare occassions. See description below.
Steps to reproduce the behavior
klarnapaylater is set up with OrdersApi and "Automatischer Versand bei markiertem Status" = "automatic shipping with selected state" is activated on the extended configuration tab. 2 states in the next configuration are are selected, while one of them is "sent".
Customer buys a product with klarnapaylater and everything is fine so far. An xx_mollie_payments table entry is created:
transaction_id (ord_xxxxx), cart_id(123456), order_reference(mol_12312332132),method(klarnapaylater, bank_status(open), and created_at are filled. The fields order_id, updated_at are "NULL".
In very rare cases (6 out of 200), after updating the state (via webservice), to "sent" the order_id will be filled up with the prestashop id_order and the order_reference will be replaced with the actual prestashop order_reference and the bank_status switches to "complete". in most other cases a log message in the prestashop with "Shipment information cannot be sent. Order reference (XXX) has no payment information." is written. As far, as I can understand the source code, this happens, when no order_id can be found in above table ( see CanSendShipment") class. I guess the webhook communication backwards somehow fails most of the time?
Environment
Prestrashop 1.6.1.15
- Mollie module version: 4.5.3
- PHP version: 7.0
Expected behavior
If we set the Prestashop "Sent" state on a klarna paylater order, it should mark all products as sent and mollie should set the state to "completed".
Actual behavior
This actually happens only in very rare occassions. See description below.
Steps to reproduce the behavior
klarnapaylater is set up with OrdersApi and "Automatischer Versand bei markiertem Status" = "automatic shipping with selected state" is activated on the extended configuration tab. 2 states in the next configuration are are selected, while one of them is "sent".
Customer buys a product with klarnapaylater and everything is fine so far. An xx_mollie_payments table entry is created:
transaction_id (ord_xxxxx), cart_id(123456), order_reference(mol_12312332132),method(klarnapaylater, bank_status(open), and created_at are filled. The fields order_id, updated_at are "NULL".
In very rare cases (6 out of 200), after updating the state (via webservice), to "sent" the order_id will be filled up with the prestashop id_order and the order_reference will be replaced with the actual prestashop order_reference and the bank_status switches to "complete". in most other cases a log message in the prestashop with "Shipment information cannot be sent. Order reference (XXX) has no payment information." is written. As far, as I can understand the source code, this happens, when no order_id can be found in above table ( see CanSendShipment") class. I guess the webhook communication backwards somehow fails most of the time?
Environment
Prestrashop 1.6.1.15