mattt/CargoBay

verifyTransactionReceipt:password:success:failure Always calls failure.

AndyIbanez opened this issue · 5 comments

I'm not sure if doing anything wrong or something, but this code always executes the failure block:

        NSData *receData = [NSData dataWithContentsOfURL:[[NSBundle mainBundle] appStoreReceiptURL]];
        NSLog(@"%@", receData);
        [[CargoBay sharedManager] verifyTransactionReceipt:receData
                                                  password:nil
                                                   success:^(NSDictionary *responseObject) {
                                                       NSLog(@"Yam %@", responseObject);
                                                   }
                                                   failure:^(NSError *error) {
                                                       NSLog(@"error %@", error.localizedDescription);
                                                   }];

The NSLog there does print a lot of data, so I can confirm that the receipt is not nil.

I have tried to do this as well, and no luck:

[receData base64EncodedDataWithOptions:0]

I need to state that my receipt is refreshed as soon as my app launches, so I always have an updated receipt.

I would appreciate more documentation on the matter. Couldn't find the proper way to load the receipt on the examples.

@AndyIbanez @mattt I also have this issue. Any updates on how to solve it?

Fixed by reverting in #57. Sorry for the delay and inconvenience.

I’m a little green with iOS development, so please forgive me if I’m missing something here.

Like AndyIbanez, I’m using verifyTransactionReceipt with data from appStoreReceiptURL, but it always fails with error code 3480, much like #55.

So it’s unclear to me whether this issue is resolved or not. I’m definitely using the latest version of CargoBay.

I'm still seeing this error when I use verifyTransactionReceipt like @sgwilym. My project is iOS 7 and above. Is CargoBay unable to verify the receipt that is located at appStoreReceiptURL?