Skip to end of metadata
Go to start of metadata

Businesses often require payment functionality within a form. The steps below detail the procedure to follow in order to configure payment capability within your smart form.

Composer

  1. Include both a ‘TM Payment Total’ widget and ‘TM Payment Type selector’ in the form.
  2. The ‘TM Payment Total’ field indicates to the form filler what payment is required and is usually a calculated value i.e. not reliant on the user to enter payment information.  To create a calculation script, go to the property editor > Rules > Calculation property.
  3. The ‘TM Payment Type selector’ field enables the form filler to select either a credit card payment  or a BPAY payment.
  4. If BPAY is not accepted, hide the ‘blkBPAY’ field (see the sample form).
  5. If BPAY is accepted the receipt must be configured to display a BPAY biller code and reference number details as well as the amount due. This can be accomplished as follows:
    • Add a block at the beginning of the form (see section level 2 called ‘BPAY Payment’ in the sample form) and set it to display only on the receipt using the following code in the visibility rule:
      • sfc.isReceipt() && {TM Payment Total field } > 0 && {BPAY radio button};

Fields referenced in the visibility rule above

      • This code ensures that the block will only display when the form is in receipt mode AND when there is a payment required AND when the user has indicated that they will make the payment using BPAY.
  • The ‘biller code’ and ‘reference number’ are set using form properties in Transaction Manager. This means that the same form can be used by different organizations, without all of the payments made by users being paid to the same place.

Transaction Manager

For payments to work, a payment gateway has to be setup in Transaction Manager.

  1. A new definition can be is created in the System > Services Definitions page if an appropriate gateway does not exist (see Transaction Manager documentation for more information).

  2. Then associate the payment gateway service to the relevant organization using Forms > Organizations > Payment Gateway tab.
     
  3. Complete the details required including which credit cards may be used.
  4. In the Properties tab, create a ‘Biller Code’ property if it doesn’t exist.
  5. Open the form and include the property at form version level.
  6. Map the properties to the biller code and biller reference number fields in the form.
  7. Resulting receipt:

Result

When the form is submitted, if the ‘TM Payment Total’ field has non-zero value and the ‘Credit/Debit Card option’ is completed, Transaction manager will either display a payment page for the form filler to enter credit card information (see below) or a confirmation page in the case of BPAY.

 Sample form:         https://composer.prod.avoka.com/composer/secure/composer.htm  > Cookbook> Payments > Payment

                        https://tm.demo.avoka.com/govassist/servlet/SmartForm.html?formCode=payment