Note that there are some explanatory texts on larger screens.

plurals
  1. POWorking with authorized .net payment gateway in ios
    text
    copied!<p>i am working with authorized .net payement gateway in ios In the following method </p> <pre><code> (void) createTransaction { AuthNet *an = [AuthNet getInstance]; [an setDelegate:self]; CreditCardType *creditCardType = [CreditCardType creditCardType]; creditCardType.cardNumber = @"4111111111111111"; NSLog(@"babul cardNumber is %@",creditCardType.cardNumber); creditCardType.cardCode = @"100"; NSLog(@"babul cardCode is %@",creditCardType.cardCode); creditCardType.expirationDate = @"1212"; NSLog(@"babul expirationDate is %@",creditCardType.expirationDate); 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] uniqueGlobalDeviceIdentifier] stringByReplacingOccurrencesOfString:@"-" withString:@"_"]; request.anetApiRequest.merchantAuthentication.sessionToken = sessionToken; [an purchaseWithRequest:request]; } </code></pre> <p>i am getting the response as</p> <p>Create Transaction response 2012-07-26 19:14:00.131 Authorized[2355:207] Error<code>E00003</code>The element 'merchantAuthentication' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd' has invalid child element 'mobileDeviceId' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd'. List of possible elements expected: 'name, transactionKey, sessionToken, password' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd'. 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" ^ 2012-07-26 19:14:00.131 Authorized[2355:207] Error = (null) 2012-07-26 19:14:00.247 Authorized[2355:207] babul output is Message.code = E00003 Message.text = The element 'merchantAuthentication' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd' has invalid child element 'mobileDeviceId' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd'. List of possible elements expected: 'name, transactionKey, sessionToken, password' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd'.</p> <p>Is there any alternative to the above problem and how the transactions are going to be stored in authorized .net (i created my test account, i am giving those credentials, i approved my device but later i am getting the above error)</p> <p>Thanks in advance</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload