1.将allpaysdk/WXModule文件夹下的文件add到项目中
2.Set Always embed swift standard libraries to YES from project build settings
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES
3.To simply disable ATS, you can follow this steps by open Info.plist, and add the following lines:
<key>NSAppTransportSecurity</key>
<dict> <key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
请求报文
序号 | 名称 | 长度 | 类型 | 参数名称 | 备注 |
---|---|---|---|---|---|
1 | 姓名 | 32 | 文本 | trxn_firstname | This is name of the customer who is doing the transaction. |
2 | 邮箱 | 40 | 文本 | trxn_email_id | this is email id of the customer who is doing transaction. |
3 | 电话 | 20 | 文本 | trxn_phone | Phone number of the customer. |
4 | 优惠券选项 | 1 | 文本 | trxn_is_coupon_enabled | If the value is 0 then customer will not be able to see the coupons. If the value is 1 then customer will be able see the coupons and able to select the coupons |
5 | 客户id | 10 | 文本 | unique_id | This is customer’s unique id.不能超过10位 |
Security.framework
CoreTelephony.framework
SystemConfiguration.framework
libc++.tbd
libz.tbd
libsqlite3.tbd
<key>LSApplicationQueriesSchemes</key>
<array>
<string>weixin</string>
</array>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
请求报文
Parameter | Type | Required | Description | Sample |
---|---|---|---|---|
timeout | String(10) | O | The default is 12h. Please contact Alipay Technical Support if you need to use other values. Max value is 15d. This parameter controls the valid time from login to completion. | 5m 10m 15m 30m 1h 2h 3h 5h 10h 12h 1d. |
libc++.tbd
libz.tbd
SystemConfiguration.framework
CoreTelephony.framework
QuartzCore.framework
CoreText.framework
CoreGraphics.framework
CFNetwork.framework
CoreMotion. .framework
将allpaysdk/UPModule文件夹下的文件add到项目中
导入下面框架和链接库
CFNetwork.framework
SystemConfiguration.framework
libz.tbd
在工程info.plist设置中添加一个URL Types回调协议,用于在支付完成后返回商户客户端。请注意URL Schemes需要是唯一的,。 设置的Scheme的值要和支付接口中参数scheme的值相同。
需要在工程对应的plist文件中,添加LSApplicationQueriesSchemes Array并加入uppaysdk、uppaywallet、uppayx1、uppayx2、uppayx3五个item
<key>LSApplicationQueriesSchemes</key>
<array>
<string>uppaysdk</string>
<string>uppaywallet</string>
<string>uppayx1</string>
<string>uppayx2</string>
<string>uppayx3</string>
</array>
在测试环境测试时,需要在工程对应的plist文件中添加NSAppTransportSecurity Dictionary 并同时设置里面NSAllowsArbitraryLoads 属性值为 YES,发生产环境可删除此设置。向Apple发布正式版本时请删除此设置。
//判读方法为:
if([PKPaymentAuthorizationViewController canMakePaymentsUsingNetworks:@[PKPaymentNetworkChinaUnionPay]] )
{
// app 展示 apple pay 支付图标
}