This plugin provides an Payment Express/Windcave integration (PXPay) for Craft Commerce.
This plugin requires Craft Commerce 3.0.0 or later.
You can install this plugin from the Plugin Store or with Composer.
Go to the Plugin Store in your project’s Control Panel and search for "Payment Express”. Then click on the “Install” button in its modal window.
Open your terminal and run the following commands:
# go to the project directory
cd /path/to/my-project.test
# tell Composer to load the plugin
composer require platocreative/commerce-payment-express
# tell Craft to install the plugin
./craft install/plugin commerce-payment-express
To add an Payment Express payment gateway, go to Commerce → Settings → Gateways, create a new gateway, and set the gateway type to “Payment Express”. We recommend using the Gateway handle "paymentExpress".
Remember to enable test mode in the settings as this will trigger Payment express to use a UAT sandbox.
Test credit cards can be found here.
Transactions in Craft Commerce are identified by a long hash which is longer than 16 characters long. Payment Express can only store transaction ids that are 16 or less so this plugin will use the first 16 characters of the transaction id that Craft generates and stores.
beforeCreateGateway
This event allows you to extend or change gateway settings before it is sent off. For example you might want to update login details dyanmically.
use platocreative\paymentexpress\gateways\PxPay;
use platocreative\paymentexpress\events\CreateGatewayEvent;
use yii\base\Event;
Event::on(
PxPay::class,
PxPay::EVENT_BEFORE_CREATE_GATEWAY,
function(CreateGatewayEvent $event) {
// $event->gateway is Omnipay::create();
// e.g. $event->gateway->setUsername()
}
);
- [] Add support for PXPost
- [] Add tests to ensure checkout using PXPay is available