Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redeem promo code in App Store #419

Closed
zsong opened this issue Nov 2, 2018 · 2 comments
Closed

Redeem promo code in App Store #419

zsong opened this issue Nov 2, 2018 · 2 comments

Comments

@zsong
Copy link

zsong commented Nov 2, 2018

I am adding the capability to my app for supporting promo code redemption of the in-app purchase of consumable products.

If I use just this code, when I hit the URL in Safari, the app pops twice asking the credentials. However it considers the 2nd time as a duplication.

SwiftyStoreKit.shouldAddStorePaymentHandler = { payment, product in
    SwiftyStoreKit.purchaseProduct(product as! SKProduct, quantity: 1, atomically: true){ result in
        //
    }
    return true
}

If I do

SwiftyStoreKit.shouldAddStorePaymentHandler = { payment, product in
    return true
}

Then it pops up the credentials just once, but nothing will be deposited.

@zsong zsong closed this as completed Nov 15, 2018
@isayeter
Copy link

why you didn't explained why you closed your issue, can you please share your solution? @zsong I'm also have some questions about this method, for example should we try to fetch Bundle.main.appStoreReceiptURL in this method and post it to backend? or just return true. If I'm using just only return true, how we handle to send receipt to server?

@isayeter
Copy link

Ok I found an explanation here: #240 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants