File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -82,6 +82,19 @@ $params = array(
8282
8383Payment::create($params);
8484
85+ /** Example of how to create an IRIS session */
86+ $sessionParams = array(
87+ 'amount' => 100,
88+ 'currency' => 'EUR',
89+ 'country' => 'GR',
90+ 'callback_url' => 'https://your-callback_url',
91+ 'uuid' => '975b48f9-06b0-41f6-98ad-87eb51d7103e',
92+ 'md' => 'test-md-data',
93+ 'webhook_url' => 'https://webhook-url'
94+ );
95+
96+ Iris::session($sessionParams);
97+
8598```
8699
87100## Documentation
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ require_once 'bootstrap.php ' ;
4+
5+ use Everypay \Iris ;
6+ use Everypay \Exception \ApiErrorException ;
7+
8+ try {
9+ $ sessionParams = array (
10+ 'amount ' => 100 ,
11+ 'currency ' => 'EUR ' ,
12+ 'country ' => 'GR ' ,
13+ 'callback_url ' => 'https://your-callback_url ' ,
14+ 'uuid ' => '975b48f9-06b0-41f6-98ad-87eb51d7103e ' ,
15+ 'md ' => 'test-md-data ' ,
16+ 'webhook_url ' => 'https://webhook-url '
17+ );
18+
19+ // create a new iris session
20+ $ irisSession = Iris::session ($ sessionParams );
21+ $ irisSessionToken = $ irisSession ->token ;
22+
23+ echo 'Iris session with token ' . $ irisSessionToken . ' created ' . PHP_EOL ;
24+ } catch (ApiErrorException $ e ) {
25+ echo $ e ->getMessage () . PHP_EOL ;
26+ }
You can’t perform that action at this time.
0 commit comments