- Status changed to Fixed
over 1 year ago 2:04pm 1 May 2023 Automatically closed - issue fixed for 2 weeks with no activity.
If the webhook is triggered too early, the status validation in the PaymentCheckoutController cannot be the same. This way, the onReturn() in the wallee module is never called and the payment method is not saved.
// commerce/modules/payment/src/Controller/PaymentCheckoutController.php
// Makes redirect if id's not equal
$this->validateStepId($step_id, $order);
//Never called, so the payment method can't save
$payment_gateway_plugin->onReturn($order, $request);
As fast workaround, i added a delay before the transaction webhook is called:
// commerce_wallee/src/Controller/WebhookController.php
private function updateTransaction($paymentGatewayStorage, $data) {
sleep(20);
\Drupal::service('commerce_wallee.payment_sdk')->webhookTransaction($paymentGatewayStorage, $data);
}
Fixed
2.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Automatically closed - issue fixed for 2 weeks with no activity.