Paypal email address validation differs from drupal core ones and can break smart buttons

Created on 11 November 2019, almost 6 years ago
Updated 6 May 2025, 3 months ago

I'm getting the following error in the log and the smart buttons only show a loading screen:

Client error: `POST https://api.sandbox.paypal.com/v2/checkout/orders` resulted in a `400 Bad Request` response: {"name":"INVALID_REQUEST","message":"Request is not well-formed, syntactically incorrect, or violates schema.","debug_id (truncated...)

I'm using the following configuration:
- Paypal Express Checkout, Sandbox Mode, 'Show the Smart payment buttons on the cart page.' disabled
- Default Multistep Checkout Flow: Contact and Payment Information in the Order Information Pane, Review in the review pane and Paypal Checkout payment process in the payment pane.

🐛 Bug report
Status

Postponed: needs info

Version

1.0

Component

PayPal Checkout

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇩🇪Germany Grevil

    We just ran into the same issue, but I don't think this is a commerce_paypal issue there are / will be other modules that require a "proper" email validation. IMO Drupal should add a setting to allow emails without a top level domain.

    For the time being, you can use https://www.drupal.org/project/evac . Eventually this module could get recommended by commerce_paypal for the time being. What do you think @jsacksick?

Production build 0.71.5 2024