Skip to content

Commit

Permalink
Merge pull request #472 from gini/ipc-health-sdk-update
Browse files Browse the repository at this point in the history
Ipc health sdk update
  • Loading branch information
zladzeyka authored Mar 28, 2024
2 parents 16dd3f7 + a91190e commit 2555167
Show file tree
Hide file tree
Showing 199 changed files with 5,593 additions and 1,454 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,15 @@ class PaymentViewController: UIViewController {
field.attributedPlaceholder = NSAttributedString(string: placeholderText)
}
payButton.isEnabled = false

let payButtonTitle = NSLocalizedString("ginipaybank.reviewscreen.payButton.title",
comment: "Pay button")
payButton.setTitle(payButtonTitle, for: .normal)

let backToBusinessButtonTitle = NSLocalizedString("ginipaybank.reviewscreen.backToInsurance.title",
comment: "Back to insurance")
backToBusinessButton.setTitle(backToBusinessButtonTitle, for: .normal)

backToBusinessButton.isHidden = true
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@
"ginipaybank.errors.failed.amount.non.empty.check" = "Summe kann nicht 0 sein";
"ginipaybank.errors.failed.purpose.non.empty.check" = "Verwendungszweck ist notwendig.";
"ginipaybank.errors.failed.default.textfield.validation.check" = "Das Feld ist ungültig";

"ginipaybank.reviewscreen.payButton.title" = "Zahlen";
"ginipaybank.reviewscreen.backToInsurance.title" = "Zur Health App";
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@
"ginipaybank.errors.failed.amount.non.empty.check" = "Amount can't be 0";
"ginipaybank.errors.failed.purpose.non.empty.check" = "Purpose is required.";
"ginipaybank.errors.failed.default.textfield.validation.check" = "The field is not valid";

"ginipaybank.reviewscreen.payButton.title" = "Pay";
"ginipaybank.reviewscreen.backToInsurance.title" = "Return to Health app";
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ Further documentation with information about how install and integrate it can be

## Requirements

- iOS 11+
- Xcode 12+
- iOS 12+
- Xcode 15+

## Author

Expand All @@ -34,4 +34,4 @@ Gini GmbH, [email protected]

The Gini Health API Library for iOS is licensed under a Private License. See [the license](https://developer.gini.net/gini-mobile-ios/GiniHealthAPILibrary/license.html) for more info.

**Important:** Always make sure to ship all license notices and permissions with your application.
> ⚠️ **Important:** Always make sure to ship all license notices and permissions with your application.
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ Once you have your Swift package set up, adding `GiniHealthAPILibrary` as a depe

```swift
dependencies: [
.package(url: "https://github.com/gini/health-api-library-ios.git", .exact("3.0.1"))
.package(url: "https://github.com/gini/health-api-library-ios.git", .exact("4.0.0"))
]
```

In case that you want to use the certificate pinning in the library, add `GiniHealthAPILibraryPinning`:
```swift
dependencies: [
.package(url: "https://github.com/gini/health-api-library-pinning-ios.git", .exact("3.0.1"))
.package(url: "https://github.com/gini/health-api-library-pinning-ios.git", .exact("4.0.0"))
]
```

Expand Down
2 changes: 1 addition & 1 deletion HealthAPILibrary/GiniHealthAPILibrary/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import PackageDescription

let package = Package(
name: "GiniHealthAPILibrary",
platforms: [.iOS(.v11)],
platforms: [.iOS(.v12)],
products: [
// Products define the executables and libraries a package produces, and make them visible to other packages.
.library(
Expand Down
6 changes: 3 additions & 3 deletions HealthAPILibrary/GiniHealthAPILibrary/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ Further documentation with information about how install and integrate it can be

## Requirements

- iOS 11+
- Xcode 12+
- iOS 12+
- Xcode 15+

## Author

Expand All @@ -30,5 +30,5 @@ Gini GmbH, [email protected]

The Gini Health API Library for iOS is licensed under a Private License. See [the license](https://developer.gini.net/gini-mobile-ios/GiniHealthAPILibrary/license.html) for more info.

**Important:** Always make sure to ship all license notices and permissions with your application.
> ⚠️ **Important:** Always make sure to ship all license notices and permissions with your application.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import Foundation
import os

enum LogEvent {
public enum LogEvent {
case error
case success
case warning
Expand All @@ -29,7 +29,7 @@ public enum LogLevel {
case debug
}

func Log(_ message: String,
public func Log(_ message: String,
event: LogEvent) {
guard case .debug = GiniHealthAPI.logLevel else { return }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// PaymentProvider.swift
// GiniHealthAPI
//
// Created by Nadya Karaban on 15.03.21.
// Copyright © 2024 Gini GmbH. All rights reserved.
//

import Foundation
Expand All @@ -16,14 +16,18 @@ public struct PaymentProvider: Codable {
public var colors: ProviderColors
var minAppVersion: MinAppVersions?
public var iconData: Data
public var appStoreUrlIOS: String?
public var universalLinkIOS: String

public init(id: String, name: String, appSchemeIOS: String, minAppVersion: MinAppVersions?, colors: ProviderColors, iconData: Data) {
public init(id: String, name: String, appSchemeIOS: String, minAppVersion: MinAppVersions?, colors: ProviderColors, iconData: Data, appStoreUrlIOS: String?, universalLinkIOS: String) {
self.id = id
self.name = name
self.appSchemeIOS = appSchemeIOS
self.minAppVersion = minAppVersion
self.colors = colors
self.iconData = iconData
self.appStoreUrlIOS = appStoreUrlIOS
self.universalLinkIOS = universalLinkIOS
}
}
public typealias PaymentProviders = [PaymentProvider]
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// PaymentProvider.swift
// GiniHealthAPI
//
// Created by Nadya Karaban on 15.03.21.
// Copyright © 2024 Gini GmbH. All rights reserved.
//

import Foundation
Expand Down Expand Up @@ -40,13 +40,17 @@ public struct PaymentProviderResponse: Codable {
public var colors: ProviderColors
var minAppVersion: MinAppVersions?
public var iconLocation: String
public var appStoreUrlIOS: String?
public var universalLinkIOS: String

public init(id: String, name: String, appSchemeIOS: String, minAppVersion: MinAppVersions?, colors: ProviderColors, iconLocation: String) {
public init(id: String, name: String, appSchemeIOS: String, minAppVersion: MinAppVersions?, colors: ProviderColors, iconLocation: String, appStoreUrlIOS: String?, universalLinkIOS: String) {
self.id = id
self.name = name
self.appSchemeIOS = appSchemeIOS
self.minAppVersion = minAppVersion
self.colors = colors
self.iconLocation = iconLocation
self.appStoreUrlIOS = appStoreUrlIOS
self.universalLinkIOS = universalLinkIOS
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// PaymentRequest.swift
// GiniHealthAPI
//
// Created by Nadya Karaban on 19.03.21.
// Copyright © 2024 Gini GmbH. All rights reserved.
//

import Foundation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// PaymentRequestBody.swift
// GiniHealthAPI
//
// Created by Nadya Karaban on 22.03.21.
// Copyright © 2024 Gini GmbH. All rights reserved.
//

import Foundation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// PaymentService.swift
// GiniHealthAPI
//
// Created by Nadya Karaban on 15.03.21.
// Copyright © 2024 Gini GmbH. All rights reserved.
//

import Foundation
Expand Down Expand Up @@ -181,7 +181,7 @@ extension PaymentService {
self.file(urlString: providerResponse.iconLocation) { result in
switch result {
case let .success(imageData):
let provider = PaymentProvider(id: providerResponse.id, name: providerResponse.name, appSchemeIOS: providerResponse.appSchemeIOS, minAppVersion: providerResponse.minAppVersion, colors: providerResponse.colors, iconData: imageData)
let provider = PaymentProvider(id: providerResponse.id, name: providerResponse.name, appSchemeIOS: providerResponse.appSchemeIOS, minAppVersion: providerResponse.minAppVersion, colors: providerResponse.colors, iconData: imageData, appStoreUrlIOS: providerResponse.appStoreUrlIOS, universalLinkIOS: providerResponse.universalLinkIOS)
providers.append(provider)
case let .failure(error):
completion(.failure(error))
Expand Down Expand Up @@ -210,7 +210,7 @@ extension PaymentService {
self.file(urlString: providerResponse.iconLocation) { result in
switch result {
case let .success(imageData):
let provider = PaymentProvider(id: providerResponse.id, name: providerResponse.name, appSchemeIOS: providerResponse.appSchemeIOS, minAppVersion: providerResponse.minAppVersion, colors: providerResponse.colors, iconData: imageData)
let provider = PaymentProvider(id: providerResponse.id, name: providerResponse.name, appSchemeIOS: providerResponse.appSchemeIOS, minAppVersion: providerResponse.minAppVersion, colors: providerResponse.colors, iconData: imageData, appStoreUrlIOS: providerResponse.appStoreUrlIOS, universalLinkIOS: providerResponse.universalLinkIOS)
completion(.success(provider))
case let .failure(error):
completion(.failure(error))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// GiniHealthAPILibraryVersion.swift
//
//
// Created by Nadya Karaban on 15.10.21.
// Copyright © 2024 Gini GmbH. All rights reserved.
//

public let GiniHealthAPILibraryVersion = "3.0.1"
public let GiniHealthAPILibraryVersion = "4.0.0"
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// PaymentTests.swift
// GiniHealthAPI-Unit-Tests
//
// Created by Nadya Karaban on 13.04.21.
// Copyright © 2024 Gini GmbH. All rights reserved.
//

import XCTest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// PaymentTests.swift
// GiniHealthAPI-Unit-Tests
//
// Created by Nadya Karaban on 15.03.21.
// Copyright © 2024 Gini GmbH. All rights reserved.
//

import XCTest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@
"background": "009EDC",
"text": "FFFFFF"
},
"iconLocation": "https://pay-api.gini.net/paymentProviders/b09ef70a-490f-11eb-952e-9bc6f4646c57/icon"
"iconLocation": "https://pay-api.gini.net/paymentProviders/b09ef70a-490f-11eb-952e-9bc6f4646c57/icon",
"universalLinkIOS": "ginipay-bank://"
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"background": "009EDC",
"text": "FFFFFF"
},
"iconLocation": "https://pay-api.gini.net/paymentProviders/b09ef70a-490f-11eb-952e-9bc6f4646c57/icon"
"iconLocation": "https://pay-api.gini.net/paymentProviders/b09ef70a-490f-11eb-952e-9bc6f4646c57/icon",
"universalLinkIOS": "ginipay-bank://"
},
{
"id": "dbe3a2ca-c9df-11eb-a1d8-a7efff6e88b7",
Expand All @@ -27,7 +28,8 @@
"background": "daa520",
"text": "54f1db"
},
"iconLocation": "https://pay-api.gini.net/paymentProviders/dbe3a2ca-c9df-11eb-a1d8-a7efff6e88b7/icon"
"iconLocation": "https://pay-api.gini.net/paymentProviders/dbe3a2ca-c9df-11eb-a1d8-a7efff6e88b7/icon",
"universalLinkIOS": "ginipay-ingdiba://"
},
{
"id": "f7d06ee0-51fd-11ec-8216-97f0937beb16",
Expand All @@ -42,7 +44,8 @@
"background": "FFFFFF",
"text": "009EDC"
},
"iconLocation": "https://pay-api.gini.net/paymentProviders/f7d06ee0-51fd-11ec-8216-97f0937beb16/icon"
"iconLocation": "https://pay-api.gini.net/paymentProviders/f7d06ee0-51fd-11ec-8216-97f0937beb16/icon",
"universalLinkIOS": "ginipay-ginibank://"
},
{
"id": "a65b0646-51fe-11ec-8736-c338396b2f09",
Expand All @@ -57,6 +60,7 @@
"background": "4DBED3",
"text": "FFFFFF"
},
"iconLocation": "https://pay-api.gini.net/paymentProviders/a65b0646-51fe-11ec-8736-c338396b2f09/icon"
"iconLocation": "https://pay-api.gini.net/paymentProviders/a65b0646-51fe-11ec-8736-c338396b2f09/icon",
"universalLinkIOS": "ginipay-consorsbank://"
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func loadProviders() -> PaymentProviders {
let providersResponse = try! JSONDecoder().decode([PaymentProviderResponse].self, from: jsonData!)
for providerResponse in providersResponse {
let imageData = UIImage(named: "Gini-Test-Payment-Provider", in: Bundle.module, compatibleWith: nil)?.pngData()
let provider = PaymentProvider(id: providerResponse.id, name: providerResponse.name, appSchemeIOS: providerResponse.appSchemeIOS, minAppVersion: providerResponse.minAppVersion, colors: providerResponse.colors, iconData: imageData ?? Data())
let provider = PaymentProvider(id: providerResponse.id, name: providerResponse.name, appSchemeIOS: providerResponse.appSchemeIOS, minAppVersion: providerResponse.minAppVersion, colors: providerResponse.colors, iconData: imageData ?? Data(), appStoreUrlIOS: providerResponse.appStoreUrlIOS, universalLinkIOS: providerResponse.universalLinkIOS)
providers.append(provider)
}
return providers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// AppDelegate.swift
// HealthAPILibraryExample
//
// Created by Nadya Karaban on 30.09.21.
// Copyright © 2024 Gini GmbH. All rights reserved.
//

import UIKit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// SceneDelegate.swift
// HealthAPILibraryExample
//
// Created by Nadya Karaban on 30.09.21.
// Copyright © 2024 Gini GmbH. All rights reserved.
//

import UIKit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// ViewController.swift
// HealthAPILibraryExample
//
// Created by Nadya Karaban on 30.09.21.
// Copyright © 2024 Gini GmbH. All rights reserved.
//

import UIKit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ let package = Package(
// .package(url: /* package url */, from: "1.0.0"),

.package(name: "TrustKit", url: "https://github.com/datatheorem/TrustKit.git", from: "2.0.0"),
.package(name: "GiniHealthAPILibrary", url: "https://github.com/gini/health-api-library-ios.git", .exact("3.0.1")),
.package(name: "GiniHealthAPILibrary", url: "https://github.com/gini/health-api-library-ios.git", .exact("4.0.0")),
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
Expand Down
2 changes: 1 addition & 1 deletion HealthAPILibrary/GiniHealthAPILibraryPinning/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import PackageDescription

let package = Package(
name: "GiniHealthAPILibraryPinning",
platforms: [.iOS(.v12), .macOS(.v10_13)],
platforms: [.iOS(.v12)],
products: [
// Products define the executables and libraries a package produces, and make them visible to other packages.
.library(
Expand Down
2 changes: 1 addition & 1 deletion HealthAPILibrary/GiniHealthAPILibraryPinning/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ Gini GmbH, [email protected]

The Gini Health API Library Pinning for iOS is licensed under a Private License. See [the license](https://developer.gini.net/gini-mobile-ios/GiniHealthAPILibrary/license.html) for more info.

**Important:** Always make sure to ship all license notices and permissions with your application.
> ⚠️ **Important:** Always make sure to ship all license notices and permissions with your application.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// GiniHealthAPILibraryPinningVersion.swift
//
//
// Created by Nadya Karaban on 15.10.21.
// Copyright © 2024 Gini GmbH. All rights reserved.
//

public let GiniHealthAPILibraryPinningVersion = "3.0.1"
public let GiniHealthAPILibraryPinningVersion = "4.0.0"
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// AppDelegate.swift
// HealthAPILibraryExample
//
// Created by Nadya Karaban on 30.09.21.
// Copyright © 2024 Gini GmbH. All rights reserved.
//

import UIKit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// SceneDelegate.swift
// HealthAPILibraryExample
//
// Created by Nadya Karaban on 30.09.21.
// Copyright © 2024 Gini GmbH. All rights reserved.
//

import UIKit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// ViewController.swift
// HealthAPILibraryExample
//
// Created by Nadya Karaban on 30.09.21.
// Copyright © 2024 Gini GmbH. All rights reserved.
//

import UIKit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// GiniHealthAPILibraryPinningIntegrationTests.swift
// GiniHealthAPILibraryPinningExampleTests
//
// Created by Nadya Karaban on 17.05.22.
// Copyright © 2024 Gini GmbH. All rights reserved.
//

import XCTest
Expand Down
Loading

0 comments on commit 2555167

Please sign in to comment.