Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,059 of 9,059 pages
About the help in other languages
All help pages

paymentgateways.ini walkthrough

How Exponential finds payment gateways - paymentgateways.ini AvailableGateways and GatewaysDirectories, the automatic loading of a gateway class from an active extension, registerGateway, and the provider files…

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/help/e-commerce/settings/paymentgateways-ini-walkthrough.md

On this page

paymentgateways.ini walkthrough

This page is for developers who connect or write a payment gateway. It explains the two ways the payment gateway event finds gateway classes, the settings of settings/paymentgateways.ini, and the provider files of the two payment extensions in the repository.

Contents

  1. GatewaysSettings
  2. How gateways are loaded
  3. The provider files
  4. Checking that a gateway is available

GatewaysSettings

SettingShippedMeaning
AvailableGateways[]emptyNames of gateways to load from GatewaysDirectories[]
GatewaysDirectories[]kernel/shop/paymentgatewaysDirectories to search; this kernel directory is not shipped, so nothing is loaded from it

The old misspelling GatewaysDerictories is still read when present (eZPaymentGatewayType::loadAndRegisterBuiltInGateways()).

How gateways are loaded

When the payment gateway event type is constructed it loads gateways in two ways (kernel/classes/workflowtypes/event/ezpaymentgateway/ezpaymentgatewaytype.php):

WayFile it includesUsed by
Listed gateways<GatewaysDirectories>/<gateway>/classes/<gateway>gateway.php for every name in AvailableGateways[]Gateways kept outside the extension convention
Active extensionsextension/<extension>/classes/<extension>gateway.php for every active extensionezpaypal (classes/ezpaypalgateway.php), ezauthorize (classes/ezauthorizegateway.php)

Including the file is not enough: at the foot of its file every gateway calls

eZPaymentGatewayType::registerGateway( <type>, '<class name>', '<description>' );

and only registered gateways appear in the payment gateway event. Registering the same type twice logs an error and keeps the first. The simplest way for a gateway of your own is the extension convention: an extension mypay with classes/mypaygateway.php (Payment gateway development).

The provider files

ezpaypal: paypal.ini

Block and settingShippedNote
[ServerSettings] ServerName, ServerPort, RequestURIhttps://www.paypal.com, 443, /cgi-bin/webscrPoint to PayPal's sandbox while testing
[PaypalSettings] BusinessemptyYour PayPal business account; required
[PaypalSettings] MaxDescriptionLength127Longest order description sent
[PaypalSettings] NoNote, NoteLabel, PageStyle, BackgroundColor, LogoURI0, empty, empty, 0, emptyLook of the PayPal page
[OrderSettings] PaymentMadeOrderStatusID1000Status set when the payment is confirmed; see the note in PayPal payments

The extension also registers the module view paypal/notify_url for PayPal's callback, exempts it from policy checks ([RoleSettings] PolicyOmitList[]=paypal/notify_url) and allows the redirect host ([SiteSettings] AllowedRedirectHosts[]=www.paypal.com). The full table is in ezpaypal.

ezauthorize: ezauthorize.ini

ezauthorize is a transparent gateway: eZAuthorizeGateway extends eZCurlGateway, which extends eZPaymentGateway, so card details are entered on your site and sent to Authorize.Net from your server. Its settings/ezauthorize.ini.append.php holds, among others:

SettingShippedNote
MerchantLogin, TransactionKeyfalseYour Authorize.Net credentials; keep them in settings/override/
TestModetrueLeave on until the go-live test
SSLVerifytrueKeep on
CustomerCVV2CheckfalseAsk for the card security code
MD5HashVerification, MD5HashSecretWordtrue, publishChange the secret word from the shipped value
OrderStatusRefundCode, ShowAuthorizeDotNetRefundButton1000, trueThe extension adds a refund view (refund module)
ShopAdminEmailAddress[email protected]Replace with your own address

Because card data passes through your server with this gateway, read Card payments and PCI basics before choosing it.

Checking that a gateway is available

  1. Activate the extension and clear the INI cache.
  2. Open Setup > Workflows, create or edit the checkout workflow and add the event Payment Gateway.
  3. The gateway's description ("Paypal", "Authorize.Net", or yours) is listed for selection. If it is missing, the file was not found or registerGateway() was not called.
  4. The payment gateway event writes a log to var/log/eZPaymentGatewayType.log; redirect gateways also write var/log/eZRedirectGateway.log (Troubleshooting checkout).

Become an Exponential Partner

Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x