Invoice / receipt plugin

OJS development discussion, enhancement requests, third-party patches and plug-ins.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
The Public Knowledge Project Support Forum is moving to

This forum will be maintained permanently as an archived historical resource, but all new questions should be added to the new forum. Questions will no longer be monitored on this old forum after March 30, 2015.
Posts: 111
Joined: Wed Jul 25, 2012 2:56 pm
Location: Munich, Germany

Invoice / receipt plugin

Postby springday » Sun Oct 28, 2012 6:30 am

Hi there,

I would like to write a plugin for creating and sending an invoice / receipt (preferably in PDF format as an email attachment) right after a paypal payment has been processed. This is a requirement of our book keeping department, which says that the receipts paypal is sending out do not suffice - there's no VAT information included in them, for example.

However, I didn't even find a starting point, because I couldn't locate any hooks in the payment processing code (I've checked the files in /classes/payment, /lib/pkp/classes/payment and /plugins/paymethod), and the slightly outdated "technical reference" of OJS didn't say anything about it either. I didn't even understand how the paypal plugin is actually integrated and called.

Could somebody give me a hint about how I could integrate a plugin with the described functionality into OJS?

(In the forum when searching for "invoice" I mainly got hits for OCS. Does OCS already have an invoicing module?)

Best regards,
Kai Weber

Posts: 10015
Joined: Wed Aug 10, 2005 12:56 pm

Re: Invoice / receipt plugin

Postby asmecher » Sun Oct 28, 2012 8:55 am

Hi Kai,

The PayPal plugin is integrated by extending its superclass, PaymentPlugin, which uses hooks and API calls to interact with OJS. (See lib/pkp/classes/payment/ and classes/payment/ojs/ for details.)

One way to extend the behavior of the paypal plugin would be to extend its PaypalPlugin class, implement your new behavior where needed, and fall back on the parent implementation otherwise. Alternately, hooks would be another method, but OTOH I don't think we included many in the PaypalPlugin class.

Alec Smecher
Public Knowledge Project Team

Return to “OJS Development”

Who is online

Users browsing this forum: No registered users and 2 guests