dmitrovskiy / velocityservice
silex service for velocity payment system
Installs: 104
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/dmitrovskiy/velocityservice
Requires
- silex/silex: ~1.2
Requires (Dev)
- phpunit/phpunit: ~3.7
This package is not auto-updated.
Last update: 2025-10-25 22:14:27 UTC
README
Using
Single velocity processor
To use it in your project you should add the package "dmitrovskiy/velocityservice": "dev-master" into your composer.json file.
Before using velocity service provider you need to inject values:
$app = new Application(); $app->register(new VelocityServiceProvider(), array( 'velocity.identityToken' => 'yourToken', 'velocity.applicationProfileId' => 1234, 'velocity.merchantProfileId' => 'yourMerchantProfileID', 'velocity.workflowId' => 1234565, 'velocity.isTestAccount' => true ));
The value velocity.isTestAccount is optional and false by default.
After registering the service you be able to use $app['velocity.processor'] to communicate with velocity service.
Velocity processor factory
That to use several instances of velocity processor you need $app['velocity.processor.factory'].
$applicationProfileId = 14644; $merchantProfileId = "Test Merchant HC"; $workflowId = 2317000001; $identityToken = 'yourToken'; $isTestAccount = true; $velocityProcessorFactory = $app['velocity.processor.factory']; $processor = $velocityProcessorFactory->getProcessor( $applicationProfileId, $merchantProfileId, $workflowId, $identityToken, $isTestAccount );