This module allows the integration of Comercia's (Caixa Bank) payment gateway through "ready to use" component templates.

The main idea of this kind of integration is to be able to sell products without a cart or an e-commerce tool. 

From a user's point of view, business cases can be:

  • Guided sell through form steps where users can configure the product they are going to buy.
  • Unique product sell where users simply select the product they want to buy.
  • Users can buy products on Magnolia websites without any e-commerce integration.

From an editor's point of view:

  • Editors can configure any product to be sell through form steps, with a single price and/or add-on prices where the last step would be comercia's checkout page.
  • Editors can configure a product with a single price, which leads directly to comercia's checkout page.
  • Editors can review/manage orders  generated from Magnolia websites. The management is currently done in Comercia's dashboard.

The comercia connector module includes:

  • Form template using Comercia's lightbox payment.
  • Teaser template using Comercia's lightbox payment.
  • Teaser template using Comercia's basic payment.
  • Basic order management. (Content app coming soon!)
  • Easy configuration of Comercia's payment gateway.
  • Demo pages for selling tours using a purchase form.
  • Demo pages for selling tour guides.



You can install the Comercia connector module by either: 

  • Downloading a pre-built jar file and placing it in the WEB-INF/lib directory (see Installing a module for more information).
  • Adding a Maven dependency.

Maven is the easiest way to install the module. Add the following dependency to your bundle:



Installing the pre-built jar requires to also get the realex dependencies. Maven is the easiest way to get them with dependency:copy-dependencies plugin. A bundle zip will be coming soon to avoid this additional step.


The module is very easy to configure. You just need to go to the module's config:

  • /modules/comercia-connector-module/config

And fill out the following properties:

  • account: Name of Comercia's account. "hpp" is the only currently supported.
  • formUrl: URL of Comercia's server. For example, use this for test server: "", and this for production server: "".
  • merchantId: The client id you received in Comercia's addon payment registration.
  • responseUrl: The full URL of the module's servlet for order callbacks. The URL has the form: http(s)://[ip or domain]:[port]/[contextpath]/comercia/json-response. For example:
  • secret: The shared secret you received in Comercia's addon payment registration.

Form component template

This component template can be used in guided sells which are composed of several form steps (using Magnolia's form module).

It includes two buttons:

  • Back button: Goes to the forms previous step.
  • Checkout: Triggers Comercia's lightbox payment gateway.

The template id is: 

  • comercia-connector-module:components/comercia-js-form

The following attributes can be defined though its dialog:

  • Checkout text: The checkout button label.
  • Target Page: The page to be shown after the payment is done.
  • Currency: The currency for the order.
  • Button id: HTML id of the checkout button.
  • Lightbox z-index: A custom z-index for the lightbox shown by Commercia.
  • Back button text: The back button label.

Teaser component template

This component template can be used in any page to sell a product with a fixed price. It extends the standard Magnolia's teaser component.

The template id is: 

  • comercia-connector-module:components/comercia-teaser

In addition to the standard teaser attributes, the following attributes can be defined though its dialog:

  • Target Page: The page to be shown after the payment is done.
  • Price: The proce of the product to be sold.
  • Currency: The currency for the order.

Download teaser component template

This component template can be used inside the target page of the previous components in case the order includes a download link after the purchase.

This template needs an order id to be passed as URL parameter. The name of the parameter has to be "order".

This template needs an order to be previously created in the "transactions" workspace and the order needs to have a "downloadLink" property.

The template id is: 

  • comercia-connector-module:components/comercia-download-teaser

Demo pages

The guided sell is shown through the following form pages:

  • /travel/purchase-tour

  • /travel/purchase-tour/review


The unique product sell is shown through travel guides page:

  • /travel/travel-guides

The download page for the teaser is shown here:

  • /travel/comercia-download-thank-you


You can review and report issues in the JIRA project.

  • No labels


  1. Edwin Guilbert is this still relevant? Would it make sense to move this page to Extensions? 

    1. Yes its still relevant and the module is still available to public. It needs updating to latest versions of magnolia though. It makes sense to move it to extensions

      1. Ok perfect. I want to try and consolidate the community wiki so I've been going through the pages. Then I will take that and format it for Extensions (aka the incubator) next week.