Skip to content

itmox/PayumServer

 
 

Repository files navigation

PayumServer.

Build Status Total Downloads Latest Stable Version

PHP 5.5+ Payment processing server. Setup once and rule them all. Here you can find a good introduction to what it does and what problems it solves.

Try it:

Docker

Create docker-compose.yml file:

web:
  image: payum/payum-server
  command: apachectl -e info -DFOREGROUND
  environment:
      - PAYUM_MONGO_SERVER=mongodb://mongo:27017
      - PAYUM_DEBUG=1
  ports:
   - "80:80"
  links:
   - mongo
mongo:
  image: mongo

and run docker-compose up. You server will be at localhost:8080 port.

Docker container on docker hub. to be done.

Setup & Run

$ php composer.phar create-project payum/payum-server --stability=dev
$ cd payum-server
$ php -S 127.0.0.1:8000 web/index.php

An example on javascript:

  // do new payment
  var payum = new Payum('http://localhost:8000');
  payum.payment.create(100, 'USD', function(payment) {
      var afterUrl = 'http://afterPaymentIsDoneUrl';

      payum.token.create('capture', payment.id, afterUrl, function(token) {
          // do redirect to token.targetUrl or process at the same page like this:
          payum.execute(token.targetUrl, '#payum-container');
      });
  });

Note: You might need a web client to manage payments gateways or you can use REST API.

Support me

There are lots of features were done and even more stuff in todo list. If the library made your life easier cosider support me. You can eiether hire me to do some payment related stuff or donate. You can also send a mail with a feedback. Tell me about your experience with Payum.

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

Code MIT licensed.

Packages

No packages published

Languages

  • PHP 93.3%
  • HTML 4.1%
  • JavaScript 2.3%
  • ApacheConf 0.3%