Swift implementation of PayApi Secure Form.
Includes an easy-to-use PayApi SDK for any iOS application, working with Swift. In order to use the SDK, please register for a free PayApi user account
CocoaPods is the recommended installation method.
pod 'PayApiSDK'import PayApiSDKInitialize SDK with your credentials (Public Id and PayApi key)
let secureForm = SecureForm(publicId: "SHOP_PUBLIC_ID", apiKey: "PROVIDED_API_KEY")let productData: [String: Any] = [
"order": [
"sumInCentsIncVat": 122,
"sumInCentsExcVat": 100,
"vatInCents": 22,
"currency": "EUR",
"referenceId": "ref123"
],
"products": [
[
"quantity": 1,
"title": "Black bling cap",
"priceInCentsIncVat": 122,
"priceInCentsExcVat": 100,
"vatInCents": 22,
"vatPercentage": 22
]
],
"consumer": [
"email": "support@payapi.io"
]
]Method to open the Secure Form on any UIButton TouchUpInside event
secureForm.addSecureFormToButton(button: myButton, message: productData)Please contact support@payapi.io for any questions.