Payment Web API
  • Payment API Solutions Map
  • API Common Specifications
  • Payment Status Query API (Common)
  • Refund & Refund Query API (Common)
  • Query Exchange Rate API (Common)
  • Payment Process Flow with Mobile App (Common)
  • API for PC Browser with Wechat Pay/Alipay/UnionPay
    • Payment Request with WeChat Pay
    • Payment Request with Alipay
    • Payment Request with UnionPay-SecurePay
      • Query Transaction with UnionPay-SecurePay
  • API for WeChat Browser with WeChat Pay
    • Payment Request API
    • Query Transaction with WeChat Pay
  • API for WeChat Mini-Program with WeChat Pay
    • Payment Request API
    • Query Transaction API
  • API for Mobile Browser with Alipay
    • Payment Request API
    • Query Transaction API
  • API for Mobile Browser with WeChat
    • Payment Request API
    • Query Transaction API
  • API for Mobile with UnionPay-SecurePay
    • Payment Request API
    • Query Transaction API
    • Code Samples(Web App, Android, iOS)
  • API for Mobile App with WeChat Pay
    • Payment Request API
    • Query Transaction API
  • API for Mobile App with Alipay
    • Payment Request with OTT Pay SDK
    • Implementation with Android App SDK
    • Implementation with iOS App SDK
  • API for In-Store Channels(via Merchant POS/Terminal)
    • API Process Flows
    • Payment Request API
    • Query Transaction API
  • API for Elavon Converge-Hosted payment
    • Payment Request API
    • Query Transaction API
  • API for Global payments PORTICO Ecomm Payment
    • Payment Request API
    • Query Transaction API
  • API for Checkout payment
    • Payment Request API
    • Query Transaction API
  • Appendix A (Data Encryption / Decryption)
  • Appendix B (Response Code)
  • FAQ
  • > Back to Top Page
Powered by GitBook
On this page

Was this helpful?

  1. API for Mobile App with Alipay

Implementation with iOS App SDK

Support for iOS 9 or above

PreviousImplementation with Android App SDKNextAPI for In-Store Channels(via Merchant POS/Terminal)

Last updated 5 years ago

Was this helpful?

Add OTTPaySDK.framework into your Project

In the Link Binary With Libraries on the Build Phases tab, add the following dependency

#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

NOTE:

1. All the monetary measurement unit in API is CENT. For example, one dollar will be expressed as 100, when it is passed into API.

2. The AlipaySDK is connected to the sdk. If you need to use the AlipaySDK interface, you can use it directly without having to import it repeatedly.

3. Error message with error code:

code msg
9000 订单支付成功
8000 正在处理中
4000 订单支付失败
6001 用户中途取消
6002 网络连接出错

Add $(PROJECT_DIR)/OTTPaySDK.framework/Headers in Build Settings

Register sdk in AppDelegate to set URL Types

Note: shopID is optional for future usage

Registration in AppDelegate implements to listen for payment callbacks

Call OTTPAY payment API

Here is the sdk for iOS App for download

☑️
☑️
👉
☑️
☑️
👉
☑️
☑️
10MB
ios-sdk-ottalipay_release.zip
archive