Description
Stored payment method without a billing address causes the checkout to give the following error:
Drupal\commerce_order\Entity\Order::setBillingProfile(): Argument #1 ($profile) must be of type Drupal\profile\Entity\ProfileInterface, null given
If the payment gateway requires_billing_information = false, the setBillingProfile function should not be called.
Steps to repreduce
Use the commerce stripe module, and use the Stripe Payment Element gateway, then checkout normally and enter the test card details, then try to checkout using the saved payment method from the previous step and you will face the error.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 3494179-2.patch | 1001 bytes | anas_maw |
Issue fork commerce-3494179
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
anas_maw commentedThis patch solves the issue
Comment #3
jsacksick commentedHm... Perhaps we can simply check that $payment_method->getBillingProfile() isn't NULL?
Comment #4
anas_maw commentedThis will work also
Comment #6
zaporylieChanging target
Comment #9
jsacksick commented