Download the PHP package reflexece/systempay-bundle without Composer
On this page you can find all versions of the php package reflexece/systempay-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download reflexece/systempay-bundle
More information about reflexece/systempay-bundle
Files in reflexece/systempay-bundle
Package systempay-bundle
Short Description Payment gateway for Banque Populaire and Caisse d'épargne.
License
Informations about the package systempay-bundle
SystempayBundle
This bundle allows to implement a Payment Solution working with SystemPay for your symfony projet. This payment solution uses Systempay. Systempay is a payment gateway proposed by the following bank companies :
- Banque Populaire (Cyberplus)
- Caisse d'épargne (SPPlus)
Installation
Step 1 : Import using Composer
Using composer :
Step 2 : Enable the plugin
Enable the bundle in the kernel:
Step 3 : Configure the bundle
Mandatory fields :
Optionnal fields (here the fields have their default values) :
How to use
Controller
Create a Transaction
To intantiate a new Transaction, you need to create an action in one of your controller and call the tlconseil_systempay
serivce. All mandatory fields are used with their default value. You can configure all the common fields of your transactions in the app/config/config.yml
file.
To see what fields are available see : Systempay Documentation (Chapter 2.3.1)
Service Method
init($currency = 978, $amount = 1000)
allows you to specify the amount and the currency of the transaction.setOptionnalFields(array)
allows you to specify any field for the System Pay Gateway.
Example
Handle the response from the server
This route will be called by the Systempay service to update you about the payment status. This is the only way to correctly handle payment verfication.
Service Method
responseHandler(Request)
is used to update the transaction status (in database)
Example
Template
This is how the template for the payOnlineAction()
may look like. You can use the systempayForm
twig function to automatically generate the form based on the fields created in the service and returned by the getResponse()
function.