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
GatewaysSettings
| Setting | Shipped | Meaning |
|---|---|---|
AvailableGateways[] | empty | Names of gateways to load from GatewaysDirectories[] |
GatewaysDirectories[] | kernel/shop/paymentgateways | Directories 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):
| Way | File it includes | Used by |
|---|---|---|
| Listed gateways | <GatewaysDirectories>/<gateway>/classes/<gateway>gateway.php for every name in AvailableGateways[] | Gateways kept outside the extension convention |
| Active extensions | extension/<extension>/classes/<extension>gateway.php for every active extension | ezpaypal (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 setting | Shipped | Note |
|---|---|---|
[ServerSettings] ServerName, ServerPort, RequestURI | https://www.paypal.com, 443, /cgi-bin/webscr | Point to PayPal's sandbox while testing |
[PaypalSettings] Business | empty | Your PayPal business account; required |
[PaypalSettings] MaxDescriptionLength | 127 | Longest order description sent |
[PaypalSettings] NoNote, NoteLabel, PageStyle, BackgroundColor, LogoURI | 0, empty, empty, 0, empty | Look of the PayPal page |
[OrderSettings] PaymentMadeOrderStatusID | 1000 | Status 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:
| Setting | Shipped | Note |
|---|---|---|
MerchantLogin, TransactionKey | false | Your Authorize.Net credentials; keep them in settings/override/ |
TestMode | true | Leave on until the go-live test |
SSLVerify | true | Keep on |
CustomerCVV2Check | false | Ask for the card security code |
MD5HashVerification, MD5HashSecretWord | true, publish | Change the secret word from the shipped value |
OrderStatusRefundCode, ShowAuthorizeDotNetRefundButton | 1000, true | The 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
- Activate the extension and clear the INI cache.
- Open Setup > Workflows, create or edit the checkout workflow and add the event Payment Gateway.
- 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. - The payment gateway event writes a log to
var/log/eZPaymentGatewayType.log; redirect gateways also writevar/log/eZRedirectGateway.log(Troubleshooting checkout).
Related pages
- Shop settings walkthroughs
- Payment gateway event
- Payment gateways (website creators)
- Payment gateways (running your store)
- Free documentation: this page is free to copy, translate and improve under the GNU FDL 1.3.
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.