This example app illustrates the use of the Worldline Connect Swift Client SDK and the services provided by Worldline Global Collect on the Worldline Global Collect platform. This repository contains an example with screens written in SwiftUI. It demonstrates the UI and business logic required to perform a basic Credit Card payment. The steps supported are selecting a payment product, fill in the required payment details and encrypting those details.
See the Worldline Connect Developer Hub for more information on how to use the SDK.
To run this example app, clone or download the source from Github. This example uses Swift Package Manager for its dependencies and so the dependencies should be downloaded automatically as soon as you open the project in XCode.
When you start the example you will see a form as the first screen where session details and payment details can be entered.
In order to use the SDK you need a session. This session can be created by making a Client Session request via in the Server to Server API. It is also possible to use the API Explorer to obtain client session details. The JSON response with the Session id, Customer id, API URL and assets URL can be pasted in the appropriate fields.
Set the payment details to any values you like to test a payment. Note that CountryCode, CurrencyCode and amount, as well as your configuration all influence which products will be available for the current payment.