Receive payment from your customer through IME pay.
- Introduction
- SDK Feature
- SDK Initialization
- Authenticate Merchant
- Get Transaction Token
- Perform Payment
- Validate Payment
- Response Codes
The IME Pay Payment SDK for iOS gives access to merchants to receive payment from IME Pay customers through their native iOS application.
IME pay iOS Merchant Payment SDK enables merchants to receive payments from IME pay customes through their native application. The application performs the payment and verifies the transaction status.
Cocoapods, iOS 8+
use frameworks!
pod 'IMEPay'
uncomment use frameworks in your pod file in case of swift projects.
The merchant is verified using the merchant code, merchant username, merchant password, module which will be provided by the IME pay Developer Support to applicable merchants.
IMPPaymentManager *manager = [[IMPPaymentManager alloc]initWithEnvironment:Live];
[manager pay:@"username" password:@"password" merchantCode:@"merchantCode" merchantName:@"merchantName" merchantUrl:@"merchantUrl" amount:@"amount" customerMobileNumber:@"customerMobileNumber" referenceId:@"referenceId" module:@"module" success:^(NSDictionary *transactionInfo) {
NSLog(@"Sucess!!");
} failure:^(NSDictionary *transactionInfo) {
NSLog(@"Failure!!");
}];
let manager = IMPPaymentManager(environment: Live)
manager?.pay("username" , password: "password", merchantCode: "merchantCode", merchantName: "merchantName", merchantUrl: "merchantUrl", amount: "amount", customerMobileNumber: "customerMobileNumber", referenceId: "referenceId", module: "module", success: { (info) in
print("success with transaction info \(info!)")
}, failure: { (transcationInfo) in
print("failure with transaction info \(transcationInfo!)")
})
Note: You can use transaction info passed in success and failure blocks, you shouldnt present any alert when success or failure block is called.
These response codes mentioned below are handled by the SDK itself.
403 : Application unauthorized to use the service.
500 : Your request cannot be processed at the moment
401 : Application request cannot be processed at the moment