2017 © Pedro PelĂĄez
 

component payum-monetico

Payum Monetico (Credit Mutuel/CIC) gateway

image

ekyna/payum-monetico

Payum Monetico (Credit Mutuel/CIC) gateway

  • Friday, June 29, 2018
  • by ekyna
  • Repository
  • 1 Watchers
  • 0 Stars
  • 662 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 3 Versions
  • 661 % Grown

The README.md

ekyna/PayumMonetico

Payum Monetico (Credit Mutuel/CIC/OBC) payment gateway., (*1)

[Build Status][link-github-actions], (*2)

  • Symfony bundle available here.
  • Sylius plugin available here.

Installation / Configuration

composer req ekyna/payum-monetico
use Ekyna\Component\Payum\Monetico\Api\Api;
use Ekyna\Component\Payum\Monetico\MoneticoGatewayFactory;

$factory = new MoneticoGatewayFactory();

$gateway = $factory->create([
    'mode'      => Api::MODE_PRODUCTION,
    'tpe'       => '123456',
    'key'       => '123456',
    'company'   => 'foobar',
]);

// Register your convert payment action
// $gateway->addAction(new \Acme\ConvertPaymentAction());

Create your convert action

See src/Action/ConvertPaymentAction.php sample., (*3)

Create your notify controller

Example (Symfony):, (*4)

public function notifyAction(Request $request)
{
    // Get the reference you set in your ConvertAction
    if (null === $reference = $request->request->get('reference')) {
        throw new NotFoundHttpException();
    }

    // Find your payment entity
    $payment = $this
        ->get('acme.repository.payment')
        ->findOneBy(['number' => $reference]);

    if (null === $payment) {
        throw new NotFoundHttpException();
    }

    $payum = $this->get('payum');

    // Execute notify & status actions.
    $gateway = $payum->getGateway('monetico');
    $gateway->execute(new Notify($payment));
    $gateway->execute(new GetHumanStatus($payment));

    // Get the payment identity
    $identity = $payum->getStorage($payment)->identify($payment);

    // Invalidate payment tokens
    $tokens = $payum->getTokenStorage()->findBy([
        'details' => $identity,
    ]);
    foreach ($tokens as $token) {
        $payum->getHttpRequestVerifier()->invalidate($token);
    }

    // Return expected response
    return new Response(\Ekyna\Component\Payum\Monetico\Api\Api::NOTIFY_SUCCESS);
}

The Versions

29/06 2018

dev-master

9999999-dev https://github.com/ekyna/PayumMonetico

Payum Monetico (Credit Mutuel/CIC) gateway

  Sources   Download

MIT

The Requires

 

The Development Requires

php payum cic crédit mutuel monetico

29/06 2018

1.5.x-dev

1.5.9999999.9999999-dev https://github.com/ekyna/PayumMonetico

Payum Monetico (Credit Mutuel/CIC) gateway

  Sources   Download

MIT

The Requires

 

The Development Requires

php payum cic crédit mutuel monetico

30/05 2018

1.3.x-dev

1.3.9999999.9999999-dev https://github.com/ekyna/PayumMonetico

Payum Monetico (Credit Mutuel/CIC) gateway

  Sources   Download

MIT

The Requires

 

The Development Requires

php payum cic crédit mutuel monetico