Giter Site home page Giter Site logo

sovetski / payumbundle Goto Github PK

View Code? Open in Web Editor NEW

This project forked from payum/payumbundle

0.0 0.0 0.0 1.63 MB

Payum offers everything you need to work with payments. From simplest use cases to very advanced ones.

Home Page: https://payum.forma-pro.com/

License: MIT License

PHP 99.58% Twig 0.42%

payumbundle's Introduction

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, an open source headless eCommerce 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('[email protected]');

$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.

License

The bundle is released under the MIT License.

payumbundle's People

Contributors

makasim avatar pierredup avatar chris8934 avatar pborreli avatar tetragramat avatar davidmpaz avatar aitboudad avatar piotrantosik avatar chris53897 avatar askozienko avatar saidul avatar hacfi avatar pantelm-florajet avatar pantelm avatar pamil avatar antonioperic avatar aerendir avatar great-antique avatar winzou avatar serdyuka avatar ruslan-polutsygan avatar nyholm avatar realaestan avatar mgrinko avatar garak avatar mvar avatar kg-itembase avatar kkevindev avatar jcroll avatar eymengunay avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.