func purchase(productID: String)
{
self.showActivityIndicator(withText: "Please Wait...")
if can()
{
DispatchQueue.main.async
{
if let product = self.products[productID]
{
let payment = SKMutablePayment(product: product);
payment.applicationUsername = User.currentUser.id!;
SKPaymentQueue.default().add(payment)
print("PRODUCT TO PURCHASE: \(product.productIdentifier)")
}
}
self.hideActivityIndicator();
}
else
{
showPopupView(APPNAME, subTitle: "You can't make payments", buttonTitle1: "Okay", buttonTitle2: nil, buttonClickedCompletionHandler: nil);
}
}
任何人都可以告诉我如何获得这个payment.applicationUsername
https://sandbox.itunes.apple.com/verifyReceipt
或在哪里可以找到它。
如果有人知道请帮助我,我会留在这里