> 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-lv/integracija/mobilais-sdk/ios-sdk/atsauce/konfiguracija.md).

# Konfigurācija

Katrs konfigurācijas inicializētājs un īpašība ar noklusējuma vērtībām un nozīmi.

`Konfigurācija` / `EGWConfiguration`

Satur hostus, ar kuriem SDK sazinās, un uzvedības iestatījumus priekš `PaymentKit`. Visas īpašības ir nemainīgas; lai mainītu kādu no tām, izveidojiet jaunu instanci.

***

## Inicializatori

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

Pieejami arī divi ērtie varianti:

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

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

Objective-C selektori:

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

***

## Īpašības

| Īpašība              | Tips           | Noklusējums | Apraksts                                                                                                                                                                                                                                                                                                                |
| -------------------- | -------------- | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `apiBaseURL`         | `URL?`         | nav         | Aizmugursistēma, kurai SDK vaicā par maksājuma statusu. SDK pievieno `/checkout/api/egw/v1/payments/{paymentId}`. `nil` nozīmē, ka uzmeklēšana netiek veikta un katrs maksājums tiek pabeigts `.unresolved`, ja vien nav norādīts pielāgots `PaymentStatusResolving` .                                                  |
| `checkoutAPIBaseURL` | `URL?`         | `nil`       | Klientam paredzētais checkout API, ko vietējā kartes forma izmanto kartes sesijas un 3-D Secure izsaukumiem. SDK pievieno `/checkout/api/egw/v1/payments/{paymentId}/…` un autorizē katru izsaukumu ar maksājuma verifikācijas atslēgu, nosūtītu kā `Authorization: Bearer`. Nepieciešams funkcijai `startCardPayment`. |
| `checkoutBaseURL`    | `URL?`         | `nil`       | Checkout lapas resursdators. Nodrošina kartes šifrēšanas atslēgu un lapu, uz kuru tiek nosūtīts atpakaļ 3-D Secure verifikācijas rezultāts. Nepieciešams funkcijai `startCardPayment`.                                                                                                                                  |
| `environment`        | `Environment`  | nav         | Tikai informatīvi. URL nemaina; paredzēts, lai jūsu kods un žurnāli varētu atšķirt testēšanas vidi no tiešās vides.                                                                                                                                                                                                     |
| `requestTimeout`     | `TimeInterval` | `30`        | Ierobežo SDK paša API pieprasījumu laiku. Vērtība 0 vai mazāk tiek uztverta kā 30 sekundes. Nevienam tīmekļa skatam netiek noteikts noildzes laiks, jo pircējs, kurš lasa bankas apstiprinājuma ekrānu, nav iestrēdzis pieprasījums.                                                                                    |
| `loggingEnabled`     | `Bool`         | `false`     | Reģistrē plūsmas posmus, izmantojot `os_log`. Nekad nereģistrē saturu, kartes datus, akreditācijas datus vai pilnus URL.                                                                                                                                                                                                |

Neviens no trim URL nav atvasināts no cita. Norādiet katru atsevišķi.

### Kura plūsma nolasa kuru URL

|                      | Hostētais checkout                  | Iebūvētā kartes forma                            |
| -------------------- | ----------------------------------- | ------------------------------------------------ |
| `apiBaseURL`         | Tiek izmantots statusa uzmeklēšanai | Tiek izmantots statusa uzmeklēšanai, pēc izvēles |
| `checkoutAPIBaseURL` | Netiek izmantots                    | Obligāts                                         |
| `checkoutBaseURL`    | Netiek izmantots                    | Obligāts                                         |

***

## Environment

`Environment` / `EGWEnvironment`

| Variants   | Objective-C             | Neapstrādātā vērtība |
| ---------- | ----------------------- | -------------------- |
| `.sandbox` | `EGWEnvironmentSandbox` | `0`                  |
| `.live`    | `EGWEnvironmentLive`    | `1`                  |

***

## Piemēri

Tikai hostētajai checkout plūsmai:

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

Ar iebūvēto kartes formu:

```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-lv/integracija/mobilais-sdk/ios-sdk/atsauce/konfiguracija.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.
