AlaaKanaan / PayumBundle

Rich payment solutions for symfony2. Paypal, Stripe, Payex, Authorize.NET, Be2bill, Klarna, recurring paymens, instant notifications and many more

Home Page: http://payum.org/doc#PayumBundle

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PayumBundle

Build Status Total Downloads Latest Stable Version

The bundle integrate payum into symfony framework. It already supports +35 payments. 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\Order:
            filesystem:
                storage_dir: %kernel.root_dir%/Resources/payments
                id_property: number

    security:
        token_storage:
            Payum\Core\Model\Token:
                storage_dir: %kernel.root_dir%/Resources/payments
                id_property: hash
                
    payments:
        offline:
            offline: ~

Purchase

<?php
use Payum\Core\Model\Order;
use Payum\Core\Reply\HttpRedirect;
use Payum\Core\Reply\HttpResponse;
use Payum\Core\Request\Capture;
use Payum\Offline\PaymentFactory as OfflinePaymentFactory;

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

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

Get status

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

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

echo $status->getValue();

Other operations.

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

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

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

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

Contributing

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

Like it? Spread the world!

Star PayumBundle on github or packagist.

License

The bundle is released under the MIT License.

About

Rich payment solutions for symfony2. Paypal, Stripe, Payex, Authorize.NET, Be2bill, Klarna, recurring paymens, instant notifications and many more

http://payum.org/doc#PayumBundle


Languages

Language:PHP 100.0%