I am adding a subscription offer to my existing in-app purchase. So I get the encoded signature, nonce, timestamp and key identifier from our server. I create a SKPaymentDiscount object and setting this to paymentDiscount of SKMutablePayment object.
It showed me the expected offer price and actual price screen with password field. After I confirmed the subscription with password it takes me to the popup "Unable to purchase contact the development for more information." with an Ok button. Next after I tap the button it shows another alert Failed Cannot connect to iTunes Store.
I got the signature from following this tutorial using python. Generating a Signature for Subscription Offers - Xcode - Swift
- (void)buyProduct:(SKProduct*)product offer:(SKPaymentDiscount*)promotionalOffer
{
SKMutablePayment* payment = [ SKMutablePayment paymentWithProduct:product ];
payment.paymentDiscount = promotionalOffer;
[ [ SKPaymentQueue defaultQueue ] addPayment:payment ];
}
I want the subscription to be purchased successfully.