问题描述
在我的项目中,我需要实现支付网关,以便我尝试通过 Authorize.Net iOS SDK 实现.
In my project i need to implement payment gateway so that i tried to implement through Authorize.Net iOS SDK .
通过谷歌搜索,我遵循了如下的一些步骤
By googling i have followed some steps as in below
1) 从 https://developer.authorize.net/下载 Authorize.Net iOS SDK集成/十五分钟/ios/
2) 转到 MyProject -> 目标 -> 构建设置.
2) Goto MyProject -> Targets -> Build Settings.
1.标题搜索路径:
${SDK_DIR}/usr/include/libxml2
${SDK_DIR}/usr/include/libxml2
将递归复选框标记为选中
Mark the Recursive checkbox as checked
$(SRCROOT)/anet_ios_sdk-1.1.1/ANMobilePaymentLib
$(SRCROOT)/anet_ios_sdk-1.1.1/ANMobilePaymentLib
图书馆搜索路径:$(SRCROOT)/anet_ios_sdk-1.1.1/ANMobilePaymentLib
Library Search Paths :$(SRCROOT)/anet_ios_sdk-1.1.1/ANMobilePaymentLib
其他链接器标志:-lxml2
3) 导入的 SystemConfiguration.framework
3) Imported SystemConfiguration.framework
4) 导入 libxml2.2.dylib 和 libxml2dylib
4) Imported libxml2.2.dylib and libxml2dylib
3) 将 ANMobilePaymentLib.xcodeproj 文件从 Authorize.Net SDK 文件夹中拖放到 MyProject 下的 Xcode 中.
3) Drag and drop the ANMobilePaymentLib.xcodeproj file from Authorize.Net SDK folder into Xcode under MyProject.
错误:(编译时)
未找到MobileDeviceLoginRequest.h"文件
'MobileDeviceLoginRequest.h' file not found
//这里我无法访问头文件夹
// Here i can't access the header folder
4 ) 所以我试图像框架一样将 sdk 添加到我的项目中,然后我得到了不同的错误
4 ) So that i have tried to add the sdk into my project like a framework , then i got different error
错误:(编译时)
ld:警告:找不到选项-L/Users/sathish/Documents/CompanyApps/TestApps/PaymentGateway/anet_ios_sdk-1.1.1/ANMobilePaymentLib"的目录
ld: warning: directory not found for option '-L/Users/sathish/Documents/CompanyApps/TestApps/PaymentGateway/anet_ios_sdk-1.1.1/ANMobilePaymentLib'
//这里我在 Authorize.Net iOS SDK 中找不到 ANMobilePaymentLib 以及在哪里可以下载 LibANMobilePaymentLib.a
// Here i can't find the ANMobilePaymentLib in Authorize.Net iOS SDK and where i can download LibANMobilePaymentLib.a
请指导我解决这个问题.
pls guide me to resolve this issue.
推荐答案
我已经创建了这个示例项目,您可以从以下链接下载:https://github.com/sibahota059/AuthorizeNetPaymentTest/tree/master.本示例只能编译运行,没有任何错误.您需要将您的代码添加到其他内容中.
I have created this sample project, you can download from below link : https://github.com/sibahota059/AuthorizeNetPaymentTest/tree/master. This sample only can be compiled and run without any error. you need to add your code to other stuffs.
对于 Swift,请遵循 this SDK
For Swift, follow this SDK
这篇关于如何在 iOS 中实现 Authorize.Net SDK的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!