Code Monkey home page Code Monkey logo

payumserver's Introduction

SWUbanner


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:


Payum

Join the chat at https://gitter.im/Payum/Payum Unit Tests Latest Stable Version Total Downloads Latest Unstable Version License PHP Version Require

Reduce Your Development Time with Payum integrating more than 50 payment services simultaneously. Payum is one of the most popular bug-free solution that has over 1 000 000 downloads already. It is friendly for all top PHP frameworks and was successfully installed and tested by thousands of developers worldwide

Resources

License

Payum is released under the MIT License.

Sponsors

payumserver's People

Contributors

cordoval avatar jaike avatar makasim avatar qymaen avatar vitaliy-svinchyak avatar zifius avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

payumserver's Issues

Fix Fatal error: Call to a member function createConfig() on a non-object in ../Payum/PayumServer/vendor/payum/payum/src/Payum/Core/Bridge/Symfony/Form/Type/GatewayConfigType.php on line 64

i installed the payum server and the payum server ui on my windows machine today. after trying to setup a new payment gateway via the ui, i recieved the following error on the server side:

Fatal error: Call to a member function createConfig() on a non-object in ../Payum/PayumServer/vendor/payum/payum/src/Payum/Core/Bridge/Symfony/Form/Type/GatewayConfigType.php on line 64

after that, i tried to add the payment via the cli command provided in the docs, but got the same error.

then i noticed, that the travis ci build currently fails because of the same error.

after some debugging i found out, that there was some kind of refactoring in "src\Payum\Server\ServiceProvider.php"

when setting up the gateway factories (line 133) it adds the factories like this:

$factories['authorize_net_aim'] = 'payum.authorize_net_aim.gateway_factory';

but imho it should be added like this:

$factories['authorize_net_aim'] = $app['payum.authorize_net_aim.gateway_factory'];

ps: this is my very first issue on github. please be patient with me. :)

Fatal error: Uncaught RuntimeException: APP_ENV environment variable is not defined.

On Latest Docker we get from Symfony:

Fatal error: Uncaught RuntimeException: APP_ENV environment variable is not defined. You need to define environment variables for configuration or add "symfony/dotenv" as a Composer dependency to load variables from a .env file. in /payum/public/index.php:13 Stack trace: #0 {main} thrown in /payum/public/index.php on line 13

In Docker $_ENV var used to retrieve environment variables.

May it is related with this symfony/recipes#331

TODOs

  • History
  • Take gateway from payment not a token
  • Store gateway config inside payment.
  • docker container

Bugs:

  • Default gateway (not implemented)
  • Snippet
  • choose payment
  • Gateway delete
  • StoreExtension is not registered. Fixed but not best way.

Api documentation

Hi,

I've been wondering if there is some documentation about how to use the PayumServer API. I've been playing with the code and after solving some issues I'm stuck adding gateways. Any help? I wanted to add stripe and paypal.

Thank you

XSS in PayumServer

A reflected xss vulnerability in PayumServer can be performed.

PoC:
by inserting

<script>alert('XSS')</script>

as gateway name the server returns the message:
"Parameter "name" for route "gateway_get" must match "[^/]++" ("" given) to generate a corresponding URL."
but also delivers the injected script which is performed in the browser.

The issue can be soled by not returning the input after checking it or by sanitizing and escaping the returned String before delivering it to the client.

Unfortunately we were unable to install PayumServer and fix the bug.

payumserver

Docker image doesn't work

Attempts to use this image result in
<b>Fatal error</b>: Cannot use lexical variable $value as a parameter name in <b>/payum/vendor/makasim/values/src/functions/values.php</b> on line <b>223</b><br>.

Looking at the makasim/values project I can see that this bug has been fixed: makasim/values@ef2306f

joe@itchy:~/compose/payum$ docker-compose exec payum php --version
PHP 7.1.8-2+ubuntu16.04.1+deb.sury.org+4 (cli) (built: Aug  4 2017 13:04:12) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies
    with Zend OPcache v7.1.8-2+ubuntu16.04.1+deb.sury.org+4, Copyright (c) 1999-2017, by Zend Technologies

Register other gateways

I'm trying to add new gateway to the PayumServer but I cannot figure which file is responsible to add the gateways. I have to add the next code in order to register the gateway:

<?php
//config.php

use Payum\Core\Extension\GenericTokenFactoryExtension;

// ...
$factory = new \Crevillo\Payum\Redsys\RedsysGatewayFactory;
$gateways['redsys'] = $factory->create(array(
   'merchant_code' => 'REPLACE WITH YOURS',
   'terminal' => 'REPLACE WITH YOURS', // normally '001'
   'secret_key' => 'REPLACE WITH YOURS'
   'sandbox' => true

    // uncomment if you want notify url to be generated automatically.
    // 'payum.extension.token_factory' => new GenericTokenFactoryExtension($tokenFactory),
));

But I cannot find where, looking PayumSilexProvider documentation it says to use $app['payum.gateways'] but I'm getting InvalidArgumentException: Identifier "payum.gateways" is not defined. all the time.

Any point in how to add other gateways than the default ones would be very appreciated :)

Thanks

Complete solution.

  1. A merchant opens a mobile app or web UI and creates a payment.
  2. He has to fill email, price and description fields.
  3. Buyer gets a SMS or email with the link.
  4. Bayer goes to the purchase page and complete the payment.
  5. The merchant is notificated about payment status.

payum/server missing DOM extension

Current payum/server:latest image (image id 3ab4418f87bc) has no XML/DOM extension installed.

There's php7.1-xml installed, but the default version uses php7.2 and therefore looks for extensions in different directory.

/etc/php/7.1/mods-available/ vs /etc/php/7.2/mods-available/

I see there's Ondrej's repo added to apt's source lists, so the quick fix is just:

FROM payum/server

RUN apt-get update && \
    apt-get install -y php7.2-xml

docker-compose example in readme out of date

In the readme, it says to use payum/payum-server as the image name in the Docker Compose file, checking this out on Docker Hub however, it says that it's deprecated and to use payum/server instead.

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.