Skip to content

Commit eb9deb7

Browse files
author
LEFEBVRE Clément
committed
Add Clic&Pay provider
1 parent 7805cc7 commit eb9deb7

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PayumPayzen
22
===========
33

4-
PayZen Payum Gateway (Systempay, Scellius)
4+
PayZen Payum Gateway (Systempay, Scellius, CLIC&PAY)
55

66
[![Build](https://github.com/ekyna/PayumPayzen/actions/workflows/build.yml/badge.svg?branch=master)](https://github.com/ekyna/PayumPayzen/actions/workflows/build.yml)
77

src/Api/Api.php

+7-1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ class Api
2222

2323
const ENDPOINT_SYSTEMPAY = 'SYSTEMPAY';
2424
const ENDPOINT_SCELLIUS = 'SCELLIUS';
25+
const ENDPOINT_CLICANDPAY = 'CLICANDPAY';
2526

2627
/**
2728
* @var OptionsResolver
@@ -204,6 +205,7 @@ private function getDirectoryPath(): string
204205
{
205206
$path = $this->config['directory'];
206207

208+
207209
// Create directory if not exists
208210
if (!is_dir($path)) {
209211
if (!mkdir($path, 0755, true)) {
@@ -466,7 +468,7 @@ private function getModes(): array
466468

467469
private function getEndPoints(): array
468470
{
469-
return [null, self::ENDPOINT_SYSTEMPAY, self::ENDPOINT_SCELLIUS];
471+
return [null, self::ENDPOINT_SYSTEMPAY, self::ENDPOINT_SCELLIUS, self::ENDPOINT_CLICANDPAY];
470472
}
471473

472474
private function getHashModes(): array
@@ -484,6 +486,10 @@ private function getUrl(): string
484486
return 'https://scelliuspaiement.labanquepostale.fr/vads-payment/';
485487
}
486488

489+
if (self::ENDPOINT_CLICANDPAY === $this->config['endpoint']) {
490+
return 'https://clicandpay.groupecdn.fr/vads-payment/';
491+
}
492+
487493
return 'https://secure.payzen.eu/vads-payment/';
488494
}
489495

0 commit comments

Comments
 (0)