tldr_baz
tldr_baz

Reputation: 78

Paypal CreateAndSendInvoice and IPN listener (PHP)

Maybe I'm approaching this wrong, but I'm using the Angell EYE Paypal library to create and send an invoice, which works fine, but now I'm stuck on setting up an IPN listener to note when the invoice is paid.

I'm wanting to avoid specifying an IPN listener URL in the account's settings (already in use and don't want to tamper with it), and would much rather just specify the URL as you would do with 'notify_url' for forms with standard payments.

Is this possible with CreateAndSendInvoice? I've considered just using GetInvoiceDetails on a cron job instead and check the invoice status that way, but would prefer the IPN route

Upvotes: 1

Views: 122

Answers (1)

pp_pduan
pp_pduan

Reputation: 3402

Invoicing API does not support "notify_url" to be set "on-the-fly", so you would either rely on the account settings (the fixed IPN URL), or your own cron job of GetInvoiceDetails API requests, to get the invoice status.

While on the other hand, most of the payment method APIs / standard forms support the notify_url in the request payload (overriding the account settings), you may switch the approach to use dynamic listener URLs in there, and keep the base url in the account setting for invoicing status and other event-triggered post backs.

Upvotes: 2

Related Questions