接上一篇筆記
請(qǐng)求付款 Requesting Payment
當(dāng)用戶(hù)點(diǎn)擊購(gòu)買(mǎi)按鈕以后,會(huì)向App Store發(fā)起一個(gè)購(gòu)買(mǎi)操作星压。下圖是Apple文檔中的示意圖(圖中橙色部分):
![Requesting Payment](https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/StoreKitGuide/Art/requesting_payment_2x.png)
Requesting Payment
第一步: 創(chuàng)建Payment Request
SKProduct *product = <# Product returned by a products request #>;
SKMutablePayment *payment = [SKMutablePayment paymentWithProduct:product];
payment.quantity = 2; //數(shù)量
第二步: 提交Payment Request
[[SKPaymentQueue defaultQueue] addPayment:payment];