API Overview

Methods

The following methods can be implemented in a payment plug-in:

Method Name

Method Type

Mandatory

%Plug-in_Name%_GetConfig

configuration

Yes

%Plug-in_Name%_GetSupportedCurrencies

configuration

No

%Plug-in_Name%_ValidateConfig

configuration

No

%Plug-in_Name%_TestConnection

configuration

No

%Plug-in_Name%_Is3DSecureActive

configuration

Yes if 3D Secure is supported

%Plug-in_Name%_Redirect

processing

Yes (if redirection to the gateway page is required)

%Plug-in_Name%_GoModal

processing

Yes (if opening of the modal form is required)

%Plug-in_Name%_Sell

processing

Yes (for the gateways that use tokenization)

%Plug-in_Name%_Auth

processing

Yes (for the gateways that use 3D Secure)

%Plug-in_Name%_Capture

processing

Yes (for the gateways that use 3D Secure)

%Plug-in_Name%_Refund

processing

No

%Plug-in_Name%_RefundPartial

processing

No

%Plug-in_Name%_RefundCredit

processing

No

%Plug-in_Name%_Void

processing

No

%Plug-in_Name%_CheckStatus

processing

No

%Plug-in_Name%_Callback

processing

No

%Plug-in_Name%_CanRemovePayTool

processing

No

%Plug-in_Name%_RemovePayTool

processing

No

Billing initializes a developed payment plug-in using the following logic:

  • as a redirect plug-in, if it supports the Redirect method;
  • as a modal, if it has has the GoModal method implemented;
  • as a token-method, in case it supports the Sell and Auth methods.

If no one of the above listed methods is implemented in the supported_methods list, the plug-in's configuration is considered invalid.

Utility Functions

The following utility functions that can be used while developing a payment plug-in:

  • pa_localized_string($string, $variables) - returns localized string;
  • pa_log($message) - writes a message to the log file at /var/log/httpd/payment-sdk.log
  • pa_array_to_xmlstr($array) - converts an array to a string that contains data in xml format;
  • pa_xml_to_array($xmlstr) - converts a string containing xml data to an array.