Skip to content

PDT payments intermittently broken? #239

@djw

Description

@djw

In some recent requests on my site the query parameters passed to the return_url have changed, in a way that's incompatible with the current implementation of PayPalPDTForm.

Specifically, I'm now receiving:

  1. notify_version=UNVERSIONED which is incompatible with the decimal type of the underlying model field
  2. payment_date=2021-05-11T12:00:00Z which is incompatible with PayPalDateTimeField

Tweaking the form like this works fine locally with Django 3.1 — when I get a moment I'll create a proper patch with a test case.

class PayPalPDTForm(PayPalStandardBaseForm):
    payment_date = DateTimeField(required=False)

    class Meta:
        model = PayPalPDT
        exclude = [
            "ipaddress",
            "flag",
            "flag_code",
            "flag_info",
            "query",
            "response",
            "created_at",
            "updated",
            "form_view",
            "notify_version",
        ]

Edit: I originally thought this was related to v1.1 due to the timing of the issue, but even after I reverted I'm still seeing some requests arrive with the new parameters. Looking at the code I can't see how changing the postback endpoint would cause this issue anyway!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions