GoModal

Purpose

Prepares the opening of the modal form. The form will be displayed in the UI as a Javascript-based checkout.

Mandatory

Yes, if the plugin supports the Modal Form Workflow.

Input Parameters

An associative array that contains the following values:

Param name Description Type
config The plug-in configuration values saved in the Billing database. array
environment The Billing environment information. Environment
account_info The account's details. AccountDetails
vendor_info The vendor's details. AccountDetails
document_info The payment document description. DocumentInfo

transaction_category

The transaction category for merchant-initiated payments (relevant and available only for transaction_initiator = MIT). Possible values are:

  • C: for Unscheduled Credential on File payments,
  • R: for recurring payments (payments at regular intervals).
string

transaction_moto

The parameter that defines whether it is the MOTO transaction. Possible values are:

  • true: for MIT payments on behalf of a customer,
  • transaction_moto is not sent: for CIT payments and recurring or renewing MIT payments.
boolean

transaction_initiator

The transaction initiator. Possible values are:

string
ref_no The Billing transaction identifier. integer
transaction_amount The transaction amount. double
currency_iso The currency of the transaction amount in the ISO format (for example, USD or EUR). string

current_lang

The current language. string
client_ip The IP from the client computer. string

The example of input parameters is shown below as a JSON object:

Response

An associative array that should contains the following keys:

Param name

Description

Type

STATUS (Mandatory) The method execution status. Valid values for the GoModal method are:
  • MODAL: The request is successfully performed and a pop-up window will be embedded to the provider's website.
  • DECLINED: The request failed. The reason or error message can be sent in the TEXT parameter.
string
TEXT (Optional) The array that contains the following parameters:
  • customer_message: Contains text that will be displayed to a customer as a status message (String, optional).
  • vendor_message: Contains text that will be displayed to a vendor (String, optional).
array

MODAL_FORM

(Mandatory) Provides the attributes required for displaying the checkout modal form to the UI. The parameters are:

  • checkout_script_section: The ID of HTML <div> element that contains HTML elements required to open the form (String, mandatory).
  • checkout_script_src: The URL to vendor's Javascript required to build the form (String, optional).
  • checkout_script_handler: The Javascript code that launches the Javascript checkout script (String, mandatory).
  • checkout_script_html: The extra HTML code that can be used for checkout (String, optional).
array
TRANSACTION_DETAIL

(Optional) The array that will be associated with the current transaction and will be represented back in an unchanged form as the value of the previous_transaction_data parameter at the next call of transaction processing methods of the plugin.

Note: Billing looks up the trans_id parameter that identifies a transaction on the gateway side to display it in the provider's UI. We highly recommend that you use this parameter.

array

The example of a response is shown below as a JSON object:

Example

The built-in DemoModal plugin supports the Modal Form workflow. The example below shows how this plugin implements the GoModal method:

See Also

CloudBlue, an Ingram Micro business, uses cookies to improve the usability of our site. By continuing to use this site and/or logging in you are accepting the use of these cookies. For more information, visit our Privacy Policy.