PaymentParameters

public struct PaymentParameters

An object for customising the behaviour of the YocoSDK.

  • Declaration

    Swift

    public init (autoTransition: Bool = false,
                 receiptDelegate: YocoReceiptDelegate? = nil,
                 userInfo: [AnyHashable: Any]? = nil,
                 metaData: [String: String]? = nil,
                 staffMember: YocoStaff? = nil,
                 transactionCompleteNotifier: YocoCompletionHandler? = nil)

    Parameters

    autoTransition

    Will make the payment complete screen automatically hide after a short time before dismissing the Yoco payment flow. Has no effect if you are implementing the YocoReceiptDelegate. This will allow the payment complete screen to show to the merchant and will have to tap to dismiss it so as to make sure they have seen the payment success screen. If you want to auto transition to your own receipt view or something similar, then you probably want autoTransition set to true.

    receiptDelegate

    A delegate object that will recieve call backs of button presses for different reciept types.

    userInfo

    Store data you would like to recieve back on completion of the payment. This data only exists locally.

    metaData

    Send JSON meta data with the transaction that you will recieve as part of a webhook to your server.

    staffMember

    A staff member object that can be used to assign staff member meta data to the transaction.