接上一篇笔记
请求付款 Requesting Payment
当用户点击购买按钮以后,会向App Store发起一个购买操作。下图是Apple文档中的示意图(图中橙色部分):
Requesting Payment
第一步: 创建Payment Request
SKProduct *product = <# Product returned by a products request #>;
SKMutablePayment *payment = [SKMutablePayment paymentWithProduct:product];
payment.quantity = 2; //数量
第二步: 提交Payment Request
[[SKPaymentQueue defaultQueue] addPayment:payment];
网友评论