> For the complete documentation index, see [llms.txt](https://docs.ecommerce.seb.ee/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ecommerce.seb.ee/seb-docs-draft/seb-docs-public-lt/integracija/mobilusis-sdk/ios-sdk/nuoroda/konfiguravimas.md).

# Konfigūravimas

Kiekvienas konfigūracijos inicijuoklis ir savybė su numatytosiomis reikšmėmis bei reikšmėmis.

`Konfigūracija` / `EGWConfiguration`

Pateikia prieglobas, su kuriomis SDK bendrauja, ir elgsenos nustatymus, skirtus `PaymentKit`. Visos ypatybės yra nekintamos; norėdami pakeisti vieną, sukurkite naują egzempliorių.

***

## Inicializatoriai

```swift
init(apiBaseURL: URL?,
     checkoutAPIBaseURL: URL? = nil,
     checkoutBaseURL: URL? = nil,
     environment: Environment,
     requestTimeout: TimeInterval = 30,
     loggingEnabled: Bool = false)
```

Taip pat yra dvi patogios formos:

```swift
init(apiBaseURL: URL?, environment: Environment)

init(apiBaseURL: URL?,
     checkoutAPIBaseURL: URL?,
     checkoutBaseURL: URL?,
     environment: Environment)
```

Objective-C selektoriai:

```objc
- initWithApiBaseURL:checkoutAPIBaseURL:checkoutBaseURL:environment:requestTimeout:loggingEnabled:
- initWithApiBaseURL:environment:
- initWithApiBaseURL:checkoutAPIBaseURL:checkoutBaseURL:environment:
```

***

## Ypatybės

| Ypatybė              | Tipas          | Numatytoji reikšmė | Aprašymas                                                                                                                                                                                                                                                                                                                        |
| -------------------- | -------------- | ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `apiBaseURL`         | `URL?`         | nėra               | Užpakalinė sistema, kuriai SDK užklausia mokėjimo būsenos. SDK prideda `/checkout/api/egw/v1/payments/{paymentId}`. `nil` reiškia, kad nebus bandoma atlikti paieškos ir kiekvienas mokėjimas baigiasi `.unresolved`, nebent buvo pateiktas pasirinktin `PaymentStatusResolving` buvo pateiktas.                                 |
| `checkoutAPIBaseURL` | `URL?`         | `nil`              | Klientui skirta atsiskaitymo API, kurią vietinė kortelės forma naudoja kortelės sesijos ir 3-D Secure iškvietimams. SDK prideda `/checkout/api/egw/v1/payments/{paymentId}/…` ir autorizuoja kiekvieną iškvietimą naudodamas mokėjimo patvirtinimo raktą, siunčiamą kaip `Authorization: Bearer`. Reikalinga `startCardPayment`. |
| `checkoutBaseURL`    | `URL?`         | `nil`              | Atsiskaitymo puslapio prieglobos adresas. Pateikia kortelės šifravimo raktą ir puslapį, į kurį grąžinamas 3-D Secure patikros rezultatas. Reikalinga `startCardPayment`.                                                                                                                                                         |
| `environment`        | `Environment`  | nėra               | Informacinė. URL nekeičia; pateikiama tam, kad jūsų kodas ir žurnalai galėtų atskirti testinę aplinką nuo gyvos.                                                                                                                                                                                                                 |
| `requestTimeout`     | `TimeInterval` | `30`               | Apriboja paties SDK API užklausas. Reikšmė, lygi nuliui arba mažesnė, laikoma 30 sekundžių. Nė vienam žiniatinklio rodiniui netaikomas laiko limitas, nes pirkėjas, skaitantis banko patvirtinimo ekraną, nėra užstrigusi užklausa.                                                                                              |
| `loggingEnabled`     | `Bool`         | `false`            | Registruoja srauto etapus per `os_log`. Niekada neregistruoja turinio, kortelės duomenų, prisijungimo duomenų ar pilnų URL.                                                                                                                                                                                                      |

Nė vienas iš trijų URL nėra išvestas iš kito. Nustatykite kiekvieną atskirai.

### Kuris srautas nuskaito kurį URL

|                      | Priglobtas atsiskaitymas   | Vietinė kortelės forma                   |
| -------------------- | -------------------------- | ---------------------------------------- |
| `apiBaseURL`         | Naudojama būsenos paieškai | Naudojama būsenos paieškai, pasirinktina |
| `checkoutAPIBaseURL` | Nenaudojama                | Privaloma                                |
| `checkoutBaseURL`    | Nenaudojama                | Privaloma                                |

***

## Environment

`Environment` / `EGWEnvironment`

| Atvejis    | Objective-C             | Neapdorota reikšmė |
| ---------- | ----------------------- | ------------------ |
| `.sandbox` | `EGWEnvironmentSandbox` | `0`                |
| `.live`    | `EGWEnvironmentLive`    | `1`                |

***

## Pavyzdžiai

Tik priglobtam atsiskaitymui:

```swift
let configuration = Configuration(
    apiBaseURL: URL(string: "https://your-backend.example.com"),
    environment: .sandbox
)
```

Naudojant vietinę kortelės formą:

```swift
let configuration = Configuration(
    apiBaseURL: URL(string: "https://your-backend.example.com"),
    checkoutAPIBaseURL: URL(string: "https://sandbox-api.example.com"),
    checkoutBaseURL: URL(string: "https://sandbox-checkout.example.com"),
    environment: .sandbox,
    requestTimeout: 30,
    loggingEnabled: false
)
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.ecommerce.seb.ee/seb-docs-draft/seb-docs-public-lt/integracija/mobilusis-sdk/ios-sdk/nuoroda/konfiguravimas.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
