Skip to content

Commit

Permalink
Prepare Release 1.1.1 (#16)
Browse files Browse the repository at this point in the history
* chore: Include swiftlint

* feat: Plugin init + Setup Configurations (#1)

Initialise plugin with required structure.
Create structure to deal with Apple Pay. Despite being ready to deal with any kind of dictionary, provide an accelerator to read the configuration from the main bundle.
Add Nimble and Quick through Cocoapods to use BDD for unit testing.

* feat: Check Wallet and Payment Availability (#2)

Add verification for wallet and payment availability. Payment verification is enhanced by also checking it against the configured payment networks and supported capabilities.

* feat: Set Details and Trigger Payment (#3)

Configure the missing payment details and, by mixing it with the configuration info, trigger the payment request.

* refactor: Add DocC documentation and minor fixes. (#4)

Add DocC documentation.
Add empty value check and mandatory fields when fetching configuration properties.

* fix: Payment Setup Verification Failed on Invalid Configuration (#5)

Fix error when verifying payment setup on ReadyToPay method. If some payment network or merchant capabilities are missing, return the associated error.

* fix: Errors and Contact Management (#6)

Clean errors and its codes and messages accordingly.
New OSPMTContact struct that allows the management of the correct shipping and billing information to use on a payment request. This is required due to a limitation on OutSystems related with nullable lists.
Change the OSPMTConfigurationDelegate to OSPMTConfigurationModel, in order to comply with the new OutSystems structure.
Clean code (privatise local methods and make OSPMTPayment's delegate property weak, in order to avoid possible retain cycles).

* fix: Check if GivenName and FamilyName are empty (#7)

* chore: Add Unreleased Section

* Chore: Add Podspec (#9)

* refactor: Simply Generic Method

* chore: Add public podspec

Add public podspec. This implies also updating the readme.md file to something more descriptive and user-friendly.

* feat: Add Stripe as First Payment Gateway (#11)

Add all necessary logic and changes to make payment processing using Stripe including Protocols, Factories and Models to deal with the StripePayments pod. Unit tests are included.

* Feat: Add Gateway property to OSPMTDetailsModel (#12)

Add `gateway` property to `OSPMTDetailsModel` struct. When authorising payment, confirm that this property corresponds to a configured gateway (on plist).

* feat: Add AccessToken to Full Payment Process (#13)

Add the optional parameter `accessToken` to the `OSPMTActionDelegate`'s `set` method and the `OSPMTStripeWrapper`'s `processPaymentWithDetails` method. Apply consequent changes to it.
In case of a full payment is triggered but no access token is passed, a `tokenIssue` is returned.

* chore: Set Release Tag

Set release tag on the repo's CHANGELOG file.

* feat: Make library available as xcframework (#15)

Add the necessary script (script.sh) to make the library available as a xcframework.
Remove podspec file as the CocoaPods approach was discarded.
Exchange Stripe pod for a Swift Package Manager.

* chore: Set Release Tag
  • Loading branch information
OS-ricardomoreirasilva committed Mar 1, 2023
1 parent ce50ffe commit 8717712
Show file tree
Hide file tree
Showing 588 changed files with 557 additions and 50,897 deletions.
27 changes: 27 additions & 0 deletions OSPaymentsLib.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
755A8060289BD54E00426EAA /* OSPMTDataModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 755A805F289BD54E00426EAA /* OSPMTDataModel.swift */; };
755A8062289BD56300426EAA /* OSPMTAddressModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 755A8061289BD56300426EAA /* OSPMTAddressModel.swift */; };
755A8064289BD58900426EAA /* OSPMTContactInfoModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 755A8063289BD58900426EAA /* OSPMTContactInfoModel.swift */; };
755DF3F0297FF02800140860 /* StripePayments in Frameworks */ = {isa = PBXBuildFile; productRef = 755DF3EF297FF02800140860 /* StripePayments */; };
756931E62937A9200014618D /* OSPMTTokenInfoModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 756931E52937A9200014618D /* OSPMTTokenInfoModel.swift */; };
75760F78289C102D001BDCEC /* OSPMTAddressModelSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75760F77289C102D001BDCEC /* OSPMTAddressModelSpec.swift */; };
75760F7A289C17AB001BDCEC /* OSPMTContactInfoModelSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75760F79289C17AB001BDCEC /* OSPMTContactInfoModelSpec.swift */; };
Expand Down Expand Up @@ -122,6 +123,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
755DF3F0297FF02800140860 /* StripePayments in Frameworks */,
8DB1869BE6C7A0D7D44D4C34 /* Pods_OSPaymentsLib.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -319,6 +321,9 @@
dependencies = (
);
name = OSPaymentsLib;
packageProductDependencies = (
755DF3EF297FF02800140860 /* StripePayments */,
);
productName = OSPaymentsLib;
productReference = 7507FC1227FC2AAE003809F6 /* OSPaymentsLib.framework */;
productType = "com.apple.product-type.framework";
Expand Down Expand Up @@ -371,6 +376,9 @@
Base,
);
mainGroup = 7507FC0827FC2AAE003809F6;
packageReferences = (
755DF3EE297FF02800140860 /* XCRemoteSwiftPackageReference "stripe-ios-spm" */,
);
productRefGroup = 7507FC1327FC2AAE003809F6 /* Products */;
projectDirPath = "";
projectRoot = "";
Expand Down Expand Up @@ -798,6 +806,25 @@
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */

/* Begin XCRemoteSwiftPackageReference section */
755DF3EE297FF02800140860 /* XCRemoteSwiftPackageReference "stripe-ios-spm" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/stripe/stripe-ios-spm";
requirement = {
kind = exactVersion;
version = 23.2.0;
};
};
/* End XCRemoteSwiftPackageReference section */

/* Begin XCSwiftPackageProductDependency section */
755DF3EF297FF02800140860 /* StripePayments */ = {
isa = XCSwiftPackageProductDependency;
package = 755DF3EE297FF02800140860 /* XCRemoteSwiftPackageReference "stripe-ios-spm" */;
productName = StripePayments;
};
/* End XCSwiftPackageProductDependency section */
};
rootObject = 7507FC0927FC2AAE003809F6 /* Project object */;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"pins" : [
{
"identity" : "stripe-ios-spm",
"kind" : "remoteSourceControl",
"location" : "https://github.com/stripe/stripe-ios-spm",
"state" : {
"revision" : "87e3ebe7539e4408430606a5f1fbc9b88e67ae84",
"version" : "23.2.0"
}
}
],
"version" : 2
}
14 changes: 14 additions & 0 deletions OSPaymentsLib.xcworkspace/xcshareddata/swiftpm/Package.resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"pins" : [
{
"identity" : "stripe-ios-spm",
"kind" : "remoteSourceControl",
"location" : "https://github.com/stripe/stripe-ios-spm",
"state" : {
"revision" : "87e3ebe7539e4408430606a5f1fbc9b88e67ae84",
"version" : "23.2.0"
}
}
],
"version" : 2
}
2 changes: 1 addition & 1 deletion OSPaymentsLib/Gateways/Stripe/OSPMTStripeAPIDelegate.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import PassKit
import StripePayments
@_implementationOnly import StripePayments

/// Delegate class containing the required calls for Stripe's SDK to process.
protocol OSPMTStripeAPIDelegate: AnyObject {
Expand Down
2 changes: 1 addition & 1 deletion OSPaymentsLib/Gateways/Stripe/OSPMTStripeWrapper.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import PassKit
import StripeCore
@_implementationOnly import StripeCore

/// Object responsible for making a Stripe payment process. The Wrapper deals with all calls that are required to Stripe's SDK.
final class OSPMTStripeWrapper: OSPMTGatewayDelegate {
Expand Down
23 changes: 0 additions & 23 deletions OSPaymentsPluginLib.podspec

This file was deleted.

1 change: 0 additions & 1 deletion Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ target 'OSPaymentsLib' do
use_frameworks!

# Pods for OSPaymentsLib
pod 'StripePayments', '23.2.0'

target 'OSPaymentsLibTests' do
pod 'Quick', '5.0.1'
Expand Down
13 changes: 1 addition & 12 deletions Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,31 +1,20 @@
PODS:
- Nimble (10.0.0)
- Quick (5.0.1)
- StripeCore (23.2.0)
- StripePayments (23.2.0):
- StripeCore (= 23.2.0)
- StripePayments/Stripe3DS2 (= 23.2.0)
- StripePayments/Stripe3DS2 (23.2.0):
- StripeCore (= 23.2.0)

DEPENDENCIES:
- Nimble (= 10.0.0)
- Quick (= 5.0.1)
- StripePayments (= 23.2.0)

SPEC REPOS:
trunk:
- Nimble
- Quick
- StripeCore
- StripePayments

SPEC CHECKSUMS:
Nimble: 5316ef81a170ce87baf72dd961f22f89a602ff84
Quick: 749aa754fd1e7d984f2000fe051e18a3a9809179
StripeCore: 6da916796f87ab91f3dae1d78a93602465964cbc
StripePayments: 7651a56a2a7fe320e5e8b1cb0c2e881536b75021

PODFILE CHECKSUM: c547ae5a2dc2e6c1ec55f7b849384bf4cf87a950
PODFILE CHECKSUM: 573766210a1468eb831a29c19f8af7f8f1800801

COCOAPODS: 1.11.3
13 changes: 1 addition & 12 deletions Pods/Manifest.lock

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

Loading

0 comments on commit 8717712

Please sign in to comment.