Documentation

Notification URLs

RO Payments uses two addresses on the site, both handled by the System - RO Payments plugin:

  • https://example.com/notify - the payment provider reports the status of a payment here (the webhook);
  • https://example.com/customer - the payment provider sends the customer back here after paying.

The names notify and customer can be changed in the options. Change them only when the site already uses one of these addresses for something else, and change the webhook at your payment provider at the same time.

The plugin looks at the last part of the address only, so a site in a folder, such as https://example.com/shop/notify, works as well.

The webhook: /notify

When a payment changes, the payment provider calls /notify. RO Payments asks the payment provider for the status of the payment, stores it with the transaction and updates the order in the extension the payment came from. The page answers OK, or NOK with HTTP status 500 when the payment could not be processed. The reason is in the transaction log, see Transactions.

Some payment providers need the alias of the profile in the webhook, for example https://example.com/notify?alias=stripe. The article of each payment provider explains what to enter.

To test the address, open https://example.com/notify in a browser. You see NOK, because there is no payment to process. If you see a page of the site or a 404 error, something else uses the address or the System - RO Payments plugin is disabled.

The customer: /customer

After paying, the payment provider sends the customer to /customer. When the webhook has not arrived yet, RO Payments waits a few seconds for it and otherwise asks the payment provider for the status itself. Then it sends the customer to the page of the extension: the return page for a successful payment, the cancel page otherwise.

When the status is not known yet

Sometimes the payment provider does not know the result yet when the customer comes back, for example with a bank transfer. RO Payments then shows the Status page with the message for the status Unknown. Create a menu item for it, otherwise the page has a non-SEF address:

  1. Go to Menus and click the menu you want to add the page to
  2. Click New
  3. For Menu Item Type select RO Payments -> Status page
  4. Select the Profile and set Payment status to Unknown
  5. On the Link Type tab, set Display in Menu to No
  6. Click Save & Close

The text of the page comes from the messages.

Firewalls and security extensions

Both addresses must be reachable for the payment provider without logging in. A web application firewall, such as the one in Admin Tools, or rules in .htaccess can block the calls from the payment provider. When payments stay on open, check the logs of these tools for blocked requests to /notify.