8000 Add support for all parameters in InitSession function by MikolajKaminski · Pull Request #10 · nordigen/nordigen-php · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add support for all parameters in InitSession function #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
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
48 changes: 30 additions & 18 deletions src/API/NordigenClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,41 +39,53 @@ public function account(string $accountId): Account


/**
* Perform all the necessary steps in order to retrieve the URL for user authentication. <br>
* A new End-User agreement and requisition will be created.
*
* The result will be an array containing the URL for user authentication and the IDs of the
* newly created requisition and End-user agreement.
* @param string $institutionIdentifier ID of the Institution.
* @param int $maxHistoricalDays Maximum number of days of transaction data to retrieve.
* @param string $endUserId The ID of the End-user in the client's system.
* @param string $reference
* @param string $redirect
* @param AccessScope[] $accessScope
* @param string|null $userLanguage
*
* @return array
*/
* Perform all the necessary steps in order to retrieve the URL for user authentication. <br>
* A new End-User agreement and requisition will be created.
*
* The result will be an array containing the URL for user authentication and the IDs of the
* newly created requisition and End-user agreement.
* @param string $institutionIdentifier ID of the Institution.
* @param int $maxHistoricalDays Maximum number of days of transaction data to retrieve. 90 by default.
* @param int $accessValidForDays How long access to the end-user's account will be available. 90 days by default.
* @param string $endUserId The ID of the End-user in the client's system.
* @param string $reference Additional ID to identify the End-user. This value will be appended to the redirect.
* @param string $redirect The URI where the End-user will be redirected to after authentication.
* @param AccessScope[] $accessScope The requested access scope. All by default. See Enums\AccessScope for possible values.
* @param string|null $userLanguage Language to use in views. Two-letter country code (ISO 639-1).
* @param string|null $ssn SSN (social security number) field to verify ownership of the account.
* @param bool|null $accountSelection Option to enable account selection view for the end user.
* @param bool|null $redirectImmediate Option to enable redirect back to the client after account list received
*
* @return array
*/
public function initSession(
string $institutionIdentifier,
string $redirect,
int $maxHistoricalDays = 90,
int $accessValidForDays = 90,
?string $reference = null,
?array $accessScopes = ['details', 'balances', 'transactions'],
?string $userLanguage = null
?string $userLanguage = null,
?string $ssn = null,
?bool $accountSelection = null,
?bool $redirectImmediate = null
): array
{
$endUserAgreement = $this->endUserAgreement->createEndUserAgreement(
$institutionIdentifier,
$accessScopes,
$maxHistoricalDays
$maxHistoricalDays,
$accessValidForDays
);
$requisition = $this->requisition->createRequisition(
$redirect,
$institutionIdentifier,
$endUserAgreement["id"],
$reference,
$userLanguage
$userLanguage,
$ssn,
$accountSelection,
$redirectImmediate
);
$result = [
'link' => $requisition["link"],
Expand Down
0