PPRetailTransactionContext Class Reference
| Inherits from | PPRetailObject : NSObject |
|---|---|
| Declared in | PPRetailTransactionContext.h |
Overview
The TransactionContext class is returned by RetailSDK.getTransactionManager().createTransaction and allows you to control many aspects of the payment or refund flow and observe events that occur during the flows. Simply creating a TransactionContext will not kick off any behaviors, so that you have a chance to configure the transaction context as you wish (enable on-reader tipping , specify transaction options, etc). When you’re ready to proceed with the payment flow, call beginPayment()
invoice
The invoice being processed for this transaction @readonly
@property (nonatomic, strong, nullable, readonly) PPRetailRetailInvoice *invoiceDiscussion
The invoice being processed for this transaction @readonly
Declared In
PPRetailTransactionContext.h
type
The type of transaction being attempted (defaults to Sale if the invoice is not already paid, Refund if it is already paid)
@property (nonatomic, assign) PPRetailTransactionType typeDiscussion
The type of transaction being attempted (defaults to Sale if the invoice is not already paid, Refund if it is already paid)
Declared In
PPRetailTransactionContext.h
isSignatureRequired
Given the current state of the invoice and transaction, is a signature required to secure payment? @readonly
@property (nonatomic, assign, readonly) BOOL isSignatureRequiredDiscussion
Given the current state of the invoice and transaction, is a signature required to secure payment? @readonly
Declared In
PPRetailTransactionContext.h
digitalCard
Digital Card information
@property (nonatomic, strong, nullable) PPRetailDigitalCard *digitalCardDiscussion
Digital Card information
Declared In
PPRetailTransactionContext.h
orderId
id of the PP order for payment
@property (nonatomic, strong, nullable) NSString *orderIdDiscussion
id of the PP order for payment
Declared In
PPRetailTransactionContext.h
totalDisplayFooter
While building your invoice, the running total will be displayed on PaymentDevices capable of displaying messages. If you set totalDisplayFooter, that will be displayed (centered) after the total amount. Note that once the payment flow starts, EMV certification requires that the display just show the total and iconography corresponding to expected payment types. Your message will not be on that screen.
@property (nonatomic, strong, nullable) NSString *totalDisplayFooterDiscussion
While building your invoice, the running total will be displayed on PaymentDevices capable of displaying messages. If you set totalDisplayFooter, that will be displayed (centered) after the total amount. Note that once the payment flow starts, EMV certification requires that the display just show the total and iconography corresponding to expected payment types. Your message will not be on that screen.
Declared In
PPRetailTransactionContext.h
– getPaymentState
Returns the current state of payment
- (PPRetailPaymentState)getPaymentStateDiscussion
Returns the current state of payment
Declared In
PPRetailTransactionContext.h
– getTippingState
Returns the current state of tipping
- (PPRetailTippingState)getTippingStateDiscussion
Returns the current state of tipping
Declared In
PPRetailTransactionContext.h
– clearOnReaderTip
Clear the on-reader tip that was acquired for this transaction
- (void)clearOnReaderTipDiscussion
Clear the on-reader tip that was acquired for this transaction
Declared In
PPRetailTransactionContext.h
– beginPayment:
Begin the payment flow (activate payment devices, listen for relevant events from devices)
- (PPRetailTransactionContext *_Nullable)beginPayment:(PPRetailTransactionBeginOptions *_Nullable)paymentOptionsDiscussion
Begin the payment flow (activate payment devices, listen for relevant events from devices)
Declared In
PPRetailTransactionContext.h
– beginRefund:amount:refundTag:
Begin the flow to issue a refund on the current invoice.
- (PPRetailTransactionContext *_Nullable)beginRefund:(BOOL)promptForCardOptions amount:(NSDecimalNumber *_Nullable)amount refundTag:(NSString *_Nullable)refundTagDiscussion
Begin the flow to issue a refund on the current invoice.
Declared In
PPRetailTransactionContext.h
– deactivateFormFactors:callback:
Deactivate form factors without ending the transaction. Once deactivated, you should re-begin the transaction to start taking payments
- (void)deactivateFormFactors:(NSArray *_Nullable)formFactors callback:(PPRetailTransactionContextCompleteHandler _Nullable)callbackDiscussion
Deactivate form factors without ending the transaction. Once deactivated, you should re-begin the transaction to start taking payments
Declared In
PPRetailTransactionContext.h
– clear:
Abort an idle transaction abandoning activated readers and all event listeners. The completed event will NOT be fired for this TransactionContext given that you have explicitly abandoned it
- (void)clear:(PPRetailTransactionContextCompleteHandler _Nullable)callbackDiscussion
Abort an idle transaction abandoning activated readers and all event listeners. The completed event will NOT be fired for this TransactionContext given that you have explicitly abandoned it
Declared In
PPRetailTransactionContext.h
– isPaymentInRetryOrProgress
Check to see if payment is in ‘retry’ state. This check helps with disconnection/connection logic when the app goes in the background.
- (BOOL)isPaymentInRetryOrProgressDiscussion
Check to see if payment is in ‘retry’ state. This check helps with disconnection/connection logic when the app goes in the background.
Declared In
PPRetailTransactionContext.h
– requestPaymentCancellation:
Request to cancel a payment. The request will only be accepted if payment is not already in progress.
- (void)requestPaymentCancellation:(PPRetailTransactionContextCancellationHandlerHandler _Nullable)handlerDiscussion
Request to cancel a payment. The request will only be accepted if payment is not already in progress.
Declared In
PPRetailTransactionContext.h
– requestDigitalCardCancellation:
Request to cancel an ongoing payment. The request will only be accepted if there is a partial digital card payment and payment is not in progress.
- (void)requestDigitalCardCancellation:(PPRetailTransactionContextVoidCompletedHandler _Nullable)voidCompletedHandlerDiscussion
Request to cancel an ongoing payment. The request will only be accepted if there is a partial digital card payment and payment is not in progress.
Declared In
PPRetailTransactionContext.h
– dropHandlers
Remove all handlers
- (void)dropHandlersDiscussion
Remove all handlers
Declared In
PPRetailTransactionContext.h
– discardPresentedCard:
Discard the presented card for non-EMV transactions only
- (void)discardPresentedCard:(PPRetailCard *_Nullable)cardDiscussion
Discard the presented card for non-EMV transactions only
Declared In
PPRetailTransactionContext.h
– continueWithDigitalCard:
Continue processing transaction with Digital Card/Code information
- (void)continueWithDigitalCard:(PPRetailDigitalCard *_Nullable)digitalCardDiscussion
Continue processing transaction with Digital Card/Code information
Declared In
PPRetailTransactionContext.h
– continueWithCard:
Continue processing a transaction - the behavior of which depends on the presented card. If it’s a magnetic card or an NFC tap, payment will be attempted and money will move (if successful). If it’s an EMV card insertion, we will start the EMV flow which includes a few calls to the server, potentially asking the user to enter a PIN, etc.
- (void)continueWithCard:(PPRetailCard *_Nullable)cardDiscussion
Continue processing a transaction - the behavior of which depends on the presented card. If it’s a magnetic card or an NFC tap, payment will be attempted and money will move (if successful). If it’s an EMV card insertion, we will start the EMV flow which includes a few calls to the server, potentially asking the user to enter a PIN, etc.
Declared In
PPRetailTransactionContext.h
– startInvoiceSync
Sync the Invoice total to the reader display. Use this function to sync invoice amount on the app to the reader. This automatic invoice syncing will stop based on the transaction state. Use ‘syncInvoiceOnce’ to do an on-demand push invoice total to the card reader display
- (void)startInvoiceSyncDiscussion
Sync the Invoice total to the reader display. Use this function to sync invoice amount on the app to the reader. This automatic invoice syncing will stop based on the transaction state. Use ‘syncInvoiceOnce’ to do an on-demand push invoice total to the card reader display
Declared In
PPRetailTransactionContext.h
– continueWithCash
Continue processing a cash transaction.
- (void)continueWithCashDiscussion
Continue processing a cash transaction.
Declared In
PPRetailTransactionContext.h
– continueWithQRC
Continue processing a QRC transaction.
- (void)continueWithQRCDiscussion
Continue processing a QRC transaction.
Declared In
PPRetailTransactionContext.h
– continueWithCheck
Continue processing a check transaction.
- (void)continueWithCheckDiscussion
Continue processing a check transaction.
Declared In
PPRetailTransactionContext.h
– setSignatureCollector:
If you acquire signatures yourself, for example from a Topaz Pen Pad or with an external camera, set this property to a handler that will be invoked when signature should be collected. Once you’ve collected the signature, call the supplied signatureReceiver with a base64 encoded JPG of the signature. Try to keep it under 100k.
- (void)setSignatureCollector:(PPRetailTransactionContextSignatureCollectorHandler _Nullable)collectorDiscussion
If you acquire signatures yourself, for example from a Topaz Pen Pad or with an external camera, set this property to a handler that will be invoked when signature should be collected. Once you’ve collected the signature, call the supplied signatureReceiver with a base64 encoded JPG of the signature. Try to keep it under 100k.
Declared In
PPRetailTransactionContext.h
– setTokenExpiredHandler:
Provide a token expiration handler if you want to handle token expirations during a transaction
- (void)setTokenExpiredHandler:(PPRetailTransactionContextTokenExpirationHandlerHandler _Nullable)expirationHandlerDiscussion
Provide a token expiration handler if you want to handle token expirations during a transaction
Declared In
PPRetailTransactionContext.h
– setCardInsertedHandler:
Provide a handler to get notified after chip card insert is detected but before EMV data is read. cardInsertedHandler.continueWithCardDataRead must be invoked to continue with transaction
- (void)setCardInsertedHandler:(PPRetailTransactionContextCardInsertedHandlerHandler _Nullable)cardInsertedHandlerDiscussion
Provide a handler to get notified after chip card insert is detected but before EMV data is read. cardInsertedHandler.continueWithCardDataRead must be invoked to continue with transaction
Declared In
PPRetailTransactionContext.h
– setCardPresentedHandler:
Provide a handler to get notified when card was presented and emv/magstripe data was read. TransactionContext.continueWithCard should be invoked to continue the payment
- (void)setCardPresentedHandler:(PPRetailTransactionContextCardPresentedHandler _Nullable)cardPresentedHandlerDiscussion
Provide a handler to get notified when card was presented and emv/magstripe data was read. TransactionContext.continueWithCard should be invoked to continue the payment
Declared In
PPRetailTransactionContext.h
– setQRCStatusHandler:
Provide a handler to get notifications for QRC Payment
- (void)setQRCStatusHandler:(PPRetailTransactionContextOnQRCStatusHandler _Nullable)qrcStatusHandlerDiscussion
Provide a handler to get notifications for QRC Payment
Declared In
PPRetailTransactionContext.h
– setCompletedHandler:
Provide a handler to get notified once transaction is complete
- (void)setCompletedHandler:(PPRetailTransactionContextTransactionCompletedHandler _Nullable)completedHandlerDiscussion
Provide a handler to get notified once transaction is complete
Declared In
PPRetailTransactionContext.h
– setVaultCompletedHandler:
Provide a handler to get notified once vault is complete
- (void)setVaultCompletedHandler:(PPRetailTransactionContextVaultCompletedHandler _Nullable)completedHandlerDiscussion
Provide a handler to get notified once vault is complete
Declared In
PPRetailTransactionContext.h
– setOfflineTransactionAdditionHandler:
Provide a handler to get offline transaction addition notification
- (void)setOfflineTransactionAdditionHandler:(PPRetailTransactionContextOfflineTransactionAddedHandler _Nullable)addedHandlerDiscussion
Provide a handler to get offline transaction addition notification
Declared In
PPRetailTransactionContext.h
– setAdditionalReceiptOptions:receiptHandler:
If you would like to display additional receipt options such as print, etc., you can provide them here. These options would be presented on the receipt screen below the Email and Text options.
- (void)setAdditionalReceiptOptions:(NSArray *_Nullable)additionalReceiptOptions receiptHandler:(PPRetailTransactionContextReceiptOptionHandlerHandler _Nullable)receiptHandlerDiscussion
If you would like to display additional receipt options such as print, etc., you can provide them here. These options would be presented on the receipt screen below the Email and Text options.
Declared In
PPRetailTransactionContext.h
– addContactlessReaderDeactivatedListener:
Add a listener for the contactlessReaderDeactivated event
- (PPRetailContactlessReaderDeactivatedSignal _Nullable)addContactlessReaderDeactivatedListener:(PPRetailContactlessReaderDeactivatedEvent _Nullable)listenerReturn Value
PPRetailContactlessReaderDeactivatedSignal an object that can be used to remove the listener when you’re done with it.
Discussion
Add a listener for the contactlessReaderDeactivated event
Declared In
PPRetailTransactionContext.h
– removeContactlessReaderDeactivatedListener:
Remove a listener for the contactlessReaderDeactivated event given the signal object that was returned from addContactlessReaderDeactivatedListener
- (void)removeContactlessReaderDeactivatedListener:(PPRetailContactlessReaderDeactivatedSignal _Nullable)listenerTokenDiscussion
Remove a listener for the contactlessReaderDeactivated event given the signal object that was returned from addContactlessReaderDeactivatedListener
Declared In
PPRetailTransactionContext.h
– addContactlessReaderActivatedListener:
Add a listener for the contactlessReaderActivated event
- (PPRetailContactlessReaderActivatedSignal _Nullable)addContactlessReaderActivatedListener:(PPRetailContactlessReaderActivatedEvent _Nullable)listenerReturn Value
PPRetailContactlessReaderActivatedSignal an object that can be used to remove the listener when you’re done with it.
Discussion
Add a listener for the contactlessReaderActivated event
Declared In
PPRetailTransactionContext.h
– removeContactlessReaderActivatedListener:
Remove a listener for the contactlessReaderActivated event given the signal object that was returned from addContactlessReaderActivatedListener
- (void)removeContactlessReaderActivatedListener:(PPRetailContactlessReaderActivatedSignal _Nullable)listenerTokenDiscussion
Remove a listener for the contactlessReaderActivated event given the signal object that was returned from addContactlessReaderActivatedListener
Declared In
PPRetailTransactionContext.h
– addPinEntryListener:
Add a listener for the pinEntry event
- (PPRetailPinEntrySignal _Nullable)addPinEntryListener:(PPRetailPinEntryEvent _Nullable)listenerReturn Value
PPRetailPinEntrySignal an object that can be used to remove the listener when you’re done with it.
Discussion
Add a listener for the pinEntry event
Declared In
PPRetailTransactionContext.h
– removePinEntryListener:
Remove a listener for the pinEntry event given the signal object that was returned from addPinEntryListener
- (void)removePinEntryListener:(PPRetailPinEntrySignal _Nullable)listenerTokenDiscussion
Remove a listener for the pinEntry event given the signal object that was returned from addPinEntryListener
Declared In
PPRetailTransactionContext.h
– addWillPresentSignatureListener:
Add a listener for the willPresentSignature event
- (PPRetailWillPresentSignatureSignal _Nullable)addWillPresentSignatureListener:(PPRetailWillPresentSignatureEvent _Nullable)listenerReturn Value
PPRetailWillPresentSignatureSignal an object that can be used to remove the listener when you’re done with it.
Discussion
Add a listener for the willPresentSignature event
Declared In
PPRetailTransactionContext.h
– removeWillPresentSignatureListener:
Remove a listener for the willPresentSignature event given the signal object that was returned from addWillPresentSignatureListener
- (void)removeWillPresentSignatureListener:(PPRetailWillPresentSignatureSignal _Nullable)listenerTokenDiscussion
Remove a listener for the willPresentSignature event given the signal object that was returned from addWillPresentSignatureListener
Declared In
PPRetailTransactionContext.h
– addReaderTippingCompletedListener:
Add a listener for the readerTippingCompleted event
- (PPRetailReaderTippingCompletedSignal _Nullable)addReaderTippingCompletedListener:(PPRetailReaderTippingCompletedEvent _Nullable)listenerReturn Value
PPRetailReaderTippingCompletedSignal an object that can be used to remove the listener when you’re done with it.
Discussion
Add a listener for the readerTippingCompleted event
Declared In
PPRetailTransactionContext.h
– removeReaderTippingCompletedListener:
Remove a listener for the readerTippingCompleted event given the signal object that was returned from addReaderTippingCompletedListener
- (void)removeReaderTippingCompletedListener:(PPRetailReaderTippingCompletedSignal _Nullable)listenerTokenDiscussion
Remove a listener for the readerTippingCompleted event given the signal object that was returned from addReaderTippingCompletedListener
Declared In
PPRetailTransactionContext.h
– addDidCompleteSignatureListener:
Add a listener for the didCompleteSignature event
- (PPRetailDidCompleteSignatureSignal _Nullable)addDidCompleteSignatureListener:(PPRetailDidCompleteSignatureEvent _Nullable)listenerReturn Value
PPRetailDidCompleteSignatureSignal an object that can be used to remove the listener when you’re done with it.
Discussion
Add a listener for the didCompleteSignature event
Declared In
PPRetailTransactionContext.h
– removeDidCompleteSignatureListener:
Remove a listener for the didCompleteSignature event given the signal object that was returned from addDidCompleteSignatureListener
- (void)removeDidCompleteSignatureListener:(PPRetailDidCompleteSignatureSignal _Nullable)listenerTokenDiscussion
Remove a listener for the didCompleteSignature event given the signal object that was returned from addDidCompleteSignatureListener
Declared In
PPRetailTransactionContext.h