Code Monkey home page Code Monkey logo

Comments (4)

spookylukey avatar spookylukey commented on July 18, 2024

I would not be at all surprised if PayPal mangled data like that. I would recommend doing base64 encoding to reduce the chances of your data getting mangled. You will still need to be careful of data length - don't expect PayPal to allow you to store much, or to be correct in what it advertises as the maximum length.

In general, see if you can reduce the amount of data in your custom field, which can be done using, for example, a single user ID or creating an "Orders" table, putting the data in there and sending only the order id in the custom field.

from django-paypal.

PetrDlouhy avatar PetrDlouhy commented on July 18, 2024

@spookylukey Thank you very much for your reply. I will consider what you are writing.

But length or something in the custom string is not the problem here. Tens or hundreds of payments did pass just OK in few recent months I have been using this type of payment. There have been longer custon data strings than those that didn't pass and also there is nothing special in them (special characters etc.).

This problem did occur just in the last month only for few payments out of many.

from django-paypal.

spookylukey avatar spookylukey commented on July 18, 2024

This problem did occur just in the last month only for few payments out of many.

That sounds about normal. There have been many such instances of PayPal's stuff mostly working, but just not working sometimes.

from django-paypal.

PetrDlouhy avatar PetrDlouhy commented on July 18, 2024

When I originally implemented the custom field logic, I taught, it would be better to store more values for cases when I will need to identify some payment.
I didn't think much about the length of that field, but according to documentation it is 255 characters, which I am far from reaching. Even my tests on sandbox don't show any problems with longer with long custom values, and if the 255 limit is reached, the payment would fail sooner, before it's creation.

In fact I only really need the Order ID, but PayPal leaves me only one character in the faulty cases, so I can't work with that.

Now I will try to use item_number field as fallback to store Order ID: PetrDlouhy/django-plans-paypal@ca29ab3

from django-paypal.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.