Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
4.0.0 includes breaking changes in both symbols and behavior. See the migration guide for more details.
New Features
Mail order / telephone order (MOTO) payment support for smart readers.
Global card saving after payment support by updating customer consent capture. The following breaking changes are required:
allowRedisplay
value is now required to be set incollectConfiguration
when usingsetupFutureUsage
forSCPTerminal
'scollectPaymentMethod
.customerConsentCollected
parameter fromSCPTerminal
'scollectSetupIntentPaymentMethod
and replaced it withallowRedisplay
.Reader discovery
discovering
toSCPConnectionStatus
to represent when discovery is running.SCPTerminal
'sdiscoverReaders:delegate:completion:
cancel all previously queued discovery operations. Only one discovery operation can run at any given time; all other discovery attempts will fail withSCPErrorCanceledDueToIntegrationError
.discoverReaders
completion block when the operation completes since these are not long running discovery operations.Reader connection
Update: There is now a single
connectReader
call used for all connection methods. This replaces the previous methods:connectBluetoothReader
,connectInternetReader
, andconnectLocalMobileReader
.ReaderDelegate
has been removed from theconnectReader
method as a parameter, and moved into theconnectionConfig
, replacingautoReconnectionDelegate
. - For smart readers, theInternetConnectionConfiguration
now also expects anInternetReaderDelegate
to be passed in, which will alert your integration of reader disconnects.Update: Auto reconnect on unexpected disconnect is now enabled by default for mobile and Tap to Pay readers.
SCPReconnectionDelegate
has been removed and the methods have been moved to the commonReaderDelegate
.Update: The method for handling reader disconnects has changed.
terminal:didReportUnexpectedReaderDisconnect:
from theSCPTerminalDelegate
. Usereader:didDisconnect:
to be informed of reader disconnects.-readerDidFailReconnect:
andreader:didDisconnect:
methods will be called if the SDK fails to reconnect to the reader and it becomes disconnected.Payment acceptance
SCPCardPresentCaptureMethodManual
toSCPCardPresentCaptureMethod
for simplifying manual card capture without affecting automatic non-card payment capture.SCPTerminal
'sconfirmPaymentIntent:completion
,confirmSetupIntent:completion
, andconfirmRefund:completion
operations now returnSCPCancelable
's that allow you to cancel the operation in certain scenarios.SCPTerminal
'scancelPaymentIntent:completion
orcancelSetupIntent:completion
will now cancel ongoing operations related to the specified intent.SCPOfflineDelegate
now conforms toNSObject
.SCPPaymentIntentParameters
andSCPSetupIntentParameters
now keep payment method types as values of theSCPPaymentMethodType
enum rather than strings.SCPSetupIntent.stripeId
is nownullable
to be consistent withSCPPaymentintent.stripeId
. TheSCPSetupIntent.stripeId
will continue to be present.Renaming
BluetoothReaderDelegate
has been renamed toMobileReaderDelegate
.SCPReaderSoftwareUpdate
, renamedestimatedUpdateTime
todurationEstimate
.SCPUpdateTimeEstimate
toSCPUpdateDurationEstimate
.Non-breaking changes
SCPInternetDiscoveryConfiguration
now supports an optionaltimeout
value, specifying the timeout in seconds for the discover readers request. If the online discovery attempt fails, the operation will automatically fall back to offline discovery if offline mode is enabled.SCPError
. Errors that were previously reported as aSCPErrorGenericReaderError
are now mapped to a more specificSCPError
type.