Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Mastercard-Gateway/gateway-ios-sdk
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1.1.3
Choose a base ref
...
head repository: Mastercard-Gateway/gateway-ios-sdk
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
  • 16 commits
  • 34 files changed
  • 10 contributors

Commits on Feb 7, 2020

  1. Copy the full SHA
    6e7bc7b View commit details
  2. Updating Changes.md file

    H2wk committed Feb 7, 2020
    Copy the full SHA
    c0f2e3b View commit details
  3. Version Bump

    H2wk committed Feb 7, 2020
    Copy the full SHA
    74b5c8a View commit details

Commits on Feb 12, 2020

  1. Copy the full SHA
    531860a View commit details

Commits on Feb 13, 2020

  1. Allowing additional regions to be created as needed

    Monroe, Josh authored and Monroe, Josh committed Feb 13, 2020
    Copy the full SHA
    73eec1f View commit details

Commits on Feb 14, 2020

  1. - Adding the China on-soil region

    - Converting all URLs to use the "<region>.gateway.mastercard.com" pattern
    - Providing a way for integrators to use regions that have not yet been added to the SDK.
    Monroe, Josh authored and Monroe, Josh committed Feb 14, 2020
    Copy the full SHA
    83cba42 View commit details
  2. Copy the full SHA
    b72daed View commit details

Commits on Feb 18, 2020

  1. Update README.md

    nak5ive authored Feb 18, 2020
    Copy the full SHA
    a798ef7 View commit details

Commits on Jul 21, 2020

  1. Update MerchantAPI.swift to remove the transaction.frequency parame…

    …ter from the call to complete the session.
    jmonroe authored Jul 21, 2020
    Copy the full SHA
    9a28de5 View commit details
  2. Merge branch 'develop-public' into master-public

    Josh Monroe authored and Josh Monroe committed Jul 21, 2020
    Copy the full SHA
    a0793d8 View commit details

Commits on Dec 19, 2022

  1. Updating pinned certificate

    H2wk committed Dec 19, 2022
    Copy the full SHA
    c11dc22 View commit details
  2. Change log tweak

    H2wk committed Dec 19, 2022
    Copy the full SHA
    044ed1f View commit details

Commits on Sep 13, 2023

  1. Update README.md

    Add 3DS notice at top
    jk00000 authored Sep 13, 2023
    Copy the full SHA
    fc7dd3b View commit details
  2. Update README.md

    update 3ds text
    jk00000 authored Sep 13, 2023
    Copy the full SHA
    cfb4990 View commit details

Commits on Feb 12, 2024

  1. Copy the full SHA
    5107cfb View commit details

Commits on Feb 7, 2025

  1. Copy the full SHA
    f137a08 View commit details
Showing with 502 additions and 574 deletions.
  1. +26 −0 CHANGES.md
  2. +1 −1 Configs/MPGSDK.plist
  3. +1 −1 Configs/MPGSDKTests.plist
  4. +7 −7 Gemfile.lock
  5. +9 −14 MPGSDK-iOS-Sample/MPGSDK-iOS-Sample/ConfigurationViewModel.swift
  6. +4 −1 MPGSDK-iOS-Sample/MPGSDK-iOS-Sample/Merchant API/MerchantAPI.swift
  7. +10 −42 MPGSDK.xcodeproj/project.pbxproj
  8. +3 −0 MPGSDK.xcworkspace/contents.xcworkspacedata
  9. +1 −0 Package.swift
  10. +4 −2 README.md
  11. +48 −59 Sources/BuildConfig.swift
  12. +1 −1 Sources/Gateway+URLSessionDelegate.swift
  13. +1 −1 Sources/Gateway.swift
  14. +22 −8 Sources/GatewayRegion.swift
  15. +8 −8 Tests/MGPSDKTests/GatewayTests.swift
  16. +4 −9 Tests/MGPSDKTests/GatewayURLSessionDelegateTests.swift
  17. +64 −0 Tests/MGPSDKTests/TestCertificates.swift
  18. BIN Tests/MGPSDKTests/TestCertificates/invalid-leaf.cer
  19. BIN Tests/MGPSDKTests/TestCertificates/trusted-ca.cer
  20. BIN Tests/MGPSDKTests/TestCertificates/trusted-intermediate.cer
  21. BIN Tests/MGPSDKTests/TestCertificates/trusted-leaf.cer
  22. BIN Tests/MGPSDKTests/TestCertificates/untrusted-ca.cer
  23. BIN Tests/MGPSDKTests/TestCertificates/untrusted-intermediate.cer
  24. BIN Tests/MGPSDKTests/TestCertificates/untrusted-leaf.cer
  25. +8 −8 docs/badge.svg
  26. +8 −8 docs/docsets/MPGSDK.docset/Contents/Resources/Documents/badge.svg
  27. +5 −71 docs/docsets/MPGSDK.docset/Contents/Resources/Documents/index.html
  28. +1 −1 docs/docsets/MPGSDK.docset/Contents/Resources/Documents/search.json
  29. +259 −1 docs/docsets/MPGSDK.docset/Contents/Resources/Documents/undocumented.json
  30. BIN docs/docsets/MPGSDK.docset/Contents/Resources/docSet.dsidx
  31. BIN docs/docsets/MPGSDK.tgz
  32. +5 −71 docs/index.html
  33. +1 −1 docs/search.json
  34. +1 −259 docs/undocumented.json
26 changes: 26 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,32 @@
# Release Notes

## [Unreleased]

## [1.1.8]
### Changed
- Pinned certificate updated. New Expirey December 2038

## [1.1.7] - 2024-02-12
### Added
- Saudi region (KSA) URL

## [1.1.6]
### Changed
- Pinned certificate updated. New Expirey December 2030

## [1.1.5]
### Added
- Adding the China on-soil region
- Providing a way for integrators to use regions that have not yet been added to the SDK.
### Changed
- Converting all URLs to use the "<region>.gateway.mastercard.com" pattern

## [1.1.4]
### Changed
- Swift.package file version updated to specify swift 5.0
- Syncing Changes.md with releases

## [1.1.3]
### Added
- Added the India regions
### Changed
2 changes: 1 addition & 1 deletion Configs/MPGSDK.plist
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.1.3</string>
<string>1.1.7</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2017 Mastercard Payment Gateway Services. All rights reserved.</string>
<key>NSPrincipalClass</key>
2 changes: 1 addition & 1 deletion Configs/MPGSDKTests.plist
Original file line number Diff line number Diff line change
@@ -19,6 +19,6 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.1.3</string>
<string>1.1.7</string>
</dict>
</plist>
14 changes: 7 additions & 7 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -63,7 +63,7 @@ GEM
dotenv (2.7.5)
emoji_regex (1.0.1)
escape (0.0.4)
excon (0.71.1)
excon (0.72.0)
faraday (0.17.3)
multipart-post (>= 1.2, < 3)
faraday-cookie_jar (0.0.6)
@@ -72,7 +72,7 @@ GEM
faraday_middleware (0.13.1)
faraday (>= 0.7.4, < 1.0)
fastimage (2.1.7)
fastlane (2.140.0)
fastlane (2.141.0)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.3, < 3.0.0)
babosa (>= 1.0.2, < 2.0.0)
@@ -193,7 +193,7 @@ GEM
faraday (~> 0.9)
jwt (>= 1.5, < 3.0)
multi_json (~> 1.10)
simctl (1.6.7)
simctl (1.6.8)
CFPropertyList
naturally
slack-notifier (2.3.2)
@@ -202,9 +202,9 @@ GEM
terminal-table (1.8.0)
unicode-display_width (~> 1.1, >= 1.1.1)
thread_safe (0.3.6)
tty-cursor (0.7.0)
tty-screen (0.7.0)
tty-spinner (0.9.2)
tty-cursor (0.7.1)
tty-screen (0.7.1)
tty-spinner (0.9.3)
tty-cursor (~> 0.7)
tzinfo (1.2.6)
thread_safe (~> 0.1)
@@ -219,7 +219,7 @@ GEM
xcode-install (2.6.3)
claide (>= 0.9.1, < 1.1.0)
fastlane (>= 2.1.0, < 3.0.0)
xcodeproj (1.14.0)
xcodeproj (1.15.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
23 changes: 9 additions & 14 deletions MPGSDK-iOS-Sample/MPGSDK-iOS-Sample/ConfigurationViewModel.swift
Original file line number Diff line number Diff line change
@@ -53,14 +53,14 @@ struct ConfigurationViewModel {
// MARK: - Loading and Saving
func save(toUserDefaults defaults: UserDefaults = .standard) {
defaults.set(merchantId, forKey: "merchantId")
defaults.set(region.rawValue, forKey: "region")
defaults.set(region.id, forKey: "region")
defaults.set(merchantServiceURL, forKey: "merchantServiceURL")
defaults.set(applePayMerchantID, forKey: "applePayMerchantID")
}

mutating func load(fromUserDefaults defaults: UserDefaults = .standard) {
merchantId = defaults.string(forKey: "merchantId")
if let regionString = defaults.string(forKey: "region"), let new = GatewayRegion(rawValue: regionString) {
if let regionString = defaults.string(forKey: "region"), let new = GatewayRegion.matching(id: regionString) {
region = new
} else {
region = .mtf
@@ -74,18 +74,13 @@ struct ConfigurationViewModel {
extension GatewayRegion {
static let all: [GatewayRegion] = [.mtf, .northAmerica, .europe, .asiaPacific, .india]

var name: String {
switch self {
case .mtf:
return "Test (MTF)"
case .northAmerica:
return "North America"
case .europe:
return "Europe"
case .asiaPacific:
return "Asia Pacific"
case .india:
return "India"
static func matching(id: String) -> GatewayRegion? {
var match: GatewayRegion? = nil
GatewayRegion.all.forEach {
if $0.id == id {
match = $0
}
}
return match
}
}
Original file line number Diff line number Diff line change
@@ -27,6 +27,9 @@ enum MerchantAPIError: Error {
case other(Error)
}

/**
NOTE: This code is sample code only and is not intended to be used for production applications. Any use in production applications is at your own risk.
*/
class MerchantAPI {
static var shared: MerchantAPI?

@@ -58,7 +61,7 @@ class MerchantAPI {
func completeSession(transaction: Transaction, completion: @escaping (Result<GatewayMap>) -> Void) {
var payload = GatewayMap(["apiOperation": "PAY"])
payload[at: "sourceOfFunds.type"] = "CARD"
payload[at: "transaction.frequency"] = "SINGLE"
// payload[at: "transaction.frequency"] = "SINGLE" // NOTE: 'transaction.frequency` is only applicable to API versions <=53
payload[at: "transaction.source"] = "INTERNET"
payload[at: "order.amount"] = transaction.amountString
payload[at: "order.currency"] = transaction.currency
52 changes: 10 additions & 42 deletions MPGSDK.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
@@ -12,13 +12,6 @@
6F2C1A011FE15F1800D06A3B /* GatewayRegion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F2C1A001FE15F1800D06A3B /* GatewayRegion.swift */; };
6F38B59B1F6C0256005DAB93 /* Gateway+URLSessionDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F38B59A1F6C0256005DAB93 /* Gateway+URLSessionDelegate.swift */; };
6F4BEC861F698751002C64A3 /* GatewayError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F4BEC851F698751002C64A3 /* GatewayError.swift */; };
6F93652D20068ECE002A52FD /* trusted-ca.cer in Resources */ = {isa = PBXBuildFile; fileRef = 6FAFCCF020068AEF006F6DBA /* trusted-ca.cer */; };
6F93652E20068ECE002A52FD /* trusted-intermediate.cer in Resources */ = {isa = PBXBuildFile; fileRef = 6FAFCCF320068AF0006F6DBA /* trusted-intermediate.cer */; };
6F93652F20068ECE002A52FD /* trusted-leaf.cer in Resources */ = {isa = PBXBuildFile; fileRef = 6FAFCCF420068AF0006F6DBA /* trusted-leaf.cer */; };
6F93653020068ECE002A52FD /* untrusted-intermediate.cer in Resources */ = {isa = PBXBuildFile; fileRef = 6FAFCCF120068AEF006F6DBA /* untrusted-intermediate.cer */; };
6F93653120068ECE002A52FD /* untrusted-ca.cer in Resources */ = {isa = PBXBuildFile; fileRef = 6FAFCCFD20068B34006F6DBA /* untrusted-ca.cer */; };
6F93653220068ECE002A52FD /* untrusted-leaf.cer in Resources */ = {isa = PBXBuildFile; fileRef = 6FAFCCF220068AEF006F6DBA /* untrusted-leaf.cer */; };
6F9365342006AC5F002A52FD /* invalid-leaf.cer in Resources */ = {isa = PBXBuildFile; fileRef = 6F9365332006AC5F002A52FD /* invalid-leaf.cer */; };
6F9D18FB1FFE862700224916 /* GatewayMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F9D18FA1FFE862700224916 /* GatewayMap.swift */; };
6F9D18FD1FFE8EB100224916 /* HTTPMethod.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F9D18FC1FFE8EB100224916 /* HTTPMethod.swift */; };
6FAFCCE92004054C006F6DBA /* URLSessionMocks.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F24484A1F75688C0032030D /* URLSessionMocks.swift */; };
@@ -32,6 +25,7 @@
6FE9A7871F69633000B7B56A /* GatewayTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FE9A7861F69633000B7B56A /* GatewayTests.swift */; };
6FE9A78B1F69644100B7B56A /* BuildConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FE9A78A1F69644100B7B56A /* BuildConfig.swift */; };
8933C7851EB5B820000D00A4 /* MPGSDK.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8933C7841EB5B820000D00A4 /* MPGSDK.swift */; };
AB40AA962950A1E1009DEB60 /* TestCertificates.swift in Sources */ = {isa = PBXBuildFile; fileRef = AB40AA952950A1E1009DEB60 /* TestCertificates.swift */; };
B7EFCD83204DE15100C9A99E /* Gateway3DSecureViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B7EFCD82204DE15000C9A99E /* Gateway3DSecureViewController.swift */; };
/* End PBXBuildFile section */

@@ -53,25 +47,19 @@
6F2C1A001FE15F1800D06A3B /* GatewayRegion.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GatewayRegion.swift; sourceTree = "<group>"; };
6F38B59A1F6C0256005DAB93 /* Gateway+URLSessionDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Gateway+URLSessionDelegate.swift"; sourceTree = "<group>"; };
6F4BEC851F698751002C64A3 /* GatewayError.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GatewayError.swift; sourceTree = "<group>"; };
6F9365332006AC5F002A52FD /* invalid-leaf.cer */ = {isa = PBXFileReference; lastKnownFileType = file; path = "invalid-leaf.cer"; sourceTree = "<group>"; };
6F9D18FA1FFE862700224916 /* GatewayMap.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GatewayMap.swift; sourceTree = "<group>"; };
6F9D18FC1FFE8EB100224916 /* HTTPMethod.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HTTPMethod.swift; sourceTree = "<group>"; };
6FAFCCEA200535CB006F6DBA /* GatewayMapTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GatewayMapTests.swift; sourceTree = "<group>"; };
6FAFCCEC20065C45006F6DBA /* GatewayErrorTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GatewayErrorTests.swift; sourceTree = "<group>"; };
6FAFCCEE20066E45006F6DBA /* GatewayURLSessionDelegateTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GatewayURLSessionDelegateTests.swift; sourceTree = "<group>"; };
6FAFCCF020068AEF006F6DBA /* trusted-ca.cer */ = {isa = PBXFileReference; lastKnownFileType = file; path = "trusted-ca.cer"; sourceTree = "<group>"; };
6FAFCCF120068AEF006F6DBA /* untrusted-intermediate.cer */ = {isa = PBXFileReference; lastKnownFileType = file; path = "untrusted-intermediate.cer"; sourceTree = "<group>"; };
6FAFCCF220068AEF006F6DBA /* untrusted-leaf.cer */ = {isa = PBXFileReference; lastKnownFileType = file; path = "untrusted-leaf.cer"; sourceTree = "<group>"; };
6FAFCCF320068AF0006F6DBA /* trusted-intermediate.cer */ = {isa = PBXFileReference; lastKnownFileType = file; path = "trusted-intermediate.cer"; sourceTree = "<group>"; };
6FAFCCF420068AF0006F6DBA /* trusted-leaf.cer */ = {isa = PBXFileReference; lastKnownFileType = file; path = "trusted-leaf.cer"; sourceTree = "<group>"; };
6FAFCCFD20068B34006F6DBA /* untrusted-ca.cer */ = {isa = PBXFileReference; lastKnownFileType = file; path = "untrusted-ca.cer"; sourceTree = "<group>"; };
6FE598751FFED17D001FD483 /* Coding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Coding.swift; sourceTree = "<group>"; };
6FE598771FFED234001FD483 /* JSONCodingMocks.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONCodingMocks.swift; sourceTree = "<group>"; };
6FE5987A1FFFFD16001FD483 /* ExpectationManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExpectationManager.swift; sourceTree = "<group>"; };
6FE9A7841F69632300B7B56A /* Gateway.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Gateway.swift; sourceTree = "<group>"; };
6FE9A7861F69633000B7B56A /* GatewayTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GatewayTests.swift; sourceTree = "<group>"; };
6FE9A78A1F69644100B7B56A /* BuildConfig.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BuildConfig.swift; sourceTree = "<group>"; };
8933C7841EB5B820000D00A4 /* MPGSDK.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MPGSDK.swift; sourceTree = "<group>"; };
AB40AA952950A1E1009DEB60 /* TestCertificates.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TestCertificates.swift; sourceTree = "<group>"; };
AD2FAA261CD0B6D800659CF4 /* MPGSDK.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = MPGSDK.plist; sourceTree = "<group>"; };
AD2FAA281CD0B6E100659CF4 /* MPGSDKTests.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = MPGSDKTests.plist; sourceTree = "<group>"; };
B7EFCD82204DE15000C9A99E /* Gateway3DSecureViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Gateway3DSecureViewController.swift; sourceTree = "<group>"; };
@@ -124,20 +112,6 @@
path = Configs;
sourceTree = "<group>";
};
6FAFCCFC20068AF7006F6DBA /* TestCertificates */ = {
isa = PBXGroup;
children = (
6FAFCCF020068AEF006F6DBA /* trusted-ca.cer */,
6FAFCCF320068AF0006F6DBA /* trusted-intermediate.cer */,
6FAFCCF420068AF0006F6DBA /* trusted-leaf.cer */,
6FAFCCF120068AEF006F6DBA /* untrusted-intermediate.cer */,
6FAFCCFD20068B34006F6DBA /* untrusted-ca.cer */,
6FAFCCF220068AEF006F6DBA /* untrusted-leaf.cer */,
6F9365332006AC5F002A52FD /* invalid-leaf.cer */,
);
path = TestCertificates;
sourceTree = "<group>";
};
8933C7811EB5B7E0000D00A4 /* Sources */ = {
isa = PBXGroup;
children = (
@@ -159,14 +133,14 @@
8933C7831EB5B7EB000D00A4 /* Tests */ = {
isa = PBXGroup;
children = (
6FAFCCFC20068AF7006F6DBA /* TestCertificates */,
6FE9A7861F69633000B7B56A /* GatewayTests.swift */,
6F24484A1F75688C0032030D /* URLSessionMocks.swift */,
6FE598771FFED234001FD483 /* JSONCodingMocks.swift */,
6FAFCCEA200535CB006F6DBA /* GatewayMapTests.swift */,
6FAFCCEC20065C45006F6DBA /* GatewayErrorTests.swift */,
6FE5987A1FFFFD16001FD483 /* ExpectationManager.swift */,
6FAFCCEE20066E45006F6DBA /* GatewayURLSessionDelegateTests.swift */,
AB40AA952950A1E1009DEB60 /* TestCertificates.swift */,
);
name = Tests;
path = Tests/MGPSDKTests;
@@ -287,13 +261,6 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
6F9365342006AC5F002A52FD /* invalid-leaf.cer in Resources */,
6F93652E20068ECE002A52FD /* trusted-intermediate.cer in Resources */,
6F93652D20068ECE002A52FD /* trusted-ca.cer in Resources */,
6F93652F20068ECE002A52FD /* trusted-leaf.cer in Resources */,
6F93653020068ECE002A52FD /* untrusted-intermediate.cer in Resources */,
6F93653220068ECE002A52FD /* untrusted-leaf.cer in Resources */,
6F93653120068ECE002A52FD /* untrusted-ca.cer in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -329,6 +296,7 @@
6FE5987C1FFFFD5B001FD483 /* ExpectationManager.swift in Sources */,
6FAFCCEF20066E45006F6DBA /* GatewayURLSessionDelegateTests.swift in Sources */,
6FE598791FFFE444001FD483 /* JSONCodingMocks.swift in Sources */,
AB40AA962950A1E1009DEB60 /* TestCertificates.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -372,7 +340,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1.1.3;
CURRENT_PROJECT_VERSION = 1.1.5;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
@@ -432,7 +400,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1.1.3;
CURRENT_PROJECT_VERSION = 1.1.5;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
@@ -461,10 +429,10 @@
APPLICATION_EXTENSION_API_ONLY = YES;
CLANG_ENABLE_MODULES = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
CURRENT_PROJECT_VERSION = 1.1.3;
CURRENT_PROJECT_VERSION = 1.1.5;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1.1.3;
DYLIB_CURRENT_VERSION = 1.1.5;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = Configs/MPGSDK.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
@@ -486,10 +454,10 @@
APPLICATION_EXTENSION_API_ONLY = YES;
CLANG_ENABLE_MODULES = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
CURRENT_PROJECT_VERSION = 1.1.3;
CURRENT_PROJECT_VERSION = 1.1.5;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1.1.3;
DYLIB_CURRENT_VERSION = 1.1.5;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = Configs/MPGSDK.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
3 changes: 3 additions & 0 deletions MPGSDK.xcworkspace/contents.xcworkspacedata

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

1 change: 1 addition & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// swift-tools-version:5.0
import PackageDescription

let package = Package(
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# Gateway iOS SDK
**This Mobile SDK supports 3-D Secure 1 only.** If you require EMV 3DS support, please obtain the version 2 Mobile SDK by following these instructions: https://na.gateway.mastercard.com/api/documentation/integrationGuidelines/mobileSDK/emv3DSsdk.html

[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)
[![Build Status](https://travis-ci.org/Mastercard-Gateway/gateway-ios-sdk.svg?branch=master)](https://travis-ci.org/Mastercard-Gateway/gateway-ios-sdk)

Our iOS SDK allows you to easily integrate payments into your Swift iOS app. By updating a hosted session directly with the Gateway, you avoid the risk of handling sensitive card details on your server. The included [sample app](#sample-app) demonstrates the basics of installing and configuring the SDK to complete a simple payment.
Our iOS SDK allows you to easily integrate payments into your Swift iOS app. By updating a session directly with the Gateway, you avoid the risk of handling sensitive card details on your server. The included [sample app](#sample-app) demonstrates the basics of installing and configuring the SDK to complete a simple payment.

For more information, visit the [**Gateway iOS SDK Wiki**](https://github.com/Mastercard/gateway-ios-sdk/wiki) to find details about the basic transaction lifecycle and 3-D Secure support.

@@ -44,7 +45,8 @@ import MPGSDK
### Configuration
In order to use the SDK, you must initialize the Gateway object with your merchant ID and your gateway's region. If you are unsure about which region to select, please direct your inquiry to your gateway support team.

> Possible region values include, `GatewayRegion.northAmerica`, `GatewayRegion.asiaPacific`, `GatewayRegion.india` and `GatewayRegion.europe`
> Possible region values include, `GatewayRegion.northAmerica`, `GatewayRegion.asiaPacific`, `GatewayRegion.india`, `GatewayRegion.china` and `GatewayRegion.europe`
> For a complete list of regions see the `GatewayRegion.swift`.
```
let gateway = Gateway(region: GatewayRegion.<#YOUR GATEWAY REGION#>, merchantId: "<#YOUR MERCHANT ID#>")
```
Loading