locastic / tcompayway-payum-bundle
Symfony2 Integration for TcomPayWay with Payum
Installs: 1 766
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 9
Forks: 2
Open Issues: 0
Requires
- php: ^5.5.9|^7.0
- locastic/tcompayway: dev-master
- payum/payum: ^1.3
- payum/payum-bundle: ^2.1
Requires (Dev)
- phpunit/phpunit: ~4.0
README
Prerequisites
For TcomPayPayumBundle to work, you have to install Payum. You can read more about Payum at their official website payum
On PayumBundle's get_it_started you can find more about creating security token and payment details.
Installation
For installation of TcomPayWayPayumBundle just include it in your composer.json file and run Composer's update command.
Afterwards, register the new bundle in your AppKernel.
<?php // app/AppKernel.php public function registerBundles() { $bundles = [ // ... new \Locastic\TcomPayWayPayumBundle\LocasticTcomPayWayPayumBundle(), ]; }
Next step is to fill your shop details. Parameters secure3d_template, prepare_template & done_template are exposed so you can replace them with your own templates.
# app/config/config.yml payum: gateways: tcompayway: factory: tcompayway_direct # or tcompayway_direct shop_name: EDITME shop_id: EDITME username: EDITME password: EDITME secret_key: EDITME authorization_type: EDITME sandbox: true disable_installments: EDITME # or tcompayway_offsite: factory: tcompayway_offsite shop_id: EDITME secret_key: EDITME authorization_type: EDITME sandbox: true disable_installments: EDITME
Sylius Configuration
Now you need to configure capture_payment service, add tcompayway gateway to sylius_payments.
# app/config/config.yml services: payum.tcompayway.action.convert_payment_to_tcompayway: class: Locastic\TcomPayWayPayumBundle\Bridge\Sylius\ConvertPaymentToTcomPayWayAction tags: - { name: payum.action, factory: tcompayway_direct, prepend: true } - { name: payum.action, factory: tcompayway_offsite, prepend: true } # Sylius/Bundle/CoreBundle/Resources/config/app/config.yml sylius_payment: gateways: dummy: Defaultni gateway (dummy) tcompayway: T-com PayWay
You also need to configure payment methods in Sylius administration to use T-com PayWay gateway.
To do:
- decouple labels and add support for translations
- add configuration for installments
- add javascript validation and automatic pick of credit card by card number
- set custom number of installments