iOS SDK
iOS SDK
Build payments into your iOS mobile app with Swift.
The Bill24 iOS SDK with Swift helps you build customizable payments into your app. We provide powerful and customizable UI screens and allow your customer to make payment Easier and Faster.
1 How to integrate
Frist, you can get Bill24 package SDK from cocoapods, please check the latest version.
CocoaPods 1.13.0 or later
Create Podfile and add pod B24PaymentSdk
check latest version
use_frameworks!
target 'MyApp' do
pod 'B24PaymentSdk',
:http => 'https://b24sdk.s3.ap-southeast-1.amazonaws.com/B24PaymentSdk-1-0-25.zip'
end
Run this command for install pod:
pod install
And you can import the package:
import UIKit
import B24PaymentSd
Now you can access our function
to initiate SDK.
To initiate SDK or load SDK you must use this class name B24PaymentSdk().intSdk
Example code:
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
}
@IBAction func onClickCheckoutButton(_ sender: Any) {
B24PaymentSdk().initSdk(
controller: self,
transactionId: "19F84F284841",
refererKey: "123X",
//'km' is Khmer, 'en' is English
language: "km",
darkMode: false,
//'true' is production
isProduction: false
)
}
}
Grant Permission:
Add permission to save image in photos inside Info.plist
<key>Privacy - Photo Library Additions Usage Description</key>
<string>App needs access to the photo library for saving images.</string>
Requirement:
Require UIkit , Swift version 5.0.0
IOS minimum version 13.0
Xcode version 15.0
:::note
To initiate SDK or load SDK you must provide tranId
that you get from endpoint Transaction Initiation.
:::