Payment UI
Prerequisites
1
Add Podfile to the project
cd <project-root-path>pod initsudo gem install cocoapodssource 'https://github.com/xplor-pay/CocoaPods.git'
source 'https://github.com/CocoaPods/Specs.git'
# Uncomment the next line to define a global platform for your project
# platform :ios, '13.0'
target 'PROJECTNAME' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
pod 'ClearentIdtechIOSFrameworkPod', '4.0.158'
# Pods for ExampleSwift
endpod install3
Initialize the SDK
ClearentUIManager.shared.initialize(
with: ClearentUIManagerConfiguration(
baseURL: "<YOUR_BASE_URL>",
apiKey: "<YOUR_API_KEY>",
publicKey: "<YOUR_PUBLIC_KEY>",
softwareType: "<YOUR_APP_NAME>",
softwareTypeVersion: "<YOUR_APP_VERSION>"
)
)Configuration values
Field name
Data type
Required?
Description
4
Launch the payment UI
let paymentInfo = PaymentInfo(
amount: 20.00,
customerID: "<YOUR_CUSTOMER_ID>",
invoice: "<YOUR_INVOICE_NUMBER>",
orderID: "<YOUR_ORDER_ID>",
billing: ClearentIdtechIOSFramework.ClientInformation,
shipping: ClearentIdtechIOSFramework.ClientInformation,
softwareType: "<YOUR_APP_NAME>"
)
ClearentUIManager.shared.paymentViewController(
paymentInfo: paymentInfo,
completion: completion
)Last updated
Was this helpful?

