OJS development discussion, enhancement requests, third-party patches and plug-ins.
Moderators: jmacgreg, michael, jheckman, barbarah, btbell, bdgregg, asmecher
The OJS Technical Reference
and the OJS API Reference
are both available from the OJS Documentation
You can access our public Git Repository here
. Comprehensive Git usage instructions are available on the wiki
You can access our Bugzilla report tracker here
You can use our Google Custom Search
to search across our main website, the support forum, and Bugzilla.
Questions and discussion are welcome, but if you have a workflow or usability question you should probably post to the OJS Editorial Support and Discussion
subforum; if you have a technical support question, try the OJS Technical Support
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?)
- Posts: 99
- Joined: Wed Jul 25, 2012 2:56 pm
- Location: Munich, Germany
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/PaymentManager.inc.php and classes/payment/ojs/OJSPaymentManager.inc.php 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.
Public Knowledge Project Team
- Posts: 5924
- Joined: Wed Aug 10, 2005 12:56 pm
Return to OJS Development
Who is online
Users browsing this forum: No registered users and 3 guests