iOS Application SDK Implementation

Support iOS 9 or above

Add OTTPaySDK.framework to your project

In build settings add $(PROJECT_DIR)/OTTPaySDK.framework/Headers

Register SDK in AppDelegate and set URL type

Note: shopID is optional for future use



Register in AppDelegate to monitor payment callback



#ifdef IOS9
- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<NSString*, id> *)options{
[OTTPaySDK application:application handleOpenURL:url];
return YES;
}
#else
-(BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString
*)sourceApplication annotation:(id)annotation{
[OTTPaySDK application:application openURL:url sourceApplication:sourceApplication annotation:annotation];
return YES;
}
#endif

Call OTTPAY payment API



NOTE:

  1. All currency units of measurement in the API are CENT. For example, CAD 1.00 will be represented as “100” when passed into the API.

  2. AlipaySDK connects to the SDK. If you need to use the AlipaySDK port, you can use it directly without repeated import.

  3. Return code and return messages:

code msg
9000 Order paid successfully
8000 are being processed
4000 Order payment failed
6001 User canceled midway
6002 Network connection error

Here is the SDK download for the iOS app