Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PayPal purchase can't be completed when product title is too long #8911

Closed
mihaijoldis opened this issue Oct 4, 2021 · 1 comment · Fixed by #8912
Closed

PayPal purchase can't be completed when product title is too long #8911

mihaijoldis opened this issue Oct 4, 2021 · 1 comment · Fixed by #8912

Comments

@mihaijoldis
Copy link
Contributor

Bug Report

Expected behavior

When I click the PayPal purchase button I expect to modal window to be visible.

Actual behavior

The modal shows for a brief moment then closes automatically.

Steps to reproduce the behavior

  1. I have not tried to reproduct it yet but customer has provided logs that seem to confirm the issue
  2. Customer's website is using product variations which are long titles

The actual product name + variation looks like this:
Agriculture Business Plan Template - Click to Add-on Agriculture Business Funding Package includes 12 Slide Pitch Deck Template PowerPoint .pptx + 4 funding eBooks (add-on does not include business plan template) Digital Download.

Response Code: 400; Message: Unexpected response when creating order:

Log data:

{"name":"INVALID_REQUEST","message":"Request is not well-formed, syntactically incorrect, or violates schema.","debug_id":"6e9f7b41d4781","details":[{"field":"/purchase_units/@reference_id=='5f3b7478822d44aa406b3071497cd54f'/items/1/name","value":"Agriculture Business Plan Template - Click to Add-on Agriculture Business Funding Package includes 12 Slide Pitch Deck Template PowerPoint .pptx + 4 funding eBooks (add-on does not include business plan template) Digital Download.","location":"body","issue":"INVALID_STRING_LENGTH","description":"The value of a field is either too short or too long."}],"links":[{"href":"https://developer.paypal.com/docs/api/orders/v2/#error-INVALID_STRING_LENGTH","rel":"information_link","encType":"application/json"}]}

Information (if a specific version is affected):

PHP Version:

EDD Version (or branch): latest
WordPress Version:latest

Any other relevant information:
Reported by a customer here https://secure.helpscout.net/conversation/1646086556/195199?folderId=2048992

@mihaijoldis
Copy link
Contributor Author

Tested locally with a download with that title and the maximum characters that will work is 127 as download title. Anything higher will cause the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants