This was originally raised in this commerce_authnet issue: #2892467: Does not support anonymous checkout.

Authorize.net requires a customer email even for anonymous customers, but createPaymentMethod() gets just the $payment_method, while the customer email lives on the order for anonymous customers. We know the email when the form is submitted, but we're not passing it along.

This means we'll need to break BC again to change the method signature to createPaymentMethod($payment_method, $customer_mail), and change the add-payment-method plugin form to expect a #customer_mail or #customer_mail_parents property. First one is for when the customer mail is known when the plugin form is built (authenticated users), the second one is for when the customer mail is another field on the same parent form.

Comments

bojanz created an issue.

drupalfan2’s picture