Documentation

A list of RO Payment plugin triggers

With a Joomla plugin you can act on what happens in RO Payments, for example create an account after a payment on the payment page or extend a membership when a subscription is renewed. This article lists the events RO Payments triggers.

The package installs Example - RO Payments, a plugin in the ropayments group that listens to onPaymentComplete and onCreateRenewal. Copy it as the start of your own plugin.

Events of the ropayments group

Your plugin must be in the ropayments plugin group. The events are Joomla 4/5 events: read the arguments with $event->getArgument('name').

onPaymentComplete

A payment made on the RO Payments payment page has been processed.

Argument Content
subject The data of the payment as an object
transaction The transaction, a Rolandd\Component\Ropayments\Site\Entity\Transaction

onCreateRenewal

The payment provider reported a new payment of a subscription, and RO Payments recorded it as a transaction.

Argument Content
paymentId The ID of the payment at the payment provider
transactionId The transaction ID of the first payment of the subscription
logId The ID of the new transaction
result The result of the payment so far, for example OPEN or SUCCESS

onRenewalResult

The payment of a subscription has its final result. A direct debit can take a few days, so this event can come later than onCreateRenewal. Use this event to act on a paid renewal. It has the same arguments as onCreateRenewal, with the final result.

onCreateRefunded and onCreateChargeback

A refund or a chargeback has been recorded as a transaction.

Argument Content
paymentId The ID of the refund or chargeback at the payment provider
transactionId The transaction ID of the payment
logId The ID of the new transaction

Stopping the processing

In the renewal, refund and chargeback events, set the argument abort to true and abortReason to a message, or a language key, to stop the processing. The webhook then answers NOK and the payment provider tries again later.

Events of other groups

onCancelSubscriptionComplete (system)

A subscription was cancelled in Components -> RO Payments -> Subscriptions. The argument is the subscription.

onContentPrepare (content)

A result message that is a Joomla article is prepared with the content plugins, as any article is.

RSForm! Pro (system)

The RO Payments - RSForm! Pro plugin triggers these events for system plugins:

Event Arguments
onPrepareThankYouMessage The message, by reference; the payment details; the form ID
onPrepareRedirectUrl The URL the customer goes to after paying, by reference; the payment details; the form ID
onRsformGetPayment The payment items of the form, by reference; the form ID

After a confirmed payment it also triggers the RSForm! Pro event onRsformAfterConfirmPayment with the submission ID, so plugins of RSForm! Pro act on the payment as they do for its own payment plugins.

Event Booking and Joom Donation

After a successful payment the addons trigger onAfterPaymentSuccess of Event Booking and Joom Donation, as their own payment plugins do.