Objective C-Non-Seamless
Using SDK’s Inbuilt UI
Before proceeding further, make sure you have read this document
To integrate with iOS SDK,download latest sample app from github using link : https://github.com/payu-intrepos/iOS-SDK-Sample-App/releases/
Prerequisites
Add
libz.tbd
libraries into your project (Project->Build Phases->Link Binary With Libraries)Add
-ObjC
and$(OTHER_LDFLAGS)
in Other Linker Flags in Project Build Settings(Project->Build Settings->Other Linker Flags)To run the app on iOS9, please add the below code in info.plist
Integration steps
Drag and drop PayU folder into your App.
In AppDelegate.h add the below property
@property (weak, nonatomic) UIViewController *paymentOptionVC;
Now come to checkout view controller of your app from where you want to start payment process.
Import the following file
On the Pay button set the paymentparam as below:
Now call getPayUPaymentRelatedDetailForMobileSDK:paymentParam method of PayUWebServiceResponse class to get the payment related details:
Once the payment gets success, fails, cancel or any stored card gets deleted SDKUI fires notification to any registered observers. Add observer as below:
Now PayUSDK is integrated.
Note: Please calculate all the hashes and assign tostrEmail paymentOptionsVC.allHashDict.Please refer this for calculating hash.Hashes are provided to
“paymentOptionsVC.allHashDict”
in Key-Value Pair as below:
Last updated