#open-iOS V 3.1.2
####Migration from 3.0.x to 3.1.x
============ ###SDK Installation Prerequisites
- Xcode 6 or higher.
###Citrus PG Prerequisites
- You need to enroll with Citrus as a merchant.
- You need to host Bill generator on your server
- You need to host Return Url Page on your server. (After the transaction is complete, Citrus posts a response to this URL.)
- Make sure that you have obtained following parameters from your Citrus admin panel
- Merchant Secret Key
- Merchant Access Key
- SignIn Key
- SignIn Secret
- SignUp Key
- SignUp Secret
Note: Please DO NOT PROCEED if the above mentioned requirements have not been met.
###Features Citrus iOS SDK broadly offers following features.
- Prepaid Payments.
- Direct credit/debit card (CC, DC) or netbanking payments (NB) .
- Saving Credit/Debit cards into user's account for easier future payments by abiding The Payment Card Industry Data Security Standard (PCI DSS).
- Loading Money into users Citrus prepaid account for Prepaid facility .
- Withdraw the money back into User's bank account from the Prepaid account .
- Creating Citrus account for the user .
Get the latest source code from github.com:
$ git clone https://github.com/citruspay/open-ios.git
To integrate the SDK you just have to drag drop folder CitrusDevKit/ into your project as groups, import CitrusSdk.h and populate the macros in MerchantConstants.h with the parameters you obatained from your Citrus admin panel
import "CitrusSdk.h"
SDK operates in two different modes Sandbox and Production mode. for both the enviroments Citrus PG Prerequisites key sets are different. keys from one enviroment won't work on other. so please make sure you are using correct set of keys. During the developement you would always want to use the Sandbox mode. once you are done with your App development you can switch to production mode .
you need to use [CitrusPaymentSDK initializeWithKeyStore: environment:]
to initialize the SDK
Sandbox:
[CitrusPaymentSDK initializeWithKeyStore:keyStore environment:CTSEnvSandbox];
Production:
[CitrusPaymentSDK initializeWithKeyStore:keyStore environment:CTSEnvProduction];
####How to configure KeyStore Object As you must have noticed the SDK initialization requires you to pass the Keystore object please see below how to configure it.
CTSKeyStore *keyStore = [[CTSKeyStore alloc] init];
keyStore.signinId = @"test-signin";
keyStore.signinSecret = @"52f7e15efd4208cf5345dd554443fd99";
keyStore.signUpId = @"test-signup";
keyStore.signUpSecret = @"c78ec84e389814a05d3ae46546d16d2e";
keyStore.vanity = @"testing";
Only after you are done with initialization you can proceed with following guide
The SDK is logically divided into 3 modules/layers or interfacing classes
- CTSAuthLayer - handles all of the user creation related tasks .
- CTSProfileLayer - handles all of the user profile related tasks .
- CTSPaymentLayer - handles all of the payment related tasks .
To use any of the above layers your need to fetch their singlton instance from CitrusPaymentSDK's class methods,
// initialization in your .m file
CTSPaymentLayer *paymentLayer = [CitrusPaymentSDK fetchSharedPaymentLayer];
Following are the specific tasks related to each of the layer
#Important Update for iOS 9 #Please See it here
#####User Management
- See if anyone is logged in
- Bind User (doens't need password, enables user to save cards)
- Creating & Linking the User (creates account with password, required for all prepaid related operations)
- Signin the user for Prepaid level access
- Reset User Password
- Sign Out
#####Card Management
#####Wallet Management & Payment
- Get User's Prepaid Balance
- Save Cashout Bank Account
- Get Saved Cashout Bank Acoount
- Loading Money into Users Citrus Prepaid Account
- Paying via Prepaid account
- Initiate Cashout Proccess into users Account from Citrus prepaid account
- Send Money to another Citrus User
#####Doing direct payments
#####Dynamic Pricing Offer Coupons and Surcharge
#####Others
===== ####Common Integration Issues