CocoaPods trunk is moving to be read-only. Read more on the blog, there are 16 months to go.

nimbbl_mobile_kit_ios_core_api_sdk 1.5.9

nimbbl_mobile_kit_ios_core_api_sdk 1.5.9

Maintained by Sandeep, Nimbbl.



  • By
  • Nimbbl

Nimbbl Core API SDK for iOS

The Nimbbl Core API SDK provides the core functionality for payment processing, order management, and transaction handling in iOS applications.

Features

  • Order Management: Create and update orders
  • Transaction Enquiry: Query transaction status
  • Payment Processing: Handle payment flows
  • UPI App Detection: Detect available UPI apps
  • Event Logging: Comprehensive event tracking
  • Error Handling: Robust error management

Requirements

  • iOS 13.0+
  • Swift 5.0+
  • Xcode 12.0+

Installation

CocoaPods

Add the following to your Podfile:

# Use dynamic frameworks
use_frameworks!

pod 'nimbbl_mobile_kit_ios_core_api_sdk', '~> 1.0.0'

Then run:

pod install

Note: For production apps, you should handle code signing according to your app's requirements.

Swift Package Manager

Add the following dependency to your Package.swift:

dependencies: [
    .package(url: "https://github.com/nimbbl/nimbbl-ios-sdk.git", from: "1.0.0")
]

Quick Start

Import the SDK

import nimbbl_mobile_kit_ios_core_api_sdk

Initialize the SDK

let sdk = NimbblCoreApiSDK.shared

Update Order Details

sdk.updateOrderDetails(
    token: "your_order_token",
    orderId: "order_123",
    callbackMode: "webhook",
    referrerPlatform: "ios",
    referrerPlatformVersion: "1.0.0"
) { result in
    switch result {
    case .success(let response):
        print("Order updated successfully: \(response)")
    case .failure(let error):
        print("Error updating order: \(error)")
    }
}

Get Transaction Enquiry

sdk.getTransactionEnquiry(
    token: "your_order_token",
    orderId: "order_123",
    invoiceId: "invoice_456",
    transactionId: "txn_789"
) { result in
    switch result {
    case .success(let response):
        print("Transaction status: \(response)")
    case .failure(let error):
        print("Error getting transaction: \(error)")
    }
}

Update Checkout Cancel Reason

sdk.updateCheckOutCancelReason(
    token: "your_order_token",
    orderId: "order_123",
    cancelReason: "User cancelled"
) { result in
    switch result {
    case .success(let data):
        print("Cancel reason updated successfully")
    case .failure(let error):
        print("Error updating cancel reason: \(error)")
    }
}

API Reference

NimbblCoreApiSDK

The main SDK class that provides all core API functionality.

Methods

  • updateOrderDetails(token:orderId:callbackMode:referrerPlatform:referrerPlatformVersion:completion:) - Update order details
  • getTransactionEnquiry(token:orderId:invoiceId:transactionId:completion:) - Get transaction enquiry
  • updateCheckOutCancelReason(token:orderId:cancelReason:completion:) - Update checkout cancel reason

Response Models

  • OrderResponse - Response model for order operations
  • TransactionEnquiryResponse - Response model for transaction enquiries
  • CheckoutDetailResponse - Response model for checkout details

Error Handling

The SDK uses Swift's Result type for error handling. All completion handlers return either a success value or an error.

switch result {
case .success(let response):
    // Handle success
case .failure(let error):
    // Handle error
    print("Error: \(error.localizedDescription)")
}

Logging

The SDK includes comprehensive logging capabilities. Log levels can be controlled through the LogUtil class.

License

This SDK is licensed under the MIT License. See the LICENSE file for details.

Support

For support and questions, please contact:

Changelog

Version 1.0.0

  • Initial release
  • Core API functionality
  • Order management
  • Transaction enquiry
  • UPI app detection
  • Event logging