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

Truncate Product Description and Name #263

Open
victoria-lo opened this issue Aug 31, 2021 · 7 comments
Open

Truncate Product Description and Name #263

victoria-lo opened this issue Aug 31, 2021 · 7 comments

Comments

@victoria-lo
Copy link

Hi development team,

I am writing regarding some small issues I have encountered when integrating this gem onto Spree. When the product name or description is greater than 127 characters, the Braintree API would reject the transaction and the payment would instantly fail. Can I please request this Braintree v.zero gem to truncate the fields before sending the data to the API?

My team also discovered that the gem did not pass all details to PayPal, so when viewing the invoice, it appears incomplete. Please fix this issue too.

Thank you, I will be happy to provide more details and clarification if you have any.

@damianlegawiec
Copy link
Contributor

Hi development team,

I am writing regarding some small issues I have encountered when integrating this gem onto Spree. When the product name or description is greater than 127 characters, the Braintree API would reject the transaction and the payment would instantly fail. Can I please request this Braintree v.zero gem to truncate the fields before sending the data to the API?

My team also discovered that the gem did not pass all details to PayPal, so when viewing the invoice, it appears incomplete. Please fix this issue too.

Thank you, I will be happy to provide more details and clarification if you have any.

Hi @victoria-lo

Thanks for pointing out the truncate issue, we'll take care of it 💪

Could you elaborate on the missing data sent to PP? Which fields are getting lost?

@victoria-lo
Copy link
Author

Hi @damianlegawiec

Thanks for the prompt response. The missing fields are:
https://developer.paypal.com/braintree/docs/reference/request/transaction/sale/ruby#line_items.description
https://developer.paypal.com/braintree/docs/reference/request/transaction/sale/ruby#options.paypal.description

We want to pass custom description in these fields to send in the email when a customer checks out with Braintree or PayPal.

1 similar comment
@victoria-lo
Copy link
Author

Hi @damianlegawiec

Thanks for the prompt response. The missing fields are:
https://developer.paypal.com/braintree/docs/reference/request/transaction/sale/ruby#line_items.description
https://developer.paypal.com/braintree/docs/reference/request/transaction/sale/ruby#options.paypal.description

We want to pass custom description in these fields to send in the email when a customer checks out with Braintree or PayPal.

@bjsion
Copy link

bjsion commented Aug 31, 2021

@damianlegawiec

FYI, My team are currently fixing many of the issues that we found with this gem in relation to submitting payments to PayPal via BrainTree. We will be submitting a patch to you guys shortly (next 1-2 days). Hopefully that will help and reduce the turnaround time on the fix.

In short we will address the following issues:

  1. Product name text limitation (truncate anything > 127 chars), including using double byte character sets
  2. Product description text limitation (truncate anything > 127 chars), including using double byte character sets
  3. Line items are not submitted as part of the sales order
  4. Delivery Fee not submitted as part of the sales order
  5. Promotions not submitted as part of the sales order

Items 3-5 have a flow on effect with the invoice issued by PayPal to the end customer. Currently with the line items missing, the invoice issued by PayPal does not contain the product names.

@bjsion
Copy link

bjsion commented Sep 10, 2021

@damianlegawiec FYI we have submitted the patch. Let us know if you need more details.

@damianlegawiec
Copy link
Contributor

@damianlegawiec FYI we have submitted the patch. Let us know if you need more details.

Thank you! Just merged it, we need to push out the release to RubyGems which will happen in a day or two

@bjsion
Copy link

bjsion commented Sep 10, 2021

Awesome, thanks @damianlegawiec

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

No branches or pull requests

3 participants