2

Beeblex を使用してアプリ内購入の検証に成功した人はいますか? アプリ内購入が有効で機能しているアプリストアで既に公開されているアプリがあります。アプリ内購入に関する最近のハッキング ニュースに照らして、購入を検証するために Beeblex を使用するように更新しようとしています。問題は、Beeblex が常に、Apple が購入が無効であると主張しているという結果を返すことです。ここにいる誰かが Beeblex をうまく使って、実用的な例を投稿できることを願っています。私は彼らのアドバイスに従い、購入を完全に完了させてから検証します。私は基本的に彼らのウェブサイトからコードを切り取って貼り付けただけなので、何が違うのかわかりません.

- (void) validatePurchaseOrRestore

{

//The transaction has been reported as complete for a new purchase of the upgrade.  I now make use of Beeblex
//to verify the receipt to ensure the purchase is legit.
if (![BBXIAPTransaction canValidateTransactions])
{
    transactionResult = 4;
    return; // There is no connectivity to reach the server.
    // You should try the validation at a later date.
}

BBXIAPTransaction *bbxTransaction = [[BBXIAPTransaction alloc] initWithTransaction:transactionCopy];
bbxTransaction.useSandbox;

[bbxTransaction validateWithCompletionBlock:^(NSError *error)
 {
     if (bbxTransaction.transactionVerified)
     {
         if (bbxTransaction.transactionIsDuplicate)
         {

             // The transaction is valid, but duplicate - it has already been
             // sent to Beeblex in the past.
             transactionResult = 1;

         }
         else
         {
             // The transaction has been successfully validated
             // and is unique.

             NSLog(@"Transaction data: %@", bbxTransaction.validatedTransactionData);
             transactionResult = 0;
         }
     }
     else
     {
         // Check whether this is a validation error, or if something
         // went wrong with Beeblex.

         if (bbxTransaction.hasServerError)
         {                 
             // The error was not caused by a problem with the data, but is
             // most likely due to some transient networking issues.
             transactionResult = 4;
         }
         else
         {                 
             // The transaction supplied to the validation service was not valid according to Apple.
             transactionResult = 3;
             purchaseDidFail = TRUE;
         }    
     }
 }];

}

4

0 に答える 0