If in the checkout process the user does not add any address (like shipping address), when triggering the payment gateway pane of this module, this fatal error is given:
TypeError: Argument 1 passed to Drupal\commerce_paytrail\Repository\FormManager::setPayerFromAddress() must be an instance of CommerceGuys\Addressing\AddressInterface, null given, called in /var/www/html/web/modules/contrib/commerce_paytrail/src/EventSubscriber/FormAlterSubscriber.php on line 48 in Drupal\commerce_paytrail\Repository\FormManager->setPayerFromAddress() (line 478 of /var/www/html/web/modules/contrib/commerce_paytrail/src/Repository/FormManager.php)
#0 /var/www/html/web/modules/contrib/commerce_paytrail/src/EventSubscriber/FormAlterSubscriber.php(48): Drupal\commerce_paytrail\Repository\FormManager->setPayerFromAddress(NULL)
It should return a message forcing the user to input an address.
I also use the commerce_shipping module.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 3149678-2.patch | 1.21 KB | tuutti |
Comments
Comment #2
tuutti commentedSorry for the late response. Could you test if this patch fixes the issue for you?
Comment #4
tuutti commentedThis should be fixed in the 8.x-2.4 release.
You can force users to input their address by enabling the
Collect billing informationsetting from your payment gateway settings.Comment #5
tuutti commented