Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ We have a 70-person team of experts: business analysts and consultants, eCommerc

# Installation

The installation process for the Imoje Paywall Plugin can be found [here](doc/installation.md).
The installation process for the ING Pay Paywall Plugin can be found [here](doc/installation.md).


## Requirements:
Expand All @@ -73,11 +73,11 @@ We work on stable, supported and up-to-date versions of packages. We recommend y

# Usage

This plugin allows you to use the payment solution delivered by Imoje.
This plugin allows you to use the payment solution delivered by ING Pay.

# Configuration

The configuration process for the Imoje Paywall Plugin can be found [here](doc/configuration.md).
The configuration process for the ING Pay Paywall Plugin can be found [here](doc/configuration.md).

# Functionalities

Expand Down
2 changes: 1 addition & 1 deletion behat.yml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ default:
FriendsOfBehat\SymfonyExtension:
bootstrap: tests/Application/config/bootstrap.php
kernel:
class: Tests\BitBag\SyliusImojePlugin\Application\Kernel
class: Tests\BitBag\SyliusIngPayPlugin\Application\Kernel

FriendsOfBehat\VariadicExtension: ~

Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "bitbag/imoje-paywall-plugin",
"name": "bitbag/ing-pay-paywall-plugin",
"type": "sylius-plugin",
"description": "Imoje plugin for Sylius.",
"description": "ING Pay plugin for Sylius.",
"keywords": [
"sylius",
"sylius-plugin"
Expand Down Expand Up @@ -57,12 +57,12 @@
},
"autoload": {
"psr-4": {
"BitBag\\SyliusImojePlugin\\": "src/"
"BitBag\\SyliusIngPayPlugin\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\BitBag\\SyliusImojePlugin\\": [
"Tests\\BitBag\\SyliusIngPayPlugin\\": [
"tests/",
"tests/Application/src"
]
Expand Down
11 changes: 11 additions & 0 deletions config/packages/nyholm_psr7.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
services:
# Register nyholm/psr7 services for autowiring with PSR-17 (HTTP factories)
Psr\Http\Message\RequestFactoryInterface: '@nyholm.psr7.psr17_factory'
Psr\Http\Message\ResponseFactoryInterface: '@nyholm.psr7.psr17_factory'
Psr\Http\Message\ServerRequestFactoryInterface: '@nyholm.psr7.psr17_factory'
Psr\Http\Message\StreamFactoryInterface: '@nyholm.psr7.psr17_factory'
Psr\Http\Message\UploadedFileFactoryInterface: '@nyholm.psr7.psr17_factory'
Psr\Http\Message\UriFactoryInterface: '@nyholm.psr7.psr17_factory'

nyholm.psr7.psr17_factory:
class: Nyholm\Psr7\Factory\Psr17Factory
3 changes: 3 additions & 0 deletions config/packages/property_info.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
framework:
property_info:
with_constructor_extractor: true
2 changes: 2 additions & 0 deletions config/packages/workflow.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
framework:
workflows: null
6 changes: 3 additions & 3 deletions config/routes.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
bitbag_sylius_imoje_payment_notify:
path: /payment/imoje/notify
bitbag_sylius_ing_pay_payment_notify:
path: /payment/ing_pay/notify
methods: [POST]
defaults:
_controller: bitbag.sylius_imoje_plugin.controller.notify_controller::verifyImojeNotification
_controller: bitbag.sylius_ing_pay_plugin.controller.notify_controller::verifyIngPayNotification
20 changes: 10 additions & 10 deletions config/services/command_handlers.yaml
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
services:
bitbag.sylius.command_handlers.imoje_paywall.capture:
class: BitBag\SyliusImojePlugin\CommandHandler\CapturePaymentRequestHandler
bitbag.sylius.command_handlers.ing_pay_paywall.capture:
class: BitBag\SyliusIngPayPlugin\CommandHandler\CapturePaymentRequestHandler
arguments:
- '@sylius.provider.payment_request'
- '@sylius_abstraction.state_machine'
- '@bitbag.imoje_plugin.resolver.signature_resolver'
- '@bitbag.ing_pay_plugin.resolver.signature_resolver'
- '@sylius_shop.provider.order_pay.payment_request_pay_url'
tags:
- name: messenger.message_handler
bus: sylius.payment_request.command_bus

bitbag.sylius.command_handlers.imoje_paywall.capture_end:
class: BitBag\SyliusImojePlugin\CommandHandler\CaptureEndPaymentRequestHandler
bitbag.sylius.command_handlers.ing_pay_paywall.capture_end:
class: BitBag\SyliusIngPayPlugin\CommandHandler\CaptureEndPaymentRequestHandler
arguments:
- '@sylius.provider.payment_request'
- '@sylius_abstraction.state_machine'
- '@bitbag.sylius_imoje_plugin.processor.payment_transition'
- '@bitbag.sylius_ing_pay_plugin.processor.payment_transition'
tags:
- name: messenger.message_handler
bus: sylius.payment_request.command_bus

bitbag.sylius.command_handlers.imoje_paywall.status:
class: BitBag\SyliusImojePlugin\CommandHandler\StatusPaymentRequestHandler
bitbag.sylius.command_handlers.ing_pay_paywall.status:
class: BitBag\SyliusIngPayPlugin\CommandHandler\StatusPaymentRequestHandler
arguments:
- '@sylius.provider.payment_request'
- '@sylius_abstraction.state_machine'
- '@bitbag.sylius_imoje_plugin.processor.payment_transition'
- '@bitbag.sylius_ing_pay_plugin.processor.payment_transition'
tags:
- name: messenger.message_handler
bus: sylius.payment_request.command_bus
handles: BitBag\SyliusImojePlugin\Command\StatusPaymentRequest
handles: BitBag\SyliusIngPayPlugin\Command\StatusPaymentRequest
18 changes: 9 additions & 9 deletions config/services/command_providers.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
services:
bitbag.sylius.command_provider.imoje_paywall:
bitbag.sylius.command_provider.ing_pay_paywall:
class: Sylius\Bundle\PaymentBundle\CommandProvider\ActionsCommandProvider
arguments:
- !tagged_locator
tag: bitbag.sylius.command_provider.imoje_paywall
tag: bitbag.sylius.command_provider.ing_pay_paywall
index_by: 'action'
tags:
- name: sylius.payment_request.command_provider
gateway_factory: 'imoje_paywall'
gateway_factory: 'ing_pay_paywall'

bitbag.sylius.command_provider.imoje_paywall.capture:
class: BitBag\SyliusImojePlugin\CommandProvider\CapturePaymentRequestCommandProvider
bitbag.sylius.command_provider.ing_pay_paywall.capture:
class: BitBag\SyliusIngPayPlugin\CommandProvider\CapturePaymentRequestCommandProvider
tags:
- name: bitbag.sylius.command_provider.imoje_paywall
- name: bitbag.sylius.command_provider.ing_pay_paywall
action: !php/const Sylius\Component\Payment\Model\PaymentRequestInterface::ACTION_CAPTURE

bitbag.sylius.command_provider.imoje_paywall.status:
class: BitBag\SyliusImojePlugin\CommandProvider\StatusPaymentRequestCommandProvider
bitbag.sylius.command_provider.ing_pay_paywall.status:
class: BitBag\SyliusIngPayPlugin\CommandProvider\StatusPaymentRequestCommandProvider
tags:
- name: bitbag.sylius.command_provider.imoje_paywall
- name: bitbag.sylius.command_provider.ing_pay_paywall
action: !php/const Sylius\Component\Payment\Model\PaymentRequestInterface::ACTION_STATUS
6 changes: 3 additions & 3 deletions config/services/controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ services:
_defaults:
public: true

bitbag.sylius_imoje_plugin.controller.notify_controller:
class: BitBag\SyliusImojePlugin\Controller\NotifyController
bitbag.sylius_ing_pay_plugin.controller.notify_controller:
class: BitBag\SyliusIngPayPlugin\Controller\NotifyController
arguments:
- '@sylius.repository.order'
- '@sylius.repository.payment'
- '@doctrine.orm.entity_manager'
- '@bitbag.imoje_plugin.resolver.signature_resolver'
- '@bitbag.ing_pay_plugin.resolver.signature_resolver'
8 changes: 4 additions & 4 deletions config/services/form.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
services:
bitbag.imoje_plugin.form.type.gateway_configuration.imoje_paywall:
class: BitBag\SyliusImojePlugin\Form\Type\ImojeGatewayConfigurationType
bitbag.ing_pay_plugin.form.type.gateway_configuration.ing_pay_paywall:
class: BitBag\SyliusIngPayPlugin\Form\Type\IngPayGatewayConfigurationType
tags:
- name: sylius.gateway_configuration_type
type: imoje_paywall
label: 'bitbag.imoje_plugin.paywall'
type: ing_pay_paywall
label: 'bitbag.ing_pay_plugin.paywall'
- name: form.type
12 changes: 6 additions & 6 deletions config/services/http_response_provider.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
services:
bitbag.sylius.provider.order_pay.http_response.imoje_paywall:
bitbag.sylius.provider.order_pay.http_response.ing_pay_paywall:
class: Sylius\Bundle\PaymentBundle\Provider\ActionsHttpResponseProvider
arguments:
- !tagged_locator
tag: bitbag.sylius.provider.order_pay.http_response.imoje_paywall
tag: bitbag.sylius.provider.order_pay.http_response.ing_pay_paywall
index_by: action
tags:
- name: sylius.payment_request.provider.http_response
gateway_factory: 'imoje_paywall'
gateway_factory: 'ing_pay_paywall'

bitbag.sylius.provider.order_pay.http_response.imoje_paywall.capture:
class: BitBag\SyliusImojePlugin\OrderPay\Provider\CaptureHttpResponseProvider
bitbag.sylius.provider.order_pay.http_response.ing_pay_paywall.capture:
class: BitBag\SyliusIngPayPlugin\OrderPay\Provider\CaptureHttpResponseProvider
tags:
- name: bitbag.sylius.provider.order_pay.http_response.imoje_paywall
- name: bitbag.sylius.provider.order_pay.http_response.ing_pay_paywall
action: !php/const Sylius\Component\Payment\Model\PaymentRequestInterface::ACTION_CAPTURE
4 changes: 2 additions & 2 deletions config/services/processor.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
services:
bitbag.sylius_imoje_plugin.processor.payment_transition:
class: BitBag\SyliusImojePlugin\Processor\PaymentTransitionProcessor
bitbag.sylius_ing_pay_plugin.processor.payment_transition:
class: BitBag\SyliusIngPayPlugin\Processor\PaymentTransitionProcessor
arguments:
- '@sylius_abstraction.state_machine'
4 changes: 2 additions & 2 deletions config/services/resolver.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
services:
bitbag.imoje_plugin.resolver.signature_resolver:
class: BitBag\SyliusImojePlugin\Resolver\SignatureResolver
bitbag.ing_pay_plugin.resolver.signature_resolver:
class: BitBag\SyliusIngPayPlugin\Resolver\SignatureResolver
12 changes: 6 additions & 6 deletions config/twig_hooks/payment_method/admin/create.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
sylius_twig_hooks:
hooks:
'sylius_admin.payment_method.create.content.form.sections.gateway_configuration.imoje_paywall':
'sylius_admin.payment_method.create.content.form.sections.gateway_configuration.ing_pay_paywall':
environment:
template: '@BitBagSyliusImojePlugin/admin/payment_method/form/environment.html.twig'
template: '@BitBagSyliusIngPayPlugin/admin/payment_method/form/environment.html.twig'
priority: 400
merchant_id:
template: '@BitBagSyliusImojePlugin/admin/payment_method/form/merchant_id.html.twig'
template: '@BitBagSyliusIngPayPlugin/admin/payment_method/form/merchant_id.html.twig'
priority: 300
service_id:
template: '@BitBagSyliusImojePlugin/admin/payment_method/form/service_id.html.twig'
template: '@BitBagSyliusIngPayPlugin/admin/payment_method/form/service_id.html.twig'
priority: 200
service_key:
template: '@BitBagSyliusImojePlugin/admin/payment_method/form/service_key.html.twig'
template: '@BitBagSyliusIngPayPlugin/admin/payment_method/form/service_key.html.twig'
priority: 100
authorization_token:
template: '@BitBagSyliusImojePlugin/admin/payment_method/form/authorization_token.html.twig'
template: '@BitBagSyliusIngPayPlugin/admin/payment_method/form/authorization_token.html.twig'
priority: 0
12 changes: 6 additions & 6 deletions config/twig_hooks/payment_method/admin/update.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
sylius_twig_hooks:
hooks:
'sylius_admin.payment_method.update.content.form.sections.gateway_configuration.imoje_paywall':
'sylius_admin.payment_method.update.content.form.sections.gateway_configuration.ing_pay_paywall':
environment:
template: '@BitBagSyliusImojePlugin/admin/payment_method/form/environment.html.twig'
template: '@BitBagSyliusIngPayPlugin/admin/payment_method/form/environment.html.twig'
priority: 400
merchant_id:
template: '@BitBagSyliusImojePlugin/admin/payment_method/form/merchant_id.html.twig'
template: '@BitBagSyliusIngPayPlugin/admin/payment_method/form/merchant_id.html.twig'
priority: 300
service_id:
template: '@BitBagSyliusImojePlugin/admin/payment_method/form/service_id.html.twig'
template: '@BitBagSyliusIngPayPlugin/admin/payment_method/form/service_id.html.twig'
priority: 200
service_key:
template: '@BitBagSyliusImojePlugin/admin/payment_method/form/service_key.html.twig'
template: '@BitBagSyliusIngPayPlugin/admin/payment_method/form/service_key.html.twig'
priority: 100
authorization_token:
template: '@BitBagSyliusImojePlugin/admin/payment_method/form/authorization_token.html.twig'
template: '@BitBagSyliusIngPayPlugin/admin/payment_method/form/authorization_token.html.twig'
priority: 0
10 changes: 5 additions & 5 deletions doc/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
To create an ING-based payment method, go to Payment methods in the Sylius admin panel.
After that, you need to add an ING payment:

![Screenshot showing payment method config in admin](./create_imoje_payment_method.png)
![Screenshot showing payment method config in admin](./create_ing_pay_payment_method.png)

And now, you can configure your payment method in the admin panel:

![Screenshot showing payment method config in admin](./payment_method_config.png)

## ING admin panel:
To configure the imoje gateway, log in to ING the admin panel.
To configure the ING Pay gateway, log in to ING the admin panel.

- [Sandbox ING admin panel](https://sandbox.imoje.ing.pl)
- [Production ING admin panel](https://imoje.ing.pl)
Expand All @@ -25,12 +25,12 @@ From `Shops` -> `Your shop` -> `Details` -> `Integration data` you can acquire n
- Service key,

Also, here in the integration data page you need to configure the path to your webhook,
just type in your shop URL followed by: `/payment/imoje/notify`
just type in your shop URL followed by: `/payment/ing_pay/notify`

In sandbox mode, you can use Ngrok or another tunneling program to expose your localhost.

![Screenshot showing integration data in ING admin panel](./imoje_integration_data.png)
![Screenshot showing integration data in ING admin panel](./ing_pay_integration_data.png)

The authorization token can be obtained from `Your profile` → `API keys` → `Details`

![Screenshot showing Authorization key in ING admin panel](./imoje_api_key.png)
![Screenshot showing Authorization key in ING admin panel](./ing_pay_api_key.png)
10 changes: 5 additions & 5 deletions doc/functionalities.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

---

The plugin integrates iMoje payments with Sylius based applications.
The plugin integrates ING Pay payments with Sylius based applications.

>iMoje is an online payment platform created by ING Bank Śląski, which enables online shops and service providers to accept payments from customers in Poland.
>ING Pay is an online payment platform created by ING Bank Śląski, which enables online shops and service providers to accept payments from customers in Poland.
It is a comprehensive payment gateway service, offering various payment methods such as payment cards, fast online transfers (so-called pay-by-links), BLIK, mobile payments and deferred payments.

>In contrast to iMojePlugin, payment and selection of the payment type is carried out after redirection to a dedicated payment gateway.
>In contrast to the ING Pay Plugin, payment and selection of the payment type is carried out after redirection to a dedicated payment gateway.

- After an installation, user should be able to create new `Imoje gateway` payment method in the `Payment methods` section in the admin panel.
- After an installation, user should be able to create new `ING Pay gateway` payment method in the `Payment methods` section in the admin panel.

![Screenshot showing payment method config in admin](./create_imoje_payment_method.png)
![Screenshot showing payment method config in admin](./create_ing_pay_payment_method.png)

- And now, you can configure your payment method in the admin panel:

Expand Down
File renamed without changes
File renamed without changes
10 changes: 5 additions & 5 deletions doc/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ADDITIONAL

## Composer:
```bash
composer require bitbag/imoje-paywall-plugin --with-all-dependencies
composer require bitbag/ing-pay-paywall-plugin --with-all-dependencies
```

## Basic configuration:
Expand All @@ -23,21 +23,21 @@ Add plugin dependencies to your `config/bundles.php` file:

return [
...
BitBag\SyliusImojePlugin\BitBagSyliusImojePlugin::class => ['all' => true],
BitBag\SyliusIngPayPlugin\BitBagSyliusIngPayPlugin::class => ['all' => true],
];
```

Add routing to your `config/routes.yaml` file:
```yaml
bitbag_sylius_imoje_plugin:
resource: "@BitBagSyliusImojePlugin/config/routes.yaml"
bitbag_sylius_ing_pay_plugin:
resource: "@BitBagSyliusIngPayPlugin/config/routes.yaml"
```

Import plugin configuration in `config/packages/_sylius.yaml` file:
```yaml
imports:
# ...
- { resource: "@BitBagSyliusImojePlugin/config/config.yaml" }
- { resource: "@BitBagSyliusIngPayPlugin/config/config.yaml" }
```

## Known issues
Expand Down
2 changes: 1 addition & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
colors="true"
bootstrap="tests/Application/config/bootstrap.php">
<testsuites>
<testsuite name="BitBagSyliusImojePlugin Test Suite">
<testsuite name="BitBagSyliusIngPayPlugin Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@

declare(strict_types=1);

namespace BitBag\SyliusImojePlugin;
namespace BitBag\SyliusIngPayPlugin;

use Sylius\Bundle\CoreBundle\Application\SyliusPluginTrait;
use Symfony\Component\HttpKernel\Bundle\Bundle;

final class BitBagSyliusImojePlugin extends Bundle
final class BitBagSyliusIngPayPlugin extends Bundle
{
use SyliusPluginTrait;

Expand Down
2 changes: 1 addition & 1 deletion src/Command/CaptureEndPaymentRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

declare(strict_types=1);

namespace BitBag\SyliusImojePlugin\Command;
namespace BitBag\SyliusIngPayPlugin\Command;

use Sylius\Bundle\PaymentBundle\Command\PaymentRequestHashAwareInterface;
use Sylius\Bundle\PaymentBundle\Command\PaymentRequestHashAwareTrait;
Expand Down
Loading
Loading