I am trying to use the store kit. Everything works until i send the data to my 
php script to verify the transaction below is the code that sends to the script 
and then i get this error:
response {"status":21002, "exception":"java.lang.IllegalArgumentException: 
propertyListFromString parsed an object, but there's still more text in the 
string. A plist should contain only one top-level object. Line number: 6, 
column: 2."}

                                NSUserDefaults * settings = [NSUserDefaults 
standardUserDefaults];
                                UIDevice *thisDevice = [UIDevice currentDevice];
                                NSString * udid =thisDevice.uniqueIdentifier;
                                
                                NSURL * url = [NSURL 
URLWithString:@"http://fornextsoft.com/script.php";];
                                
                                NSString *myRequestString = [NSString 
stringWithFormat:@"UDID=%@&transaction=%@",udid,
                                                                                
         [NSString encode:(const uint8_t*)[[item transactionReceipt] bytes]
                                                                                
                           length:[[item transactionReceipt] length]]];
                                
                                NSData *myRequestData = [myRequestString 
dataUsingEncoding:NSUTF8StringEncoding];
                        
                                NSLog(@"Request string: %@",myRequestString);
                                
                                NSMutableURLRequest *request = [ [ 
NSMutableURLRequest alloc ] initWithURL:url];
                                [ request setHTTPMethod: @"POST" ];
                                [ request setHTTPBody: myRequestData ];
                                [request 
setValue:@"application/x-www-form-urlencoded" 
forHTTPHeaderField:@"content-type"];
                                NSURLResponse* urlResponse;
                                NSError* error;
                                NSData* result = [NSURLConnection 
sendSynchronousRequest:request returningResponse:&urlResponse error:&error];
                                
                                NSString * response = [[NSString 
alloc]initWithData:result encoding:NSUTF8StringEncoding];
                                NSLog(@"response %@",response);
                        [[SKPaymentQueue defaultQueue]finishTransaction:item];




_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to