Paypal plugin documentation and IPN URL

Hi,

Our team is new to Indico. We’re trying to use the Paypal payment plugin.

I don’t see any documentation page for configuration of the plugin - is there one that I’m missing in the Indico documentation site, or somewhere else?

The references to IPN in the configuration dialog make me think I need to use the Paypal NVP/SOAP legacy API, and provide an IPN webhook URL in the Paypal configuration. I see a previous forum thread about /ipn, but going to the Indico URL with /ipn just returns a ‘not found’ error.

Thank you,
David

You should not need to configure anything on the PayPal side (except UTF-8 encoding for data). The IPN URL is sent in the form data when clicking the payment button on Indico.

When creating a NVP/SOAP Webhook, the Paypal developer site requires that you provide the IPN URL. I don’t know what to put in.

There is no SOAP involved. You do not need to create a webhook on the Paypal side.

It looks like the documentation is shared between IPN and some SOAP API though.

If you enable the IPN service, PayPal sends messages to the IPN listener at the URL you specify in your account profile. If you want, you can override this URL in order to associate a different IPN listener with a specific transaction. To do this, you can either:

  • Specify the URL of a different listener in your definition of a PayPal Payment Standard button or
  • […]

And this is exactly what Indico does.

Searching for IPN in the paypal developer site finds only one link:

https://developer.paypal.com/api/nvp-soap/ipn/IPNandPDTVariables/

Which goes on to talk about how NVP/SOAP is a legacy API, etc etc.

REST API credentials provide an application ID (81 characters of alphanumeric plus underscores)
and a Secret Key.

The Paypal plugin configuration in Indico asks for an API URL, and an email address for the account, so - no place to put the application ID or the secret key.

There’s “Paypal checkout” - but that doesn’t seem to be the right thing either, and for credentials ties back to the REST API Application ID and Secret.

The only reference to UTF-8 in the paypal documentation is regarding configuration for SFTP reports, which I’m sure has nothing to do with the REST API I’d expect Paypal to be using.

The help link in the Paypal configuration dialog in Indico (about the UTF-8 setting) goes to this URL:

The instructions on that page refer to Profile → Profile and Settings (doesn’t exist in Paypal for me) and to look for “My Selling Tools” (possible called “My selling preferences” in some countries) - there are no links called that in Paypal’s dashboard for me.

but - I eventually found it under “Account Settings” → “Website Payments” → “Paypal Buttons” - and it was already set to UTF-8 anyway.

UTF-8 setting → DONE.

So - for Indico configuration there are two configuration dialogs for the PayPal plugin.

  1. From Administration → Payment → Paypal plugin button
  2. From Event → Edit → Payment → Paypal plugin button

In #1, the fields are Name, API URL, and Business
in #2, the fields are Name and Paypal ID / email

For API URL, I was tried using both the Sandbox and production API URLs from the Paypal API requests documentation at https://developer.paypal.com/api/rest/requests/

  • Sandbox. https://api-m.sandbox.paypal.com
  • Live. https://api-m.paypal.com

Name is a display name only, I believe - and for paypal ID / email, I tried both the application ID (which Indico won’t accept - it seems to want an email only) and the email of the paypal account.

So, I’m doing something wrong, but it’s not obvious what it is.

Thanks,
David

Aha - closer.

Changed the URL to https://ipnpb.paypal.com/cgi-bin/webscr

Seems like it’s trying - but just spinning forever…

After retrying, the payment went through successfully, but Indico did not get (or did not understand) the confirmation IPN callback.

I don’t know what URL to look for in the Indico logs - and on the paypal side, since this doesn’t seem to use a named Application ID, there are no logs to look at there either.

Running Chrome developer tools, I see that after the paypal payment, it returns to

https :// indico.[domain].org/event/1/registrations/2/payment/response/paypal/success?token=[tok]&PayerID=[payertok]

That gets a 302 from the Indico server, direction Location back to https :// indico.[domain].org/event/1/registrations/2

However in controllers.py, it mentions action mappings for ‘Completed’, ‘Denied’, and ‘Pending’. I’m guessing that ‘success’ is being ignored as it’s not an expected action.

Aha. The blueprint.py is supposed to handle the /success action. I’ll have to add some debug logging and see where it fails to record the payment.

1 Like