Skip to content

Commit 0794d83

Browse files
committed
Add option to skip success screens
To skip the screen shown at the end of a successful transaction, the `skip-screen-success=true` parameter can be used. When using the parameter your application is responsible for displaying the transaction result to the customer.
1 parent f1ed7d8 commit 0794d83

File tree

8 files changed

+170
-28
lines changed

8 files changed

+170
-28
lines changed

README.md

+16-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#SumUp custom URL scheme
1+
# SumUp custom URL scheme
22

33
Using the custom SumUp URL scheme you can accept card payments from your iOS app or website through the SumUp iOS app.
44
To get started you will need to create a SumUp account and get an affiliate key in our [Developer section](https://me.sumup.com/developers).
@@ -17,8 +17,8 @@ If you are planning to open the SumUp app using a URL, please find the parameter
1717
|`currency` | The ISO 4217 code of currency to be charged. The currency needs to match the currency of the user that is logged into the SumUp app. For example EUR, GBP, BRL, CHF, PLN. |
1818
|`affiliate-key` | Your affiliate key. It needs to be associated with the calling app's bundle identifier. |
1919

20-
## Optional query parameters
2120

21+
## Optional query parameters
2222

2323
| Key | Comment |
2424
| --------------------|:------- |
@@ -28,6 +28,7 @@ If you are planning to open the SumUp app using a URL, please find the parameter
2828
|`receipt-email` | Prefills the email textfield when asking the customer whether he wants a receipts. |
2929
|`receipt-mobilephone`| Prefills the phone number textfield when asking the customer whether he wants a receipts. |
3030
|`foreign-tx-id` | An optional ID to be associated with this transaction. Please see our [API documentation](https://sumup.com/integration#transactionReportingAPIs) on how to retrieve a transaction using this ID. This ID has to be unique in the scope of a SumUp merchant account and its sub-accounts. It must not be longer than 128 characters and can only contain printable ASCII characters. *Supported by SumUp app version 1.53 and later. Version 1.53.2 and later will append it to the callback URLs as a [query parameter](#Callback-query-parameters) if provided.* |
31+
|`skip-screen-success`| To skip the screen shown at the end of a successful transaction, the `skip-screen-success=true` parameter can be used. When using the parameter your application is responsible for displaying the transaction result to the customer. In combination with the Receipts API your application can also send your own receipts, see [API documentation](https://sumup.com/docs/rest-api/transactions-api) for details. Please note success screens will still be shown when using the SumUp Air Lite readers. *Supported by SumUp app version 1.69 and later.*|
3132

3233

3334
## Callback query parameters
@@ -64,5 +65,18 @@ request = [SMPPaymentRequest paymentRequestWithAmount:amount
6465
* &callbackfail=samplepaymentapp%3A%2F%2F
6566
* &callbacksuccess=samplepaymentapp%3A%2F%2F
6667
*/
68+
69+
/* Optionally: Setting the option to skip success screens
70+
* to add skip-screen-success=true to the URL
71+
* Supported by SumUp app version 1.69 and later.
72+
* [request setSkipScreenOptions:SMPSkipScreenOptionSuccess];
73+
*/
74+
6775
[request openSumUpMerchantApp];
6876
```
77+
78+
79+
## Community
80+
81+
- **Questions?** Get in contact with our integration team by sending an email to <a href="mailto:integration@sumup.com">integration@sumup.com</a>.
82+
- **Found a bug?** [Open an issue](https://github.com/sumup/sumup-ios-url-scheme/issues/new). Please provide as much information as possible.

SMPPayment.framework/Versions/A/Headers/SMPPaymentRequest.h

+16-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
//
88

99
#import <Foundation/Foundation.h>
10+
#import "SMPSkipScreenOptions.h"
1011

1112
extern NSString const *SMPPaymentRequestStatusParameterKey __deprecated_msg("Please use SMPPaymentRequestKeyStatus.");
1213

@@ -56,7 +57,11 @@ extern NSString const *SMPPaymentRequestKeyForeignTransactionID;
5657

5758
/**
5859
* Will check whether the SumUp app is installed by calling
59-
* -[UIApplication canOpenURL:] and SumUp's URL scheme.
60+
* -[UIApplication canOpenURL:] using SumUp's URL scheme 'sumupmerchant://'.
61+
*
62+
* Please make sure to add 'sumupmerchant' to your list of LSApplicationQueriesSchemes
63+
* See https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/LaunchServicesKeys.html#//apple_ref/doc/uid/TP40009250-SW14
64+
*
6065
*
6166
* @return A boolean indicating if the SumUp app is installed.
6267
*/
@@ -82,6 +87,8 @@ extern NSString const *SMPPaymentRequestKeyForeignTransactionID;
8287
* These URLs are optional, however we would encourage you to set
8388
* them to bring the user back to your app or website once the
8489
* transaction has been finished.
90+
*
91+
* See https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#//apple_ref/doc/uid/20001431-102207
8592
*/
8693
@property (strong) NSURL *callbackURLSuccess;
8794
@property (strong) NSURL *callbackURLFailure;
@@ -99,6 +106,14 @@ extern NSString const *SMPPaymentRequestKeyForeignTransactionID;
99106
*/
100107
@property (strong) NSString *foreignTransactionID;
101108

109+
/**
110+
* An optional flag to skip the confirmation screen in checkout.
111+
* If set, the checkout will be dismissed w/o user interaction.
112+
* Default is SMPSkipScreenOptionNone.
113+
*/
114+
@property (nonatomic) SMPSkipScreenOptions skipScreenOptions;
115+
116+
102117
- (void)addTag:(NSString *)aTag forKey:(NSString *)tagKey;
103118

104119
/**
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
//
2+
// SMPSkipScreenOptions.h
3+
// SumupSDK
4+
//
5+
// Created by Lukas Mollidor on 08.06.17.
6+
// Copyright (c) 2017 SumUp Payments Limited. All rights reserved.
7+
//
8+
9+
#ifndef SMPSkipScreenOptions_h
10+
#define SMPSkipScreenOptions_h
11+
12+
/**
13+
* SMPSkipScreenOptions allow for skipping the confirmation screen.
14+
*/
15+
typedef NS_OPTIONS(NSUInteger, SMPSkipScreenOptions) {
16+
/**
17+
* Never skip confirmation screen.
18+
*/
19+
SMPSkipScreenOptionNone = 0,
20+
/**
21+
* Skip confirmation screen (i.e. screen that would ask for a receipt) for successful transactions.
22+
*/
23+
SMPSkipScreenOptionSuccess = 1 << 0,
24+
};
25+
26+
#endif
6.95 KB
Binary file not shown.

SMPPaymentSampleApp.xcodeproj/project.pbxproj

+10-13
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@
163163
isa = PBXProject;
164164
attributes = {
165165
CLASSPREFIX = SMPCO;
166-
LastUpgradeCheck = 0640;
166+
LastUpgradeCheck = 0730;
167167
ORGANIZATIONNAME = sumup;
168168
};
169169
buildConfigurationList = E97A96D116413A4D00C9EC7C /* Build configuration list for PBXProject "SMPPaymentSampleApp" */;
@@ -243,21 +243,17 @@
243243
isa = XCBuildConfiguration;
244244
buildSettings = {
245245
ALWAYS_SEARCH_USER_PATHS = NO;
246-
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
247-
CLANG_CXX_LIBRARY = "libc++";
248246
CLANG_ENABLE_OBJC_ARC = YES;
249247
CLANG_WARN_EMPTY_BODY = YES;
250248
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
251249
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
252250
COPY_PHASE_STRIP = NO;
253-
GCC_C_LANGUAGE_STANDARD = gnu99;
254-
GCC_DYNAMIC_NO_PIC = NO;
251+
ENABLE_TESTABILITY = YES;
255252
GCC_OPTIMIZATION_LEVEL = 0;
256253
GCC_PREPROCESSOR_DEFINITIONS = (
257254
"DEBUG=1",
258255
"$(inherited)",
259256
);
260-
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
261257
GCC_WARN_ABOUT_RETURN_TYPE = YES;
262258
GCC_WARN_UNINITIALIZED_AUTOS = YES;
263259
GCC_WARN_UNUSED_VARIABLE = YES;
@@ -272,14 +268,11 @@
272268
isa = XCBuildConfiguration;
273269
buildSettings = {
274270
ALWAYS_SEARCH_USER_PATHS = NO;
275-
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
276-
CLANG_CXX_LIBRARY = "libc++";
277271
CLANG_ENABLE_OBJC_ARC = YES;
278272
CLANG_WARN_EMPTY_BODY = YES;
279273
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
280274
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
281275
COPY_PHASE_STRIP = YES;
282-
GCC_C_LANGUAGE_STANDARD = gnu99;
283276
GCC_WARN_ABOUT_RETURN_TYPE = YES;
284277
GCC_WARN_UNINITIALIZED_AUTOS = YES;
285278
GCC_WARN_UNUSED_VARIABLE = YES;
@@ -294,16 +287,19 @@
294287
E97A971416413A4D00C9EC7C /* Debug */ = {
295288
isa = XCBuildConfiguration;
296289
buildSettings = {
290+
DEVELOPMENT_TEAM = "";
291+
ENABLE_BITCODE = NO;
297292
FRAMEWORK_SEARCH_PATHS = (
298293
"$(inherited)",
299294
"\"$(SRCROOT)/\"",
300295
);
301296
GCC_PRECOMPILE_PREFIX_HEADER = YES;
302297
GCC_PREFIX_HEADER = "SMPPaymentSampleApp/SMPPaymentSampleApp-Prefix.pch";
303298
INFOPLIST_FILE = "SMPPaymentSampleApp/SMPPaymentSampleApp-Info.plist";
304-
IPHONEOS_DEPLOYMENT_TARGET = 5.0;
299+
IPHONEOS_DEPLOYMENT_TARGET = 6.0;
305300
LIBRARY_SEARCH_PATHS = "";
306301
OTHER_LDFLAGS = "-ObjC";
302+
PRODUCT_BUNDLE_IDENTIFIER = "com.sumup.${PRODUCT_NAME:rfc1034identifier}";
307303
PRODUCT_NAME = SMPPaymentSampleApp;
308304
TARGETED_DEVICE_FAMILY = "1,2";
309305
WRAPPER_EXTENSION = app;
@@ -313,19 +309,20 @@
313309
E97A971516413A4D00C9EC7C /* Release */ = {
314310
isa = XCBuildConfiguration;
315311
buildSettings = {
316-
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution: SumUp ltd.";
312+
DEVELOPMENT_TEAM = "";
313+
ENABLE_BITCODE = NO;
317314
FRAMEWORK_SEARCH_PATHS = (
318315
"$(inherited)",
319316
"\"$(SRCROOT)/\"",
320317
);
321318
GCC_PRECOMPILE_PREFIX_HEADER = YES;
322319
GCC_PREFIX_HEADER = "SMPPaymentSampleApp/SMPPaymentSampleApp-Prefix.pch";
323320
INFOPLIST_FILE = "SMPPaymentSampleApp/SMPPaymentSampleApp-Info.plist";
324-
IPHONEOS_DEPLOYMENT_TARGET = 5.0;
321+
IPHONEOS_DEPLOYMENT_TARGET = 6.0;
325322
LIBRARY_SEARCH_PATHS = "";
326323
OTHER_LDFLAGS = "-ObjC";
324+
PRODUCT_BUNDLE_IDENTIFIER = "com.sumup.${PRODUCT_NAME:rfc1034identifier}";
327325
PRODUCT_NAME = SMPPaymentSampleApp;
328-
"PROVISIONING_PROFILE[sdk=iphoneos*]" = "349BD196-1C48-4DC9-99C2-6CF60FD3A6DA";
329326
TARGETED_DEVICE_FAMILY = "1,2";
330327
WRAPPER_EXTENSION = app;
331328
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "0730"
4+
version = "1.3">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES">
8+
<BuildActionEntries>
9+
<BuildActionEntry
10+
buildForTesting = "YES"
11+
buildForRunning = "YES"
12+
buildForProfiling = "YES"
13+
buildForArchiving = "YES"
14+
buildForAnalyzing = "YES">
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "E97A96D616413A4D00C9EC7C"
18+
BuildableName = "SMPPaymentSampleApp.app"
19+
BlueprintName = "SMPPaymentSampleApp"
20+
ReferencedContainer = "container:SMPPaymentSampleApp.xcodeproj">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
</BuildActionEntries>
24+
</BuildAction>
25+
<TestAction
26+
buildConfiguration = "Debug"
27+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29+
shouldUseLaunchSchemeArgsEnv = "YES">
30+
<Testables>
31+
</Testables>
32+
<MacroExpansion>
33+
<BuildableReference
34+
BuildableIdentifier = "primary"
35+
BlueprintIdentifier = "E97A96D616413A4D00C9EC7C"
36+
BuildableName = "SMPPaymentSampleApp.app"
37+
BlueprintName = "SMPPaymentSampleApp"
38+
ReferencedContainer = "container:SMPPaymentSampleApp.xcodeproj">
39+
</BuildableReference>
40+
</MacroExpansion>
41+
<AdditionalOptions>
42+
</AdditionalOptions>
43+
</TestAction>
44+
<LaunchAction
45+
buildConfiguration = "Debug"
46+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
47+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
48+
launchStyle = "0"
49+
useCustomWorkingDirectory = "NO"
50+
ignoresPersistentStateOnLaunch = "NO"
51+
debugDocumentVersioning = "YES"
52+
debugServiceExtension = "internal"
53+
allowLocationSimulation = "YES">
54+
<BuildableProductRunnable
55+
runnableDebuggingMode = "0">
56+
<BuildableReference
57+
BuildableIdentifier = "primary"
58+
BlueprintIdentifier = "E97A96D616413A4D00C9EC7C"
59+
BuildableName = "SMPPaymentSampleApp.app"
60+
BlueprintName = "SMPPaymentSampleApp"
61+
ReferencedContainer = "container:SMPPaymentSampleApp.xcodeproj">
62+
</BuildableReference>
63+
</BuildableProductRunnable>
64+
<AdditionalOptions>
65+
</AdditionalOptions>
66+
</LaunchAction>
67+
<ProfileAction
68+
buildConfiguration = "Release"
69+
shouldUseLaunchSchemeArgsEnv = "YES"
70+
savedToolIdentifier = ""
71+
useCustomWorkingDirectory = "NO"
72+
debugDocumentVersioning = "YES">
73+
<BuildableProductRunnable
74+
runnableDebuggingMode = "0">
75+
<BuildableReference
76+
BuildableIdentifier = "primary"
77+
BlueprintIdentifier = "E97A96D616413A4D00C9EC7C"
78+
BuildableName = "SMPPaymentSampleApp.app"
79+
BlueprintName = "SMPPaymentSampleApp"
80+
ReferencedContainer = "container:SMPPaymentSampleApp.xcodeproj">
81+
</BuildableReference>
82+
</BuildableProductRunnable>
83+
</ProfileAction>
84+
<AnalyzeAction
85+
buildConfiguration = "Debug">
86+
</AnalyzeAction>
87+
<ArchiveAction
88+
buildConfiguration = "Release"
89+
revealArchiveInOrganizer = "YES">
90+
</ArchiveAction>
91+
</Scheme>

SMPPaymentSampleApp/SMPPaymentSampleApp-Info.plist

+7-3
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@
2020
<string>Icon-Small-50@2x.png</string>
2121
</array>
2222
<key>CFBundleIdentifier</key>
23-
<string>com.sumup.${PRODUCT_NAME:rfc1034identifier}</string>
23+
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
2424
<key>CFBundleInfoDictionaryVersion</key>
2525
<string>6.0</string>
2626
<key>CFBundleName</key>
2727
<string>${PRODUCT_NAME}</string>
2828
<key>CFBundlePackageType</key>
2929
<string>APPL</string>
3030
<key>CFBundleShortVersionString</key>
31-
<string>1.00.108</string>
31+
<string>1.00.109</string>
3232
<key>CFBundleSignature</key>
3333
<string>????</string>
3434
<key>CFBundleURLTypes</key>
@@ -45,7 +45,7 @@
4545
</dict>
4646
</array>
4747
<key>CFBundleVersion</key>
48-
<string>8</string>
48+
<string>9</string>
4949
<key>LSRequiresIPhoneOS</key>
5050
<true/>
5151
<key>UIPrerenderedIcon</key>
@@ -65,5 +65,9 @@
6565
<string>UIInterfaceOrientationLandscapeLeft</string>
6666
<string>UIInterfaceOrientationLandscapeRight</string>
6767
</array>
68+
<key>LSApplicationQueriesSchemes</key>
69+
<array>
70+
<string>sumupmerchant</string>
71+
</array>
6872
</dict>
6973
</plist>

SMPPaymentSampleApp/en.lproj/SMPPaymentViewController.xib

+4-9
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2-
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7706" systemVersion="14F27" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="10117" systemVersion="16D32" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
33
<dependencies>
4-
<deployment version="1280" identifier="iOS"/>
5-
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/>
4+
<deployment identifier="iOS"/>
5+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
66
</dependencies>
77
<objects>
88
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="SMPPaymentViewController">
@@ -88,9 +88,4 @@
8888
<simulatedScreenMetrics key="simulatedDestinationMetrics"/>
8989
</view>
9090
</objects>
91-
<simulatedMetricsContainer key="defaultSimulatedMetrics">
92-
<simulatedStatusBarMetrics key="statusBar"/>
93-
<simulatedOrientationMetrics key="orientation"/>
94-
<simulatedScreenMetrics key="destination" type="retina4"/>
95-
</simulatedMetricsContainer>
9691
</document>

0 commit comments

Comments
 (0)