I make a request using
[an purchaseWithRequest:request];
following the code in the SDK example. When it returns it gives me a success message but goes in the
- (void) requestFailed:(AuthNetResponse *)response
delegate callback method. I went up the stack trace and saw that in AuthNet.m file in
- (void) processResponseData:(NSData *)theResponse method transactionResponse has nil values including nil for responseCode and hence it calls the requestFailed callback.
This is the XML data it gets back in response:
GDataXMLElement 0xa66d5a0: {type:1 name:mobileDeviceLoginResponse xml:"
<mobileDeviceLoginResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
<messages>
<resultCode>Ok</resultCode>
<message><code>I00001</code>
<text>Successful.</text>
</message>
</messages>
<sessionToken>Gdy$M1476PS09dch_Jz7v9eIdC8kqZIbbsijaIJVbHWFLYeiDFpTfrHR_oI41rD3dJvnigH7EQduleRviTg_2w8TJrhlalK0ykv4MJyBlfTidLEEJplSPs1SuX$mh2Ns1UbinP6A3sqHiY5dg9oTqgAA</sessionToken>
<merchantContact>
<merchantName>Rahul Thathoo</merchantName>
<merchantAddress>1 Main Street</merchantAddress>
<merchantCity>Bellevue</merchantCity>
<merchantState>WA</merchantState>
<merchantZip>98004</merchantZip>
<merchantPhone>425-555-1212</merchantPhone>
</merchantContact>
<userPermissions>
<permission>
<permissionName>Submit_Charge</permissionName>
</permission>
<permission>
<permissionName>Submit_Refund</permissionName>
</permission>
<permission>
<permissionName>Submit_Update</permissionName>
</permission>
<permission>
<permissionName>Mobile_Admin</permissionName>
</permission>
</userPermissions>
<merchantAccount>
<marketType>0</marketType>
<deviceType>7</deviceType>
</merchantAccount>
</mobileDeviceLoginResponse>
"}
Is there an issue in the backend of Authorize.Net cause I downloaded the SDK yesterday. It is version 1.1.1
Any help is welcome as I have a strict deadline to get this working. Below is the request I am making. Could it be because of AUTH_ONLY?
CreateTransactionRequest *request = [CreateTransactionRequestcreateTransactionRequest];
request.transactionRequest = requestType;
request.transactionType = AUTH_ONLY;
request.anetApiRequest.merchantAuthentication.mobileDeviceId = [[UIDevicecurrentDevice] identifierForVendor].UUIDString;
request.anetApiRequest.merchantAuthentication.sessionToken = self.sessionToken;
[an purchaseWithRequest:request];
08-27-2013
03:01 PM
- last edited on
08-27-2013
07:01 PM
by
RichardH
First of all I am NOT a iOS developer,
but the response you post is from the mobileDeviceLoginRequest and not from the CreateTransactionRequest
08-27-2013 04:23 PM
This is the response I get from CreateTransactionRequest in TEST environment. I get a session token in the mobileDeviceLoginRequest. Is there a bug in the SDK then?
08-27-2013 05:33 PM
Issue is that sessionToken was returned after I made the request for transaction. So it is synchornous and we have to wait until we have the session set and then make the purchase transaction.
08-27-2013 08:52 PM