SilverStripe Payment Module
PHP Scheme JavaScript
Latest commit 9a0a040 Mar 26, 2016 @dhensby dhensby Merge pull request #41 from helpfulrobot/add-standard-scrutinizer-config
Added standard Scrutinizer config
Failed to load latest commit information.
code Converted to PSR-2 Dec 18, 2015
images APICHANGE: add TestHarness class as DPSPayment development tool, add … Mar 22, 2010
javascript ENHANCEMENT: re-orgnase the file structure, remove unnecessary file Mar 23, 2010
lang ENHANCEMENT: omit all php close tag '?>' to avoid potential problem f… Mar 16, 2011
templates/Includes API Removed "harness" feature Mar 5, 2013
tests/DPSPayment Converted to PSR-2 Dec 17, 2015
.editorconfig Added standard .editorconfig file Dec 17, 2015
.gitattributes Added standard .gitattributes file Jan 16, 2016
.scrutinizer.yml Added standard Scrutinizer config Feb 17, 2016 BUG Fixed XML injection in DPSAdapter Mar 5, 2013
LICENSE Added LICENSE and README files to payment module Apr 27, 2009
_config.php API Removed "harness" feature Mar 4, 2013 Added standard code of conduct file Feb 16, 2016
composer.json Added composer.json Jan 3, 2013

Payment Module

Important: The module is being restructured for SilverStripe 3 support, see "Roadmap" below


Generic API for various payment gateways. Records payments and their status in the database.

Supported Gateways and Payment Methods


A project using this module needs to set its PDS account in project _config.php file,

  • If using DPS-hosted payment gateway (pxpost), set PXPost account: DPSAdapter::set_pxpost_account($your_pxpost_username, $your_pxpost_password);
  • If using Merchant-hosted payment geteway (pxpay), set PXPay account: DPSAdapter::set_pxpay_account($your_pxpay_userid, $your_pxpay_key);
  • If using both gateways, you need to set both above. This is very likely when using DPS-hosted to Auth a Credit Card and using Merchant-hosted to recursively pay.

This module is a stand-alone module, it is only dependent on SilverStripe core. We have re-factored DPSPayment and make DPSPayment and previous DPSHostedPayment into one payment object, the only difference between the two is they call different functions when making a transaction.

One of its common applications is to be used in E-commerce module. But in general, it should be hook-up with any data object as long as this data object is payable, such as a downloadable mp3, a E-book, booking a ticket on-line, donation, etc. DPSPayment has been re-implemented in this way, though we need to check all other payment methods in future releases.


The module was heavily worked on during GSOC 2012 (project page), which resulted in a number of forks, which we'll merge back once they're in a good state.


Curl and CA Certificates on Windows

Some gateways (like DPSPayment) use PHP's curl in order to submit data, usually through a secure SSL connection. In some cases, the CA certificates aren't accepted. On Windows, PHP's curl doesn't come with any root CAs installed. You'll need to add them manually. The easiest way is a global installation through changing php.ini: