During checkout, if you enter a single name in Fullname (e.g. Sting) during checkout, only the FIRSTNAME parameter is populated in the request to Paypal and the transaction is rejected with an error from Paypal (L_ERRORCODE => 10513, L_SHORTMESSAGE0 => Invalid Data, L_LONGMESSAGE => This transaction cannot be processed. Please enter a last name.). This appears in Drupal Commerce as a form error on the checkout review page with text "We encountered an error processing your payment. Please verify your credit card details or try a different card."
1. Paypal WPP module needs to more gracefully handle a single name being provided.
2. A the actual error from Paypal should be made visible to the customer so that useful action can be taken.
Comments
Comment #1
rszrama commentedWhat do you propose we do? Split the fullname into two parameters? Or should it be enough to send an empty string to PayPal for the last name?
Comment #2
rszrama commentedI'm gonna need more information about your configuration, because I cannot reproduce your reported issue. I used the full name line and just put in my first name. This generated the following request:
Which resulted in the following successful response:
Perhaps it's something in your fraud settings? Maybe something only affecting a live site?
Comment #3
rszrama commentedI just tested this again, and I had no issue submitting a payment with only a single name in the full name line. If you can provide instructions on how to reproduce the failed payment, please feel free to reopen this issue. Otherwise I'll assume it's owing to some sort of PayPal account / fraud protection setting.
Comment #4
heyehren commentedThis error still occurs. I tried making a payment with a single name in the name field and the transaction failed.
This is the error log output:
Comment #5
heyehren commentedComment #6
rszrama commentedYou haven't provided any new information; what do you expect me to do for you? Did you try looking into your account or fraud settings to see if they are to blame as I suggested above?
Comment #7
akshayadhavFacing same issue on single word entry in "Full Name" field of Shipping information.
Comment #8
tomtech commentedAutomatically closed because Drupal 7 security and bugfix support has ended as of 5 January 2025. If the issue verifiably applies to later versions, please reopen with details and update the version.