Skip to content

Commit

Permalink
Release 1.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
adyen-git-manager committed Jul 14, 2017
1 parent cc0b8b7 commit de4864f
Show file tree
Hide file tree
Showing 263 changed files with 28,183 additions and 2,369 deletions.
40 changes: 37 additions & 3 deletions .jazzy.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,41 @@
clean: true
module: Adyen
author: Adyen
author_url: https://adyen.com
github_url: https://github.com/Adyen
github_url: https://github.com/Adyen/adyen-ios

output: Docs

theme: fullwidth
skip_undocumented: false
hide_documentation_coverage: true
theme: fullwidth

custom_categories:
- name: UI
children:
- CheckoutViewController
- CheckoutViewControllerDelegate
- AppearanceConfiguration
- name: Payment
children:
- Payment
- PaymentStatus
- name: Payment Request
children:
- PaymentRequest
- PaymentRequestDelegate
- PaymentRequestResult
- Error
- name: Payment Method
children:
- PaymentMethod
- PaymentDetails
- InputDetail
- InputType
- InputSelectItem
- name: Utilities
children:
- CardType
- CardValidator
- IBANSpecification
- IBANValidator
- IBANTextField
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@ disabled_rules:
- function_body_length
- file_length
included:
- ../../Adyen
- ../../Example
- ../../UnitTests
- Adyen
- Examples
- AdyenTests
excluded:
- Pods
- ../../Adyen/Core/Config.swift
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ osx_image: xcode8.3

env:
global:
- WORKSPACE="Example/1-quick-integration-example/ShoppingApp.xcworkspace"
- SCHEME="ShoppingApp"
- WORKSPACE="Adyen.xcworkspace"
- SCHEME="Adyen"
- DESTINATION="platform=iOS Simulator,name=iPhone 7,OS=10.3"

before_install:
- gem install cocoapods
- pod repo update
- (cd Example/1-quick-integration-example && pod install)
- pod install

script:
- (cd Example/1-quick-integration-example && ./Pods/SwiftLint/swiftlint)
- ./Pods/SwiftLint/swiftlint
- pod lib lint
- xcodebuild test -workspace "${WORKSPACE}" -scheme "${SCHEME}" -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO -destination "${DESTINATION}" | xcpretty -s && exit ${PIPESTATUS[0]}
25 changes: 21 additions & 4 deletions Adyen.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
version = `agvtool vers -terse`

Pod::Spec.new do |s|
s.name = 'Adyen'
s.version = File.read('VERSION')
s.version = version
s.summary = "Adyen SDK for iOS"
s.description = <<-DESC
With Adyen SDK you can dynamically list all relevant payment methods for a specific transaction, so your shoppers can always pay with the method of their choice. The methods are listed based on the shopper's country, the transaction currency and amount.
Expand All @@ -14,11 +16,10 @@ Pod::Spec.new do |s|
s.ios.deployment_target = '9.0'
s.frameworks = 'Foundation'

s.default_subspecs = 'Core', 'Cards', 'Ideal', 'UI'
s.default_subspecs = 'Core', 'Cards', 'Ideal', 'SEPADirectDebit', 'UI'

s.subspec 'Core' do |plugin|
plugin.source_files = 'Adyen/Core/**/*'
plugin.resources = ['VERSION']
end

# Payment Methods
Expand Down Expand Up @@ -46,6 +47,17 @@ Pod::Spec.new do |s|
plugin.dependency 'Adyen/Core'
end

s.subspec 'SEPADirectDebit' do |plugin|
plugin.source_files = 'Adyen/Plugins/SEPADirectDebit/**/*'
plugin.dependency 'Adyen/Core'
plugin.dependency 'Adyen/CoreUI'
plugin.resource_bundles = {
'SEPADirectDebit' => [
'Adyen/Plugins/SEPADirectDebit/**/*.xib'
]
}
end

# Internals
s.subspec 'UI' do |plugin|
plugin.source_files = 'Adyen/UI/**/*'
Expand All @@ -55,7 +67,12 @@ Pod::Spec.new do |s|

s.subspec 'CoreUI' do |plugin|
plugin.source_files = 'Adyen/CoreUI/**/*.swift'
plugin.resources = ['Adyen/CoreUI/Assets/Media.xcassets']
plugin.resource_bundles = {
'CoreUI' => [
'Adyen/CoreUI/Assets/Media.xcassets',
'Adyen/CoreUI/Assets/*.lproj/*.strings'
]
}
plugin.dependency 'Adyen/Core'
end
end
1,463 changes: 1,463 additions & 0 deletions Adyen.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "7CAC59DC1E364F6500CAE0C9"
BuildableName = "ShoppingApp.app"
BlueprintName = "ShoppingApp"
ReferencedContainer = "container:ShoppingApp.xcodeproj">
BlueprintIdentifier = "E20AD0081EFAB0310065B70E"
BuildableName = "Adyen.framework"
BlueprintName = "Adyen"
ReferencedContainer = "container:Adyen.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
Expand All @@ -32,30 +32,20 @@
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "E9C24FDE1ED85ACF002D3B8E"
BlueprintIdentifier = "E20AD0111EFAB0310065B70E"
BuildableName = "AdyenTests.xctest"
BlueprintName = "AdyenTests"
ReferencedContainer = "container:ShoppingApp.xcodeproj">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "E9C2501C1ED85BF6002D3B8E"
BuildableName = "UnitTests.xctest"
BlueprintName = "UnitTests"
ReferencedContainer = "container:ShoppingApp.xcodeproj">
ReferencedContainer = "container:Adyen.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "7CAC59DC1E364F6500CAE0C9"
BuildableName = "ShoppingApp.app"
BlueprintName = "ShoppingApp"
ReferencedContainer = "container:ShoppingApp.xcodeproj">
BlueprintIdentifier = "E20AD0081EFAB0310065B70E"
BuildableName = "Adyen.framework"
BlueprintName = "Adyen"
ReferencedContainer = "container:Adyen.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
Expand All @@ -71,16 +61,15 @@
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "7CAC59DC1E364F6500CAE0C9"
BuildableName = "ShoppingApp.app"
BlueprintName = "ShoppingApp"
ReferencedContainer = "container:ShoppingApp.xcodeproj">
BlueprintIdentifier = "E20AD0081EFAB0310065B70E"
BuildableName = "Adyen.framework"
BlueprintName = "Adyen"
ReferencedContainer = "container:Adyen.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
Expand All @@ -90,16 +79,15 @@
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "7CAC59DC1E364F6500CAE0C9"
BuildableName = "ShoppingApp.app"
BlueprintName = "ShoppingApp"
ReferencedContainer = "container:ShoppingApp.xcodeproj">
BlueprintIdentifier = "E20AD0081EFAB0310065B70E"
BuildableName = "Adyen.framework"
BlueprintName = "Adyen"
ReferencedContainer = "container:Adyen.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions Adyen/Adyen.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//
// Copyright (c) 2017 Adyen B.V.
//
// This file is open source and available under the MIT license. See the LICENSE file for more info.
//

#import <UIKit/UIKit.h>

//! Project version number for Adyen.
FOUNDATION_EXPORT double AdyenVersionNumber;

//! Project version string for Adyen.
FOUNDATION_EXPORT const unsigned char AdyenVersionString[];
13 changes: 0 additions & 13 deletions Adyen/Core/BasePlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,6 @@ class BasePlugin: NSObject {
return UIApplication.shared.keyWindow?.rootViewController
}

var isRedirectType: Bool {
// Groupped methods are not redirects.
guard let method = self.method, method.members != nil else {
return false
}

return method.inputDetails.count == 0
}

public required override init() {
super.init()
}
Expand Down Expand Up @@ -79,10 +70,6 @@ class BasePlugin: NSObject {
return providedPaymentData
}

func linnearFlow() -> Bool {
return false
}

func reset() {
providedPaymentData = nil
}
Expand Down
1 change: 1 addition & 0 deletions Adyen/Core/Enum/Error.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public enum Error: Swift.Error {

/// Payment was canceled.
case canceled

}

extension Error: LocalizedError {
Expand Down
14 changes: 14 additions & 0 deletions Adyen/Core/Extensions/ArrayExtensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,17 @@ internal extension Array {
return groups
}
}

internal extension Optional where Wrapped: Collection {

/// Returns a boolean value indicating whether the wrapped collection is either nil or empty.
internal var isNilOrEmpty: Bool {
switch self {
case let .some(array):
return array.isEmpty
case .none:
return true
}
}

}
20 changes: 20 additions & 0 deletions Adyen/Core/Extensions/StringExtensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,24 @@ extension String {
let lowerBound = range.lowerBound < 0 ? 0 : range.lowerBound
return substring(with: lowerIndex..<(index(lowerIndex, offsetBy: range.upperBound - lowerBound + 1, limitedBy: endIndex) ?? endIndex))
}

/// Separates the string into groups of the given length.
///
/// - Parameters:
/// - length: The maximum length of the groups the string should be separated in.
/// - separator: The separator to use inbetween the groups.
/// - Returns: A grouped string.
internal func grouped(length: Int, separator: String = " ") -> String {
let groups = stride(from: 0, to: characters.count, by: length).map { index -> String in
let startIndex = self.index(self.startIndex, offsetBy: index)

let offset = min(length, self.distance(from: startIndex, to: self.endIndex))
let endIndex = self.index(startIndex, offsetBy: offset)

return self.substring(with: startIndex..<endIndex)
}

return groups.joined(separator: " ")
}

}
4 changes: 2 additions & 2 deletions Adyen/Core/InternalPaymentRequest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class InternalPaymentRequest {
let deletePreferredURL: URL?

var shopperReference: String?
var oneClick = true
var isOneClick = true
var paymentMethod: PaymentMethod?
var publicKey: String?
var paymentData: String
Expand Down Expand Up @@ -54,7 +54,7 @@ class InternalPaymentRequest {
self.paymentData = paymentData
self.generationTime = generationTime

oneClick = (shopperReference != nil)
isOneClick = (shopperReference != nil)
paymentRequestData = data
shopperReference = paymentInfo["shopperReference"] as? String
publicKey = requestInfo["publicKey"] as? String
Expand Down
Loading

0 comments on commit de4864f

Please sign in to comment.