iOS Native Integration
The iOS native SDK for NTT DATA Payment Services India enables seamless integration of the NTTDATA Payment Gateway into your iOS applications. This SDK provides a secure and efficient way to handle transactions, allowing you to quickly implement robust payment solutions and enhance your app's user experience.
How to Install?
- Download the aipayiOSLibrary.xcframework and add it to your project using Xcode.
- You can embed this library by following the steps below. Project->targets->General->Frameworks, Libraries and Embedded Content to run project select Embed Without Signing.
- Project->targets->Build Phases->Embed Framework->click on Code Sign On Copy
- Import library into your project.
Import aipayiOSLibrary
- Initiate AIPAY payments by using the following code.
let aipayAuthRequest = ["merchId" : "317157",
"password": "Test@123",
"merchTxnId" : "txnid123456",
"amount" : "1",
"product": "NSE",
"custAccNo":"6567657",
"txnCurrency":"INR",
"custEmail":"test@xyz.com",
"custMobile":"8888888888",
"udf1":"udf1",
"udf2":"udf2",
"udf3":"udf3",
"udf4":"udf4",
"udf5":"udf5",
"encryptionKey" :"A4476C2062FFA58980DC8F79EB6A799E",
"decryptionKey" :"75AEF0FA1B94B3C10D4F5B268F757F11",
"responseHashKey" :"KEYRESP123657234",
"payMode": "uat"]
let manager = PaymentsManager()
manager.ndpsAipayPayments(paymentRequestData: aipayAuthRequest, controller: self)
- Create notification to capture real time response of AIPAY transaction.
//setting notification to get NDPS AIPAY transaction response
NotificationCenter.default.addObserver(self, selector: #selector(handleNdpsAipayResponse(_:)), name: nil, object: nil)
@objc func handleNdpsAipayResponse(_ notification: Notification) {
if let responseData = notification.userInfo?["data"] as? String {
print(responseData)
}
}
Note: Support for UPI Intent payment mode
Note:You need to add the lines below inside your iOS app's info.plist file to support UPI Intent payment mode.
<key>LSApplicationQueriesSchemes</key>/n]] <array> <string>upi</string> <string>phonepe</string> <string>paytmmp</string> <string>gpay</string> <string>tez</string> </array>