Auth

Purpose

Implements the Auth transaction with a payment gateway.

Mandatory

Yes, if the plugin supports 3D Secure.

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
payment_method

The attributes of the previously saved payment method.

This contains name-value pairs returned by the ADD_NEW_METHOD parameter.

array
previous_transaction_data

(Optional) Data saved in the previous transaction.

This contains name-value pairs returned previously in the TRANSACTION_DETAILS array.

array

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 contains the following keys:

Param name Description Type
STATUS (Mandatory) The method execution status. Valid values for the Auth method are:
  • APPROVED: The request is successfully processed and the payment gateway approved the transaction.
  • DECLINED: The request is successfully processed and the payment gateway declined the transaction.
  • FRAUD: The request is successfully processed and the payment gateway declined the transaction due to a suspected fraud.
  • 3DSECURE: The request is successfully processed and the payment gateway requires a customer to be redirected to an Authentication page at the 3D Secure Gateway server.
  • PENDING: The request processing has the pending status in the payment gateway. The NEXT_TRANSACTION_GAP parameter may be used together with this status, so Billing can schedule the CheckStatus method call to verify whether the status is changed in the payment gateway. Refer to the NEXT_TRANSACTION_GAP parameter for details.
  • ERROR: An error occurred while processing the request. The error reason 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
REDIRECT_HASH

(Mandatory) Provides information for the redirect. The parameters are:

  • url: The URL where a customer is redirected (String, mandatory),
  • attrs: Parameters and values that will be used for redirect (Array, mandatory),
  • method: The method used to pass the data: GET, POST. If not set, the POST method will be used (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
NEXT_TRANSACTION_GAP

(Optional) The delay, in seconds, to dispatch the CheckStatus method call. This parameter may be used when the STATUS parameter is PENDING.

When Billing receives this parameter, it will schedule the CheckStatus method call event to be dispatched in NEXT_TRANSACTION_GAP seconds. It may be useful when the payment gateway expects API consumers to actively check a transaction status.

integer

The example of a response with the 3DSECURE status is shown below as a JSON object:


The example of a response with the APPROVED status is shown below as a JSON object:

Example

The built-in Demo plugin supports the 3D Secure flow, therefore it implements the Auth method. The example below shows how this plugin implements the Auth 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.