Reply
Highlighted
Member
Posts: 2
Registered: ‎09-24-2013

iPhone SDK Issue

[ Edited ]

I'm creating an iOS app using auth.net SDK but can't seem to get it to work. Can you someone please help me or direct me in the right way?

 

README = https://docs.google.com/file/d/0B-r8xXsB9_n0ZUZaY3NmMmktYU0/edit?usp=sharing

 

Step-1 Device Register- Sucess
Step-2 Login- Sucess

Step-3-Payment- unsuccessfully


InPut-

=================

#define API_LOGIN_ID @"6XqC5f7x"

#define TRANSACTION_KEY @"7X69ew83UK5h4Kw7

"


#define USERNAME @"taxiRates2013"

#define PASSWORD @"Rates2013"


AuthNet *an = [AuthNet getInstance];

 

[an setDelegate:self];

 

CreditCardType *creditCardType = [CreditCardType creditCardType];

creditCardType.cardNumber = @"5424000000000015";

creditCardType.cardCode = @"123";

creditCardType.expirationDate = @"0511";

 

PaymentType *paymentType = [PaymentType paymentType];

paymentType.creditCard = creditCardType;

 

ExtendedAmountType *extendedAmountTypeTax = [ExtendedAmountType extendedAmountType];

extendedAmountTypeTax.amount = @"0";

extendedAmountTypeTax.name = @"Tax";

 

ExtendedAmountType *extendedAmountTypeShipping = [ExtendedAmountType extendedAmountType];

extendedAmountTypeShipping.amount = @"0";

extendedAmountTypeShipping.name = @"Shipping";

 

LineItemType *lineItem = [LineItemType lineItem];

lineItem.itemName = @"Soda";

lineItem.itemDescription = @"Soda";

lineItem.itemQuantity = @"1";

lineItem.itemPrice = @"1.00";

lineItem.itemID = @"1";

 

TransactionRequestType *requestType = [TransactionRequestType transactionRequest];

requestType.lineItems = [NSArray arrayWithObject:lineItem];

requestType.amount = @"1.00";

requestType.payment = paymentType;

requestType.tax = extendedAmountTypeTax;

requestType.shipping = extendedAmountTypeShipping;

 

CreateTransactionRequest *request = [CreateTransactionRequest createTransactionRequest];

request.transactionRequest = requestType;

request.transactionType = AUTH_ONLY;

request.anetApiRequest.merchantAuthentication.mobileDeviceId =

[[[UIDevice currentDevice] uniqueIdentifier]

stringByReplacingOccurrencesOfString:@"-" withString:@"_"];

request.anetApiRequest.merchantAuthentication.sessionToken = sessionToken;

[an purchaseWithRequest:request];

1 Out Put-

createTransactionResponse>

namespace warning : xmlns: URI AnetApi/xml/v1/schema/AnetApiSchema.xsd is not absolute

ttp://www.w3.org/2001/XMLSchema" xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd"

Message.code = E00059\nMessage.text = The authentication type is not allowed for this method call.\nMessage.description = (null)\n"
2 Output-
namespace warning : xmlns: URI AnetApi/xml/v1/schema/AnetApiSchema.xsd is not absolute
ttp://www.w3.org/2001/XMLSchema" xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd"
"Message.code = E00027\nMessage.text = The transaction was unsuccessful.\nMessage.description = (null)\n"

Highlighted
Member
Posts: 2
Registered: ‎09-24-2013

Re: iPhone SDK Issue

[AuthNet authNetWithAPILoginID:@"YOUR_LOGIN_ID" andTransactionKey: @"YOUR_TRANSACTION_KEY" forEnvironment:ENV_TEST];

 

This method is not available in the updated SDK

Highlighted
Member
Posts: 2
Registered: ‎05-26-2014

Re: iPhone SDK Issue

Could any of you find the solution to this problem?

Highlighted
Member
Posts: 1
Registered: ‎06-09-2014

Re: iPhone SDK Issue

I am facing the same problem, please provide a solution for it.

Highlighted
Posts: 2,765
Topics: 57
Kudos: 248
Blog Posts: 67
Registered: ‎12-05-2011

Re: iPhone SDK Issue

Have you tried using our recently updated iOS SDK from GitHub?  https://github.com/AuthorizeNet/sdk-mpos-ios

 

Richard