本文介绍了如何在iOS中实现Authorize.Net SDK的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的项目中,我需要实现支付网关,以便尝试通过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)从Authorize.Net SDK文件夹中将ANMobilePaymentLib.xcodeproj文件拖放到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

请引导我解决此问题.

推荐答案

我创建了此示例项目,则可以从以下链接下载: 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,请遵循 SDK

For Swift, follow this SDK

这篇关于如何在iOS中实现Authorize.Net SDK的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-27 11:36