Download the PHP package kptive/payment-sips-bundle without Composer
On this page you can find all versions of the php package kptive/payment-sips-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download kptive/payment-sips-bundle
More information about kptive/payment-sips-bundle
Files in kptive/payment-sips-bundle
Package payment-sips-bundle
Short Description Payment Bundle providing access to the ATOS SIPS solution
License MIT
Homepage http://github.com/KptiveStudio/KptivePaymentSipsBundle
Informations about the package payment-sips-bundle
KptivePaymentSipsBundle
The KptivePaymentSipsBundle
provides access to the Atos Worldline SIPS payment solution through
the JMSPaymentCoreBundle.
The following payment services are powered by Atos SIPS:
- Merc@net (BNP Parisbas)
- Cyberplus (Banque Populaire)
- Elys Net (HSBC)
- Scellius (La Banque Postale)
- SogenActif (Société Générale)
- Webaffaires (Crédit du Nord)
- Sherlocks (LCL)
- Citelis (Crédit Mutuel)
- ...
This means that this bundle should work out of the box with any of them.
Installation
Step 1
Run:
Or add the following to your composer.json
before updating your vendors:
Step 2
Register the bundle in your AppKernel
class.
You will also have to register the JMSPaymentCoreBundle
and
configure it.
Step 3
Copy the content of your SIPS folder into app/sips/
. If you want to put it
elsewhere, just edit the config values of the pathfile
and binaries locations
(see below).
You will also have to copy or put your own logo images in the right location
depending on what you specified in your pathfile
.
Configuration
Usage
Let's assume that you have an AcmePaymentBundle
and that you handle your
orders with a Acme\PaymentBundle\Entity\Order
class:
Create a controller with a details
action.
This is where your customer can review their order and confirm it.
As you can see in the previous action, when the user confirms their order, we
create a new PaymentInstruction
(see the
JMSPaymentCoreBundle documentation
for more information on how it works).
They are then redirected to the payment_gateway
route.
This is where we'll make a call to the SIPS API so that we can display the SIPS
credit card choice form.
Let's implement the corresponding action:
And in the corresponding view, display the form to the user:
When the user has completed the payment workflow on the SIPS platform, they will
be redirected to the normal_return_url
you configured earlier in the bundle
config section.
Let's implement the action :
For now, we didn't do anything with the Order, we just handled the bank response and marked the payment as valid.
The JMSPaymentCoreBundle will trigger a payment.state_change
event.
So we will listen to this event and do everything useful we want in a PaymentListener
:
Register it as a service:
And voilà!
If your customer doesn't click on the "Back" button on the bank platform,
a request will be automatically issued to the configured automatic_response_url
.
You can use the same URL as the normal_return_url
or implement your own.
Warning: those examples don't take security into account. Don't forget to check the ownership of the order!
Credits
- KptiveStudio http://kptivestudio.com
- Hubert Moutot [email protected]
A great thank you to Johannes M Schmitt for his awesome JMSPayementCoreBundle. Thanks to https://github.com/Kitano/KitanoPaymentSipsBundle for the inspiration.
License
KptivePaymentSipsBundle is released under the MIT License. See the bundled LICENSE file for details.