Skip to content
Payum offers everything you need to work with payments. From simplest use cases to very advanced ones.
Branch: master
Clone or download
makasim Merge pull request #487 from hacfi/symfony-4.2
Fix Symfony 4.2 deprecations
Latest commit 9669e1c Feb 4, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Command Remove deprecated ContainerAwareCommand usage Feb 2, 2019
Controller Allow sessionTokenAction to POST redirect Jan 7, 2019
DependencyInjection Fix root node deprecation in symfony/config > 4.1 Dec 19, 2018
EventListener Use allowCustomResponseCode instead X-Status-Code Feb 14, 2018
Form/Extension Add new getExtendedTypes method in form extension for Symfony 4.2 Feb 2, 2019
Profiler fix tests. Dec 22, 2017
Resources Adding alias to enable auto-wiring Dec 18, 2018
Sonata [security] Add support of Gateway encryption. Mar 28, 2017
Tests Fix tests for Symfony 4.2 Feb 2, 2019
.gitignore Added PayPal pro payment Feb 15, 2013
.travis.yml upd travis cfg Dec 22, 2017
CHANGELOG.md Release 2.3.1 Jul 19, 2018
LICENSE Update license copyright Oct 30, 2018
PayumBundle.php move storage factory init from PayumBundle::build to PayumExtension::… Nov 24, 2017
README.md Update README.md Nov 6, 2018
UPGRADE.md
composer.json remove dep on jms payment core. Dec 22, 2017
phpunit.xml.dist Fix tests for Symfony 4.2 Feb 2, 2019

README.md

Supporting Payum

Payum is an MIT-licensed open source project with its ongoing development made possible entirely by the support of community and our customers. If you'd like to join them, please consider:


PayumBundle

Gitter Build Status Total Downloads Latest Stable Version

The bundle integrate payum into symfony framework. It already supports +35 gateways. Provide nice configuration layer, secured capture controller, storages integration and lots of more features.

Sylius e-commerce platform base its payment solutions on top of the bundle.

Resources

Examples

Configure:

payum:
    storages:
        Payum\Core\Model\Payment:
            filesystem:
                storage_dir: '%kernel.root_dir%/Resources/payments'
                id_property: number

    security:
        token_storage:
            Payum\Core\Model\Token:
                filesystem:
                    storage_dir: '%kernel.root_dir%/Resources/gateways'
                    id_property: hash
                
    gateways:
        offline:
            factory: offline

note if you're using Symfony 4+ then create config/packages/payum.yaml file with contents described above.

Purchase

<?php
use Payum\Core\Model\Payment;
use Payum\Core\Reply\HttpRedirect;
use Payum\Core\Reply\HttpResponse;
use Payum\Core\Request\Capture;

$payment = new Payment;
$payment->setNumber(uniqid());
$payment->setCurrencyCode('EUR');
$payment->setTotalAmount(123); // 1.23 EUR
$payment->setDescription('A description');
$payment->setClientId('anId');
$payment->setClientEmail('foo@example.com');

$gateway = $this->get('payum')->getGateway('offline');
$gateway->execute(new Capture($payment));

Get status

<?php
use Payum\Core\Request\GetHumanStatus;

$gateway->execute($status = new GetHumanStatus($payment));

echo $status->getValue();

Other operations.

<?php
use Payum\Core\Request\Authorize;
use Payum\Core\Request\Cancel;
use Payum\Core\Request\Refund;

$gateway->execute(new Authorize($payment));

$gateway->execute(new Refund($payment));

$gateway->execute(new Cancel($payment));

Contributing

PayumBundle is an open source, community-driven project. Pull requests are very welcome.

Like it? Spread the word!

Star PayumBundle on github or packagist.

Donate

Click here to lend your support to: Your private payment processing server. Setup it once and rule them all and make a donation at pledgie.com !

License

The bundle is released under the MIT License.

You can’t perform that action at this time.