Skip to content
Open
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
34 changes: 34 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
## Description
<!-- Provide a clear summary of the changes and the problem it solves. -->
<!-- Include any relevant context or background information. -->

**Motivation:**

**Related issue(s):** Closes #

---

## Type of Change
<!-- check the corresponding checkbox(es) with an "x" -->
- 🐛 Bug fix (non-breaking change that fixes an issue) [ ]
- ✨ New feature (non-breaking change that adds functionality) [ ]
- 💥 Breaking change (fix or feature that causes existing functionality to change and that could impact other libs) [ ]
- 🔧 Refactor (no functional changes, code improvement only) [ ]
- 📦 Dependency update [ ]
- 🔒 Security fix [ ]
- 📝 Documentation update [ ]
Comment on lines +13 to +19

---

## Checklist
### Code Quality
- [ ] Code is linted and formatted
- [ ] No unnecessary commented-out code or debug logs
- [ ] No hardcoded values (use env variables or config)

### Testing
- [ ] Unit tests added / updated

### Security & Ops
- [ ] No sensitive data or secrets introduced
- [ ] Logging and error handling are appropriate
86 changes: 0 additions & 86 deletions .github/workflows/analysis.yaml

This file was deleted.

10 changes: 10 additions & 0 deletions .github/workflows/auto-tag-rc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Auto-tag RC0

'on':
create:

jobs:
create-rc0-tag:
if: startsWith(github.ref, 'refs/heads/release/')
uses: payplug/template-ci/.github/workflows/auto_tag_rc.yml@main
secrets: inherit
29 changes: 29 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: CI

'on':
pull_request:
branches:
- test-develop-ci
- test-master-ci
paths-ignore:
- README.md

jobs:
quality:
uses: payplug/template-ci/.github/workflows/sylius_quality.yml@main

sylius-matrix:
needs: [quality]
if: github.base_ref == 'test-develop-ci'
uses: payplug/template-ci/.github/workflows/sylius_phpunit.yml@main

sonarcloud:
if: always() && !failure() && !cancelled() && github.base_ref == 'test-develop-ci'
needs: sylius-matrix
uses: payplug/template-ci/.github/workflows/sonarcloud.yml@main
with:
project-name: 'github-payplug-payplug-syliuspayplugplugin'
src-folder: 'src/'
secrets:
sonar-orga: ${{ secrets.SONAR_ORGA }}
sonar-token: ${{ secrets.SONAR_TOKEN }}
5 changes: 0 additions & 5 deletions .github/workflows/pull_request_template.md

This file was deleted.

19 changes: 19 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Release — RC

'on':
push:
tags:
- '*-rc*'

jobs:
quality:
uses: payplug/template-ci/.github/workflows/sylius_quality.yml@main

phpunit:
needs: [quality]
uses: payplug/template-ci/.github/workflows/sylius_phpunit.yml@main

github-release:
needs: phpunit
uses: payplug/template-ci/.github/workflows/github_release_rc.yml@main
secrets: inherit
105 changes: 0 additions & 105 deletions .github/workflows/sylius.yaml

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ CLAUDE.md
.DS_Store
.claude
.review
.phpunit.result.cache
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[![License](https://img.shields.io/packagist/l/payplug/sylius-payplug-plugin.svg)](https://github.com/payplug/SyliusPayPlugPlugin/blob/master/LICENSE)
[![CI - Analysis](https://github.com/payplug/SyliusPayPlugPlugin/actions/workflows/analysis.yaml/badge.svg?branch=master)](https://github.com/payplug/SyliusPayPlugPlugin/actions/workflows/analysis.yaml)
[![CI - Sylius](https://github.com/payplug/SyliusPayPlugPlugin/actions/workflows/sylius.yaml/badge.svg?branch=master)](https://github.com/payplug/SyliusPayPlugPlugin/actions/workflows/sylius.yaml)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=github-payplug-payplug-syliuspayplugplugin&metric=alert_status&token=af29f9f3fbb3a74caff4e4a4d168bddab858f4dc)](https://sonarcloud.io/summary/new_code?id=github-payplug-payplug-syliuspayplugplugin)
[![Duplicated Lines (%)](https://sonarcloud.io/api/project_badges/measure?project=github-payplug-payplug-syliuspayplugplugin&metric=duplicated_lines_density&token=af29f9f3fbb3a74caff4e4a4d168bddab858f4dc)](https://sonarcloud.io/summary/new_code?id=github-payplug-payplug-syliuspayplugplugin)
[![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=github-payplug-payplug-syliuspayplugplugin&metric=code_smells&token=af29f9f3fbb3a74caff4e4a4d168bddab858f4dc)](https://sonarcloud.io/summary/new_code?id=github-payplug-payplug-syliuspayplugplugin)
Comment on lines 1 to +4
[![Version](https://img.shields.io/packagist/v/payplug/sylius-payplug-plugin.svg)](https://packagist.org/packages/payplug/sylius-payplug-plugin)
[![Total Downloads](https://poser.pugx.org/payplug/sylius-payplug-plugin/downloads)](https://packagist.org/packages/payplug/sylius-payplug-plugin)

Expand Down
11 changes: 6 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "payplug/sylius-payplug-plugin",
"type": "sylius-plugin",
"version": "2.0.0.",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@adumont-payplug this should reverted imho

"keywords": [
"sylius",
"sylius-plugin",
Expand Down Expand Up @@ -47,7 +48,7 @@
"phpstan/phpstan-webmozart-assert": "2.0.0",
"phpunit/phpunit": "^9.6",
"rector/rector": "2.0.4",
"sylius-labs/coding-standard": "4.4.0",
"sylius-labs/coding-standard": "^4.4",
"sylius/test-application": "^2.1.0@alpha",
"symfony/apache-pack": "*",
"symfony/browser-kit": "^6.4|| ^7.2",
Expand Down Expand Up @@ -80,10 +81,10 @@
}
},
"scripts": {
"ecs": "ecs check -c rulesets/ecs.php --ansi --clear-cache .",
"fix-ecs": "@ecs --fix",
"phpmd": "phpmd src ansi rulesets/.php_md.xml",
"phpstan": "phpstan analyse src -c rulesets/phpstan.neon",
"ecs": "ecs check -c ruleset/ecs.php --ansi --clear-cache",
"fix-ecs": "@ecs --fix --memory-limit=4G",
"phpmd": "phpmd src ansi ruleset/.php_md.xml",
"phpstan": "phpstan analyse src -c ruleset/phpstan.neon",
"phpunit": "phpunit tests/PHPUnit --colors=always",
"tests": [
"@ecs",
Expand Down
21 changes: 21 additions & 0 deletions config/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,27 @@ services:
- name: sylius.payment_request.provider.http_response
gateway_factory: !php/const PayPlug\SyliusPayPlugPlugin\Gateway\AmericanExpressGatewayFactory::FACTORY_NAME

## Scalapay Payplug Gateway ##
payplug_sylius_payplug_plugin.command_provider.payplug_scalapay:
class: Sylius\Bundle\PaymentBundle\CommandProvider\ActionsCommandProvider
arguments:
- !tagged_locator
tag: payplug_sylius_payplug_plugin.command_provider.payplug_scalapay
index_by: 'action'
tags:
- name: sylius.payment_request.command_provider
gateway_factory: !php/const PayPlug\SyliusPayPlugPlugin\Gateway\ScalapayGatewayFactory::FACTORY_NAME
payplug_sylius_payplug_plugin.provider.order_pay.http_response.payplug_scalapay:
class: Sylius\Bundle\PaymentBundle\Provider\ActionsHttpResponseProvider
arguments:
- !tagged_locator
tag: payplug_sylius_payplug_plugin.http_response_provider.payplug_scalapay
index_by: action
tags:
- name: sylius.payment_request.provider.http_response
gateway_factory: !php/const PayPlug\SyliusPayPlugPlugin\Gateway\ScalapayGatewayFactory::FACTORY_NAME


## Apple Pay Payplug Gateway ##
payplug_sylius_payplug_plugin.command_provider.payplug_apple_pay:
class: Sylius\Bundle\PaymentBundle\CommandProvider\ActionsCommandProvider
Expand Down
9 changes: 9 additions & 0 deletions config/services/client.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,14 @@
method="create"/>
<argument type="string" key="$factoryName">american_express</argument><!-- Gateway factory name -->
</service>

<service id="payplug_sylius_payplug_plugin.api_client.scalapay"
class="PayPlug\SyliusPayPlugPlugin\ApiClient\PayPlugApiClient"
public="true"
lazy="true">
<factory service="PayPlug\SyliusPayPlugPlugin\ApiClient\PayPlugApiClientFactory"
method="create"/>
<argument type="string" key="$factoryName">payplug_scalapay</argument><!-- Gateway factory name -->
</service>
</services>
</container>
8 changes: 8 additions & 0 deletions config/services/gateway.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,13 @@
<tag name="payum.gateway_factory_builder"
factory="payplug_american_express"/>
</service>

<!-- Gateway Scalapay by PayPlug -->
<service id="payplug_sylius_payplug_plugin.gateway_factory.scalapay"
class="Payum\Core\Bridge\Symfony\Builder\GatewayFactoryBuilder">
<argument type="string">PayPlug\SyliusPayPlugPlugin\Gateway\ScalapayGatewayFactory</argument>
<tag name="payum.gateway_factory_builder"
factory="payplug_scalapay"/>
</service>
</services>
</container>
Loading
Loading