payment.applicationUsername in iOS 7 StoreKit for

2019-05-14 20:31发布

问题:

In the WWDC video "Using Store Kit for In-App Purchases", the speaker describes adding a payment.applicationUsername as a hash of the customer account name.

payment.applicationUsername = hash(customerAccountName);

I cannot find documentation on this anywhere. I don't think the customerAccountName is the same as the GUID, so where would we obtain this information?

回答1:

The "customerAccountName" value, and the hash function can be different from developer to developer. Apple provides a good example of a hash function in the In-App Purchase Programming Guide, in the section entitled Requesting Payment, Detecting Irregular Activity.

https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/StoreKitGuide/Chapters/RequestPayment.html