Class: SKPaymentTransaction

Inherits:
NSObject show all

Overview

The SKPaymentTransaction class defines objects residing in the payment queue. A payment transaction is created whenever a payment is added to the payment queue. Transactions are delivered to your application when the App Store has finished processing the payment. Completed transactions provide a receipt and transaction identifier that your application can use to save a permanent record of the processed payment.

Instance Attribute Summary (collapse)

Method Summary

Methods inherited from NSObject

#!, #!=, #!~, #, #==, #===, #=~, #Rational, #__callee__, #__method__, #__send__, #__type__, `, alloc, allocWithZone:, #autoContentAccessingProxy, autoload, autoload?, autorelease_pool, #awakeAfterUsingCoder:, binding, block_given?, caller, cancelPreviousPerformRequestsWithTarget:, cancelPreviousPerformRequestsWithTarget:selector:object:, catch, class, classFallbacksForKeyedArchiver, #classForCoder, #classForKeyedArchiver, classForKeyedUnarchiver, #clone, conformsToProtocol:, #copy, copyWithZone:, #dealloc, #define_singleton_method, description, display, #doesNotRecognizeSelector:, #dup, #enum_for, #eql?, #equal?, #extend, fail, #finalize, format, #forwardInvocation:, #forwardingTargetForSelector:, framework, #freeze, #frozen?, getpass, gets, global_variables, #init, initialize, #initialize_clone, #initialize_copy, #initialize_dup, #inspect, instanceMethodForSelector:, instanceMethodSignatureForSelector:, #instance_eval, #instance_exec, #instance_of?, #instance_variable_defined?, #instance_variable_get, #instance_variable_set, #instance_variables, instancesRespondToSelector:, isSubclassOfClass:, #is_a?, iterator?, #kind_of?, lambda, load, load_bridge_support_file, load_plist, local_variables, loop, #method, #methodForSelector:, #methodSignatureForSelector:, #methods, #mutableCopy, mutableCopyWithZone:, new, #nil?, open, p, #performSelector:onThread:withObject:waitUntilDone:, #performSelector:onThread:withObject:waitUntilDone:modes:, #performSelector:withObject:afterDelay:, #performSelector:withObject:afterDelay:inModes:, #performSelectorInBackground:withObject:, #performSelectorOnMainThread:withObject:waitUntilDone:, #performSelectorOnMainThread:withObject:waitUntilDone:modes:, print, printf, #private_methods, proc, #protected_methods, #public_method, #public_methods, #public_send, putc, puts, raise, rand, readline, readlines, #replacementObjectForCoder:, #replacementObjectForKeyedArchiver:, require, resolveClassMethod:, resolveInstanceMethod:, #respond_to?, #respond_to_missing?, select, #send, setVersion:, #singleton_methods, sprintf, srand, superclass, #taint, #tainted?, #tap, test, throw, #to_plist, #to_s, trace_var, trap, #trust, #untaint, untrace_var, #untrust, #untrusted?, version

Constructor Details

This class inherits a constructor from NSObject

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class NSObject

Instance Attribute Details

- (Array) downloads (readonly)

An array of download objects representing the downloadable content associated with the transaction. (read-only) The contents of this property are undefined except when transactionState is set to SKPaymentTransactionStatePurchased. The SKDownload objects stored in this property must be used to download the transaction’s content before the transaction is finished. After the transaction is finished, the download objects are no longer queueable.

Returns:

- (NSError) error (readonly)

An object describing the error that occurred while processing the transaction. (read-only) The error property is undefined except when transactionState is set to SKPaymentTransactionStateFailed. Your application can read the error property to determine why the transaction failed.

Returns:

- (SKPaymentTransaction) originalTransaction (readonly)

The transaction that was restored by the App Store. (read-only) The contents of this property are undefined except when transactionState is set to SKPaymentTransactionStateRestored. When a transaction is restored, the current transaction holds a new transaction identifier, receipt, and so on. Your application will read this property to retrieve the restored transaction.

- (SKPayment) payment (readonly)

The payment for the transaction. (read-only) Each payment transaction is created in response to a payment that your application added to the payment queue.

Returns:

- (NSDate) transactionDate (readonly)

The date the transaction was added to the App Store’s payment queue. (read-only) The contents of this property are undefined except when transactionState is set to SKPaymentTransactionStatePurchased or SKPaymentTransactionStateRestored.

Returns:

- (String) transactionIdentifier (readonly)

A string that uniquely identifies a successful payment transaction. (read-only) The contents of this property are undefined except when transactionState is set to SKPaymentTransactionStatePurchased or SKPaymentTransactionStateRestored. The transactionIdentifier is a string that uniquely identifies the processed payment. Your application may wish to record this string as part of an audit trail for App Store purchases. See In-App Purchase Programming Guide for more information.

Returns:

- (NSData) transactionReceipt (readonly)

A signed receipt that records all information about a successful payment transaction. (read-only) The contents of this property are undefined except when transactionState is set to SKPaymentTransactionStatePurchased.The receipt is a signed chunk of data that can be sent to the App Store to verify that the payment was successfully processed. This is most useful when designing a store that server separate from the iPhone to verify that payment was processed. For more information on verifying receipts, see In-App Purchase Programming Guide.

Returns:

- (SKPaymentTransactionState) transactionState (readonly)

The current state of the transaction. (read-only)

Returns:

  • (SKPaymentTransactionState)