2017 © Pedro PelĆ”ez
 

project payum-setefi

Setefi Payum gateway

image

webburza/payum-setefi

Setefi Payum gateway

  • Thursday, November 30, 2017
  • by dkarlovi
  • Repository
  • 3 Watchers
  • 1 Stars
  • 753 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 1 % Grown

The README.md

Setefi Payum gateway

A Payum gateway for Setefi payment processor., (*1)

Note: all user IDs, passwords and secrets listed are documented by Setefi (section "TEST ENVIRONMENT CREDENTIALS") and shared with all other Setefi sandbox users, they're NOT a secret., (*2)

Sylius Integration

# app/config/config.yml
parameters:
    # NOTE:
    # these are documented by Setefi and shared among all sandbox users, they're NOT a secret
    setefi.id: "99999999"
    setefi.password: "99999999"
    setefi.sandbox: true # false in config_prod.yml

payum:
    gateways:
        setefi:
            factory: "setefi"
            payum.http_client: "@sylius.payum.http_client"
            terminal_id: "%setefi.id%"
            terminal_password: "%setefi.password%"
            sandbox: "%setefi.sandbox%"

sylius_payment:
    gateways:
        setefi: Setefi

After having done this, enable the payment method in the Sylius admin interface., (*3)

(Note: Any testing of the integration must be done on a public-accessible URL (ie. by using ngrok) because Setefi backend needs to be able to do valid server-to-server requests for the process to complete successfully.), (*4)

Setefi sandbox environment

Log in to Setefi's sandbox environment:, (*5)

(Note: these are documented by Setefi and shared among all sandbox users, they're NOT a secret), (*6)

  • Codice Commerciante: 009999999
  • Codice Utente: 009999999
  • Password: Setefi14

Note that your transactions will be among all other sandbox's users' transactions, you need to find your own to verify it works., (*7)

Technical implementation

  • Entrypoint is Webburza\Payum\Setefi\SetefiGatewayFactory which registers all known actions, sets up config and creates a new Api.
  • Webburza\Payum\Setefi\Api is a collection of helpers and constants specific to this provider, it gets injected to all actions implementing Payum\Core\ApiAwareInterface.
  • Every action has a specific task and they declare on which part of the process they work on by implementing support($request) from Payum\Core\Action\ActionInterface. The action name itself does not matter.
    For example, Webburza\Payum\Setefi\Action\CancelAction declares it can handle Payum\Core\Request\Cancel request and it will receive all those types of requests to handle.
    Action and the request are two different things, you can (and do) have much more actions than you do request types (some gateways have no custom request types).
  • We can also define some custom request types such as Webburza\Payum\Setefi\Request\CreateTransaction for situations where domain-specific events need to happen. After having defined them, we register actions to handle them the same way we do native actions.

Transaction sequence

  1. Webburza\Payum\Setefi\Action\StatusAction marks the payment request as new
  2. Webburza\Payum\Setefi\Action\CaptureAction triggers Webburza\Payum\Setefi\Request\CreateTransaction request
  3. a new Setefi transaction is created using Webburza\Payum\Setefi\Action\CreateTransactionAction and a server-to-server (S2S) request
  4. if successful, the user is redirected to Setefi web interface
    1. if payment successful, Setefi does a S2S request and Webburza\Payum\Setefi\Action\StatusAction marks the payment request as captured
    2. if payment not successful, Setefi does a S2S request and Webburza\Payum\Setefi\Action\StatusAction marks the payment request as canceled
  5. response to 5. is a valid redirect URL for Setefi to redirect to user back to
  6. process complete

Transaction sequence, (*8)

The Versions

30/11 2017

dev-master

9999999-dev https://github.com/webburza/payum-setefi

Setefi Payum gateway

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dalibor Karlović
by Kotlyar Maksim

payment payum setefi monetaonline

08/09 2017

0.1.4

0.1.4.0 https://github.com/webburza/payum-setefi

Setefi Payum gateway

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dalibor Karlović
by Kotlyar Maksim

payment payum setefi monetaonline

31/07 2017

0.1.3

0.1.3.0 https://github.com/webburza/payum-setefi

Setefi Payum gateway

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dalibor Karlović
by Kotlyar Maksim

payment payum setefi monetaonline

27/07 2017

0.1.2

0.1.2.0 https://github.com/webburza/payum-setefi

Setefi Payum gateway

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dalibor Karlović
by Kotlyar Maksim

payment payum setefi monetaonline

23/12 2016

0.1.1

0.1.1.0 https://github.com/webburza/payum-setefi

Setefi Payum gateway

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dalibor Karlović
by Kotlyar Maksim

payment payum setefi monetaonline

23/12 2016

0.1.0

0.1.0.0 https://github.com/webburza/payum-setefi

Setefi Payum gateway

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dalibor Karlović
by Kotlyar Maksim

payment payum setefi monetaonline