title: In-App Purchase Not Working
body: <p>I'm trying to add in-app purchase to my app.
  my code is the same as here - <a href="https://github.com/ivanacostarubio/swift-in-app-purchase-example/blob/master/In%20App%20Purchase%20Example/ViewController.swift" rel="nofollow">https://github.com/ivanacostarubio/swift-in-app-purchase-example/blob/master/In%20App%20Purchase%20Example/ViewController.swift</a></p>
  
  <p>The problem is here, the SKPaymentTransaction always fail - </p>
  
  <pre><code>func paymentQueue(queue: SKPaymentQueue, updatedTransactions transactions: [SKPaymentTransaction]!)    {
      for transaction:AnyObject in transactions {
          if let trans:SKPaymentTransaction = transaction as? SKPaymentTransaction{
              switch trans.transactionState {
              case .Purchased:
                  println("Product Purchased");
                  SKPaymentQueue.defaultQueue().finishTransaction(transaction as SKPaymentTransaction)
                  break;
              case .Failed:
                  //*ALWAYS FAIL*
                  println("Purchased Failed");
                  SKPaymentQueue.defaultQueue().finishTransaction(transaction as SKPaymentTransaction)
                  break;
                  // case .Restored:
                  //[self restoreTransaction:transaction];
              default:
                  break;
              }
          }
      }
  }
  </code></pre>
  
  <p>Why is this happening and how can I fix it?</p>