Development

Acting on a New Payment

For developers!

The instructions provided in this document are designed for those who have experience programming Joomla extensions (plugins, modules, or components) or at least with some basic PHP skills. These instructions may have you modify your existing PHP files or database tables. You should never do this on a live site and should always have a back-up of your system prior to making any of the changes listed here. If you have an active support subscriptions you can request assistance with this process in our Support Center; however, if you need us to make custom modifications to your installation there maybe a fee for this service.

The Need

You can create your own automatic actions that happen after a user completes a subscription payment. This will allow you to add a user to other extensions or process some other activity.

The Solution

The best thing to do first when writing a plugin that will act on a new Payment is to look at the AmbraSubscriptions - AddToJUGA plugin that comes with the AMBRA Subscriptions package.

Events for the Plugin

There is one main event that is triggered an useful in creating your own subscription action plugin.

  • onAfterStorePayment - when a new payment is stored to the database, this plugin event is fired. Use it to perform some action as a result of receiving a new payment. The function will be passed the payment object (BUT in the form of an array), a boolean saying whether/not the payment is new, a boolean for whether/not the payment is active, and an errorMsg string.

If you need assistance with writing your plugin, please contact us in our support center. Thanks!


This development document is valid for AmbraSubscriptions version 1.5.3c+

Canadian Viagra Cheap