@@ -21,6 +21,7 @@ class Api
21
21
const HASH_MODE_SHA256 = 'SHA256 ' ;
22
22
23
23
const ENDPOINT_SYSTEMPAY = 'SYSTEMPAY ' ;
24
+ const ENDPOINT_SOGECOMMERCE = 'SOGECOMMERCE ' ;
24
25
const ENDPOINT_SCELLIUS = 'SCELLIUS ' ;
25
26
const ENDPOINT_CLICANDPAY = 'CLICANDPAY ' ;
26
27
const ENDPOINT_OSB = 'OSB ' ;
@@ -250,13 +251,15 @@ private function getConfigResolver(): OptionsResolver
250
251
])
251
252
->setDefaults ([
252
253
'endpoint ' => null ,
254
+ 'endpoint_url ' => null ,
253
255
'hash_mode ' => self ::HASH_MODE_SHA256 ,
254
256
'debug ' => false ,
255
257
])
256
258
->setAllowedTypes ('site_id ' , 'string ' )
257
259
->setAllowedTypes ('certificate ' , 'string ' )
258
260
->setAllowedValues ('ctx_mode ' , $ this ->getModes ())
259
261
->setAllowedTypes ('directory ' , 'string ' )
262
+ ->setAllowedTypes ('endpoint_url ' , 'string ' )
260
263
->setAllowedValues ('endpoint ' , $ this ->getEndPoints ())
261
264
->setAllowedValues ('hash_mode ' , $ this ->getHashModes ())
262
265
->setAllowedTypes ('debug ' , 'bool ' )
@@ -469,7 +472,7 @@ private function getModes(): array
469
472
470
473
private function getEndPoints (): array
471
474
{
472
- return [null , self ::ENDPOINT_SYSTEMPAY , self ::ENDPOINT_SCELLIUS , self ::ENDPOINT_CLICANDPAY , self ::ENDPOINT_OSB ];
475
+ return [null , self ::ENDPOINT_SYSTEMPAY , self ::ENDPOINT_SOGECOMMERCE , self :: ENDPOINT_SCELLIUS , self ::ENDPOINT_CLICANDPAY , self ::ENDPOINT_OSB ];
473
476
}
474
477
475
478
private function getHashModes (): array
@@ -479,6 +482,10 @@ private function getHashModes(): array
479
482
480
483
private function getUrl (): string
481
484
{
485
+
486
+ if ($ this ->config ['endpoint_url ' ] !== null ) {
487
+ return $ this ->config ['endpoint_url ' ];
488
+ }
482
489
if (self ::ENDPOINT_SYSTEMPAY === $ this ->config ['endpoint ' ]) {
483
490
return 'https://paiement.systempay.fr/vads-payment/ ' ;
484
491
}
@@ -494,6 +501,9 @@ private function getUrl(): string
494
501
if (self ::ENDPOINT_OSB === $ this ->config ['endpoint ' ]) {
495
502
return 'https://secure.osb.pf/vads-payment/ ' ;
496
503
}
504
+ if (self ::ENDPOINT_SOGECOMMERCE === $ this ->config ['endpoint ' ]) {
505
+ return 'https://sogecommerce.societegenerale.eu/vads-payment/ ' ;
506
+ }
497
507
498
508
return 'https://secure.payzen.eu/vads-payment/ ' ;
499
509
}
0 commit comments