1
votes

I try to setup an In-App-Purchase (IAP) for my iOS App using the Parse SDK.

  • I enabled IAP in the developer portal for my app.
  • I enabled IAP in my XCode app project settings
  • I created a consumable IAP in iTunes Connect. It says waiting for screenshot and You do not currently have a iOS Paid Apps contract in effect. However this should both not effect sandbox testing.
  • I created a Sandbox account for IAP testing
  • I logged out of my iTunes & Appstore account on my testing device. I did not login to the sandbox account in Settings

This is how I do the IAP in my code:

        PFPurchase.buyProduct("com.domain.MyIdentifier", block: { (error: NSError?) in
            if error != nil {
                print(error?.localizedDescription)
        })

I registered a handler in AppDelegate

    PFPurchase.addObserverForProduct("com.domain.MyIdentifier") { (transaction:SKPaymentTransaction) in
        print("purchased")
    }

It does not prompt for login where I want to put in my sandbox account credentials. I receive kPFErrorPaymentDisabled error from Parse.

What does that mean?

1
What does SKPaymentQueue.canMakePayments() return?Paulw11

1 Answers

1
votes

This error occurs if IAP is disabled via Restrictions in Settings.