Overview
Set thePrimerDelegate
in order to receive different callbacks from Primer SDK.
primerDidCompleteCheckoutWithData
SWIFT
⚠️ This method won’t be called when you are using manual payment handling, or the vault manager.
Parameters
Example
SWIFT
primerDidTokenizePaymentMethod
SWIFT
token
to create a payment on your backend. Make sure that you call the decisionHandler
once your operation has been completed.⚠️ This method will be called only on the manual flow, or when vaulting.
Parameters
Example
SWIFT
primerDidResumeWith
SWIFT
resumeToken
so you can resume the payment.⚠️ This method will be called only on the manual flow when the payment is in a
.PENDING
state..
Parameters
Example
SWIFT
primerClientSessionWillUpdate
This method will be called to notify you that the client session will be updated, e.g. a surcharge needs to be applied when a payment method has been chosen.SWIFT
primerClientSessionDidUpdate
SWIFT
Parameters
primerWillCreatePaymentWithData
This method will be called with just before the payment gets created, and lets you decide whether you want to proceed with the payment creation. ⚠️ This method will be called only when checking out using theauto
flow.
SWIFT
Parameters
Example
SWIFT
primerDidEnterResumePendingWithPaymentAdditionalInfo
SWIFT
primerDidFailWithError
SWIFT
PrimerCheckoutData
if the occurs after the payment creation.
Make sure you call the decisionHandler
to finalize the flow.
Parameters
Example
SWIFT
primerDidDismiss
This method will be called to notify you that the Primer SDK has been dismissed.SWIFT