{"title":"Handle transaction state changes","category":"default","creationDate":1776961627,"content":"<h2 id=\"delegate\">Delegate<\/h2>\n<p>The\u00a0<code>transactionStateChanged<\/code>\u00a0delegate is called when the state of the transaction changes.<\/p>\n<p>This method can be used to reflect the progress in the user-interface.<\/p>\n<h3 id=\"parameters\">Parameters<\/h3>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: right;\">Name<\/th>\n<th>Type<\/th>\n<th>Required<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: right;\"><code>state<\/code><\/td>\n<td>\u00a0ADYTenderState<\/td>\n<td><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td>The new transaction-processing state.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 id=\"tender-states\">Tender states<\/h2>\n<table>\n<thead>\n<tr>\n<th>State<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>ADYTenderStateInitial<\/code><\/td>\n<td>The initial state where the tender will start from.<\/td>\n<\/tr>\n<tr>\n<td><code>ADYTenderStateCreated<\/code><\/td>\n<td>The state where the tender has been created in the payment device and a transaction is born. From this state onwards, transactions will be recorded in the transaction history, independent of the final state of such transaction.<\/td>\n<\/tr>\n<tr>\n<td><code>ADYTenderStateProcessing<\/code><\/td>\n<td>The state after tender creation where the transaction is in progress.<\/td>\n<\/tr>\n<tr>\n<td><code>ADYTenderStateProvideCardDetails<\/code><\/td>\n<td>The payment device is waiting for the card details to be provided by the App.<\/td>\n<\/tr>\n<tr>\n<td><code>ADYTenderStateCardDetailsProvided<\/code><\/td>\n<td>The payment device has received the provided card details and is processing these.<\/td>\n<\/tr>\n<tr>\n<td><code>ADYTenderStateAdditionalDataAvailable<\/code><\/td>\n<td>Additional data is available and is passed to the App.<\/td>\n<\/tr>\n<tr>\n<td><code>ADYTenderStateWaitForAmountAdjustment<\/code><\/td>\n<td>The payment device is waiting for any tender updates the App might decide to, based upon the information passed to the App in the previous state.<\/td>\n<\/tr>\n<tr>\n<td><code>ADYTenderStateReferral<\/code><\/td>\n<td>The Issuing bank requests a referral (not implemented yet)<\/td>\n<\/tr>\n<tr>\n<td><code>ADYTenderStateReferralChecked<\/code><\/td>\n<td>The authorization code, as retrieved form the Issuing bank, is sent to the payment device.<\/td>\n<\/tr>\n<tr>\n<td><code>ADYTenderStateCheckSignature<\/code><\/td>\n<td>The signature needs to be recorded\/checked.<\/td>\n<\/tr>\n<tr>\n<td><code>ADYTenderStateSignatureChecked<\/code><\/td>\n<td>The signature has been recorded\/processed.<\/td>\n<\/tr>\n<tr>\n<td><code>ADYTenderStatePrintReceipt<\/code><\/td>\n<td>The receipt is provided to the App and needs to be processed.<\/td>\n<\/tr>\n<tr>\n<td><code>ADYTenderStateReceiptPrinted<\/code><\/td>\n<td>The receipt has been processed.<\/td>\n<\/tr>\n<tr>\n<td><code>ADYTenderStateWaitingForAppSelection<\/code><\/td>\n<td>The payment method is being selected.<\/td>\n<\/tr>\n<tr>\n<td><code>ADYTenderStateAppSelected<\/code><\/td>\n<td>The payment method has been selected. The selected payment method is passed to the\u00a0<code>ADYTransactionProcessorDelegate<\/code>\u00a0function\u00a0<code>transactionApplicationSelected:<\/code>.<\/td>\n<\/tr>\n<tr>\n<td><code>ADYTenderStateWaitingForPin<\/code><\/td>\n<td>The payment device is waiting for the customer to enter their PIN.<\/td>\n<\/tr>\n<tr>\n<td><code>ADYTenderStatePinDigitEntered<\/code><\/td>\n<td>The customer has entered a PIN digit. The total number of digits provided is passed to the\u00a0<code>ADYTransactionProcessorDelegate<\/code>\u00a0function\u00a0<code>transactionPinDigitEntered:<\/code>.<\/td>\n<\/tr>\n<tr>\n<td><code>ADYTenderStatePinEntered<\/code><\/td>\n<td>The customer has completed entering their PIN.<\/td>\n<\/tr>\n<tr>\n<td><code>ADYTenderStateCardSwiped<\/code><\/td>\n<td>The customer swiped a payment card through the swipe slot.<\/td>\n<\/tr>\n<tr>\n<td><code>ADYTenderStateCardInserted<\/code><\/td>\n<td>The customer inserted their card into the EMV slot.<\/td>\n<\/tr>\n<tr>\n<td><code>ADYTenderStateCardRemoved<\/code><\/td>\n<td>The customer removed their card from the EMV slot.<\/td>\n<\/tr>\n<tr>\n<td><code>ADYTenderStateAskDcc<\/code><\/td>\n<td>The customer is being asked if Dynamic Currency Conversion should be applied.<\/td>\n<\/tr>\n<tr>\n<td><code>ADYTenderStateDccAccepted<\/code><\/td>\n<td>The customer accepted the Dynamic Currency Conversion.<\/td>\n<\/tr>\n<tr>\n<td><code>ADYTenderStateDccRejected<\/code><\/td>\n<td>The customer rejected Dynamic Currency Conversion<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 id=\"final-states\">Final States<\/h2>\n<table>\n<thead>\n<tr>\n<th>State<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>ADYTenderStateApproved<\/code><\/td>\n<td>The transaction has been completed with result: APPROVED<\/td>\n<\/tr>\n<tr>\n<td><code>ADYTenderStateDeclined<\/code><\/td>\n<td>The transaction has been completed with result: DECLINED<\/td>\n<\/tr>\n<tr>\n<td><code>ADYTenderStateCancelled<\/code><\/td>\n<td>The transaction has been completed with result: CANCELLED<\/td>\n<\/tr>\n<tr>\n<td><code>ADYTenderStateError<\/code><\/td>\n<td>The transaction has been completed with result: ERROR<\/td>\n<\/tr>\n<tr>\n<td><code>ADYTenderStateUnknown<\/code><\/td>\n<td>The transaction has been completed with the result: UNKNOWN. To fetch the final state of the transaction, query the payment device for the transaction details by calling\u00a0<code>- [ADYDevice fetchLastTransactionDataWithCompletion:]<\/code> or\u00a0<code>- [ADYDevice fetchTransactionDataWithTenderReference:]<\/code>.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3 id=\"declaration-code-example\">Declaration code example<\/h3>\n<h4 id=\"objective-c\">Objective-C<\/h4>\n<pre><code class=\"language-objectivec\">- (void)transactionStateChanged:(ADYTenderState)state;<\/code><\/pre>\n<h4 id=\"swift\">Swift<\/h4>\n<pre><code class=\"language-swift\">optional func transactionStateChanged(_ state: Any!)<\/code><\/pre>","url":"https:\/\/docs.adyen.com\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/ios-integration\/key-steps-ios\/process-a-basic-transaction-ios\/handle-transaction-state-changes-ios","articleFields":{"id":"34120996","type":"page","_expandable":{"operations":""},"status":"current","last_edit_on":"12-01-2021 16:00"},"algolia":{"url":"https:\/\/docs.adyen.com\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/ios-integration\/key-steps-ios\/process-a-basic-transaction-ios\/handle-transaction-state-changes-ios","title":"Handle transaction state changes","content":"Delegate\nThe\u00a0transactionStateChanged\u00a0delegate is called when the state of the transaction changes.\nThis method can be used to reflect the progress in the user-interface.\nParameters\n\n\n\nName\nType\nRequired\nDescription\n\n\n\n\nstate\n\u00a0ADYTenderState\n\nThe new transaction-processing state.\n\n\n\nTender states\n\n\n\nState\nDescription\n\n\n\n\nADYTenderStateInitial\nThe initial state where the tender will start from.\n\n\nADYTenderStateCreated\nThe state where the tender has been created in the payment device and a transaction is born. From this state onwards, transactions will be recorded in the transaction history, independent of the final state of such transaction.\n\n\nADYTenderStateProcessing\nThe state after tender creation where the transaction is in progress.\n\n\nADYTenderStateProvideCardDetails\nThe payment device is waiting for the card details to be provided by the App.\n\n\nADYTenderStateCardDetailsProvided\nThe payment device has received the provided card details and is processing these.\n\n\nADYTenderStateAdditionalDataAvailable\nAdditional data is available and is passed to the App.\n\n\nADYTenderStateWaitForAmountAdjustment\nThe payment device is waiting for any tender updates the App might decide to, based upon the information passed to the App in the previous state.\n\n\nADYTenderStateReferral\nThe Issuing bank requests a referral (not implemented yet)\n\n\nADYTenderStateReferralChecked\nThe authorization code, as retrieved form the Issuing bank, is sent to the payment device.\n\n\nADYTenderStateCheckSignature\nThe signature needs to be recorded\/checked.\n\n\nADYTenderStateSignatureChecked\nThe signature has been recorded\/processed.\n\n\nADYTenderStatePrintReceipt\nThe receipt is provided to the App and needs to be processed.\n\n\nADYTenderStateReceiptPrinted\nThe receipt has been processed.\n\n\nADYTenderStateWaitingForAppSelection\nThe payment method is being selected.\n\n\nADYTenderStateAppSelected\nThe payment method has been selected. The selected payment method is passed to the\u00a0ADYTransactionProcessorDelegate\u00a0function\u00a0transactionApplicationSelected:.\n\n\nADYTenderStateWaitingForPin\nThe payment device is waiting for the customer to enter their PIN.\n\n\nADYTenderStatePinDigitEntered\nThe customer has entered a PIN digit. The total number of digits provided is passed to the\u00a0ADYTransactionProcessorDelegate\u00a0function\u00a0transactionPinDigitEntered:.\n\n\nADYTenderStatePinEntered\nThe customer has completed entering their PIN.\n\n\nADYTenderStateCardSwiped\nThe customer swiped a payment card through the swipe slot.\n\n\nADYTenderStateCardInserted\nThe customer inserted their card into the EMV slot.\n\n\nADYTenderStateCardRemoved\nThe customer removed their card from the EMV slot.\n\n\nADYTenderStateAskDcc\nThe customer is being asked if Dynamic Currency Conversion should be applied.\n\n\nADYTenderStateDccAccepted\nThe customer accepted the Dynamic Currency Conversion.\n\n\nADYTenderStateDccRejected\nThe customer rejected Dynamic Currency Conversion\n\n\n\nFinal States\n\n\n\nState\nDescription\n\n\n\n\nADYTenderStateApproved\nThe transaction has been completed with result: APPROVED\n\n\nADYTenderStateDeclined\nThe transaction has been completed with result: DECLINED\n\n\nADYTenderStateCancelled\nThe transaction has been completed with result: CANCELLED\n\n\nADYTenderStateError\nThe transaction has been completed with result: ERROR\n\n\nADYTenderStateUnknown\nThe transaction has been completed with the result: UNKNOWN. To fetch the final state of the transaction, query the payment device for the transaction details by calling\u00a0- [ADYDevice fetchLastTransactionDataWithCompletion:] or\u00a0- [ADYDevice fetchTransactionDataWithTenderReference:].\n\n\n\nDeclaration code example\nObjective-C\n- (void)transactionStateChanged:(ADYTenderState)state;\nSwift\noptional func transactionStateChanged(_ state: Any!)","type":"page","locale":"pt","boost":13,"hierarchy":{"lvl0":"Home","lvl1":"Terminais","lvl2":"Deprecation of classic libraries","lvl3":"Library integrations","lvl4":"iOS integration","lvl5":"Key steps","lvl6":"Process a basic transaction","lvl7":"Handle transaction state changes"},"hierarchy_url":{"lvl0":"https:\/\/docs.adyen.com\/pt","lvl1":"https:\/\/docs.adyen.com\/pt\/point-of-sale","lvl2":"https:\/\/docs.adyen.com\/pt\/point-of-sale\/classic-library-deprecation","lvl3":"https:\/\/docs.adyen.com\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations","lvl4":"https:\/\/docs.adyen.com\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/ios-integration","lvl5":"https:\/\/docs.adyen.com\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/ios-integration\/key-steps-ios","lvl6":"https:\/\/docs.adyen.com\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/ios-integration\/key-steps-ios\/process-a-basic-transaction-ios","lvl7":"\/pt\/point-of-sale\/classic-library-deprecation\/classic-library-integrations\/ios-integration\/key-steps-ios\/process-a-basic-transaction-ios\/handle-transaction-state-changes-ios"},"levels":8,"category":"In-person payments","category_color":"green","tags":["Handle","transaction","state","changes"]}}
