This kit
is dependent on the following:
The CNISDKSumUpKit
provides the way to manage guest's credit cards by using SumUp as a payment provider.
To use CNISDKSumUpKit
, head on over to the releases page, and download the CNISDK.framework.zip
. Extract the zip file and drag and drop CNISDKCoreKit.framework
, Conichi_Meta.framework
, Conichi_Authentication.framework
, Conichi_Network.framework
, CNISDKPaymentKit.framework
, CNISDKSumUpKit.framework
and Conichi_Errors.framework
to the Project target -> general -> Embedded Binaries
.
The preferred way to integrate CNISDKSumUpKit
is via CocoaPods
. Add the following line to your Podfile
:
use_frameworks!
pod 'CNISDKSumUpKit'
Run pod install
, and you should now have the latest CNISDKSumUpKit
release.
To integrate CNISDKSumUpKit
via Carthage add the following line to your Cartfile
:
github "conichiGMBH/conichi-ios-sdk"
Run carthage update
, and you should now have the latest version of CNISDKSumUpKit
in your Carthage folder.
Sections below explain major and the most important parts of the CNISDKSumUpKit
. For the complete documentation please refer to this page. Also, it can be useful to read the overview about CNISDKCoreKit and CNISDKPaymentKit.
Example below shows the simplest setup CNISDKSumUpKit
//Create a configuration for the payment.
//At the moment there are no available properties to configure
CNISDKSumUpKitConfiguration *sumUpKitConfiguration = [CNISDKSumUpKitConfiguration configurationWithBlock:^(id<CNISDKMutableSumUpKitConfiguration> \_Nonnull mutableConfiguration) {}];
//Create a payment kit bundle
CNISDKKitBundle *sumUpKit = [CNISDKKitBundle bundleWithKit:CNISDKSumUpKit configuration:sumUpKitConfiguration]
//Create a configuration for the sdk instance
CNISDKConfiguration *configuration = [CNISDKConfiguration configurationWithBlock:^(id<CNISDKMutableConfiguration> \_Nonnull mutableConfiguration) {
mutableConfiguration.logLevel = CNISDKLogLevelInfo;
mutableConfiguration.apiKey = @"your-api-key";
mutableConfiguration.apiSecret = @"your-api-secret";
mutableConfiguration.kits = @[ sumUpKit ];
mutableConfiguration.environment = CNISDKEnvironmentSandbox;
}];
//Setups the sdk delegate - it can be any object that conforms to CNISDKDelegate protocol
id<CNISDKDelegate> delegate = [self yourMethodToSetupSDKDelegate];
//Start the sdk with the given configuration
[CNISDK startWithConfiguration:configuration delegate:delegate];
Important to manage credit cards guest has to be authorized.
To manager credit cards for the specific CNISDKGuest
please refer to paymentInstrumentManager
:
[CNISDKSumUp sharedInstance].paymentInstrumentManager
The manager conforms to CNISDKPaymentInstrumentManager
protocol that describes the all possible actions.