Skip to content

Commit 3b11a9a

Browse files
author
Camille Islasse
committed
Add unit test and update readme
1 parent 649f1f9 commit 3b11a9a

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

Diff for: README.md

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

4-
PayZen Payum Gateway (Systempay, Scellius, CLIC&PAY, OSB)
4+
PayZen Payum Gateway (Systempay, Scellius, CLIC&PAY, OSB, SOGE_COMMERCE)
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

@@ -24,6 +24,7 @@ $gateway = $factory->create([
2424
'hash_mode' => Api::HASH_MODE_SHA256,
2525
'directory' => __DIR__ . '/payzen-cache',
2626
'endpoint' => Api::ENDPOINT_SYSTEMPAY, // default value, see `Api::ENDPOINT_*` constants for more
27+
'endpoint_url' => // null default value, add custom endpoint not in `Api::ENDPOINT_*` constants
2728
]);
2829

2930
// Register your convert payment action

Diff for: tests/Api/ApiTest.php

+13
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,19 @@ public function provideCreateRequestUrl(): Generator
197197
],
198198
'https://secure.osb.pf/vads-payment/?vads_action_mode=INTERACTIVE&vads_page_action=PAYMENT&vads_payment_config=SINGLE&vads_return_mode=POST&vads_version=V2&vads_amount=1234&vads_currency=978&vads_trans_date=20200101120000&vads_trans_id=000001&vads_site_id=123456789&vads_ctx_mode=PRODUCTION&signature=p9TbeohlOZVPAmhEwfAlGxRJxFAKpNg5wYBSN9emuqs%3D',
199199
];
200+
201+
yield [
202+
[
203+
'endpoint' => Api::ENDPOINT_SOGECOMMERCE,
204+
],
205+
[
206+
'vads_amount' => '1234',
207+
'vads_currency' => '978',
208+
'vads_trans_date' => '20200101120000',
209+
'vads_trans_id' => '000001',
210+
],
211+
'https://sogecommerce.societegenerale.eu/vads-payment/?vads_action_mode=INTERACTIVE&vads_page_action=PAYMENT&vads_payment_config=SINGLE&vads_return_mode=POST&vads_version=V2&vads_amount=1234&vads_currency=978&vads_trans_date=20200101120000&vads_trans_id=000001&vads_site_id=123456789&vads_ctx_mode=PRODUCTION&signature=p9TbeohlOZVPAmhEwfAlGxRJxFAKpNg5wYBSN9emuqs%3D',
212+
];
200213
}
201214

202215
/**

0 commit comments

Comments
 (0)