{"title":"Handle the final state","category":"default","creationDate":1776961627,"content":"<h2 id=\"delegate\">Delegate<\/h2>\n<p>The\u00a0<code>transactionComplete<\/code>\u00a0delegate\u00a0is called when the transaction completes from the library perspective.<\/p>\n<p>Completion does\u00a0not\u00a0necessarily mean that a payment has been made - the transaction may also have been declined or cancelled. This can be determined by examining the given\u00a0<code>transaction<\/code>'s\u00a0status via the\u00a0<code>finalState<\/code> property.<\/p>\n<p>In case of a technical problem the\u00a0<code>finalState<\/code> property will have value UNKNOWN.<\/p>\n<p>\u00a0After this method has been called, no other methods on the delegate will be called.<\/p>\n<h3 id=\"parameters\">Parameters<\/h3>\n<table style=\"width:100%;\"><colgroup><col style=\"width: 10%\"><col style=\"width: 14%\"><col style=\"width: 7%\"><col style=\"width: 66%\"><\/colgroup><thead><tr class=\"header\"><th><p>Name<\/p><\/th><th><p>Type<\/p><\/th><th><p>Required<\/p><\/th><th><p>Description<\/p><\/th><\/tr><\/thead><tbody><tr><td><p><code>transaction<\/code><\/p><\/td><td><p>ADYTransactionData<\/p><\/td><td><p><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/p><\/td><td><p>Object containing referral data, and method to continue transaction processing with auth code.<\/p><\/td><\/tr><\/tbody><\/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)transactionComplete:(ADYTransactionData *)transaction;<\/code><\/pre>\n<h4 id=\"swift\">Swift<\/h4>\n<pre><code class=\"language-swift\">func transactionComplete(_ transaction: ADYTransactionData!)<\/code><\/pre>\n<div class=\"sc-notice note\"><div>\n<p>Receiving the transactionComplete delegate does not necessarily mean that the payment was successful. To determine this, inspect the <code>finalState<\/code>\u00a0property of the given\u00a0<code>ADYTransactionData<\/code>.<\/p>\n<\/div><\/div>","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-the-final-state-ios","articleFields":{"id":"34120834","type":"page","_expandable":{"operations":""},"status":"current"},"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-the-final-state-ios","title":"Handle the final state","content":"Delegate\nThe\u00a0transactionComplete\u00a0delegate\u00a0is called when the transaction completes from the library perspective.\nCompletion does\u00a0not\u00a0necessarily mean that a payment has been made - the transaction may also have been declined or cancelled. This can be determined by examining the given\u00a0transaction's\u00a0status via the\u00a0finalState property.\nIn case of a technical problem the\u00a0finalState property will have value UNKNOWN.\n\u00a0After this method has been called, no other methods on the delegate will be called.\nParameters\nNameTypeRequiredDescriptiontransactionADYTransactionDataObject containing referral data, and method to continue transaction processing with auth code.\nDeclaration code example\nObjective-C\n- (void)transactionComplete:(ADYTransactionData *)transaction;\nSwift\nfunc transactionComplete(_ transaction: ADYTransactionData!)\n\nReceiving the transactionComplete delegate does not necessarily mean that the payment was successful. To determine this, inspect the finalState\u00a0property of the given\u00a0ADYTransactionData.\n","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 the final state"},"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-the-final-state-ios"},"levels":8,"category":"In-person payments","category_color":"green","tags":["Handle","final","state"]}}
