Download the PHP package ongoing/saferpay-bundle without Composer
On this page you can find all versions of the php package ongoing/saferpay-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package saferpay-bundle
Saferpay - Extension to the JMSPaymentCoreBundle providing access to Saferpay.
This bundle now uses the new Saferpay JSON API
This is a Fork of valiton SaferpayBundle. On top of the parent functionalities, it adds the possibility to use the payment process with the Transaction Interface.
Install and enable
Install the bundle with composer:
Activate the bundle in your kernel.
Example Configuration
saferpay_checkout (JMS ChoosePaymentMethodType Form creation)
URLS can be overwritten or set in predefined data, to generate dynamic URLS for Example!
To additionally send user data with saferpay initialization, following fields could be added under array key checkout_params
:
firstname
,lastname
,street
,zip
,languagecode
,city
anduser_ip
Credit Card Data
On a successful response, creditcard data is saved in extended data of the transaction with keys token, CARDREFID, CARDMASK, CARDBRAND, CARDVALIDMONTH, CARDVALIDYEAR (take a look at approve method in the SaferpayPlugin).
The generated alias is saved under CARDREFID. The alias could be used to initialize, authorize and capture a transaction in one step. By setting authorize_direct to true or false, additional security step (like 3DS) could be skipped. Be aware of liability reversal.
To let the bundle use the alias, you only have to set the creditcard_alias key (and correct alias as value) on the extended data of a JMSPaymentCoreBundle transaction/paymentinstruction BEFORE the transaction is initialized. This could be done by a form listener, a controller or any other service which is able to modify extended data.
Be aware using Saferpay Transaction with 'authorize_direct', the redirect to a success/failure/error page needs to be implemented manually.
Configuration Reference
Configure the bundle according to your needs, full config example:
All versions of saferpay-bundle with dependencies
symfony/framework-bundle Version ^5.4
jms/payment-core-bundle Version ^1.0
guzzlehttp/guzzle Version ^6.4
fakerphp/faker Version ^1.23