FILTER BY TAG

Create an
mposUI
Credentials Object

Before starting this task, obtain a merchant ID and secret key. For more information, see Generating a Secret Key for an Existing Merchant ID.
The
mposUI Credentials
 object is required in order to access the functionality of the Tap to Pay on iPhone SDK. You must create this object before you can create an
mposUI
instance.
Follow these steps to create the
mposUI Credentials
object.
  1. Import
    MposUI
    .
  2. Create a
    Credentials
    object.
  3. Set the
    merchant
    field value to the merchant ID that you obtained.
  4. Set the
    secret
    field value to the secret key that you obtained.
  5. Set the
    environment
    field value to
    test
    or to
    live
    .
    • Use the
      test
      setting to test your integration without charging a real payment card. Use the merchant ID and secret key that you obtained from the test environment.
    • Use the
      live
      setting to process live transactions. Use the merchant ID and secret key that you obtained from the production environment.
    import MposUI let credentials = Credentials(merchant: "MerchantId", secret: "SecretKey", environment: .live)