2017 © Pedro Peláez
 

library payum-uniteller-gateway

The Payum Uniteller extension.

image

tmconsulting/payum-uniteller-gateway

The Payum Uniteller extension.

  • Saturday, July 22, 2017
  • by smgladkovskiy
  • Repository
  • 4 Watchers
  • 2 Stars
  • 42 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 7 Versions
  • 0 % Grown

The README.md

This package deprecated and abandoned*.

But uniteller php sdk will be support and it moved to https://github.com/spacetab-io/uniteller-sdk-php, (*1)

Payum Uniteller Gateway


, (*2)

, (*3)


, (*4)

Coverage Status , (*5)


, (*6)

Payum gateway package for Uniteller. Based on uniteller-php-sdk., (*7)

Install

composer require tmconsulting/payum-uniteller, (*8)

After composer installation, add some gateway to PayumBuilder:, (*9)

use Payum\Core\GatewayFactoryInterface;
$builder->addGatewayFactory('uniteller', function(array $config, GatewayFactoryInterface $coreGatewayFactory) {
    return new \Payum\Uniteller\UnitellerGatewayFactory($config, $coreGatewayFactory);
})
->addGateway('uniteller', [
    'factory'      => 'uniteller',
    'token_extra'  => false, // enable this options, if you want to set token to comment field.
    'shop_id'      => 'shop_od for production',
    'test_shop_id' => 'shop_id for sandbox',
    'login'        => 'login_digits',
    'password'     => 'password',
    'sandbox'      => true,
]);

Since Uniteller does not supports callback urls with dynamic parameters. So, you will should implement notify action:, (*10)

use Payum\Core\Request\Notify;
use Payum\Core\Request\GetHumanStatus;

class PaymentController extends PayumController
{
    public function notifyAction(Request $request)
    {
        $gateway = $this->getPayum()->getPayment('uniteller');
        $payment = $this->getPayum()
            ->getStorage(Payment::class)
            ->findBy([
                // find payum token by Order_ID, when uniteller call you callback url
                'number' => $request->get('Order_ID'),
            ]);

        if ($reply = $gateway->execute(new Notify($payment), true)) {
            if ($reply instanceof HttpResponse) {
                $gateway->execute($status = new GetHumanStatus($payment));

                if ($status->isCaptured() || $status->isAuthorized()) {
                    // Payment is done
                    // Notify your app here
                    // Payum library does not update status in the database
                }

                throw $reply;
            }

            throw new \LogicException('Unsupported reply', null, $reply);
        }

        return new Response('', 204);
    }
}

... or if you're disable comment field in admin panel, you can use "token extra workaround". Just enable token_extra option., (*11)

Resources

Old versions

@fullpipe implement similar package for payum 0.14.*
You can use it., (*12)

Tests

./bin/phpunit, (*13)

License

Library is released under the MIT License., (*14)

The Versions

22/07 2017

dev-master

9999999-dev

The Payum Uniteller extension.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar Roquie

payment processing uniteller

16/05 2017

dev-coverage

dev-coverage

The Payum Uniteller extension.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar Roquie

payment processing uniteller

12/05 2017

0.1.5

0.1.5.0

The Payum Uniteller extension.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar Roquie

payment processing uniteller

12/05 2017

0.1.2

0.1.2.0

The Payum Uniteller extension.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar Roquie

payment processing uniteller

12/05 2017

0.1.4

0.1.4.0

The Payum Uniteller extension.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar Roquie

payment processing uniteller

30/03 2017

dev-travis

dev-travis

The Payum Uniteller extension.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar Roquie

payment processing uniteller

30/03 2017

0.1.1

0.1.1.0

The Payum Uniteller extension.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar Roquie

payment processing uniteller