On This Page
Create an mposUI Credentials Object
mposUI
Credentials ObjectBefore 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.- ImportMposUI.
- Create aCredentialsobject.
- Set themerchantfield value to the merchant ID that you obtained.
- Set thesecretfield value to the secret key that you obtained.
- Set theenvironmentfield value totestor tolive.
- Use thetestsetting 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 thelivesetting 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)