ios - 如何在iOS中实现Authorize.Net SDK

标签 ios payment-gateway authorize.net

在我的项目中,我需要实现支付网关,因此我尝试通过 Authorize.Net iOS SDK 来实现。

通过谷歌搜索,我遵循了如下所示的一些步骤

1)从https://developer.authorize.net/integration/fifteenminutes/ios/下载Authorize.Net iOS SDK

2) 转到我的项目 -> 目标 -> build设置。

1.标题搜索路径:

${SDK_DIR}/usr/include/libxml2

将“递归”复选框标记为选中

$(SRCROOT)/anet_ios_sdk-1.1.1/ANMobilePaymentLib

库搜索路径: $(SRCROOT)/anet_ios_sdk-1.1.1/ANMobilePaymentLib

其他链接器标志: -lxml2

3) 导入SystemConfiguration.framework

4) 导入libxml2.2.dylib和libxml2dylib

3) 将 ANMobilePaymentLib.xcodeproj 文件从 Authorize.Net SDK 文件夹拖放到 MyProject 下的 Xcode 中。

错误:(编译时)

找不到“MobileDeviceLoginRequest.h”文件

//这里我无法访问头文件夹

4)所以我尝试将sdk像框架一样添加到我的项目中,然后我得到了不同的错误

错误:(编译时)

ld:警告:找不到选项“-L/Users/sathish/Documents/CompanyApps/TestApps/PaymentGateway/anet_ios_sdk-1.1.1/ANMobilePaymentLib”的目录

//这里我在 Authorize.Net iOS SDK 中找不到 ANMobilePaymentLib 以及在哪里可以下载 LibANMobilePaymentLib.a

请指导我解决这个问题。

最佳答案

我创建了this sample project ,您可以从以下链接下载:https://github.com/sibahota059/AuthorizeNetPaymentTest/tree/master 。该示例只能编译运行,没有任何错误。您需要将代码添加到其他内容中。

对于 Swift,请关注 this SDK

关于ios - 如何在iOS中实现Authorize.Net SDK,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19818299/

相关文章:

iphone - iOS:UITableViewCell 类中的按钮调用主 UIViewController 上的方法

php - paypal的 'HKD'方法支持货币 "DoDirectPayment"?

android - 谷歌钱包于 2015 年 3 月 2 日放弃应用内购买

c# - 在 Kentico 中提交 Authorize.Net SIM 表格

ios - swift - 在 collectionview 单元类和 collectionview Controller 之间调用一个函数

ios - 使用 iOS SDK 将多张照片作为单个帖子上传,例如时间轴照片,而不是 Facebook 中的相册

ios - 委托(delegate)如何知道在有多个一致性的地方调用函数

e-commerce - "Gateway error: (TESTMODE) The merchant login ID or password is invalid or the account is inactive.During PlaceOrder Authorised.net in magento"

ruby-on-rails - OpenSSL错误–证书验证失败Authorize.net

transactions - 使用测试帐户在 Authorize.net 上测试退款?