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.
- Demo: http://server.payum.org/demo.html
- Backend: http://server.payum.org/client/index.html
- Server: http://server.payum.org/
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.
$ 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.
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.
Code MIT licensed.